/* A2 Apple Story. Clarivus360 round two. Contract: docs/03_design/ART-DIRECTION-v2.md section 6.2 */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../../assets/fonts/Inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../../assets/fonts/Inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../../assets/fonts/Inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url('../../assets/fonts/InterTight-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url('../../assets/fonts/InterTight-600.woff2') format('woff2'); }

:root {
  --white: #FFFFFF;
  --off: #F5F7FA;
  --navy: #0B183D;
  --navy-2: #12385C;
  --teal: #1EA5A6;
  --teal-ink: #117A7B;
  --text: #1D1D1F;
  --muted: #6E6E73;
  --line: #D9DEE5;
  --font-display: "Inter Tight", "Inter", Arial, "Helvetica Neue", sans-serif;
  --font-text: "Inter", Arial, "Helvetica Neue", sans-serif;
  --nav-h: 52px;
  --wrap: 1260px;
  --gutter: 40px;
  --pad: 144px;
  --radius: 28px;
  --ease: cubic-bezier(.25, .1, .25, 1);
}
@media (max-width: 639px) { :root { --gutter: 20px; --pad: 88px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--white); color: var(--text); font-family: var(--font-text); font-size: 19px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, figure, table { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(780px + 2 * var(--gutter)); }
.center { text-align: center; }

/* Type roles. Max two sizes per screen plus the label. */
.headline { font-family: var(--font-display); font-weight: 600; font-size: 64px; line-height: 1.05; letter-spacing: -0.01em; color: var(--navy); text-wrap: balance; }
.headline-gradient { background: linear-gradient(90deg, #0B183D 0%, #4F7396 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sub { font-size: 21px; font-weight: 600; line-height: 1.38; color: var(--muted); max-width: 46ch; text-wrap: pretty; }
.sub strong { font-weight: 600; color: var(--navy); }
.center .sub, .sub.center { margin-left: auto; margin-right: auto; }
.kicker { font-weight: 600; font-size: 21px; line-height: 1.2; color: var(--teal-ink); }
.label { display: inline-block; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--navy); background: #E6F4F4; padding: 8px 16px; border-radius: 999px; }
.kicker + .headline, .kicker + .hero-title, .label + .headline { margin-top: 10px; }
.headline + .sub, .hero-title + .sub { margin-top: 24px; }

/* Bands */
.band-white { background: var(--white); }
.band-off { background: var(--off); }
.band-navy { background: var(--navy); color: #fff; }
.band-navy .headline { color: #fff; }
.band-navy .sub { color: #AAB4C8; }
.band-navy .sub strong { color: #fff; }
.band-navy .kicker { color: var(--teal); }
.screen { padding: var(--pad) 0; min-height: min(80vh, 760px); display: flex; flex-direction: column; justify-content: center; }

/* Buttons. Primary pill, secondary chevron link. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 36px; }
.center .actions { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 21px; border-radius: 999px; background: var(--teal); color: var(--navy); font-weight: 600; font-size: 17px; text-decoration: none; transition: background-color 200ms var(--ease), color 200ms var(--ease); white-space: nowrap; }
.btn:hover { background: var(--navy); color: #fff; }
.band-navy .btn:hover { background: #fff; color: var(--navy); }
.chev { font-size: 17px; font-weight: 500; color: var(--teal-ink); text-decoration: none; white-space: nowrap; }
.chev::after { content: "\203A"; display: inline-block; margin-left: 6px; font-size: 1.25em; line-height: 0; transform: translateY(1px); transition: transform 200ms var(--ease); }
.chev:hover { text-decoration: underline; text-underline-offset: 4px; }
.chev:hover::after { transform: translate(3px, 1px); }
.band-navy .chev { color: var(--teal); }
.fine { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* Nav: 52px, translucent, hairline after scroll */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgb(255 255 255 / 80%); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease); }
.nav.is-scrolled { border-bottom-color: rgb(11 24 61 / 10%); }
.nav-inner { height: 100%; max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 32px; }
.nav-logo img { width: 120px; height: auto; }
.nav-links { display: flex; gap: 32px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--text); text-decoration: none; opacity: .85; }
.nav-links a:hover { opacity: 1; color: var(--navy); }
.nav-cta { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 999px; background: var(--teal); color: var(--navy); font-size: 14px; font-weight: 600; text-decoration: none; }
.nav-cta:hover { background: var(--navy); color: #fff; }
.nav-menu { display: none; margin-left: auto; background: none; border: 0; padding: 8px 0; font: 500 15px/1 var(--font-text); color: var(--navy); cursor: pointer; }

/* Hero: copy on white, then full-bleed video or photo */
.hero { background: var(--white); }
.hero-copy { padding-top: 96px; padding-bottom: 56px; text-align: center; }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: 88px; line-height: 1.04; letter-spacing: -0.015em; color: var(--navy); text-wrap: balance; }
.hero-copy .sub { margin-left: auto; margin-right: auto; max-width: 40ch; }
.hero-copy .actions { justify-content: center; margin-top: 32px; }
.hero-media { position: relative; height: clamp(560px, 82vh, 820px); overflow: hidden; background: #EDE9E3; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; max-width: none; }
.video-toggle { position: absolute; right: 24px; bottom: 24px; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: rgb(255 255 255 / 78%); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--navy); cursor: pointer; }
.video-toggle[hidden] { display: none; }
.video-toggle:hover { background: #fff; }
.icon-pause { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.video-toggle.is-paused .icon-pause { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; margin-left: 3px; }

/* Hero settle */
.js .hero-copy > * { animation: rise 900ms var(--ease) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 80ms; }
.js .hero-copy > :nth-child(3) { animation-delay: 160ms; }
.js .hero-copy > :nth-child(4) { animation-delay: 240ms; }
.js .hero-copy > :nth-child(5) { animation-delay: 300ms; }
.js .hero-video { animation: settle 1600ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.04); } to { transform: scale(1); } }

/* Story. Default is the static sequence: phone, no JS and reduced motion. */
.story { padding: var(--pad) 0; }
.story-head { text-align: center; }
.story-head .sub { margin-left: auto; margin-right: auto; max-width: 40ch; }
.story-panel { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 40px auto 0; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 64px; }
.story-cover { margin: 0 calc(50% - 50vw); width: 100vw; height: clamp(520px, 80vh, 810px); overflow: hidden; background: var(--off); }
.story-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.pin-only { display: none !important; }
.beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; counter-reset: beat; }
.beat { border-top: 1px solid var(--line); padding-top: 24px; }
.beat-num { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.06em; color: var(--teal-ink); }
.beat-name { margin-top: 10px; font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; color: var(--navy); }
.today, .after { margin-top: 14px; font-size: 19px; line-height: 1.45; }
.today { color: var(--muted); }
.after { color: var(--navy); font-weight: 500; }
.today span, .after span { display: block; font-weight: 600; }
.today span { color: #8E8E93; }
.after span { color: var(--teal-ink); }

/* Story, pinned mode. app.js adds .story-pinned on wide screens without reduced motion. */
.story-pinned .story-panel { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); max-width: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.story-pinned .story-cover { display: none; }
.story-pinned .pin-only { display: block !important; }
.story-pinned .story-text { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 48px 72px 48px max(var(--gutter), calc((100vw - var(--wrap)) / 2)); }
.story-pinned .story-text > .label { align-self: flex-start; }
.story-pinned .beats { display: block; position: relative; height: 360px; margin-top: 40px; }
.story-pinned .beat { position: absolute; inset: 0; border: 0; padding: 0; opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); pointer-events: none; }
.story-pinned .beat.is-active { opacity: 1; transform: none; pointer-events: auto; }
.story-pinned .beat-name { font-size: clamp(48px, 3.9vw, 56px); line-height: 1.05; letter-spacing: -0.01em; margin-top: 14px; }
.story-pinned .today, .story-pinned .after { font-size: 22px; margin-top: 22px; max-width: 30ch; }
.story-pinned .dots { display: flex !important; gap: 10px; margin-top: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #C9D1DC; transition: background-color 300ms var(--ease), width 300ms var(--ease); }
.dots span.is-active { width: 24px; border-radius: 999px; background: var(--teal); }
.story-media { position: relative; height: 100%; background: var(--off); }
.story-media figure { position: absolute; inset: 0; opacity: 0; transition: opacity 800ms var(--ease); }
.story-media figure.is-active { opacity: 1; }
.story-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.story-media figure.pos-right img { object-position: 30% 40%; }
.story-steps { margin-top: calc(-100vh + var(--nav-h)); pointer-events: none; }
.story-steps .step { height: 100vh; }

/* Measures, always blank */
.measures { margin-top: 120px; max-width: calc(780px + 2 * var(--gutter)); }
.measures .kicker { margin-top: 28px; }
.measure-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 19px; }
.measure-table th, .measure-table td { text-align: left; padding: 18px 0; border-bottom: 1px solid var(--line); }
.measure-table thead th { font-size: 15px; font-weight: 600; color: var(--muted); padding-top: 0; }
.measure-table tbody th { font-weight: 500; color: var(--navy); padding-right: 24px; }
.measure-table td { width: 22%; }
.blank { display: inline-block; width: 56px; height: 2px; background: var(--line); vertical-align: middle; }
.closing { margin-top: 32px; font-size: 22px; line-height: 1.4; color: var(--navy); max-width: 40ch; }

/* Method, dark, compact */
.method { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 64px; max-width: 1080px; margin-left: auto; margin-right: auto; }
.method-num { display: block; font-family: var(--font-display); font-weight: 500; font-size: 64px; line-height: 1; color: var(--teal); }
.method h3 { margin-top: 20px; font-family: var(--font-display); font-weight: 600; font-size: 26px; color: #fff; }
.method p { margin-top: 10px; color: #B9C3D6; }
.method-close { margin-top: 64px; text-align: center; font-size: 22px; color: #fff; }

/* Full-bleed photo band */
.photo-band { height: clamp(560px, 80vh, 760px); overflow: hidden; background: var(--off); }
.photo-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }

/* Who it is for */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 40px; }
.photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: #E4E9EF; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.two-up h3 { margin-top: 28px; font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; color: var(--navy); }
.two-up p { margin-top: 10px; color: var(--muted); max-width: 40ch; }

/* Andres */
.about { display: grid; grid-template-columns: 440px 1fr; gap: 96px; align-items: center; max-width: calc(1180px + 2 * var(--gutter)); }
.about-photo img { width: 440px; height: 440px; border-radius: 50%; background: #EEF2F6; }
.about-photo figcaption { margin-top: 20px; text-align: center; font-size: 15px; color: var(--muted); }
.about .sub { max-width: 42ch; }
.about .chev { display: inline-block; margin-top: 28px; }

/* Answers */
.faq { margin-top: 40px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; font-weight: 500; font-size: 21px; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 26px; font-weight: 400; line-height: 1; color: var(--teal-ink); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 26px; color: var(--muted); max-width: 60ch; }

/* Final call */
.final .actions { margin-top: 36px; }
.demo-note { display: inline-block; margin-top: 36px; font-size: 14px; font-weight: 500; letter-spacing: 0.02em; color: #fff; background: rgb(255 255 255 / 10%); padding: 8px 16px; border-radius: 999px; }

/* Footer, light */
.footer { background: var(--off); padding: 72px 0 40px; font-size: 14px; color: var(--muted); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-brand img { width: 200px; height: auto; }
.footer-brand p { margin-top: 20px; max-width: 34ch; line-height: 1.5; }
.footer h3 { font-size: 13px; font-weight: 600; color: var(--navy); }
.footer ul { margin-top: 14px; display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--navy); text-decoration: underline; }
.footer-bottom { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Reveal: once, at 20 percent */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1023px) {
  .hero-title { font-size: 72px; }
  .headline { font-size: 56px; }
  .beats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 300px 1fr; gap: 48px; }
  .about-photo img { width: 300px; height: 300px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* Phone */
@media (max-width: 639px) {
  body { font-size: 17px; }
  .headline { font-size: 40px; }
  .sub { font-size: 19px; }
  .kicker { font-size: 19px; }
  .screen { min-height: 0; }

  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--line); }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 17px; }
  .nav-cta { display: none; }
  .nav-menu { display: block; }

  .hero-copy { padding-top: 48px; padding-bottom: 40px; }
  .hero-title { font-size: 48px; }
  .hero-media { height: min(62vh, 480px); }
  .hero-video { object-position: 24% 40%; }
  .video-toggle { right: 16px; bottom: 16px; }
  .actions { flex-direction: column; align-items: stretch; gap: 20px; }
  .btn { width: 100%; }
  .chev { text-align: center; }

  .story-panel { margin-top: 40px; gap: 40px; }
  .story-cover { height: min(70vh, 420px); }
  .story-cover img { object-position: 45% 30%; }
  .beats { grid-template-columns: 1fr; gap: 32px; }
  .beat-name { font-size: 26px; }
  .today, .after { font-size: 17px; }
  .measures { margin-top: 80px; }
  .measure-table { font-size: 16px; }
  .measure-table td { width: 18%; }
  .blank { width: 32px; }
  .closing { font-size: 19px; }

  .method { grid-template-columns: 1fr; gap: 40px; margin-top: 48px; }
  .method-num { font-size: 48px; }
  .method-close { margin-top: 48px; font-size: 19px; }

  .photo-band { height: 300px; }
  .photo-band img { object-position: 40% 35%; }
  .two-up { grid-template-columns: 1fr; gap: 48px; margin-top: 40px; }
  .two-up h3 { font-size: 24px; margin-top: 20px; }

  .about { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .about-photo img { width: min(320px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto; }
  .about .sub { margin-left: auto; margin-right: auto; }

  .faq { margin-top: 40px; }
  .faq summary { font-size: 18px; padding: 22px 0; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

/* Reduced motion: final state at once, story stays the static sequence */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero-copy > *, .js .hero-video { opacity: 1; transform: none; animation: none; transition: none; }
}
