/* Aurelia Fine Jewellery -- design tokens */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #f2e6d6;
  --ink-deep: #fbf4ea;
  --plum: #2a1620;
  --plum-deep: #1c0f16;
  --ivory: #14100e;
  --stone: #1d1714;
  --paper: #1a1512;
  --gold: #c9a76a;
  --gold-light: #e6cf9f;
  --gold-dark: #a5824a;
  --line: rgba(242, 230, 214, 0.13);
  --line-on-dark: rgba(250, 246, 239, 0.18);
  --muted: #b3a596;
  --on-dark-muted: #cdb9aa;
  --container: 1220px;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Jost", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Kill sideways wiggle: the closed mobile menu (translateX(100%)) inside the
   backdrop-filter header contributes layout overflow like an absolute box,
   making the document ~2x viewport wide on phones. clip > hidden. */
html { overflow-x: hidden; overflow-x: clip; }
::selection { background: var(--gold); color: var(--ink-deep); }
:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--gold-light); border: 3px solid var(--ivory); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; color: var(--ink); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1.1em;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
.on-dark, .on-dark h1, .on-dark h2, .on-dark h3, .on-dark p { color: var(--ink); }
.on-dark .eyebrow { color: var(--gold-light); }
.on-dark .lede { color: var(--on-dark-muted); }

/* Buttons -- hover fill is a transform:scaleX sweep on a negative z-index
   pseudo-element, not an animated background, so it stays within the
   transform/opacity motion rule. The pseudo paints behind the button's own
   text by stacking order (z-index:-1 within the button's own stacking
   context), so no wrapping <span> is needed around the label. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--ink);
  isolation: isolate;
  transition: color 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(.65, 0, .35, 1);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn:hover, .btn:focus-visible { color: var(--ink-deep); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink-deep); }
.btn-gold::before { background: var(--ink); }
.btn-gold:hover, .btn-gold:focus-visible { color: var(--ink); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--ink); }
.on-dark .btn-ghost::before { background: var(--ivory); }
.on-dark .btn-ghost:hover, .on-dark .btn-ghost:focus-visible { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .btn::before { transition: none; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 14, 12, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand-mark { display: flex; align-items: center; gap: 10px; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  position: relative;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 0;
}
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-dark); }
.nav a:hover:not(.nav-cta)::after, .nav a[aria-current="page"]:not(.nav-cta)::after { transform: scaleX(1); }
.nav-cta { padding: 13px 22px; border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .nav a::after { transition: none; }
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 24px; height: 1.5px; background: var(--ink); display: block; }

/* Section rhythm helpers */
section { padding: 100px 0; }
.bg-ivory { background: var(--ivory); }
.bg-stone { background: var(--stone); }
.bg-ink { background: var(--ink); }
.bg-plum { background: linear-gradient(155deg, var(--plum) 0%, var(--plum-deep) 100%); }
.divider-gold { width: 64px; height: 2px; background: var(--gold); border: 0; margin: 0 0 28px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Hero */
.hero {
  position: relative;
  min-height: 760px;
  display: flex;
  align-items: flex-end;
  color: var(--ink);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,10,12,0.35) 0%, rgba(16,10,12,0.55) 55%, rgba(16,10,12,0.92) 100%);
  z-index: -1;
}
.hero-inner { padding: 80px 0 88px; max-width: 780px; }
.hero-inner h1 em { font-style: italic; color: var(--gold-light); }
.hero-cta-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 34px; }
.trust-line { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }

/* Hero title line-reveal mask: the mask always clips, the inner line is only
   pre-hidden once JS confirms it can animate it back in (see motion block below) */
.line-mask { display: block; overflow: hidden; }
.hero-title .line-inner { display: block; }
.hero-media img { transform: scale(1); }

/* Motion entrance states -- only applied once main.js confirms GSAP loaded
   (.motion-ready) *and* the user hasn't asked for reduced motion, so a no-JS
   visitor or a reduced-motion visitor always gets the fully visible layout. */
@media (prefers-reduced-motion: no-preference) {
  .js.motion-ready .hero-title .line-inner { transform: translateY(110%); }
  .js.motion-ready .hero .eyebrow,
  .js.motion-ready .hero .lede,
  .js.motion-ready .hero-cta-row > * {
    opacity: 0;
    transform: translateY(14px);
  }
  .js.motion-ready .hero-media img { transform: scale(1.08); }
  .js.motion-ready .stagger-group > * {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* Kill switch: if GSAP hasn't finished the entrance/reveal within a couple
   of seconds (starved rAF, script failure, etc.) main.js adds this class and
   every motion-hidden element is forced fully visible, no matter what GSAP's
   internal tween state claims. See the "Safety net" comment in main.js. */
.motion-fallback .hero-title .line-inner,
.motion-fallback .hero-media img,
.motion-fallback .hero .eyebrow,
.motion-fallback .hero .lede,
.motion-fallback .hero-cta-row > *,
.motion-fallback .stagger-group > * {
  opacity: 1 !important;
  transform: none !important;
}

/* Pillars grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
  margin-top: 56px;
}
.pillar-card {
  background: var(--ivory);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease;
}
.pillar-card:hover { transform: translateY(-6px); z-index: 1; }
.pillar-media { aspect-ratio: 4/5; overflow: hidden; position: relative; }
.pillar-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.pillar-card:hover .pillar-media img { transform: scale(1.05); }
.pillar-body { padding: 34px 32px 40px; flex: 1; display: flex; flex-direction: column; }
.pillar-body h3 { margin-bottom: 0.4em; }
.pillar-body p { color: var(--muted); flex: 1; }
.pillar-link {
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-dark); border-bottom: 1px solid var(--gold-dark); align-self: flex-start; padding-bottom: 2px;
}

/* Horizontal scroll process band */
.process-scroll {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 8px 0 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.process-scroll::-webkit-scrollbar { height: 5px; }
.process-scroll::-webkit-scrollbar-thumb { background: var(--line); }
.process-card {
  scroll-snap-align: start;
  min-width: 300px;
  flex: 0 0 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 34px 30px;
  transition: transform 0.35s ease;
}
.process-card:hover { transform: translateY(-6px); }
.process-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.4em;
}
.process-card p { color: var(--muted); margin-bottom: 0; }

/* Asymmetric split */
.split {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 0;
  align-items: stretch;
}
.split.reverse { grid-template-columns: 3fr 2fr; }
.split.reverse .split-media { order: 2; }
.split-media { overflow: hidden; position: relative; }
.split-media img { width: 100%; height: 100%; object-fit: cover; min-height: 380px; }
.split-copy { display: flex; flex-direction: column; justify-content: center; padding: 64px; }

/* Brand-tone overlay: a single recipe applied to every content photo so
   images from different stock sources read as one shoot. Multiply blend
   warms/darkens toward the ink/plum hue without crushing already-dark shots. */
.pillar-media img, .split-media img {
  filter: saturate(0.94) contrast(1.03);
}
.pillar-media::after, .split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(51, 20, 29, 0.24) 0%, rgba(28, 17, 20, 0.1) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Full-bleed dark overlay CTA block */
.overlay-block {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  color: var(--ink);
  overflow: hidden;
}
.overlay-media { position: absolute; inset: 0; z-index: -2; }
.overlay-media img { width: 100%; height: 100%; object-fit: cover; }
.overlay-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,7,8,0.72) 0%, rgba(12,7,8,0.8) 100%);
  z-index: -1;
}
.overlay-copy {
  max-width: 640px;
  background: rgba(10, 6, 7, 0.7);
  padding: 40px 44px;
  border-left: 2px solid var(--gold);
}
.overlay-copy blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin: 0 0 0.6em;
  line-height: 1.4;
}

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.testimonial-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease;
}
.testimonial-card:hover { transform: translateY(-6px); }
.stars { color: var(--gold); letter-spacing: 3px; margin-bottom: 16px; font-size: 0.9rem; }
.testimonial-card p.quote { font-style: italic; color: var(--ink); flex: 1; }
.testimonial-name { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.placeholder-flag {
  display: inline-block;
  margin-top: 60px;
  font-size: 0.76rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 14px 20px;
  max-width: 640px;
}

/* FAQ */
.faq-wrap { max-width: 760px; margin: 50px auto 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 26px 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--ink);
}
.faq-q .plus { font-family: var(--font-body); font-size: 1.4rem; color: var(--gold-dark); transition: transform 0.25s ease; }
.faq-item[open] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 4px 26px; color: var(--muted); max-width: 62ch; }

/* Final CTA banner */
.cta-banner {
  padding: 110px 0;
  text-align: center;
  background: var(--ink);
  color: var(--ink);
}
.cta-banner h2 { color: var(--ink); }
.cta-banner .lede { color: var(--on-dark-muted); margin-left: auto; margin-right: auto; }
.cta-banner-row { display: flex; justify-content: center; gap: 20px; margin-top: 36px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--ink-deep); color: var(--on-dark-muted); padding: 80px 0 30px; }
.site-footer p { color: inherit; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line-on-dark); }
.footer-brand .brand-word { color: var(--ink); }
.footer-tagline { margin: 16px 0 20px; max-width: 30ch; }
.footer-social { display: flex; gap: 18px; }
.footer-social a, .footer-col a {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-block;
}
.footer-social a::after, .footer-col a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.footer-social a:hover, .footer-col a:hover { color: var(--gold-light); }
.footer-social a:hover::after, .footer-col a:hover::after { transform: scaleX(1); }
.footer-col h3 { font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); font-weight: 600; margin-bottom: 18px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-ghost {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 15vw, 11.5rem);
  line-height: 0.8;
  letter-spacing: 0.01em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(250, 246, 239, 0.14);
  margin: 40px 0 0;
  user-select: none;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .footer-social a::after, .footer-col a::after { transition: none; }
}
address { font-style: normal; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 26px; font-size: 0.78rem; }

/* Inner page hero (non-home) */
.page-hero {
  padding: 180px 0 90px;
  background: var(--stone);
  position: relative;
}
.page-hero h1 { max-width: 16ch; }

/* Services page detail rows */
.service-detail { padding: 90px 0; }
.service-detail:nth-child(even) { background: var(--stone); }

/* Values grid (about) */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); margin-top: 50px; }
.value-card { background: var(--ivory); padding: 40px 28px; transition: transform 0.35s ease; position: relative; }
.value-card:hover { transform: translateY(-6px); z-index: 1; }
.value-num { font-family: var(--font-display); color: var(--gold); font-size: 1.2rem; margin-bottom: 0.6em; }
@media (prefers-reduced-motion: reduce) {
  .pillar-card, .process-card, .testimonial-card, .value-card,
  .pillar-card:hover, .process-card:hover, .testimonial-card:hover, .value-card:hover,
  .pillar-media img, .pillar-card:hover .pillar-media img {
    transition: none;
    transform: none;
  }
}

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.form-row input, .form-row select, .form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.map-placeholder {
  aspect-ratio: 4/3;
  background: var(--stone);
  border: 1px dashed var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 30px;
}

/* Reveal (transform-only per prior CLS/flash lesson: opacity always 1) */
.reveal { transform: translateY(20px); transition: transform 0.7s ease; }
.reveal.in-view { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, html { transition: none !important; scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1000px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split-media img { min-height: 320px; }
  .split.reverse .split-media { order: 0; }
  .split-copy { padding: 48px 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 22px; }
  section { padding: 72px 0; }
  .nav {
    position: fixed;
    /* .site-header has backdrop-filter (frosted glass) -> it becomes the
       containing block for position:fixed children, so bottom:0 would resolve
       against the ~85px header box and collapse this menu to ~60px (items below
       the first get cut off). Size from the viewport (dvh) instead. */
    top: 84px; left: 0; right: 0; bottom: auto;
    height: calc(100vh - 84px);
    height: calc(100dvh - 84px);
    background: var(--ivory);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 22px calc(30px + env(safe-area-inset-bottom));
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .hero { min-height: 600px; }
  .hero-inner { padding: 60px 0 64px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .values-grid { grid-template-columns: 1fr; }
  .footer-ghost { font-size: clamp(2.6rem, 16vw, 5rem); }
}
