/* Miel de Sicriyoc — golden-hour honey theme.
   Hero: the Matt Knights scroll-zoom mechanic (520vh sticky stage, scroll-driven
   crossfade + zoom of 4 scene images with text "beats"), reskinned honey.
   Fonts borrowed verbatim from Barrington's One Happy Coffee blog:
   Merriweather (headings) + Source Sans 3 (body) + Playfair Display (brand). */

:root {
  --night:      #1b1206;
  --night-2:    #241706;
  --honey-900:  #5f3608;
  --honey-800:  #8a5210;
  --honey-700:  #a8681a;
  --honey:      #e0a526;
  --honey-500:  #e8a317;
  --honey-bright:#f6c453;
  --amber-glow: #ffb347;
  --cream:      #fdf7ec;
  --cream-2:    #f6ead1;
  --paper:      #fffdf8;
  --ink:        #2b1f10;
  --ink-soft:   #6a583d;
  --line:       rgba(120,80,20,.15);
  --brand-grad: linear-gradient(135deg,#3a2408 0%,#a8681a 46%,#f6c453 100%);
  --shadow:     0 18px 50px rgba(60,32,4,.16);
  --radius:     16px;
  --serif:   "Merriweather", Georgia, "Times New Roman", serif;
  --sans:    "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --gold: var(--honey);
  --gold-bright: var(--honey-bright);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0625rem;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.14; color: var(--honey-900);
  font-weight: 700; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1 { font-weight: 900; }
a { color: var(--honey-800); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 70;
  background: rgba(27,18,6,.86); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(246,196,83,.14); }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 20px; }
.brand { color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--honey-bright); }
.main-nav { display: flex; gap: 20px; margin-left: 6px; flex: 1; }
.main-nav a { color: #f4e6c8; font-weight: 600; font-size: .95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav a.is-active { color: #fff; border-bottom-color: var(--honey-bright); }
.header-right { display: flex; align-items: center; gap: 14px; }
.lang-toggle { display: inline-flex; border: 1px solid rgba(246,196,83,.35); border-radius: 999px; overflow: hidden; }
.lang-toggle a { color: #e9d9b6; font-size: .8rem; font-weight: 700; padding: 5px 11px; letter-spacing: .04em; }
.lang-toggle a:hover { background: rgba(246,196,83,.12); text-decoration: none; }
.lang-toggle a.is-active { background: var(--honey-bright); color: var(--night); }
.header-cta { background: var(--honey-bright); color: var(--night); font-weight: 700; font-size: .88rem; padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
.header-cta:hover { background: #ffd873; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem; transition: transform .12s ease, box-shadow .2s ease; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 10px 30px rgba(168,104,26,.4); }
.btn-primary:hover { box-shadow: 0 16px 40px rgba(168,104,26,.5); }
.btn-ghost { background: rgba(255,255,255,.10); color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
body.is-post .btn-ghost { color: var(--honey-900); border-color: var(--honey-700); background: transparent; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.10); }

/* ============ SCROLL-ZOOM HERO (Matt Knights mechanic) ============ */
#ascent { height: 520vh; position: relative; }
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--night); }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.stage.video-on video { opacity: 1; }              /* scroll-scrubbed camera ascent */
.stage.video-on .scene { opacity: 0 !important; }  /* video supersedes the stills fallback */
.scene { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; }
.scene:first-of-type { opacity: 1; }               /* first paint before JS runs */
.scene img { width: 100%; height: 100%; object-fit: cover; will-change: transform; transform: scale(1.12); }
.veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,12,4,.58) 0%, rgba(20,12,4,.22) 42%, rgba(20,12,4,.64) 100%); }
.vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(12,7,2,.66) 100%); }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E"); }

.beat { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; pointer-events: none; will-change: opacity, transform; padding: 0 8vw; }
.beat[data-beat="0"] { opacity: 1; }               /* first paint before JS runs */
.beat-tag { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--honey-bright); margin-bottom: 22px; }
.beat-tag span { border: 1px solid rgba(246,196,83,.45); padding: 6px 12px; border-radius: 3px; background: rgba(27,18,6,.35); backdrop-filter: blur(4px); }
.beat h1, .beat h2 { font-family: var(--serif); color: #fff; line-height: 1.12; text-shadow: 0 2px 28px rgba(6,4,2,.55); margin: 0; }
.beat h1 { font-weight: 900; font-size: clamp(30px, 5.2vw, 62px); max-width: 16ch; }
.beat h2 { font-weight: 700; font-size: clamp(28px, 4.6vw, 54px); max-width: 17ch; }
.beat .gold { color: var(--honey-bright); }
.beat .sub { margin-top: 20px; max-width: 52ch; font-size: clamp(15px, 1.4vw, 19px); font-weight: 400; line-height: 1.62; color: rgba(253,247,236,.9); }
.beat-center { align-items: center; text-align: center; }
.beat-center .sub { margin-left: auto; margin-right: auto; }
.hero-ctas { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.scroll-hint { margin-top: 34px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: rgba(253,247,236,.62); }

.hero-rail { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 10px; opacity: 0; transition: opacity .4s; pointer-events: none; }
.hero-rail.show { opacity: 1; }
.hero-rail i { width: 6px; height: 6px; border-radius: 50%; background: rgba(253,247,236,.35); transition: background .3s, height .3s; display: block; }
.hero-rail i.on { background: var(--honey-bright); height: 22px; border-radius: 3px; }

/* ---------- Stat band (under the hero) ---------- */
.stat-band { background: var(--night); color: var(--cream); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.stat-band .stat { padding: 26px 16px; text-align: center; background: var(--night-2); }
.stat b { display: block; font-family: var(--serif); font-weight: 900; font-size: 1.9rem; color: var(--honey-bright); line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: .82rem; color: #e2d1aa; letter-spacing: .01em; }

/* ---------- Layout ---------- */
main.landing, main.post { max-width: 820px; margin: 0 auto; padding: 0 22px; }
main.landing { padding-top: 44px; }
main.post { padding-top: 40px; }
main.post article > h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 6px 0 8px; }
.content-block { margin: 34px 0; }
.content-block h2 { font-size: 1.65rem; margin: 0 0 14px; }
.content-block h3 { font-size: 1.2rem; color: var(--honey-800); margin: 22px 0 8px; }
.content-block p { margin: 0 0 16px; }
.content-block ul, .content-block ol { margin: 0 0 18px; padding-left: 22px; }
.content-block li { margin: 6px 0; }
.content-block table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .95rem; }
.content-block th, .content-block td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.content-block th { background: var(--cream-2); color: var(--honey-900); font-weight: 700; }
.content-block tr:nth-child(even) td { background: var(--cream); }

/* ---------- Answer box (AEO BLUF) ---------- */
.answer-box { background: linear-gradient(135deg,#fff8ea 0%,#fdefce 100%);
  border: 1px solid rgba(224,165,38,.4); border-left: 6px solid var(--honey);
  border-radius: var(--radius); padding: 22px 26px; margin: 4px 0 34px; box-shadow: var(--shadow); }
main.landing .answer-box { margin-top: 8px; }
.answer-label { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--honey-700); margin: 0 0 8px; }
.answer-q { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 10px; color: var(--honey-900); }
.answer-a { font-size: 1.1rem; margin: 0; color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-section { margin: 44px 0; }
.faq-section > h2 { font-size: 1.65rem; margin-bottom: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: var(--paper); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 1.05rem; color: var(--honey-900); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--honey-700); transition: transform .2s; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { background: var(--cream); }
.faq-a { padding: 0 20px 16px; }
.faq-a p { margin: 6px 0 0; color: var(--ink-soft); }

/* ---------- Breadcrumbs / related ---------- */
.crumbs { font-size: .86rem; color: var(--ink-soft); margin: 0 0 14px; }
.crumbs a { color: var(--honey-800); }
.related { margin: 40px 0; padding: 22px 24px; background: var(--cream); border-radius: var(--radius); }
.related h2 { font-size: 1.2rem; margin: 0 0 10px; }
.related ul { margin: 0; padding-left: 20px; }

/* ---------- CTA band ---------- */
.cta-band { margin: 52px auto; max-width: 900px; text-align: center; color: #fff;
  background: var(--brand-grad); border-radius: 22px; padding: 44px 30px; box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem,3vw,2.1rem); margin: 0 0 12px; max-width: 22ch; margin-inline: auto; }
.cta-band p { color: #fbefd7; max-width: 54ch; margin: 0 auto 24px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #e9d9b6; margin-top: 64px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 52px 26px 30px; display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 36px; }
.footer-col h3 { color: var(--honey-bright); font-size: 1.1rem; margin: 0 0 12px; }
.footer-col p { color: #d8c6a2; font-size: .95rem; margin: 0 0 10px; }
.footer-col a { color: var(--honey-bright); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 7px 0; }
.footer-geo { font-size: .82rem; color: #b39a70; }
.footer-legal { border-top: 1px solid rgba(246,196,83,.14); text-align: center; padding: 18px; font-size: .82rem; color: #a88f66; }

/* ---------- Scroll reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .main-nav { display: none; }
  .header-inner { gap: 12px; }
  .beat { padding: 0 7vw; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-rail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
  #ascent { height: auto; }
  .stage { position: relative; height: 100vh; }
  .stage video { display: none; }
  .scene { opacity: 0 !important; }
  .scene:first-of-type { opacity: 1 !important; }
  .scene img { transform: none !important; }
  .beat { opacity: 0 !important; }
  .beat[data-beat="0"] { opacity: 1 !important; }
  .stage > .beat:not([data-beat="0"]) { display: none; }
}
