/* The Infinite Game of Life — site stylesheet v2
   Contemporary white: friendly professional office. Panels, not rules.
   White ground, soft warm-gray tint panels, one dark panel, teal accent,
   walnut-framed sketch doors. */

:root {
  --ground: #ffffff;
  --panel: #ffffff;
  --panel-accent: #eaf3f4;
  --card: #ffffff;
  --line: #e6eaec;
  --ink: #1f2a30;
  --ink-dim: #5f6d74;
  --teal: #177189;
  --teal-soft: #9fd3e0;
  --paper: #eef1f3;
  --walnut-1: #4a3524;
  --walnut-2: #2e2014;
  --dark-ink: #eef3f4;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(31, 42, 48, .08);
  --shadow-lift: 0 18px 44px rgba(31, 42, 48, .13);
  --frame-shadow: 0 8px 20px rgba(46, 32, 20, .25);
  --shadow-teal: 0 4px 12px rgba(23, 113, 137, .10), 0 18px 40px rgba(23, 113, 137, .15);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.65; margin: 0; }
img { max-width: 100%; }
main a:not(.btn):not(.frame) { font-weight: 700; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- nav (always visible, wraps on narrow screens) ---------- */
header.bar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); box-shadow: 0 6px 22px rgba(31, 42, 48, .06); }
.bar-inner { display: flex; flex-direction: column; align-items: center; gap: 13px; padding: 15px 28px; max-width: 1120px; margin: 0 auto; }
.brand { display: block; line-height: 0; }
.brand img { display: block; width: min(680px, 78vw); height: auto; }
.bar-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(680px, 78vw); }
nav.links { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
nav.links a { color: var(--ink-dim); text-decoration: none; font-size: 14.5px; padding: 4px 0; }
nav.links a:hover, nav.links a:focus-visible { color: var(--teal); }
.btn { display: inline-block; background: var(--teal); color: #ffffff; font-weight: 650; font-size: 15px; padding: 11px 24px; border-radius: 8px; text-decoration: none; border: 1px solid var(--teal); cursor: pointer; font-family: var(--sans); }
.btn:hover { filter: brightness(1.1); }
.btn.big { font-size: 17px; padding: 15px 32px; border-radius: 10px; }
.btn.on-dark { background: #ffffff; color: #12272e; border-color: #ffffff; }
.btn.ghost { background: transparent; color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- hero ---------- */
.hero { position: relative; background: #13323b; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 22%; }
.hero .scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 40, 48, .88) 0%, rgba(16, 40, 48, .5) 40%, rgba(16, 40, 48, 0) 70%); }
.hero-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 28px; min-height: 68vh; display: flex; align-items: center; justify-content: flex-start; }
.hero-copy { max-width: 480px; padding: 80px 0; color: #f2ede2; }
.hero-copy .eyebrow { font-size: 12.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--teal-soft); margin-bottom: 24px; font-weight: 600; }
.hero-copy h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 5.4vw, 58px); line-height: 1.06; margin: 0 0 12px; text-wrap: balance; }
.hero-copy h1 .turn { color: var(--teal-soft); }
.hero-copy .sub { font-size: 18.5px; line-height: 1.6; color: rgba(242, 237, 226, .85); margin: 22px 0 32px; max-width: 390px; }
.hero-copy .micro { font-size: 13.5px; color: rgba(242, 237, 226, .6); margin-top: 15px; }

/* ---------- panel grammar (mini-pages, no rules) ---------- */
.panel { padding: 42px 0; }
.panel.tint { background: var(--panel); }
.panel.dark { background: var(--panel-accent); color: var(--ink); }
.panel.dark .label { color: var(--teal); }
.panel.dark h2 { color: var(--ink); }
.panel.dark p, .panel.dark .lede { color: var(--ink-dim); }
.label { font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; font-weight: 600; }
h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; margin: 0 0 16px; text-wrap: balance; }
h3 { font-family: var(--serif); font-weight: 700; }
.lede { font-size: 19px; color: var(--ink-dim); max-width: 62ch; margin: 0 0 8px; }
.measure { max-width: 66ch; }
.measure p { margin: 0 0 0.9em; }
em.teal { color: var(--teal); font-style: normal; }

/* ---------- gallery / frames (smaller, doors) ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 26px 0 14px; align-items: start; }
.frame { display: block; text-decoration: none; transition: transform .25s ease; }
.frame:hover { transform: translateY(-5px); }
.frame img { width: 100%; height: auto; display: block; box-shadow: var(--frame-shadow); border-radius: 2px; }
.frame .scene { display: block; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--ink); margin-top: 8px; }
.frame .note { display: block; text-align: center; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); margin-top: 2px; }
.gallery-caption { font-size: 15px; color: var(--ink-dim); }
.gallery-caption a { color: var(--teal); }

/* ---------- story ---------- */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
/* Story: immersive black panel, white type */
.story-hero { background: #15181b; color: #fff; }
.story-hero .label { color: #5cbcd0; }
.story-hero h2 { color: #fff; }
.story-hero p { color: rgba(255, 255, 255, .82); }
.story-hero .teal, .story-hero em.teal { color: #5cbcd0; }
.story-hero figcaption { color: rgba(255, 255, 255, .58); }
.story-hero { padding: 0; }
.story-banner { position: relative; overflow: hidden; }
.story-banner img { display: block; width: 100%; height: clamp(360px, 56vh, 580px); object-fit: cover; object-position: center 30%; }
.story-banner .scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 11, 13, .85) 0%, rgba(9, 11, 13, .55) 34%, rgba(9, 11, 13, 0) 62%); }
.story-banner .wrap { position: absolute; inset: 0; display: flex; align-items: flex-start; }
.story-banner-copy { max-width: 540px; padding-top: 42px; }
.story-banner-copy h2 { font-size: clamp(34px, 4.8vw, 54px); line-height: 1.04; margin: 62px 0 0; }
.story-body { max-width: 720px; padding: 6px 0 48px; }
.story-body .story-cap { font-size: 13px; color: rgba(255, 255, 255, .5); margin-top: 18px; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 42px; align-items: center; padding: 40px 0; }
.proof-photo img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.proof-copy h2 { margin: 6px 0 14px; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.photo-pair img, .single-photo img { width: 100%; height: auto; display: block; box-shadow: var(--shadow-lift); border-radius: var(--radius); }
/* Subtle teal drop shadow on images + video embeds */
.photo-pair img, .single-photo img, article.essay img, .video-embed { box-shadow: var(--shadow-teal); }
.photo-pair figure, figure.cap { margin: 0; }
figcaption { font-size: 13px; color: var(--ink-dim); margin-top: 10px; line-height: 1.45; }

/* ---------- cards ---------- */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.case { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow); }
.case .name { font-family: var(--serif); font-size: 21px; color: var(--teal); margin-bottom: 10px; }
.case p { margin: 0; color: var(--ink-dim); font-size: 15.5px; line-height: 1.62; }
.case p strong { color: var(--ink); }

/* ---------- quotes ---------- */
.pull { font-family: var(--serif); font-style: italic; font-size: clamp(25px, 3.4vw, 36px); line-height: 1.28; max-width: 26ch; margin: 0; }
.pull .attr, .q .attr { display: block; font-family: var(--sans); font-style: normal; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); margin-top: 18px; font-weight: 600; }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 28px; }
.q { background: var(--panel-accent); border: 1px solid #d4e6ea; border-radius: var(--radius); padding: 24px 26px 22px; font-size: 15.5px; line-height: 1.5; font-style: italic; color: var(--ink); box-shadow: var(--shadow); margin: 0; display: flex; flex-direction: column; position: relative; }
.q em { font-style: italic; }
.q .attr { margin-top: auto; padding-top: 14px; }

/* ---------- offer / grids ---------- */
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* ---------- aspiration band (bright, high on page) ---------- */
.band { position: relative; }
.band img { width: 100%; height: 56vh; min-height: 380px; object-fit: cover; object-position: center 32%; display: block; }
.band .band-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 28px; background: linear-gradient(0deg, rgba(20,26,28,.62) 0%, rgba(20,26,28,0) 100%); }
.band .band-copy .inner { max-width: 1120px; margin: 0 auto; }
.band .band-copy p { margin: 0; font-family: var(--serif); font-size: clamp(22px, 3vw, 32px); line-height: 1.2; color: #fff; text-wrap: balance; max-width: 20ch; }

/* ---------- aspiration closer ---------- */
.closer { padding: 0; position: relative; }
.closer img { width: 100%; height: 46vh; object-fit: cover; object-position: center 30%; display: block; }
.closer .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .95) 96%); }
.closer .line { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; font-family: var(--serif); font-size: clamp(21px, 3vw, 30px); color: var(--ink); padding: 0 28px; text-wrap: balance; margin: 0; }

/* ---------- contact ---------- */
.contact { padding-top: 48px; padding-bottom: 20px; }
.contact-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px; box-shadow: var(--shadow-lift); display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
form.contact-form { display: grid; gap: 14px; }
.contact-form label { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.contact-form input, .contact-form textarea { width: 100%; background: #fbfaf8; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px; font-family: var(--sans); font-size: 16px; }
.contact-form input.prefilled { color: var(--ink-dim); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- interior pages ---------- */
.page-head { padding: 72px 0 56px; }
.page-head h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; margin: 0 0 18px; text-wrap: balance; max-width: 24ch; }
.page-head .lede { margin-top: 6px; }

article.essay { padding: 56px 0 40px; }
article.essay .content { max-width: 70ch; }
article.essay .content > * { margin: 0 0 1.15em; }
article.essay h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.1; margin: 0 0 14px; text-wrap: balance; }
article.essay h2 { font-size: clamp(24px, 3vw, 30px); margin-top: 1.6em; }
article.essay h3 { font-size: 21px; margin-top: 1.4em; margin-bottom: .5em; }
article.essay.tight-topics .content > * { margin-bottom: .7em; }
article.essay.tight-topics h3 { margin-top: .85em; margin-bottom: .3em; }
article.essay.tight-topics img { max-width: 100%; max-height: 400px; width: auto; height: auto; margin: 1.4em auto; }
article.essay.tight-topics img[src*="Why-we-get-sick"],
article.essay.tight-topics img[src*="Outlive-book-cover"],
article.essay.tight-topics img[src*="Reverse-osteoporosis"] { max-width: 160px; }
.wrap.tight-head .page-head { padding-bottom: 20px; }
article.essay .meta { font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 40px; }
article.essay img { display: block; margin: 2em auto; box-shadow: var(--shadow-lift); border-radius: var(--radius); }
.bones article.essay img { max-width: 50%; margin: 1.4em auto; }
.bones article.essay img[src*="graph"] { max-width: 92%; }
/* Bones article subheads styled like the condition-page subheads */
.bones article.essay h3 { font-size: clamp(27px, 3.5vw, 35px); font-weight: 700; line-height: 1.14; margin-top: 1.2em; margin-bottom: 9px; }
.bones article.essay h2 { font-size: clamp(27px, 3.5vw, 35px); }
article.essay blockquote { border-left: 3px solid var(--teal); margin: 1.5em 0; padding: .3em 0 .3em 1.3em; color: var(--ink-dim); font-family: var(--serif); font-size: 1.06em; }
article.essay a { color: var(--teal); }
article.essay ul, article.essay ol { padding-left: 1.4em; }
article.essay li { margin-bottom: .4em; }
article.essay table { border-collapse: collapse; font-size: 15px; }
article.essay .table-scroll { overflow-x: auto; }
article.essay td, article.essay th { border: 1px solid var(--line); padding: 8px 12px; }

/* essay funnel-back band */
.funnel-back { background: var(--panel); border-radius: var(--radius); padding: 34px 38px; margin: 72px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; justify-content: space-between; }
.funnel-back .fb-copy { max-width: 52ch; }
.funnel-back .fb-copy strong { font-family: var(--serif); font-weight: 700; font-size: 21px; display: block; margin-bottom: 6px; }
.funnel-back .fb-copy span { color: var(--ink-dim); font-size: 15px; }

/* blog index + video cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; margin: 40px 0 30px; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; text-decoration: none; display: block; box-shadow: var(--shadow); overflow: hidden; }
.post:hover { border-color: var(--teal-soft); box-shadow: var(--shadow-lift); }
.post .kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.post h3 { font-size: 20px; line-height: 1.3; color: var(--ink); margin: 0 0 10px; }
.post p { font-size: 14.5px; color: var(--ink-dim); margin: 0; }
.post .date { font-size: 12.5px; color: var(--ink-dim); letter-spacing: .06em; margin-top: 12px; display: block; }
.video-card .vthumb { display: block; position: relative; margin: -26px -28px 18px; overflow: hidden; aspect-ratio: 16 / 9; background: #111; }
.video-card .vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; background: rgba(0, 0, 0, .18); transition: background .2s ease; }
.video-card:hover .play { background: rgba(0, 0, 0, .38); }

/* ---------- problem funnel pages ---------- */
.problem-hero { background: var(--panel); padding: 40px 0 30px; }
/* Tighter vertical rhythm on every page except the snap homepage */
html:not(.snap) .panel { padding: 18px 0; }
html:not(.snap) .problem-hero { padding: 22px 0 12px; }
html:not(.snap) h2 { margin-bottom: 9px; line-height: 1.1; }
html:not(.snap) .label { margin-bottom: 7px; }
html:not(.snap) .measure p { margin-bottom: 0.55em; line-height: 1.5; }
html:not(.snap) .lede { line-height: 1.45; margin-bottom: 5px; }
html:not(.snap) .q { padding: 16px 20px 14px; }
html:not(.snap) .q em { line-height: 1.45; }
/* Adjacent plain panels: don't double their padding (keeps the teal offer's padding) */
html:not(.snap) .panel + .panel:not([style]) { padding-top: 0; }
p + .q { margin-top: 14px; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.check-list { list-style: none; margin: 18px 0 4px; padding: 0; display: grid; gap: 11px; }
.check-list li { position: relative; padding-left: 30px; color: var(--ink); }
.check-list li::before { content: "\2713"; position: absolute; left: 0; top: -1px; color: var(--teal); font-weight: 700; font-size: 17px; }
.ai-slot { border: 1px dashed #b9c7cb; border-radius: var(--radius); padding: 48px 20px; text-align: center; color: var(--ink-dim); background: var(--panel-accent); max-width: 460px; font-size: 13.5px; }
.ai-panel { background: #15181b; color: #fff; padding: 30px 0; }
.ai-panel-inner { max-width: 960px; margin: 0 auto; text-align: center; }
.ai-panel-inner img { width: 100%; display: block; border-radius: var(--radius); }
.ai-panel-inner p { color: rgba(255, 255, 255, .82); margin: 20px 0 0; }
.ai-panel-inner strong { color: #fff; }
.problem-hero .frame { max-width: 240px; }
.problem-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.mirror-list { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 12px; max-width: 60ch; }
.mirror-list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 20px; font-size: 16.5px; box-shadow: var(--shadow); }

/* ---------- footer ---------- */
footer.site { padding: 28px 0 24px; color: var(--ink-dim); font-size: 14px; background: var(--panel); margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 16px; }
.foot-grid h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }
.foot-grid a { display: block; color: var(--ink-dim); text-decoration: none; padding: 2px 0; }
.foot-grid a:hover { color: var(--teal); }
.legal { padding-top: 10px; }

/* ---------- full-page snap panels (homepage only) ---------- */
html.snap { scroll-snap-type: y proximity; scroll-padding-top: 130px; }
.snap main > .hero,
.snap main > .panel,
.snap main > .closer,
.snap main > .wrap > .contact { scroll-snap-align: start; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  /* No text over the photo on narrow screens: photo on top, copy below on solid dark. */
  .hero { display: flex; flex-direction: column; }
  .hero img.bg { position: static; width: 100%; height: 44vh; object-fit: cover; object-position: center 22%; }
  .hero .scrim { display: none; }
  .hero-inner { min-height: 0; align-items: stretch; }
  .hero-copy { padding: 36px 0 52px; max-width: none; }
  .story-banner img { height: 46vh; }
  .story-banner .scrim { background: linear-gradient(90deg, rgba(9, 11, 13, .88) 0%, rgba(9, 11, 13, .6) 55%, rgba(9, 11, 13, .25) 100%); }
  .story-banner-copy { max-width: 100%; }
  .proof-grid { grid-template-columns: 1fr; gap: 22px; padding: 30px 0; }
  .proof-photo { max-width: 300px; }
  .story-body { max-width: none; padding: 24px 0 36px; }
  .story-grid, .offer-grid, .contact-panel, .problem-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 18px; }
  .contact-panel { padding: 34px 26px; }
  .panel { padding: 36px 0; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (max-width: 620px) {
  .bar-inner { gap: 12px; padding: 12px 18px; }
  .wordmark { font-size: 12.5px; letter-spacing: .16em; }
  .bar-nav { width: auto; justify-content: center; flex-wrap: wrap; }
  nav.links { flex: none; justify-content: center; gap: 4px 12px; }
  nav.links a { font-size: 13px; }
  .btn { padding: 9px 16px; font-size: 14px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; }
}

/* ---------- nav dropdown ---------- */
.nav-drop { position: relative; }
.nav-drop summary { list-style: none; cursor: pointer; color: var(--ink-dim); font-size: 14.5px; padding: 4px 0; user-select: none; }
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary::after { content: " \25BE"; font-size: 11px; color: var(--ink-dim); }
.nav-drop summary:hover, .nav-drop[open] summary { color: var(--teal); }
.nav-drop .menu { position: absolute; top: calc(100% + 10px); left: -12px; background: #ffffff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); padding: 10px; min-width: 240px; display: grid; z-index: 60; }
.nav-drop .menu a { color: var(--ink); text-decoration: none; font-size: 15px; padding: 9px 14px; border-radius: 8px; }
.nav-drop .menu a:hover, .nav-drop .menu a:focus-visible { background: var(--panel); color: var(--teal); }
@media (max-width: 620px) {
  .nav-drop .menu { left: auto; right: -40px; }
}
