/* =====================================================================
   Maria Livana — Atelier
   Palette from reference 04: forest green, mustard gold, warm cream.
   Fonts: Fraunces (display serif) + Instrument Sans (UI/body).
   ===================================================================== */

:root {
  /* light theme (default) */
  --cream:      #f4eede;
  --bg:         #f1ead9;
  --surface:    #fbf7ec;
  --ink:        #1c2a20;
  --muted:      #5d6a5c;
  --line:       #ddd3bd;
  --green:      #1e3a2b;
  --green-2:    #15291e;
  --gold:       #d9931a;
  --gold-soft:  #e7a327;
  --coral:      #d95f34;
  --outline:    #cbbb95;   /* stroke for echo text */

  --accent:     var(--gold);
  --on-accent:  var(--green-2);

  --serif: "Fraunces", "Bodoni Moda", Georgia, serif;
  --sans:  "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 16px;
  --radius-lg: 22px;

  --shadow: 0 24px 60px -34px rgba(20, 40, 25, .55);
  --shadow-sm: 0 12px 26px -20px rgba(20, 40, 25, .5);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream:   #14211a;
    --bg:      #10190f;
    --surface: #182619;
    --ink:     #f0ead9;
    --muted:   #9db09b;
    --line:    #2a3a2c;
    --green:   #244a34;
    --green-2: #0e1a12;
    --gold:    #eab033;
    --gold-soft:#f2bb45;
    --coral:   #e97a4f;
    --outline: #3a4a37;
    --accent:  var(--gold);
    --on-accent: #0e1a12;
    --shadow: 0 26px 70px -30px rgba(0, 0, 0, .7);
    --shadow-sm: 0 12px 30px -20px rgba(0, 0, 0, .6);
  }
}
/* explicit toggle wins over OS setting, both directions */
:root[data-theme="light"] {
  --cream:#f4eede; --bg:#f1ead9; --surface:#fbf7ec; --ink:#1c2a20; --muted:#5d6a5c;
  --line:#ddd3bd; --green:#1e3a2b; --green-2:#15291e; --gold:#d9931a; --gold-soft:#e7a327;
  --coral:#d95f34; --outline:#cbbb95; --on-accent:var(--green-2);
  --shadow:0 24px 60px -34px rgba(20,40,25,.55); --shadow-sm:0 12px 26px -20px rgba(20,40,25,.5);
}
:root[data-theme="dark"] {
  --cream:#14211a; --bg:#10190f; --surface:#182619; --ink:#f0ead9; --muted:#9db09b;
  --line:#2a3a2c; --green:#244a34; --green-2:#0e1a12; --gold:#eab033; --gold-soft:#f2bb45;
  --coral:#e97a4f; --outline:#3a4a37; --on-accent:#0e1a12;
  --shadow:0 26px 70px -30px rgba(0,0,0,.7); --shadow-sm:0 12px 30px -20px rgba(0,0,0,.6);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
em { font-style: italic; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--green); color: var(--cream); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { left: 16px; }

:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; display: inline-block;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 16px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-color: var(--line); }
.nav__brand {
  font-family: var(--serif); font-weight: 500; font-size: 20px;
  text-decoration: none; letter-spacing: -.01em; margin-right: auto;
}
.nav__links { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.nav__links a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.pill {
  border: 1.5px solid var(--green); color: var(--green) !important;
  padding: 7px 16px; border-radius: 22px; transition: background .2s, color .2s !important;
}
.pill:hover { background: var(--green); color: var(--cream) !important; }
:root[data-theme="dark"] .pill,
@media (prefers-color-scheme: dark) { }
.theme-toggle {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { transform: rotate(20deg); border-color: var(--gold); }
.theme-toggle__icon { width: 15px; height: 15px; border-radius: 50%;
  background: var(--gold); box-shadow: inset -4px -4px 0 0 var(--ink); }
:root[data-theme="dark"] .theme-toggle__icon { box-shadow: none; background: var(--gold); }
@media (prefers-color-scheme: dark) { .theme-toggle__icon { box-shadow: none; } }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(30px, 7vw, 90px) var(--pad) clamp(30px, 6vw, 70px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.hero__star { color: var(--gold); font-size: 26px; display: block; line-height: 1;
  animation: spin 14s linear infinite; width: 26px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__name {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(56px, 11vw, 118px); line-height: .86; letter-spacing: -.03em;
  margin: 10px 0 0; text-wrap: balance;
}
.hero__name em { color: var(--gold); font-weight: 500; }
.hero__echo {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(34px, 7vw, 74px); line-height: .9; margin-top: -.12em;
  color: transparent; -webkit-text-stroke: 1.3px var(--outline);
  letter-spacing: .01em;
}
.hero__tagline { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px);
  max-width: 34ch; margin: 22px 0 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 26px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .18s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--green); color: var(--cream); }
.btn--solid:hover { background: var(--green-2); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--green); }
.btn--lg { font-size: 17px; padding: 15px 30px; }

/* reel card (facade -> iframe) */
.hero__reel { margin: 0; }
.reel-card {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; background: var(--green-2);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.reel-card img, .lite-yt img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease); }
.reel-card:hover img { transform: scale(1.04); }
.reel-card::after, .lite-yt::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(14,26,18,.55));
  pointer-events: none;
}
.play-btn {
  position: absolute; z-index: 2; display: grid; place-items: center;
  width: 66px; height: 66px; border-radius: 50%; inset: 0; margin: auto;
  background: var(--gold); color: var(--green-2);
  box-shadow: 0 0 0 8px rgba(217,147,26,.18), 0 10px 30px -8px rgba(217,147,26,.6);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.reel-card:hover .play-btn, .lite-yt:hover .play-btn { transform: scale(1.08); }
.play-btn svg { width: 24px; height: 24px; margin-left: 3px; }
.reel-card iframe, .lite-yt iframe, .lightbox iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3;
}
.reel-card__badge {
  position: absolute; z-index: 2; left: 14px; bottom: 12px;
  font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .04em;
  color: var(--cream); background: rgba(14,26,18,.5); backdrop-filter: blur(4px);
  padding: 5px 11px; border-radius: 20px;
}
.reel-card__cap { margin: 12px 4px 0; font-size: 13px; color: var(--muted);
  font-family: var(--sans); letter-spacing: .02em; }

/* ---------- stats ---------- */
.stats {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  display: flex; flex-wrap: wrap; gap: clamp(20px, 6vw, 70px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats .stat { padding: 26px 0; }
.stats .stat b { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 4vw, 40px);
  display: block; line-height: 1; letter-spacing: -.02em; }
.stats .stat span { font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* ---------- generic section ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 9vw, 110px) var(--pad); }
.section__head { max-width: 60ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section__title {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(34px, 6vw, 60px); line-height: 1; margin: 14px 0 0; text-wrap: balance;
}
.section__title em { color: var(--gold); }
.section__lead { color: var(--muted); margin: 16px 0 0; font-size: 17px; }

/* ---------- work grid ---------- */
.work-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(16px, 2.5vw, 26px);
}
.work-item { }
.lite-yt {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: var(--green-2);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.work-item:hover .lite-yt { transform: translateY(-4px); box-shadow: var(--shadow); }
.lite-yt .play-btn { width: 54px; height: 54px; }
.lite-yt .play-btn svg { width: 20px; height: 20px; }
.work-item__meta { display: flex; align-items: baseline; gap: 10px; margin: 14px 4px 0; }
.work-item__title { font-family: var(--serif); font-weight: 500; font-size: 19px;
  letter-spacing: -.01em; margin: 0; }
.work-item__tag { margin-left: auto; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; white-space: nowrap; }

/* ---------- static placeholder tiles ---------- */
.is-placeholder { cursor: default; }
.ph {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background:
    radial-gradient(130% 120% at 28% 0%, color-mix(in srgb, var(--green) 60%, #2f5a41), transparent 62%),
    linear-gradient(160deg, var(--green), var(--green-2));
}
.ph__icon {
  width: 46px; height: 34px; border: 2px solid var(--gold); border-radius: 8px;
  position: relative; opacity: .95;
}
.ph__icon::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--gold);
}
.ph__sub {
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: #c9c0a6;
}

/* ---------- about ---------- */
.about { background: var(--surface); max-width: none; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); }
.about__inner { max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(30px, 6vw, 70px); }
.about__body { margin-top: 20px; display: flex; flex-direction: column; gap: 16px;
  color: var(--muted); max-width: 60ch; font-size: 17.5px; }
.about__body p { margin: 0; }
.skills { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skills li {
  font-size: 14px; font-weight: 500; padding: 8px 15px; border-radius: 22px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  transition: border-color .2s, color .2s;
}
.skills li:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- contact ---------- */
.contact {
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.contact .hero__star { margin: 0 auto; }
.contact__title { font-family: var(--serif); font-weight: 500; letter-spacing: -.025em;
  font-size: clamp(42px, 9vw, 96px); line-height: .92; margin: 14px 0 0; text-wrap: balance; }
.contact__title em { color: var(--gold); }
.contact__lead { color: var(--muted); max-width: 46ch; margin: 20px auto 30px; font-size: 18px; }
.socials { list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 14px; padding: 0; margin: 34px 0 0; }
.socials a {
  text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--muted);
  padding: 9px 18px; border: 1.5px solid var(--line); border-radius: 22px;
  transition: color .2s, border-color .2s, transform .2s;
}
.socials a:hover { color: var(--ink); border-color: var(--green); transform: translateY(-2px); }

/* ---------- sign-off (hand-drawn "OK BYE") ---------- */
.signoff {
  display: flex; justify-content: center;
  padding: clamp(10px, 3vw, 28px) var(--pad) 0;
}
.signoff__img {
  width: clamp(170px, 32vw, 300px); height: auto;
  transform: rotate(-3deg);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .18));
}

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 30px var(--pad) 44px;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.footer a { margin-left: auto; text-decoration: none; color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: clamp(16px, 5vw, 60px);
  background: rgba(8, 16, 11, .82); backdrop-filter: blur(6px);
  animation: fade .25s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lightbox__frame { position: relative; width: min(1000px, 100%); aspect-ratio: 16/9;
  border-radius: 14px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); }
.lightbox__close {
  position: absolute; top: clamp(12px, 3vw, 26px); right: clamp(12px, 3vw, 26px);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold); color: var(--green-2); font-size: 26px; line-height: 1;
  display: grid; place-items: center; transition: transform .2s;
}
.lightbox__close:hover { transform: rotate(90deg); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__reel { order: -1; }
  .reel-card { aspect-ratio: 16/9; }
  .about__inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { gap: 10px; padding: 12px var(--pad); }
  .nav__links { gap: 12px; }
  .nav__links a:not(.pill) { display: none; }   /* keep it clean on phones */
  .stats { gap: 0 40px; }
  .stats .stat { padding: 20px 0; }
}
