/* ===========================================================
   FRANK MUGARURA — Luxury brand site
   Palette & system inspired by emerald silk + champagne gold
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Hanken+Grotesk:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');

/* ---------- THEME TOKENS ---------- */
/* Onyx (dark) — default. Charcoal base, warm ivory ink, brushed champagne + deep navy. */
:root,
[data-direction="onyx"] {
  --bg:        #121317;
  --bg-2:      #16181D;
  --surface:   #1B1E24;
  --surface-2: #23272E;
  --ink:       #F2EFE8;
  --ink-soft:  #B0AEA6;
  --ink-mute:  #797873;
  --gold:      #C3A368;
  --gold-soft: #DBC498;
  --gold-deep: #9A7E4B;
  --emerald:   #1C2740;
  --line:      rgba(195,163,104,0.22);
  --line-soft: rgba(242,239,232,0.09);
  --card:      #181B21;
  --card-hi:   #21252C;
  --hero-veil: linear-gradient(180deg, rgba(10,11,14,.10) 0%, rgba(10,11,14,.45) 60%, var(--bg) 100%);
  --shadow:    0 30px 80px -40px rgba(0,0,0,.85);
}

/* Stone (light) — warm ivory paper, charcoal ink. */
[data-direction="stone"] {
  --bg:        #EFEAE0;
  --bg-2:      #E7E0D2;
  --surface:   #F8F4ED;
  --surface-2: #F2ECE1;
  --ink:       #191A1E;
  --ink-soft:  #555550;
  --ink-mute:  #8A887F;
  --gold:      #997A3B;
  --gold-soft: #B4925A;
  --gold-deep: #7C6224;
  --emerald:   #24314B;
  --line:      rgba(25,26,30,0.16);
  --line-soft: rgba(25,26,30,0.08);
  --card:      #F8F4ED;
  --card-hi:   #FFFFFF;
  --hero-veil: linear-gradient(180deg, rgba(239,234,224,.10) 0%, rgba(239,234,224,.45) 62%, var(--bg) 100%);
  --shadow:    0 30px 70px -42px rgba(40,35,22,.40);
}

/* ---------- TYPE TOKENS ---------- */
:root {
  --serif: 'Cormorant Garamond', Georgia, serif;
  --serif-alt: 'Playfair Display', Georgia, serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: var(--serif);
  --maxw: 1280px;
  --pad: clamp(22px, 5vw, 96px);
  --motion: 1; /* toggled by tweak; 0 disables decorative motion */
}
@media (max-width: 600px){ :root { --pad: 26px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: clip;
  transition: background .6s ease, color .6s ease;
}
::selection { background: var(--gold); color: #14110a; }

/* Site-wide cursor glow — gold light that follows the pointer, strongest over dark backgrounds */
#cursor-glow {
  position: fixed; top: 0; left: 0; width: 520px; height: 520px;
  margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none;
  z-index: 75; opacity: 0; transition: opacity .5s ease; will-change: transform;
  background: radial-gradient(circle, rgba(195,163,104,.20) 0%, rgba(195,163,104,.09) 38%, rgba(195,163,104,0) 70%);
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: reduce) { #cursor-glow { display: none; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- REUSABLE ATOMS ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
  display: inline-block;
  opacity: .8;
}

.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.01em;
  font-size: clamp(40px, 7vw, 104px);
  margin: 0;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--gold); font-weight: 500; }

h2.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
}
.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 56ch;
  line-height: 1.7;
}

.btn {
  --bg-btn: var(--gold);
  display: inline-flex; align-items: center; gap: 12px; white-space: nowrap;
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase;
  color: #14110a; background: var(--bg-btn);
  padding: 16px 30px; border-radius: 2px; border: 1px solid var(--gold);
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s, color .5s;
  box-shadow: 0 12px 30px -16px rgba(201,162,75,.7);
}
.btn span { position: relative; z-index: 1; transition: color .5s; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--ink); transform: translateY(101%);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 20px 44px -18px rgba(201,162,75,.6); }
.btn:hover::after { transform: translateY(0); }
.btn:hover span { color: var(--gold); }
.btn .arrow { transition: transform .5s; }
.btn:hover .arrow { transform: translateX(5px); }

.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); box-shadow: none;
}
.btn--ghost::after { background: var(--gold); }
.btn--ghost:hover span { color: #14110a; }

/* link with animated gold underline */
.ul-link { position: relative; display: inline-block; }
.ul-link::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.ul-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s cubic-bezier(.2,.8,.2,1), transform 1s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  transition: background .5s ease, padding .5s ease, border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
  padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { height: 56px; width: auto; display: block; transition: opacity .4s ease, filter .55s cubic-bezier(.2,.8,.2,1); }
.logo-light { display: none; }
[data-direction="stone"] .logo-dark { display: none; }
[data-direction="stone"] .logo-light { display: block; }
.brand:hover .logo { opacity: 1; filter: brightness(0) saturate(100%) invert(66%) sepia(40%) saturate(500%) hue-rotate(3deg) brightness(92%) contrast(88%); }
.brand .mono {
  width: 46px; height: 46px; border: 1px solid var(--gold);
  display: grid; place-items: center; border-radius: 50%;
  font-family: var(--display); font-size: 20px; color: var(--gold);
  letter-spacing: .04em; transition: background .4s, color .4s;
}
.brand:hover .mono { background: var(--gold); color: var(--bg); }
.brand .bname { font-family: var(--display); font-size: 19px; letter-spacing: .02em; line-height: 1; }
.brand .bname small { display: block; font-family: var(--sans); font-size: 9.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-mute); margin-top: 5px; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 13px; letter-spacing: .08em; color: var(--ink-soft); transition: color .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 20px; }
.nav-burger { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; }
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ---------- FOOTER ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line-soft); padding: 84px var(--pad) 36px; position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(195,163,104,.08) 1px, transparent 1.4px); background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%); mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%); opacity: .6; }
.footer-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; position: relative; z-index: 1; }
.footer h4 { font-family: var(--sans); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin: 0 0 22px; }
.footer a { color: var(--ink-soft); font-size: 15px; display: block; margin-bottom: 12px; transition: color .3s; }
.footer a:not(.brand) { position: relative; width: fit-content; }
.footer a:not(.brand)::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.footer a:not(.brand):hover { color: var(--gold); }
.footer a:not(.brand):hover::after { transform: scaleX(1); transform-origin: left; }
.footer-base { max-width: var(--maxw); margin: 56px auto 0; padding-top: 26px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; position: relative; z-index: 1;ap; gap: 16px; font-size: 12.5px; color: var(--ink-mute); letter-spacing: .04em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- GLOWING SECTION SEPARATORS ---------- */
.glow-sep { position: relative; z-index: 3; height: 0; pointer-events: none; }
.glow-sep::before { content: ""; position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  width: min(64%, 560px); height: 1px; opacity: .85;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold-soft) 50%, var(--gold) 82%, transparent);
  box-shadow: 0 0 14px 1px rgba(195,163,104,.45); }
.glow-sep::after { content: ""; position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  width: 200px; height: 18px; border-radius: 50%; opacity: .55;
  background: radial-gradient(closest-side, rgba(195,163,104,.42), transparent 70%); filter: blur(5px); }

/* ---------- THANK-YOU OVERLAY ---------- */
.form-thanks { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 28px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .45s ease; border-radius: inherit; }
.form-thanks.show { opacity: 1; }
.form-thanks-inner { text-align: center; max-width: 34ch; transform: translateY(10px); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.form-thanks.show .form-thanks-inner { transform: none; }
.form-thanks-mark { width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center;
  color: var(--gold); border: 1px solid var(--gold); box-shadow: 0 0 0 6px var(--bg), 0 0 40px -6px rgba(195,163,104,.6); }
.form-thanks h3 { font-family: var(--display); font-weight: 500; font-size: clamp(28px,4vw,40px); margin: 0 0 12px; color: var(--ink); }
.form-thanks p { color: var(--ink-soft); font-weight: 300; font-size: 16px; line-height: 1.6; margin: 0; }

/* ---------- STORY MODAL ---------- */
.story-modal { z-index: 95; }
.story-card { position: relative; z-index: 1; width: min(760px, 100%); max-height: 92vh; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.story-close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(8px); color: #F6F1E5; border: 1px solid var(--line-soft); font-size: 26px; line-height: 1; cursor: pointer; transition: background .35s, transform .35s; }
.story-close:hover { background: var(--gold); color: #14110a; transform: rotate(90deg); }
.story-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.story-scroll::-webkit-scrollbar { width: 8px; }
.story-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

.story-hero { position: relative; height: clamp(240px, 38vh, 360px); overflow: hidden; }
.story-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.story-hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,12,.2) 0%, rgba(8,9,12,.45) 50%, var(--surface) 100%); }
.story-hero-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(24px,4vw,40px); z-index: 1; }
.story-hero-copy h1 { font-family: var(--display); font-weight: 500; font-size: clamp(32px,5vw,52px); line-height: 1.04; margin: 12px 0 0; color: #F6F1E5; }
.story-hero-copy h1 em { font-style: italic; color: var(--gold); }
.story-hero-sub { color: rgba(246,241,229,.84); font-weight: 300; font-size: clamp(14px,1.5vw,16px); margin: 12px 0 0; max-width: 52ch; line-height: 1.6; }

.story-body { padding: clamp(28px,4vw,52px); max-width: 64ch; margin: 0 auto; }
.story-body p { color: var(--ink-soft); font-weight: 300; font-size: 16.5px; line-height: 1.8; margin: 0 0 20px; }
.story-body p strong { color: var(--ink); font-weight: 500; }
.story-body p em { color: var(--gold-soft); font-style: italic; }
.story-lead { font-size: 19px !important; color: var(--ink) !important; line-height: 1.7 !important; }
.story-h2 { font-family: var(--display); font-weight: 500; font-size: clamp(24px,3vw,32px); line-height: 1.1; color: var(--ink); margin: 40px 0 18px; }
.story-pull { margin: 32px 0; padding: 0 0 0 26px; border-left: 2px solid var(--gold); font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(23px,3vw,30px); line-height: 1.25; color: var(--ink); }
.story-steps, .story-creed { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 26px; }
.story-steps span, .story-creed span { position: relative; padding-left: 26px; color: var(--ink); font-size: 16.5px; }
.story-steps span::before, .story-creed span::before { content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 7px; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(-45deg); }
.story-creed { gap: 6px; padding: 24px 26px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 6px; }
.story-creed span { font-family: var(--display); font-size: clamp(18px,2.4vw,22px); font-style: italic; padding-left: 0; }
.story-creed span::before { display: none; }
.story-final { margin: 36px 0 0; padding: 30px 32px; background: linear-gradient(180deg, var(--emerald), color-mix(in srgb, var(--emerald) 70%, var(--bg))); border-radius: 8px; font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(20px,2.6vw,26px); line-height: 1.4; color: #F6F1E5; }
.story-final cite { display: block; margin-top: 16px; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.story-cta { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.story-cta p { margin: 0 !important; font-family: var(--display); font-size: clamp(20px,2.6vw,26px); color: var(--ink); }
@media (max-width: 560px){ .story-cta { flex-direction: column; align-items: flex-start; } .story-cta .btn { width: 100%; justify-content: center; } }

/* dynamic scroll-reveal inside the story */
.story-body > * { opacity: 0; transform: translateY(24px); transition: opacity .85s cubic-bezier(.2,.8,.2,1), transform .85s cubic-bezier(.2,.8,.2,1); }
.story-body > *.in { opacity: 1; transform: none; }
/* animated final quote — word-by-word */
.story-final .qword { display: inline-block; opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1), filter .7s ease; }
.story-final.words-in .qword { opacity: 1; transform: none; filter: none; }
.story-gr { color: var(--gold); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); transition: border-color .3s, color .3s; }
.story-gr:hover { color: var(--gold-soft); border-color: var(--gold); }
@media (prefers-reduced-motion: reduce){
  .story-body > *, .story-final .qword { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ---------- SITE LOADER ---------- */
.site-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--bg);
  transition: opacity .7s ease, visibility .7s ease; }
.site-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.site-loader .loader-inner { position: relative; display: grid; place-items: center; }
.loader-ring { position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 1px solid var(--line);
  border-top-color: var(--gold); animation: loaderSpin 1.1s linear infinite; opacity: 0; animation-delay: .1s; }
.site-loader.go .loader-ring { animation: loaderSpin 1.1s linear infinite, loaderRingIn .6s ease forwards; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes loaderRingIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; } }
.loader-logo-wrap { width: 104px; height: 104px; opacity: 0; transform: scale(.78); filter: drop-shadow(0 0 0 rgba(195,163,104,0)); }
.loader-logo-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.site-loader.go .loader-logo-wrap { animation: loaderLogoIn .7s cubic-bezier(.2,1.3,.4,1) forwards, loaderGlow 1.8s ease-in-out .6s infinite; }
@keyframes loaderLogoIn { from { opacity: 0; transform: scale(.78); } to { opacity: 1; transform: scale(1); } }
@keyframes loaderGlow { 0%,100% { filter: drop-shadow(0 0 6px rgba(195,163,104,.25)); } 50% { filter: drop-shadow(0 0 22px rgba(195,163,104,.7)); } }
.site-loader .loader-word { position: absolute; top: calc(50% + 92px); font-family: var(--sans); font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: var(--ink-mute); opacity: 0; }
.site-loader.go .loader-word { animation: fadeIn .8s ease .5s forwards; }
@media (prefers-reduced-motion: reduce){
  .loader-logo-wrap { opacity: 1; transform: none; animation: none; }
  .loader-ring { display: none; }
}
