/* Marketing stories. The examples inside the devices have their own identities;
   everything around them uses the Apphaven brand tokens in site.css. */
html { --marketing-header-height: 72px; scroll-padding-top: calc(var(--marketing-header-height) + 16px); }
/* Lucide arrows are decorative inline SVGs, sized consistently across page links. */
.icon-link { display: inline-flex; align-items: center; gap: 8px; }
.marketing-page .arrow-icon, .landing-page .arrow-icon { width: 16px; height: 16px; flex-shrink: 0; }
.landing-page .icon-link .arrow-icon { margin-left: 0; }
.landing-page .hero-copy .icon-link, .landing-page .closing-actions .icon-link { gap: 20px; }
.skip-link { position: fixed; z-index: 20; left: 20px; top: -80px; padding: 12px 18px; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 12px; }
.marketing-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 7px; }
.marketing-header .top .marketing-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.marketing-header .marketing-nav a:last-child { color: var(--ink); }
.marketing-page :is(a, button, summary):focus-visible, .landing-page .marketing-nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.marketing-header { position: sticky; top: calc(-1 * (var(--marketing-header-height) + 1px)); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); transition: top 220ms ease; }
.marketing-header.is-revealed, .marketing-header:focus-within { top: 0; }
.back-to-top { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 10; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ink); border-radius: var(--r-sm); background: var(--ink); color: var(--bg); cursor: pointer; visibility: hidden; opacity: 0; transform: translateY(8px); transition: opacity 180ms ease, transform 180ms ease, visibility 180ms; }
.back-to-top.is-visible { visibility: visible; opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--ink-2); }
.back-to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.marketing-wrap { max-width: 1320px; margin: auto; padding-inline: clamp(20px, 4.5vw, 72px); }
.marketing-header .top { height: var(--marketing-header-height); }
.marketing-header .brand { font-size: 1.5rem; }
.marketing-page h1 { font-size: clamp(3.1rem, 5.4vw, 5.5rem); line-height: .99; letter-spacing: -.025em; max-width: 14ch; text-wrap: balance; }
.marketing-page h2, .pathways h2 { font-size: clamp(2.2rem, 3.6vw, 3.8rem); line-height: 1.03; letter-spacing: -.025em; text-wrap: balance; }
.marketing-page h3 { font-size: 1.45rem; }
.eyebrow { margin: 0 0 20px; font: 500 .73rem/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.story-hero { display: grid; grid-template-columns: .85fr 1.15fr; gap: 44px; align-items: center; padding-block: 82px 70px; }
.story-hero .story-lead { font-size: clamp(1.08rem, 1.7vw, 1.22rem); max-width: 39ch; color: var(--ink-2); margin-block: 25px 28px; line-height: 1.6; }
.story-hero .hero-price { margin: 18px 0 0; font-size: .85rem; color: var(--muted); }
.story-hero .btn { min-height: 48px; padding: 15px 21px; }
.story-hero-art { min-width: 0; padding-top: 22px; }
.visual-caption { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.visual-caption a { font-weight: 500; color: var(--ink); }
.device-stage { position: relative; container-type: inline-size; padding-bottom: 4%; }
.screen-browser { display: block; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--ink); }
.browser-top { display: flex; align-items: center; gap: 6px; height: 30px; padding-inline: 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-top i { width: 5px; height: 5px; border: 1px solid var(--placeholder); border-radius: 50%; }
.browser-address { flex: 1; text-align: center; margin-right: 26px; font: 400 9px/1 var(--font-mono); color: var(--muted); }
.screen-browser img, .screen-phone img { display: block; width: 100%; height: auto; }
.screen-browser img { aspect-ratio: 8 / 5; object-fit: cover; object-position: top; }
.device-stage.with-phone { padding: 0 8% 9% 0; }
.screen-phone { display: block; position: relative; padding: 6px; border: 1px solid var(--placeholder); border-radius: 25px; background: var(--ink); overflow: hidden; }
.screen-phone::after { content: ""; position: absolute; width: 26%; height: 3px; bottom: 9px; left: 37%; border-radius: 3px; background: var(--ink); }
.screen-phone img { border-radius: 19px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.with-phone > .screen-phone { position: absolute; width: 28%; right: 0; bottom: 0; }
.monitor-stage { padding-bottom: 12%; }
.monitor-stage > .screen-browser { border: 8px solid var(--ink); border-bottom-width: 17px; border-radius: 10px; }
.monitor-stage > .screen-browser .browser-top { display: none; }
.monitor-stage::before { content: ""; position: absolute; width: 17%; height: 11%; bottom: 1%; left: 37%; background: linear-gradient(var(--line-strong), var(--surface-2)); clip-path: polygon(23% 0, 77% 0, 88% 90%, 100% 100%, 0 100%, 12% 90%); }
.monitor-stage::after { content: ""; position: absolute; bottom: 0; left: 32%; width: 27%; height: 2%; border-radius: 3px; background: var(--line-strong); }
.monitor-stage > .screen-phone { z-index: 1; }
.story-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
.story-intro p:last-child { margin-bottom: 0; max-width: 47ch; color: var(--ink-2); }
.story-section { padding-block: 88px; }
.story-section > .eyebrow { margin-bottom: 16px; }
.story-section > h2 { max-width: 20ch; }
.story-section > .section-lead { max-width: 56ch; color: var(--ink-2); font-size: 1.15rem; margin-block: 22px 44px; }
.story-row { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 72px; }
.story-row.reverse { grid-template-columns: .85fr 1.15fr; }
.story-row > * { min-width: 0; }
.story-copy h2 { max-width: 15ch; }
.story-copy > p:not(.eyebrow) { max-width: 43ch; color: var(--ink-2); margin: 22px 0; }
.story-copy ul { list-style: none; padding: 0; margin: 25px 0 0; }
.story-copy li { padding: 15px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .96rem; }
.story-copy li b { display: block; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.gallery-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 38px; }
.gallery-pair figure { min-width: 0; margin: 0; }
.gallery-pair h3 { margin: 25px 0 7px; font-size: 1.7rem; }
.gallery-pair p { font-size: .94rem; color: var(--ink-2); max-width: 42ch; }
.figure-number { color: var(--muted); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .07em; }
.proof-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 46px; }
.proof-list article { padding-top: 21px; border-top: 1px solid var(--line-strong); }
.proof-list p { font-size: .95rem; color: var(--ink-2); margin: 13px 0 0; }
.proof-list .figure-number { display: block; margin-bottom: 18px; }
.share-stage { background: var(--surface-2); padding: 36px; border-radius: var(--r-sm); }
.share-card { margin: -55px 0 0 auto; position: relative; width: 74%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); overflow: hidden; }
.share-card img { display: block; width: 100%; height: auto; aspect-ratio: 1.91; object-fit: cover; }
.share-card div { padding: 17px 20px; }
.share-card small { display: block; font: .62rem var(--font-mono); text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.share-card strong { display: block; font-weight: 500; font-size: 1rem; line-height: 1.35; }
.share-card p { font-size: .8rem; color: var(--muted); margin: 7px 0 0; }
.phone-lineup { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 28px 0 10px; }
.phone-lineup .screen-phone { width: 43%; max-width: 245px; }
.phone-lineup .screen-phone:first-child { transform: translateY(-24px); }
.phone-lineup .screen-phone:last-child { transform: translateY(24px); }
.install-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 0; margin: 42px 0 0; list-style: none; counter-reset: install; }
.install-steps li { border-top: 1px solid var(--line); padding-top: 19px; counter-increment: install; }
.install-steps li::before { content: "0" counter(install); display: block; font: .75rem var(--font-mono); margin-bottom: 15px; color: var(--muted); }
.install-steps b { display: block; font: 600 1.45rem var(--font-display); }
.install-steps p { font-size: .94rem; color: var(--ink-2); margin-top: 8px; }
.detail-note { color: var(--muted); font-size: .83rem; margin: 27px 0 0; max-width: 80ch; }
.request-note { display: flex; align-items: flex-start; gap: 15px; padding: 20px 24px; border: 1px solid var(--line-strong); background: var(--surface); margin-bottom: 24px; border-radius: var(--r-sm); }
.request-note span { font: .65rem var(--font-mono); text-transform: uppercase; color: var(--muted); flex: none; padding-top: 4px; }
.request-note p { font-size: 1rem; margin: 0; }
.story-close { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; border: 0; padding-block: 80px; }
.story-close h2 { margin-bottom: 15px; }
.story-close p { color: var(--ink-2); max-width: 49ch; margin: 0; }
.story-close .btn { padding: 17px 25px; }
.cross-story { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cross-story p { margin: 0; font-size: .98rem; color: var(--ink-2); }
.marketing-foot { margin-top: 12px; }
.example-note { font-size: .75rem; color: var(--muted); }
.pathways .section-lead { color: var(--ink-2); max-width: 51ch; margin-block: 22px 35px; }
.pathway-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.pathway { min-width: 0; }
.pathway > .pathway-copy { margin-top: 25px; }
.pathway h3 { font-size: 2rem; }
.pathway p { color: var(--ink-2); font-size: .98rem; max-width: 41ch; }
.text-link { display: inline-flex; gap: 24px; align-items: center; font-weight: 500; font-size: .95rem; min-height: 44px; }
.homepage-proof { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
.homepage-proof > div { min-width: 0; }
.homepage-proof h2 { font-size: clamp(2rem, 3vw, 2.8rem); max-width: 18ch; }
.homepage-proof .lead { font-size: 1.15rem; color: var(--ink-2); }
.landing-page .utilities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.landing-page .utilities-grid b { display: block; }
.landing-page .hero-copy h1 { max-width: none; }
.agent-options { font-size: .85rem; color: var(--muted); margin: -10px 0 25px; }
@media (min-width: 1200px) { .landing-page .hero-copy h1 { font-size: clamp(48px, 4.35cqw, 72px); } }
@media (max-width: 1050px) {
  .story-hero { gap: 30px; padding-block: 64px; }
  .story-row, .story-row.reverse { gap: 40px; }
  .share-stage { padding: 24px; }
}
@media (max-width: 760px) {
  html { --marketing-header-height: 64px; }
  .marketing-page h1 { font-size: clamp(3.4rem, 10vw, 4.7rem); max-width: 14ch; }
  .story-hero, .story-intro, .story-row, .story-row.reverse, .gallery-pair, .pathway-grid, .homepage-proof { grid-template-columns: 1fr; }
  .story-hero { gap: 25px; padding-block: 46px 45px; }
  .story-hero .story-lead { max-width: 42ch; }
  .story-hero-art { margin-top: 14px; }
  .story-intro, .story-row { gap: 32px; }
  .story-row > .story-copy { order: -1; }
  .story-section { padding-block: 54px; }
  .story-section > h2, .story-copy h2 { max-width: 20ch; }
  .gallery-pair { gap: 42px; }
  .proof-list { grid-template-columns: 1fr; gap: 24px; }
  .proof-list article { display: grid; grid-template-columns: 30px 1fr; gap: 0 16px; }
  .proof-list p { grid-column: 2; margin-top: 7px; }
  .proof-list .figure-number { padding-top: 6px; margin: 0; }
  .install-steps { gap: 20px; }
  .install-steps p { font-size: .88rem; }
  .phone-lineup { margin-block: 20px; gap: 18px; }
  .story-close { grid-template-columns: 1fr; padding-block: 60px; }
  .story-close > div:last-child { justify-self: start; }
  .pathway-grid { gap: 46px; }
}
@media (max-width: 480px) {
  .marketing-header .marketing-nav { gap: 15px; }
  .marketing-header .top .marketing-nav a { font-size: .8rem; }
  .marketing-header .brand { font-size: 1.36rem; }
  .marketing-header .top { gap: 12px; }
  .marketing-page h1 { font-size: 3.3rem; }
  .eyebrow { font-size: .66rem; }
  .share-stage { padding: 18px; }
  .share-card { width: 86%; margin-top: -18px; }
  .share-card div { padding: 14px; }
  .install-steps { grid-template-columns: 1fr; gap: 12px; }
  .install-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 0 15px; }
  .install-steps li::before { padding-top: 7px; }
  .install-steps p { grid-column: 2; font-size: .94rem; }
  .landing-page .utilities-grid { grid-template-columns: 1fr; }
  .request-note { padding: 17px; gap: 12px; }
  .with-phone > .screen-phone { padding: 4px; border-radius: 16px; }
  .with-phone > .screen-phone img { border-radius: 12px; }
  .monitor-stage > .screen-browser { border-width: 5px; border-bottom-width: 10px; }
}
@media (max-width: 360px) {
  html { --marketing-header-height: 88px; }
  .marketing-header .top { height: auto; flex-wrap: wrap; padding-block: 10px; gap: 4px; }
  .marketing-header .marketing-nav { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .marketing-page *, .landing-page * { scroll-behavior: auto !important; transition: none !important; } }

.install-walkthrough { display: grid; grid-template-columns: .6fr 1fr; gap: 72px; align-items: center; margin-top: 44px; }
.install-phone { width: 100%; max-width: 210px; margin: auto; text-align: center; }
.install-walkthrough .install-steps { grid-template-columns: 1fr; margin: 0; gap: 24px; }
.install-walkthrough .install-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 0 15px; }
.install-walkthrough .install-steps li::before { padding-top: 7px; }
.install-walkthrough .install-steps p { grid-column: 2; }
@media (max-width: 760px) { .install-walkthrough { gap: 32px; } }
@media (max-width: 480px) { .install-walkthrough { grid-template-columns: 1fr; } }

/* A phone-first app story, with a static capture until the live illustration is ready. */
.app-tour { min-width: 0; }
.app-tour-stage { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 42px); }
.app-hero-art .tour-phone { width: 55%; max-width: 292px; flex: none; }
.tour-screen { position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: 19px; overflow: hidden; }
.tour-screen iframe { position: absolute; top: 0; left: 0; width: 390px; height: 844px; border: 0; transform-origin: top left; opacity: 0; pointer-events: none; }
.app-tour[data-ready="true"] iframe { opacity: 1; }
.app-tour[data-ready="true"] .tour-poster { visibility: hidden; }
.tour-promises { display: flex; flex-direction: column; gap: 32px; max-width: 175px; }
.tour-promises span { font: 400 .6rem/1.4 var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.tour-promises p { font: 500 clamp(1.05rem, 1.45vw, 1.3rem)/1.25 var(--font-display); color: var(--ink); margin: 8px 0 0; }
.tour-playback { display: flex; gap: 16px; align-items: center; justify-content: space-between; min-height: 48px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 10px; }
.tour-step { color: var(--ink-2); font-size: .79rem; line-height: 1.4; }
.tour-toggle { display: inline-flex; flex: none; gap: 7px; align-items: center; min-height: 44px; padding: 8px 4px; border: 0; background: transparent; color: var(--ink); font: 500 .78rem var(--font-body); cursor: pointer; }
.tour-toggle[hidden] { display: none; }
.tour-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.tour-pause-icon, [data-playing="true"] .tour-play-icon { display: none; }
[data-playing="true"] .tour-pause-icon { display: block; }
.tour-disclosure { margin: 4px 0 0; font-size: .68rem; color: var(--muted); }
.app-hero-art .visual-caption { margin-top: 15px; }
.pathway-grid { align-items: end; }
.app-pathway .tour-phone { width: 42%; max-width: 192px; flex: none; }
.app-pathway .tour-promises { gap: 23px; }
.app-pathway .tour-playback { margin-top: 12px; }
.pathway > .pathway-copy { min-height: 176px; }
@media (max-width: 1050px) and (min-width: 761px) {
  .app-tour-stage { gap: 18px; }
  .tour-promises { max-width: 120px; }
  .tour-promises span { font-size: .53rem; }
  .tour-promises p { font-size: 1rem; }
}
@media (max-width: 760px) {
  .app-tour-stage { gap: 28px; }
  .app-hero-art .tour-phone { width: 55%; max-width: 270px; }
  .app-pathway .tour-phone { width: 50%; max-width: 215px; }
  .tour-promises p { font-size: 1.22rem; }
  .pathway > .pathway-copy { min-height: 0; }
}
@media (max-width: 380px) {
  .app-tour-stage { gap: 16px; }
  .tour-promises span { font-size: .5rem; }
  .tour-promises p { font-size: 1rem; }
  .tour-promises { gap: 22px; }
}
@media (max-width: 480px) {
  .tour-promises { display: none; }
  .app-hero-art .tour-phone { width: 82%; max-width: 270px; }
  .app-pathway .tour-phone { width: 76%; max-width: 245px; }
}
