@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, ul, blockquote { margin: 0; }
  ul { padding: 0; list-style: none; }
  img { display: block; max-width: 100%; }
  button, a { font: inherit; }
}

@layer base {
  :root {
    --forest: #10231d;
    --forest-2: #183229;
    --moss: #315044;
    --ink: #17241f;
    --paper: #e9e1d1;
    --paper-2: #d9ceba;
    --ember: #d56f3e;
    --ember-light: #f0a26e;
    --cream: #f7f1e6;
    --line: rgba(23, 36, 31, 0.2);
    --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
    --sans: Inter, Avenir Next, Avenir, Segoe UI, Helvetica Neue, Arial, sans-serif;
    --shell: min(1180px, calc(100vw - 48px));
  }

  body {
    min-width: 320px;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
  }

  body.menu-open { overflow: hidden; }
  a { color: inherit; text-decoration: none; }
  ::selection { color: var(--cream); background: var(--ember); }
  :focus-visible { outline: 3px solid var(--ember-light); outline-offset: 5px; }
}

@layer components {
  .shell { width: var(--shell); margin-inline: auto; }
  .section { position: relative; padding-block: clamp(90px, 11vw, 160px); overflow: hidden; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 10px 16px; color: var(--cream); background: var(--ember); transform: translateY(-150%); transition: transform .2s; }
  .skip-link:focus { transform: translateY(0); }

  .site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px max(24px, calc((100vw - 1180px) / 2));
    color: var(--cream);
    transition: padding .3s ease, background .3s ease, box-shadow .3s ease;
  }

  .site-header.is-scrolled {
    padding-block: 12px;
    background: rgba(16, 35, 29, .94);
    box-shadow: 0 1px 0 rgba(255,255,255,.1);
    backdrop-filter: blur(14px);
  }

  .brand { display: inline-flex; align-items: center; gap: 13px; letter-spacing: .05em; line-height: 1; }
  .brand img { width: 42px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.25)); }
  .brand span { display: grid; gap: 5px; }
  .brand strong { font-family: var(--serif); font-size: 18px; font-weight: 500; }
  .brand small { font-size: 9px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; opacity: .72; }

  .primary-nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 40px); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .primary-nav a:not(.nav-cta) { position: relative; }
  .primary-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
  .primary-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
  .nav-cta { padding: 11px 17px; border: 1px solid rgba(255,255,255,.45); transition: color .2s, background .2s; }
  .nav-cta:hover { color: var(--forest); background: var(--cream); }
  .menu-button { display: none; }

  .hero { position: relative; min-height: max(720px, 100svh); display: grid; align-items: center; color: var(--cream); background: var(--forest); overflow: hidden; }
  .hero-image, .hero-shade { position: absolute; inset: 0; }
  .hero-image { background: url("assets/woodland-hearth.png") 58% center / cover no-repeat; transform: scale(1.015); animation: settle 1.8s cubic-bezier(.2,.7,.2,1) both; }
  .hero-shade { background: linear-gradient(90deg, rgba(4,15,12,.95) 0%, rgba(5,17,14,.74) 38%, rgba(7,20,17,.18) 72%), linear-gradient(0deg, rgba(5,17,14,.6), transparent 50%, rgba(4,14,11,.18)); }
  .hero-content { position: relative; z-index: 2; padding-top: 84px; }
  .eyebrow { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; color: rgba(247,241,230,.72); font-size: 11px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
  .eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--ember); }
  .eyebrow--dark { color: rgba(23,36,31,.62); }
  .eyebrow--ember { color: var(--ember-light); }
  .hero h1 { max-width: 850px; font-family: var(--serif); font-size: clamp(58px, 8.5vw, 118px); font-weight: 400; letter-spacing: -.055em; line-height: .9; text-wrap: balance; }
  .hero-lede { max-width: 610px; margin-top: 34px; color: rgba(247,241,230,.83); font-family: var(--serif); font-size: clamp(19px, 2vw, 25px); line-height: 1.48; }
  .hero-actions { display: flex; align-items: center; gap: 34px; margin-top: 42px; }
  .button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 23px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; transition: transform .2s, background .2s; }
  .button:hover { transform: translateY(-2px); }
  .button--ember { color: #fff; background: var(--ember); box-shadow: 0 10px 30px rgba(0,0,0,.22); }
  .button--ember:hover { background: #e27a46; }
  .text-link { display: inline-flex; align-items: center; gap: 18px; width: max-content; padding-bottom: 5px; border-bottom: 1px solid currentColor; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
  .text-link span { transition: transform .2s; }
  .text-link:hover span { transform: translate(3px, 3px); }
  .text-link--light { color: rgba(247,241,230,.9); }
  .text-link--dark { color: var(--ink); }
  .hero-note { position: absolute; z-index: 2; right: max(24px, calc((100vw - 1180px) / 2)); bottom: 32px; font-size: 9px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; writing-mode: vertical-rl; opacity: .6; }
  .scroll-cue { position: absolute; z-index: 2; bottom: 0; left: 50%; width: 1px; height: 74px; background: rgba(255,255,255,.25); }
  .scroll-cue span { position: absolute; left: 0; top: 0; width: 1px; height: 28px; background: var(--cream); animation: scroll-line 2.1s ease-in-out infinite; }

  .path { background: var(--paper); }
  .split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(50px, 9vw, 120px); align-items: start; }
  .section-heading h2, .community h2, .campfire h2, .welcome h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; line-height: .98; text-wrap: balance; }
  .section-heading h2 { max-width: 740px; font-size: clamp(46px, 6.4vw, 82px); }
  .path-copy { padding-top: 56px; font-size: 17px; }
  .path-copy .lead { margin-bottom: 25px; font-family: var(--serif); font-size: clamp(23px, 2.6vw, 31px); line-height: 1.4; }
  .path-copy p:last-child { color: rgba(23,36,31,.7); }
  .values-wrap { margin-top: clamp(75px, 10vw, 125px); }
  .values-label { margin-bottom: 16px; font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
  .values { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .values li { min-height: 122px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 16px 21px 0; border-right: 1px solid var(--line); font-family: var(--serif); font-size: 19px; }
  .values li:not(:first-child) { padding-left: 16px; }
  .values li:last-child { border-right: 0; }
  .values span { color: var(--ember); font-family: var(--sans); font-size: 9px; font-weight: 800; letter-spacing: .12em; }

  .community { color: var(--cream); background: var(--forest); }
  .community::after { content: ""; position: absolute; right: -15vw; bottom: -65vw; width: 92vw; height: 92vw; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; box-shadow: 0 0 0 10vw rgba(255,255,255,.018), 0 0 0 22vw rgba(255,255,255,.012); }
  .community-grain { position: absolute; inset: 0; opacity: .14; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E"); pointer-events: none; }
  .community-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 90px 1.1fr .9fr; gap: clamp(36px, 7vw, 100px); align-items: center; }
  .community-marker { height: 430px; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 18px; color: var(--ember-light); font-family: var(--serif); font-size: 28px; }
  .community-marker div { width: 1px; background: linear-gradient(var(--ember), rgba(213,111,62,.12)); }
  .community h2 { max-width: 650px; font-size: clamp(54px, 7vw, 92px); }
  .community-copy .lead { max-width: 630px; margin-top: 34px; font-family: var(--serif); font-size: clamp(21px, 2.3vw, 28px); line-height: 1.5; }
  .community-copy > p:last-child { max-width: 610px; margin-top: 24px; color: rgba(247,241,230,.63); }
  .community-quote { align-self: end; padding: 30px 0 5px 28px; border-left: 1px solid rgba(240,162,110,.6); }
  .community-quote p { font-family: var(--serif); font-size: clamp(28px, 3vw, 41px); font-style: italic; line-height: 1.25; }
  .community-quote footer { margin-top: 24px; color: rgba(247,241,230,.5); font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }

  .campfire { color: var(--cream); background: #0c1814; }
  .campfire-heading { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: end; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.14); }
  .campfire h2 { font-size: clamp(62px, 8vw, 112px); }
  .campfire-heading > p { max-width: 460px; padding-bottom: 9px; color: rgba(247,241,230,.6); font-family: var(--serif); font-size: 21px; }
  .campfire-feature { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(45px, 9vw, 120px); padding-top: 70px; }
  .episode-mark { position: relative; min-height: 390px; display: flex; flex-direction: column; justify-content: space-between; padding: 34px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); background: radial-gradient(circle at 50% 112%, rgba(213,111,62,.58), transparent 44%), linear-gradient(145deg, #223c32, #10221c); }
  .episode-mark::before, .episode-mark::after { content: ""; position: absolute; left: 50%; top: 58%; border: 1px solid rgba(240,162,110,.17); border-radius: 50%; transform: translate(-50%,-50%); }
  .episode-mark::before { width: 280px; height: 280px; }
  .episode-mark::after { width: 190px; height: 190px; }
  .episode-mark span, .episode-mark small { position: relative; z-index: 1; font-size: 9px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
  .episode-mark small { color: var(--ember-light); }
  .episode-mark strong { position: relative; z-index: 1; align-self: center; font-family: var(--serif); font-size: 130px; font-weight: 400; letter-spacing: -.08em; line-height: 1; }
  .episode-copy { align-self: center; }
  .episode-kicker { margin-bottom: 18px; color: var(--ember-light); font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
  .episode-copy h3 { font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); font-weight: 400; letter-spacing: -.035em; line-height: 1; }
  .episode-copy > p:not(.episode-kicker) { max-width: 650px; margin-top: 27px; color: rgba(247,241,230,.65); font-size: 17px; }
  details { margin-top: 36px; border-top: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
  summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; list-style: none; }
  summary::-webkit-details-marker { display: none; }
  summary span { color: var(--ember-light); font-size: 22px; font-weight: 300; transition: transform .2s; }
  details[open] summary span { transform: rotate(45deg); }
  .topic-list { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 0 24px; }
  .topic-list span { padding: 7px 12px; border: 1px solid rgba(255,255,255,.14); color: rgba(247,241,230,.67); font-family: var(--serif); font-size: 14px; }

  .welcome { min-height: 720px; display: grid; align-items: center; background: var(--paper-2); }
  .welcome-rings { position: absolute; top: 50%; right: -2vw; width: min(58vw, 780px); aspect-ratio: 1; border: 1px solid rgba(23,36,31,.14); border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 0 6vw rgba(23,36,31,.025), 0 0 0 13vw rgba(23,36,31,.018); }
  .welcome-rings::before, .welcome-rings::after { content: ""; position: absolute; inset: 17%; border: 1px solid rgba(23,36,31,.13); border-radius: 48% 52% 51% 49%; }
  .welcome-rings::after { inset: 34%; background: var(--ember); border: 0; box-shadow: 0 0 90px rgba(213,111,62,.35); }
  .welcome-inner { position: relative; z-index: 1; }
  .welcome h2 { max-width: 730px; font-size: clamp(64px, 9vw, 124px); }
  .welcome-inner > p:not(.eyebrow) { max-width: 600px; margin: 35px 0 34px; font-family: var(--serif); font-size: clamp(20px, 2.1vw, 26px); line-height: 1.55; }

  .site-footer { padding: 48px 0; color: rgba(247,241,230,.75); background: #08130f; }
  .footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: center; }
  .brand--footer img { width: 52px; }
  .footer-inner > p { color: rgba(247,241,230,.62); font-family: var(--serif); font-size: 17px; font-style: italic; line-height: 1.4; text-align: center; }
  .footer-inner > small { justify-self: end; font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }

  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

@layer utilities {
  @keyframes settle { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1.015); } }
  @keyframes scroll-line { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

  @media (max-width: 900px) {
    :root { --shell: min(100% - 38px, 720px); }
    .site-header { padding: 16px 19px; }
    .menu-button { z-index: 3; display: grid; gap: 7px; width: 45px; height: 45px; place-content: center; border: 0; color: inherit; background: transparent; cursor: pointer; }
    .menu-button span:not(.sr-only) { display: block; width: 25px; height: 1px; background: currentColor; transition: transform .25s; }
    .menu-button[aria-expanded="true"] span:nth-last-child(2) { transform: translateY(4px) rotate(45deg); }
    .menu-button[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
    .primary-nav { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px; padding: 90px 12vw; color: var(--cream); background: var(--forest); font-family: var(--serif); font-size: clamp(28px, 7vw, 44px); font-weight: 400; letter-spacing: -.02em; text-transform: none; transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
    .primary-nav.is-open { transform: translateX(0); }
    .nav-cta { padding: 0; border: 0; color: var(--ember-light); }
    .split, .community-grid, .campfire-heading, .campfire-feature { grid-template-columns: 1fr; }
    .path-copy { max-width: 620px; padding-top: 0; }
    .values { grid-template-columns: repeat(3, 1fr); }
    .values li:nth-child(3) { border-right: 0; }
    .values li:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
    .community-grid { gap: 55px; }
    .community-marker { display: none; }
    .community-quote { max-width: 500px; }
    .campfire-heading { gap: 24px; }
    .campfire-feature { max-width: 720px; gap: 50px; }
    .episode-mark { min-height: 340px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-inner > p { display: none; }
  }

  @media (max-width: 600px) {
    :root { --shell: calc(100% - 32px); }
    .section { padding-block: 84px; }
    .brand strong { font-size: 16px; }
    .hero { min-height: 760px; }
    .hero-image { background-position: 65% center; }
    .hero-shade { background: linear-gradient(90deg, rgba(4,15,12,.94), rgba(5,17,14,.38)), linear-gradient(0deg, rgba(5,17,14,.72), transparent 50%); }
    .hero-content { padding-top: 74px; }
    .hero h1 { font-size: clamp(52px, 17vw, 76px); line-height: .94; }
    .hero-lede { max-width: 94%; font-size: 19px; }
    .hero-actions { align-items: flex-start; flex-direction: column; gap: 24px; margin-top: 34px; }
    .hero-note { display: none; }
    .scroll-cue { left: auto; right: 20px; }
    .values { grid-template-columns: repeat(2, 1fr); }
    .values li:nth-child(n) { min-height: 105px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .values li:nth-child(even) { border-right: 0; }
    .values li:nth-last-child(-n+2) { border-bottom: 0; }
    .community h2 { font-size: 52px; }
    .community-quote { padding-left: 20px; }
    .campfire h2 { font-size: 63px; }
    .campfire-heading { padding-bottom: 42px; }
    .campfire-feature { padding-top: 48px; }
    .episode-mark { min-height: 310px; }
    .episode-mark strong { font-size: 106px; }
    .welcome { min-height: 700px; }
    .welcome-rings { right: -50vw; width: 118vw; opacity: .65; }
    .welcome h2 { font-size: 66px; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-inner > small { justify-self: start; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
  }
}

