/* Nada's landing in the D4U Store: a case study of what D4U built. The Store's shell
   (css/shell.css) draws the header, the footer and the device frames (.sh-phone); this file only
   styles what is inside <main>, in Nada's own look: Onest for text, Unbounded for the "nada" logo
   and the red of the button. Font sizes come from the shell (--sh-fs-*), the same on every D4U page. */

@font-face { font-family: "Onest"; src: url("../fonts/onest-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-800-latin.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #F5F6F8; --bg-alt: #ECEEF1; --card: #FFFFFF; --ink: #14161A; --muted: #676D77; --faint: #9BA1AA; --line: #DCDFE4;
  --accent: #FF4A2B; --accent-ink: #FFFFFF; --tint: #FFE9E4;
  --night: #121418; --night-ink: #F2F3F5; --night-muted: #9AA0A9; --night-line: #2A2E35;
  --shadow: 0 1px 2px rgba(20, 22, 26, .06), 0 14px 30px -18px rgba(20, 22, 26, .25);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17191D; --bg-alt: #111316; --card: #22252A; --ink: #F2F3F5; --muted: #9AA0A9; --faint: #6A707A; --line: #33373E;
    --tint: rgba(255, 74, 43, .14); --night: #0C0D10; --night-line: #23262C;
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 30px -16px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #17191D; --bg-alt: #111316; --card: #22252A; --ink: #F2F3F5; --muted: #9AA0A9; --faint: #6A707A; --line: #33373E;
  --tint: rgba(255, 74, 43, .14); --night: #0C0D10; --night-line: #23262C;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 30px -16px rgba(0, 0, 0, .8);
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); }
#main { display: block; overflow-x: clip; background: var(--bg); color: var(--ink); font: 400 var(--sh-fs-body)/1.55 var(--body); -webkit-font-smoothing: antialiased; }
#main, #main * { box-sizing: border-box; }
:where(#main) :where(h1, h2, h3, p, ul) { margin: 0; }   /* no weight, so every class can set its own margin */
:where(#main) img { max-width: 100%; height: auto; display: block; }
:where(#main) a { color: inherit; text-decoration: none; }
#main :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

/* Same width as the shell (.sh-wrap), so the landing lines up with the header and footer */
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- Type ---------- */
.eyebrow { font-size: var(--sh-fs-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.h2 { margin-top: 12px; font: 700 var(--sh-fs-h2)/1.08 var(--body); letter-spacing: -.035em; }
.h2 span { color: var(--accent); }
.lead { margin-top: 16px; font-size: var(--sh-fs-lead); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: var(--sh-fs-button); transition: transform .15s, box-shadow .2s, filter .2s, color .2s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-red { background: var(--accent); color: var(--accent-ink) !important; box-shadow: 0 12px 28px -12px rgba(255, 74, 43, .7); }
.btn-red:hover { filter: brightness(1.06); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent) !important; }
.btn-ghost { color: var(--night-ink) !important; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--night-ink); }

/* ---------- 1. Hero: the case study's cover ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(48px, 8vw, 104px) 0; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 60% at 80% 50%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 70%); }
.hero-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.5fr 1fr; gap: 56px; } }
.made { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: var(--sh-fs-label); font-weight: 600; color: var(--muted); }
.made img { width: 26px; height: 26px; border-radius: 7px; }
.made .d4u { font: 700 var(--sh-fs-label)/1 var(--sh-mono, ui-monospace, Menlo, monospace); color: var(--ink); }
.made .d4u b { color: var(--sh-blue, #1652F0); }
.hero .eyebrow { margin-top: 28px; color: var(--accent); }
.hero-h { margin-top: 10px; font: 700 var(--sh-fs-display)/1.02 var(--body); letter-spacing: -.04em; }
.wordmark { display: block; margin-bottom: 14px; font: 800 var(--sh-fs-display)/1 var(--display); letter-spacing: -.05em; }
.hero-line { display: block; }
.hero-sub { margin-top: 20px; font-size: var(--sh-fs-lead); color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 24px 0 0; padding: 0; list-style: none; }
.facts li { display: grid; gap: 2px; }
.facts span { font-size: var(--sh-fs-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.facts b { font-size: var(--sh-fs-small); }
.facts .status { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.facts .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--tint); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }

/* The app's icon, large, with the light of the button behind it */
.hero-art { display: grid; place-items: center; }
.app-icon { width: clamp(140px, 22vw, 240px); height: auto; border-radius: 22%; box-shadow: 0 40px 80px -30px rgba(255, 74, 43, .55), 0 0 0 1px rgba(0, 0, 0, .04); }
.ic-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic-light { display: none; }
  :root:not([data-theme="light"]) .ic-dark { display: block; }
}
:root[data-theme="dark"] .ic-light { display: none; }
:root[data-theme="dark"] .ic-dark { display: block; }

/* ---------- Bands ---------- */
.band { padding: 72px 0; }
@media (min-width: 900px) { .band { padding: 104px 0; } }
.band-alt { background: var(--bg-alt); }

/* ---------- 2. The challenge: stacked; each sentence of the headline starts its own line ---------- */
.big-text { margin-top: 14px; font: 700 var(--sh-fs-h2)/1.12 var(--body); letter-spacing: -.03em; }
.big-text span { display: block; }
.challenge .lead { margin-top: 20px; }

/* ---------- 3. What we built: the shell's phones, fanned, and the pieces ---------- */
.fan { --mid: clamp(150px, 26vw, 280px); --side: calc(var(--mid) * .86); position: relative; display: flex; justify-content: center; margin: 56px auto 0; height: calc(var(--mid) * 1434 / 660 + 24px); }
.fan::before { content: ""; position: absolute; left: 50%; bottom: -6%; width: 80%; height: 30%; transform: translateX(-50%); border-radius: 50%; filter: blur(48px);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent); }
.fan .sh-phone { position: absolute; bottom: 0; }
.fan .p-mid { --sh-phone-w: var(--mid); z-index: 2; bottom: 24px; }
.fan .p-left, .fan .p-right { --sh-phone-w: var(--side); transform-origin: bottom center; }
.fan .p-left { transform: translateX(-66%) rotate(-7deg); }
.fan .p-right { transform: translateX(66%) rotate(7deg); }

.pieces { display: grid; gap: 14px; margin-top: 64px; }
@media (min-width: 760px) { .pieces { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.piece { background: var(--card); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; }
.piece h3 { font-size: var(--sh-fs-h3); letter-spacing: -.01em; }
.piece p { color: var(--muted); font-size: var(--sh-fs-body); }
.piece .on { margin-top: 4px; color: var(--ink); font-size: var(--sh-fs-small); font-weight: 700; }
.ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--tint); color: var(--accent); margin-bottom: 6px; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 4. What we did: the disciplines as tags ---------- */
.did-wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .did-wrap { grid-template-columns: .8fr 1.2fr; gap: 64px; } }
.cloud { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cloud li { padding: 10px 18px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-weight: 600; font-size: var(--sh-fs-label); }
.cloud li:nth-child(3n+1) { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 22px -12px rgba(255, 74, 43, .7); }

/* ---------- 5. Key decisions ---------- */
.did { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 640px) { .did { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .did { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.did-card { position: relative; background: var(--card); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; }
.did-card .n { position: absolute; right: 22px; top: 18px; font: 800 var(--sh-fs-label)/1 var(--display); letter-spacing: -.02em; color: var(--faint); }
.did-card h3 { font-size: var(--sh-fs-h3); letter-spacing: -.01em; }
.did-card p { color: var(--muted); font-size: var(--sh-fs-body); }

/* ---------- 6. In numbers: a dark band ---------- */
.night { background: var(--night); color: var(--night-ink); }
.night .eyebrow { color: var(--night-muted); }
.nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 56px; border-radius: 28px; overflow: hidden; background: var(--night-line); box-shadow: 0 0 0 1px var(--night-line); }
@media (min-width: 760px) { .nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.num { background: var(--night); padding: clamp(22px, 3.4vw, 36px); display: grid; gap: 6px; align-content: start; }
.num b { font: 800 var(--sh-fs-h2)/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.num b.red { color: var(--accent); }
.num span { font-weight: 700; font-size: var(--sh-fs-body); }
.num small { font-size: var(--sh-fs-small); color: var(--night-muted); }

/* ---------- 7. Closing: start a project with D4U ---------- */
.end { position: relative; isolation: isolate; overflow: hidden; border-radius: 36px; padding: clamp(44px, 7vw, 96px) clamp(24px, 6vw, 72px); background: var(--night); color: var(--night-ink); display: grid; justify-items: center; text-align: center; }
.end::before { content: ""; position: absolute; left: 5%; bottom: -55%; width: 90%; height: 100%; z-index: -1; border-radius: 50%; filter: blur(60px);
  background: radial-gradient(closest-side, rgba(255, 74, 43, .5), transparent); }
.end .eyebrow, .end .lead { color: var(--night-muted); }
.end-cta { justify-content: center; margin-top: 32px; }

.credits { padding: 0 16px 36px; text-align: center; font-size: var(--sh-fs-small); color: var(--faint); }

@media (prefers-reduced-motion: reduce) { .btn, .btn svg { transition: none; } }
