/* ══════════════════════════════════════════════════════════
   Shirin — Fine Jewellery · custom styles
   ══════════════════════════════════════════════════════════ */

html {
  scrollbar-width: thin; scrollbar-color: #B98D3C #041B14;
  -webkit-text-size-adjust: 100%;   /* iOS: no surprise font inflation in landscape */
  text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(207,167,80,.18);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* nothing may push the page sideways on a narrow screen */
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #041B14; }
::-webkit-scrollbar-thumb { background: #96702E; border-radius: 99px; }
:focus-visible { outline: 2px solid #CFA750; outline-offset: 3px; }

/* body scroll lock while the mobile drawer or the lightbox is open.
   position:fixed (not just overflow:hidden) — iOS Safari ignores the latter.
   main.js stores/restores the scroll offset around it. */
body.nav-locked { position: fixed; width: 100%; overflow: hidden; }

/* full-height hero that respects the mobile browser's shrinking toolbar */
.hero-screen { min-height: 100vh; }
@supports (min-height: 100svh) { .hero-screen { min-height: 100svh; } }

/* ── navigation ── */
#site-nav.nav-scrolled {
  background: rgba(4,27,20,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(207,167,80,.15);
}
#site-nav.nav-scrolled .nav-bar { height: 3.9rem; }
@media (min-width: 1024px) { #site-nav.nav-scrolled .nav-bar { height: 4.5rem; } }
#site-nav.nav-scrolled .nav-logo { height: 2rem; }
@media (min-width: 1024px) { #site-nav.nav-scrolled .nav-logo { height: 2.75rem; } }
.nav-bar, .nav-logo { transition: height .4s cubic-bezier(.22,1,.36,1); }

.nav-link {
  position: relative;
  font-size: .72rem; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase;
  color: rgba(250,248,242,.85);
  padding: .4rem 0;
  transition: color .3s;
}
.nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, #B98D3C, #E5CD8C, #B98D3C);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.nav-link:hover, .nav-link-active { color: #E5CD8C; }
.nav-link:hover::after, .nav-link-active::after { transform: scaleX(1); transform-origin: left; }

/* ── burger (phones + tablets, i.e. below 1024px) ── */
.menu-btn {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;                 /* full-size tap target */
  margin-right: -8px;                        /* keeps the icon optically on the edge */
  border: 0; background: none; cursor: pointer;
}
.menu-line { display: block; height: 1px; width: 24px; background: #DABB6B; transition: width .3s ease; }
.menu-line:nth-child(2) { width: 17px; }
.menu-btn:hover .menu-line:nth-child(2) { width: 24px; }

/* ── mobile drawer ── */
.mobile-nav { position: fixed; inset: 0; z-index: 100; }
.mobile-nav[hidden] { display: none; }
.mobile-nav-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,27,20,.72);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s ease;
}
.mobile-panel {
  position: absolute; inset: 0 0 0 auto;
  display: flex; flex-direction: column;
  width: min(86vw, 360px);
  background: linear-gradient(170deg, #07271E 0%, #041B14 100%);
  border-left: 1px solid rgba(207,167,80,.22);
  box-shadow: -30px 0 60px -30px rgba(0,0,0,.8);
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22,1,.36,1);
  padding: max(1rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) 1.25rem;
  overflow-y: auto;                          /* short screens stay reachable */
  overscroll-behavior: contain;
}
.mobile-nav.is-open .mobile-nav-backdrop { opacity: 1; }
.mobile-nav.is-open .mobile-panel { transform: translateX(0); }

.mobile-panel-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(207,167,80,.18);
}
.menu-close {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  border: 1px solid rgba(207,167,80,.35); border-radius: 999px;
  background: none; color: #DABB6B; cursor: pointer;
  transition: background .25s, border-color .25s, color .25s;
}
.menu-close:hover { background: rgba(207,167,80,.12); border-color: #CFA750; color: #E5CD8C; }

.mobile-links { display: flex; flex-direction: column; padding: .5rem 0; }
.mobile-link {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 52px; padding: .35rem .25rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem; color: #FAF8F2;
  border-bottom: 1px solid rgba(250,248,242,.07);
  transition: color .25s, padding-left .25s;
}
.mobile-link svg { opacity: 0; transform: translateX(-6px); transition: all .25s; }
.mobile-link:hover, .mobile-link-active { color: #E5CD8C; padding-left: .5rem; }
.mobile-link:hover svg, .mobile-link-active svg { opacity: .8; transform: translateX(0); }

.mobile-panel-foot { margin-top: auto; padding-top: 1.5rem; }
.mobile-panel-foot .btn { width: 100%; padding: .95rem 1rem; }
.mobile-meta {
  display: flex; flex-direction: column; gap: .35rem;
  margin-top: 1.1rem; text-align: center;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(250,248,242,.45);
}
.mobile-meta a { color: rgba(250,248,242,.55); word-break: break-word; }
.mobile-meta a:hover { color: #E5CD8C; }

@media (prefers-reduced-motion: reduce) {
  .mobile-panel, .mobile-nav-backdrop { transition: none; }
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .9rem 1.6rem;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  transition: all .4s cubic-bezier(.22,1,.36,1);
  cursor: pointer; text-align: center;
  min-height: 46px;                         /* comfortable tap target */
}
@media (min-width: 640px) {
  .btn { padding: 1rem 2.2rem; font-size: .7rem; letter-spacing: .28em; white-space: nowrap; }
}
.btn svg { flex: none; }
.btn-gold {
  color: #041B14;
  background: linear-gradient(120deg, #B98D3C 0%, #E5CD8C 45%, #CFA750 100%);
  background-size: 200% 100%;
}
.btn-gold:hover { background-position: 100% 0; }
.btn-outline-light { color: #FAF8F2; border: 1px solid rgba(207,167,80,.5); }
.btn-outline-light:hover { background: rgba(207,167,80,.12); border-color: #CFA750; color: #E5CD8C; }
.btn-outline-dark { color: #0B382B; border: 1px solid rgba(11,56,43,.35); }
.btn-outline-dark:hover { background: #0B382B; color: #E5CD8C; border-color: #0B382B; }

/* ── typography helpers ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .64rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 1.8rem; height: 1px; background: currentColor; opacity: .6; }
@media (min-width: 640px) {
  .eyebrow { font-size: .68rem; gap: .9rem; letter-spacing: .32em; }
  .eyebrow::before { width: 2.6rem; }
}

.gold-text {
  background: linear-gradient(115deg, #96702E 0%, #E5CD8C 40%, #CFA750 65%, #96702E 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* small caps label that must not blow up its column on a phone */
.stat-label { font-size: .6rem; letter-spacing: .14em; }
@media (min-width: 640px) { .stat-label { font-size: .625rem; letter-spacing: .28em; } }

/* ── framed images ── */
.frame-gold {
  position: relative;
  overflow: hidden;
  background: #07271E;
}
.frame-gold img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* loading state: emerald shimmer + gold diamond, image fades in when ready.
   Scoped to html.js-anim so nothing stays hidden if JS ever fails. */
html.js-anim .frame-gold::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 30 12 16 30 2 12 16 2Z' fill='none' stroke='%23CFA750' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M2 12h28M16 2l-6 10 6 18 6-18-6-10' fill='none' stroke='%23CFA750' stroke-width='.7' opacity='.35'/%3E%3C/svg%3E"),
    linear-gradient(110deg, #07271E 25%, #0C3B2E 42%, #12503F 50%, #0C3B2E 58%, #07271E 75%);
  background-repeat: no-repeat, no-repeat;
  background-size: 36px 36px, 200% 100%;
  background-position: center, 160% 0;
  animation: img-shimmer 1.7s ease-in-out infinite;
  opacity: 1;
  transition: opacity .5s ease .05s;
  pointer-events: none;
}
html.js-anim .frame-gold img { opacity: 0; transition: opacity .7s ease; }
html.js-anim .frame-gold.img-loaded::before { opacity: 0; animation-play-state: paused; }
html.js-anim .frame-gold.img-loaded img { opacity: 1; }
@keyframes img-shimmer {
  to { background-position: center, -160% 0; }
}
@media (prefers-reduced-motion: reduce) {
  html.js-anim .frame-gold::before { animation: none; }
}
.frame-border {
  position: absolute; inset: .45rem;
  border: 1px solid rgba(207,167,80,.5);
  pointer-events: none; z-index: 2;
}
@media (min-width: 640px) { .frame-border { inset: .7rem; } }

/* ── portfolio cards ── */
.work-card { position: relative; cursor: pointer; overflow: hidden; }
.work-card img {
  width: 100%; display: block;
  transition: transform .9s cubic-bezier(.22,1,.36,1);
}
.work-card:hover img { transform: scale(1.045); }
.work-veil {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-end;
  padding: 1.3rem;
  background: linear-gradient(to top, rgba(4,27,20,.75) 0%, rgba(4,27,20,.1) 45%, transparent 65%);
  opacity: 0; transition: opacity .5s;
}
.work-card:hover .work-veil { opacity: 1; }
/* touch devices never hover — show a light hint instead of nothing */
@media (hover: none) {
  .work-veil { opacity: .85; background: linear-gradient(to top, rgba(4,27,20,.55) 0%, transparent 45%); }
  .work-card:hover img { transform: none; }
}

/* ── filter pills ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; }
.filter-btn {
  padding: .6rem 1.1rem;
  font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid rgba(11,56,43,.25); color: #0B382B;
  transition: all .35s; white-space: nowrap;
}
@media (min-width: 640px) { .filter-btn { padding: .55rem 1.4rem; font-size: .68rem; letter-spacing: .24em; } }
.filter-btn:hover { border-color: #CFA750; color: #96702E; }
.filter-btn.filter-active { background: #0B382B; color: #E5CD8C; border-color: #0B382B; }
/* on phones the pills become one swipeable row instead of four stacked lines */
@media (max-width: 639px) {
  .filter-bar {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
    margin: 0 -1.25rem; padding: 0 1.25rem .5rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-btn { scroll-snap-align: start; flex: none; }
}

/* ── footer ── */
.footer-heading { font-size: .68rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: #CFA750; }
.footer-link { transition: color .3s; word-break: break-word; }
.footer-link:hover { color: #E5CD8C; }
.social-btn {
  display: flex; width: 2.75rem; height: 2.75rem; flex: none;
  align-items: center; justify-content: center;
  border: 1px solid rgba(207,167,80,.35); border-radius: 9999px;
  color: #CFA750; transition: all .35s;
}
.social-btn:hover { background: rgba(207,167,80,.12); border-color: #CFA750; }

/* ── lightbox ── */
#lightbox { display: flex; }
#lightbox.lightbox-open { opacity: 1; pointer-events: auto; }
#lightbox .lightbox-scroll {
  width: 100%; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 4.5rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
}
#lightbox figure { margin: 0 auto; width: 100%; max-width: 48rem; }
#lightbox-img {
  max-height: 56vh; max-width: 100%; width: auto; height: auto;
  margin: 0 auto; display: block;
}
@media (min-width: 640px) { #lightbox-img { max-height: 68vh; } }
#lightbox-close {
  position: absolute; z-index: 2;
  top: max(1rem, env(safe-area-inset-top)); right: 1rem;
  width: 44px; height: 44px;
}
@media (min-width: 640px) { #lightbox-close { top: 1.5rem; right: 1.5rem; width: 3rem; height: 3rem; } }
.lightbox-nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(207,167,80,.3); color: #DABB6B;
  background: rgba(4,27,20,.45); transition: all .3s;
}
.lightbox-nav:hover { background: rgba(207,167,80,.15); border-color: #CFA750; color: #E5CD8C; }
.lightbox-prev { left: .5rem; }
.lightbox-next { right: .5rem; }
@media (min-width: 640px) { .lightbox-prev { left: 1.5rem; } .lightbox-next { right: 1.5rem; } }

/* ── misc ── */
.divider-gold { height: 1px; background: linear-gradient(90deg, transparent, rgba(207,167,80,.5), transparent); }

/* elements animated in by JS start hidden (JS adds the class) */
html.js-anim [data-reveal] { opacity: 0; }
/* safety net: if a reveal never fires (odd viewport, ScrollTrigger miss), show it */
html.js-anim.reveal-failsafe [data-reveal] { opacity: 1 !important; }

/* reCAPTCHA badge hidden (admin login shows its own notice) */
.grecaptcha-badge { visibility: hidden; }

/* ── blog ── */
.blog-card { display: block; }
.blog-card .frame-gold { aspect-ratio: 16/10; }
.blog-card h3 { transition: color .3s; }
.blog-card:hover h3 { color: #96702E; }

.prose { font-weight: 300; line-height: 1.8; color: rgba(7,39,30,.78); overflow-wrap: break-word; }
.prose p { margin: 0 0 1.35rem; }
.prose h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem; font-weight: 500; color: #07271E;
  margin: 2.1rem 0 .9rem;
}
@media (min-width: 640px) { .prose { line-height: 1.85; } .prose h2 { font-size: 1.6rem; margin: 2.4rem 0 1rem; } }
.prose em { font-style: italic; }
.prose strong { font-weight: 500; color: #0B382B; }
.prose a { color: #96702E; text-decoration: underline; text-underline-offset: 3px; }
.prose img { display: block; margin: 1.6rem auto; }
.prose blockquote {
  border-left: 2px solid #CFA750; padding-left: 1.1rem; margin: 1.6rem 0;
  font-family: "Playfair Display", Georgia, serif; font-style: italic; color: #0B382B;
}
@media (min-width: 640px) { .prose blockquote { padding-left: 1.4rem; margin: 1.8rem 0; } }

/* long words (e-mail addresses, URLs) must never widen a phone screen */
.break-anywhere { overflow-wrap: anywhere; }
