/* Alphanation case study, styled after the app's "Fuji Dawn" theme:
   glacier background, lake-teal primary, sunrise-amber accent, frosted glass,
   pill controls and arched card tops. */
@font-face {
  font-family: "Cooper Black Wordmark";
  src: url("../fonts/cooper-black-wordmark.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2f6f7;
  --ink: #12202b;
  --body: #3b4a55;
  --muted: #53646e;
  --line: #cfdde2;
  --lake: #127991;
  --lake-dark: #114b5f;
  --amber-ink: #8a4a06;
  --glass: rgba(251, 253, 254, .62);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(245, 251, 253, .4), 0 8px 18px -8px rgba(32, 64, 96, .14), 0 22px 44px -16px rgba(16, 112, 140, .16);
  --post-shadow: 0 28px 56px -14px rgba(26, 48, 64, .22), 0 26px 52px -18px rgba(20, 160, 190, .24), 0 10px 22px -8px rgba(26, 48, 64, .14), inset 0 1px 0 #fff;
  --dawn-wash: linear-gradient(100deg, rgba(230, 178, 112, .78) 0%, rgba(206, 190, 150, .74) 22%, rgba(150, 168, 160, .72) 40%, rgba(110, 160, 165, .74) 55%, rgba(68, 145, 158, .8) 72%, rgba(14, 124, 147, .86) 88%, rgba(64, 148, 168, .82) 100%);
  --arch: 50% 50% 20px 20px / 22px 22px 20px 20px;
  --display: "Playfair Display", Georgia, serif;
  --wordmark: "Cooper Black Wordmark", "Cooper Black", Georgia, serif;
  /* The app's glacial slate relief, used for the emblem and wordmark */
  --emblem-fill: linear-gradient(170deg, #84683a 0%, #304a5a 24%, #1b2e3f 62%, #234e57 100%);
  --emblem-relief: drop-shadow(0 -0.5px 0 rgba(249, 240, 222, .85)) drop-shadow(0 1px 0 rgba(15, 26, 36, .24)) drop-shadow(0 2px 2px rgba(28, 46, 62, .14));
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  color: var(--ink);
  font: 400 1rem/1.7 "Plus Jakarta Sans", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}

/* Dual-temperature dawn glow behind the header, as in the app. */
.glow {
  position: absolute;
  inset: -160px 0 auto;
  height: 720px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 8% 0%, rgba(242, 166, 60, .42), rgba(242, 166, 60, .12) 50%, transparent 80%),
    radial-gradient(70% 75% at 88% 0%, rgba(23, 172, 207, .38), rgba(23, 172, 207, .12) 50%, transparent 80%);
  filter: blur(40px);
}

h1, h2, h3, h4, p, dl, dd, figure, ul, ol { margin: 0; }
a { color: var(--lake); text-underline-offset: .22em; }
a:hover { color: var(--lake-dark); }
:focus-visible { outline: 3px solid var(--lake); outline-offset: 3px; }

.wrap { width: min(72rem, 100% - 4rem); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 10; top: .5rem; left: 1rem; padding: .6rem 1rem; border-radius: 999px; background: #fff; transform: translateY(-200%); }
.skip:focus { transform: none; }

.wordmark { font-family: var(--wordmark); font-weight: 400; letter-spacing: 0; color: #1b2e3f; background: var(--emblem-fill); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: var(--emblem-relief); }
.emblem { display: block; aspect-ratio: 674 / 348; background: var(--emblem-fill); -webkit-mask: url("../images/alphanation-emblem.png") center / contain no-repeat; mask: url("../images/alphanation-emblem.png") center / contain no-repeat; filter: var(--emblem-relief); }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.header-emblem { width: 64px; }
.hero-emblem { width: clamp(110px, 14vw, 150px); margin: .25rem 0 .75rem; }
h2 { font-family: var(--display); font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.08; }
.h-small { font-family: var(--display); font-size: 1.75rem; margin-bottom: 1.25rem; }
.intro { max-width: 62ch; margin: .9rem 0 2.5rem; color: var(--body); }
.kicker { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lake-dark); }
.section { padding-block: clamp(4rem, 8vw, 6rem); }

/* Surfaces */
.glass { border-radius: 20px; background: var(--glass); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; padding: 0; list-style: none; }

/* Pills */
.pill { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.5rem; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; }
.pill-primary { background: var(--lake); color: #fff; box-shadow: 0 4px 8px -3px rgba(18, 121, 145, .4), inset 0 1px 0 rgba(255, 255, 255, .25); }
.pill-primary:hover { background: var(--lake-dark); color: #fff; }
.pill-glass { background: rgba(251, 253, 254, .6); color: var(--ink); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(18, 32, 43, .14); }
.pill-glass:hover { color: var(--ink); background: rgba(251, 253, 254, .9); }
.pill-dark { background: var(--ink); color: #fff; }
.pill-dark:hover { color: #fff; background: #000; }

/* Header: dawn wash with the app's arched bottom edge */
/* The band's bottom edge rises into an arch, like the app's header: the
   corners reach down, the centre lifts. A mask cuts the arch so the wash
   and highlight follow it; the shadow comes from a drop-shadow on the
   header so it follows the cut edge too. */
.site-header { position: relative; filter: drop-shadow(0 10px 14px rgba(32, 64, 96, .18)); }
.header-band {
  padding-bottom: 30px;
  background: var(--dawn-wash);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  -webkit-mask: radial-gradient(ellipse 50.5% 30px at 50% 100%, transparent 98%, #000 100%);
  mask: radial-gradient(ellipse 50.5% 30px at 50% 100%, transparent 98%, #000 100%);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.header-row .pill { min-height: 44px; padding: 0 1.1rem; font-size: .875rem; white-space: nowrap; }
.header-wordmark { font-size: 1.5rem; line-height: 1; }
.header-name { font-weight: 700; font-size: .875rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; align-items: center; padding-block: 4.5rem 6rem; }
.chip { display: inline-flex; margin-bottom: 1.1rem; padding: .35rem .9rem; border-radius: 999px; background: rgba(251, 253, 254, .6); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(207, 221, 226, .9); font-size: .8rem; font-weight: 700; color: var(--lake-dark); }
.hero h1 { font-size: clamp(3rem, 6.6vw, 5.4rem); line-height: 1.05; }
.tagline { margin: 1rem 0 1.25rem; font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.2; color: var(--lake); }
.lead { max-width: 52ch; color: var(--body); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.75rem 0; padding: 1.1rem 1.25rem; font-size: .875rem; line-height: 1.45; }
.facts dt { font-weight: 800; }
.facts dd { margin-top: .25rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.phones { display: flex; justify-content: center; gap: 1.25rem; }
.phone { width: min(220px, 46%); aspect-ratio: 220 / 452; padding: 9px; border-radius: 36px; background: var(--ink); box-shadow: var(--post-shadow); }
.phone-offset { margin-top: 56px; }
.phone-screen { height: 100%; padding: 46px 12px 12px; border-radius: 28px; background: linear-gradient(180deg, #f6dfba 0%, #dcebec 38%, var(--bg) 70%); display: flex; }

/* A screenshot slot: the image covers the label once the file exists. */
.shot { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; border-radius: var(--arch); border: 2px dashed #8fb3bd; background: rgba(251, 253, 254, .7); text-align: center; color: var(--body); font-size: .8125rem; line-height: 1.4; }
.shot-label { padding: 1rem; display: grid; gap: .35rem; }
.shot-label strong { font-size: .95rem; color: var(--ink); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.shot:has(img) { border-style: solid; border-color: transparent; }
.phone-screen:has(img) { padding: 0; }
.phone-screen:has(img) .shot { border: 0; border-radius: 28px; }
.phone { aspect-ratio: 220 / 440; }

/* 60-second summary */
.summary { padding-bottom: 4.5rem; }
.arch-card { padding: 2.1rem 1.6rem 1.6rem; border-radius: var(--arch); }
.arch-card h3 { margin-bottom: .5rem; font-size: 1.2rem; font-weight: 800; }
.arch-card p { color: var(--body); }

/* Section tabs, like the app's */
.tabs { display: inline-flex; flex-wrap: wrap; gap: .35rem; padding: 6px; border-radius: 28px; list-style: none; background: rgba(251, 253, 254, .32); box-shadow: inset 0 0 0 1px rgba(18, 32, 43, .14); }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; color: var(--ink); font-weight: 700; font-size: .875rem; text-decoration: none; }
.tabs a:hover, .tabs a:focus-visible { background: linear-gradient(180deg, rgba(251, 253, 254, .96), rgba(18, 121, 145, .12)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -2px 0 rgba(18, 121, 145, .65); }

/* Scope */
.area { display: flex; flex-direction: column; gap: .45rem; padding: 1.5rem; }
.area h3 { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.area > p:last-child { font-size: .95rem; line-height: 1.55; color: var(--body); }
.medallion { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 800; background: linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(83, 100, 110, .13)); box-shadow: inset 0 1px 1px #fff, inset 0 -2px 4px rgba(18, 32, 43, .1), 0 4px 10px rgba(18, 32, 43, .08); }
.medallion.lake { color: var(--lake); }
.medallion.amber { color: #b86a10; }

/* Decisions: post-style flip cards */
.band { background: linear-gradient(180deg, rgba(220, 235, 236, .6), rgba(246, 223, 186, .35)); }
.band-fade { background: linear-gradient(180deg, rgba(220, 235, 236, .6), rgba(242, 246, 247, 0)); }
.stories { align-items: stretch; }
.story .flip { margin-top: auto; }
.story .face { flex: 1; }
.story { display: flex; flex-direction: column; padding: 2.1rem 1.5rem 1.5rem; border-radius: 50% 50% 22px 22px / 26px 26px 22px 22px; background: rgba(251, 253, 254, .92); box-shadow: var(--post-shadow); }
.story > .kicker, .story > h3 { text-align: center; }
.story > h3 { margin: .25rem 0 1.1rem; font-family: var(--display); font-size: 1.5rem; line-height: 1.2; }
.story .front { display: flex; }
.story .front .shot { min-height: 340px; border-radius: 16px; background: linear-gradient(180deg, rgba(246, 223, 186, .5), rgba(220, 235, 236, .6)); }
.story .back { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.25rem; font-size: .9rem; line-height: 1.55; }
.story .back dt { font-weight: 800; }
.story .back dd { color: var(--body); }
.story .open { padding: .65rem .8rem; border-radius: 14px; background: rgba(213, 124, 21, .1); }
.story .open dt { color: var(--amber-ink); }
.flip { align-self: center; margin-top: 1.1rem; min-height: 44px; padding: 0 1.25rem; border: 0; border-radius: 999px; background: rgba(18, 121, 145, .1); box-shadow: inset 0 0 0 1px rgba(18, 121, 145, .35); color: var(--lake-dark); font: 700 .875rem "Plus Jakarta Sans", system-ui, sans-serif; cursor: pointer; }
.flip:hover { background: rgba(18, 121, 145, .16); }
.flip[hidden] { display: none; }
.story.is-flippable .front, .story.is-flippable .back { min-height: 400px; }
.story.is-flippable .back { display: none; margin-top: 0; }
.story.is-flipped .front { display: none; }
.story.is-flipped .back { display: flex; animation: turn .45s ease; }
.story.is-flippable:not(.is-flipped) .front { animation: turn .45s ease; }
@keyframes turn { from { transform: perspective(1200px) rotateY(-80deg); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .story .front, .story .back { animation: none !important; } }

/* Process */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-bottom: 3.5rem; padding: 8px; list-style: none; border-radius: 28px; background: rgba(251, 253, 254, .32); box-shadow: inset 0 0 0 1px rgba(18, 32, 43, .12); }
.steps li { display: flex; flex-direction: column; gap: .25rem; padding: 1.1rem; border-radius: 20px; background: linear-gradient(180deg, rgba(251, 253, 254, .96), rgba(18, 121, 145, .08)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -2px 0 rgba(18, 121, 145, .55); }
.step-n { font-weight: 800; font-size: .8rem; color: var(--lake); }
.steps strong { font-size: 1rem; line-height: 1.25; }
.steps li > span:last-child { font-size: .875rem; line-height: 1.45; color: var(--muted); }
.principle { padding: 1.5rem; }
.principle h4 { margin-bottom: .35rem; font-size: 1.05rem; font-weight: 800; }
.principle p { font-size: .95rem; color: var(--body); }
.origins { max-width: 62ch; margin-top: 2.5rem; font-size: .875rem; color: var(--muted); }

/* Evidence */
#evidence h2 { margin-bottom: 2.5rem; }
.ledger { padding: 1.75rem; background: rgba(251, 253, 254, .72); }
.ledger h3 { margin-bottom: .9rem; font-size: 1.25rem; font-weight: 800; }
.ledger ul { display: flex; flex-direction: column; gap: .75rem; padding: 0; list-style: none; font-size: .95rem; line-height: 1.5; }
.ledger li { display: flex; gap: .65rem; }
.ledger li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .5rem; border-radius: 50%; }
.built h3 { color: var(--lake-dark); }
.built li::before { background: var(--lake); }
.tested h3 { color: var(--amber-ink); }
.tested li::before { background: #b86a10; }
.next li::before { background: var(--muted); }

/* Closing */
.closing { padding-bottom: 6rem; }
.closing-card { padding: 3.5rem 1.5rem; text-align: center; border-radius: 50% 50% 28px 28px / 40px 40px 28px 28px; background: linear-gradient(100deg, rgba(230, 178, 112, .55) 0%, rgba(206, 190, 150, .5) 25%, rgba(110, 160, 165, .5) 55%, rgba(14, 124, 147, .55) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 22px 44px -16px rgba(16, 112, 140, .22); }
.closing-card h2 { font-family: var(--wordmark); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.closing-card p { margin: .4rem 0 1.5rem; font-weight: 600; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding-block: 1.5rem; border-top: 1px solid var(--line); font-weight: 700; font-size: .875rem; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  .hero, .grid-3, .steps { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .hero { padding-block: 3rem 4rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-name { display: none; }
  .header-emblem { width: 46px; }
  .header-wordmark { font-size: 1.2rem; }
  .phones { gap: .75rem; }
  .phone-offset { margin-top: 36px; }
  .header-band { padding-bottom: 20px; -webkit-mask: radial-gradient(ellipse 50.5% 20px at 50% 100%, transparent 98%, #000 100%); mask: radial-gradient(ellipse 50.5% 20px at 50% 100%, transparent 98%, #000 100%); }
}
