/* Fonts: Geist for the page and Under Hour; each project uses its own app font */
@font-face { font-family: "Geist"; src: url(fonts/geist-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Outfit"; src: url(fonts/outfit-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Anton"; src: url(fonts/anton-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #fafafa;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; }

/* ---------- Intro ---------- */
.intro {
  min-height: 82svh;
  padding: max(56px, env(safe-area-inset-top)) var(--gutter) 48px;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 1120px; margin: 0 auto;
}
.intro h1 { font: 700 clamp(52px, 15vw, 132px)/.92 var(--sans); letter-spacing: -.055em; }
.intro-line { font-size: clamp(19px, 5vw, 26px); line-height: 1.35; letter-spacing: -.015em; color: #3a3a3a; max-width: 20em; margin-top: 24px; }
.index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.index a { text-decoration: none; font-size: 14px; font-weight: 500; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.index a:active { background: var(--ink); color: var(--bg); }

/* ---------- Project section skeleton ---------- */
.p { position: relative; overflow: hidden; padding: 72px var(--gutter) 64px; display: grid; gap: 44px; justify-items: center; }
.p-text { width: 100%; max-width: 32rem; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand > img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.brand > img.round { border-radius: 50%; box-shadow: 0 0 0 1px #3f3f46; }
.p h2 { font-size: clamp(42px, 12vw, 68px); line-height: 1; letter-spacing: -.04em; margin: 22px 0 14px; font-weight: 700; }
.lead { font-size: 19px; line-height: 1.45; max-width: 26em; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); }
.tag svg { width: 12px; height: 12px; }

/* iPhone frame */
.phone {
  width: min(72vw, 290px); flex: none;
  padding: 9px; border-radius: 50px;
  background: linear-gradient(145deg, #3a3a3e, #121214 45%, #2a2a2d);
  box-shadow: 0 0 0 1.5px #55555a inset, 0 30px 60px -20px rgba(0,0,0,.55), 0 10px 20px -10px rgba(0,0,0,.4);
  position: relative;
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; background: #2a2a2d; border-radius: 2px; }
.phone::before { left: -3px; top: 22%; height: 9%; }
.phone::after { right: -3px; top: 28%; height: 14%; }
.phone-screen { border-radius: 41px; overflow: hidden; background: var(--bar); position: relative; padding-top: 14%; }
.phone-screen::before { content: ""; position: absolute; top: 1.6%; left: 50%; transform: translateX(-50%); width: 32%; aspect-ratio: 3.4; background: #000; border-radius: 999px; z-index: 1; }

/* Several phones: swipe row on mobile, side by side on desktop */
.phones { display: flex; gap: 20px; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.phones::-webkit-scrollbar { display: none; }
.phones .phone { scroll-snap-align: center; width: min(68vw, 270px); }

@media (min-width: 860px) {
  .p { grid-template-columns: minmax(0, 32rem) auto; justify-content: center; align-items: center; justify-items: start; gap: 96px; padding: 120px 48px; }
  .p:nth-of-type(odd):not(.p-wide) { grid-template-columns: auto minmax(0, 32rem); }
  .p:nth-of-type(odd):not(.p-wide) .phone { order: -1; }
  .phone { width: 300px; }
  .p-wide { grid-template-columns: 1fr; justify-items: center; gap: 64px; }
  .p-wide .p-text { max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: end; }
  .p-wide .uh-facts { grid-row: 1 / 4; grid-column: 2; align-self: end; }
  .phones { width: auto; margin: 0; padding: 0; overflow: visible; justify-content: center; gap: 40px; }
  .phones .phone { width: 280px; }
  .phones .phone:nth-child(2) { transform: translateY(-32px); }
  .intro { padding-left: 48px; padding-right: 48px; }
}

/* ---------- 1 Under Hour: the app's dark UI, Geist, indigo ---------- */
.p-uh { background: #0c0d10; color: #f5f5f5; }
.p-uh .tag { color: #c7c2ff; }
.p-uh .lead { color: #a3a3a3; }
.uh-facts { list-style: none; display: grid; gap: 12px; margin-top: 28px; font-size: 15px; color: #d4d4d4; }
.uh-facts li { display: flex; gap: 12px; align-items: center; }
.uh-facts svg { width: 18px; height: 18px; flex: none; color: #7c6cff; }

/* ---------- 2 InForm: black, blue, Inter ---------- */
.p-if { background: #09090b; color: #fafafa; font-family: "Inter", var(--system); }
.p-if h2 { font-weight: 800; letter-spacing: -.035em; }
.p-if .tag { color: #60a5fa; }
.p-if .lead { color: #a1a1aa; }
.if-week { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 28px; padding: 14px 10px; border: 1px solid #27272a; border-radius: 18px; background: #111114; max-width: 340px; }
.if-week li { display: grid; justify-items: center; gap: 10px; }
.if-week b { font-size: 12px; font-weight: 500; color: #71717a; }
.if-week i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #27272a; }
.if-week i.done { background: #27272a; border-color: #3f3f46; }
.if-week .today b { color: #3b82f6; }
.if-week .today i { background: #3b82f6; border-color: #3b82f6; box-shadow: 0 0 18px rgba(59,130,246,.6); }

/* ---------- 3 InTune: night, mint, Outfit ---------- */
.p-it { background: linear-gradient(180deg, #0d1117 0%, #0b1a17 100%); color: #e6f4ef; font-family: "Outfit", var(--system); }
.p-it h2 { letter-spacing: -.03em; }
.p-it .tag { color: #34d399; }
.p-it .lead { color: #a7c4bb; }
.it-scope { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 28px; padding: 14px; border-radius: 18px; background: #111a1f; border: 1px solid #1f3a33; max-width: 380px; }
.it-scope svg { width: 100%; height: 48px; overflow: hidden; }
.it-scope line { stroke: #34d399; stroke-width: 1; stroke-dasharray: 4 4; opacity: .5; }
.it-scope path { stroke: #34d399; stroke-width: 2.5; animation: it-run 1.6s linear infinite; filter: drop-shadow(0 0 4px rgba(52,211,153,.7)); }
@keyframes it-run { to { transform: translateX(-30px); } }
.it-target { font-weight: 700; font-size: 22px; }
.it-read { font-size: 13px; color: #34d399; font-variant-numeric: tabular-nums; }

/* ---------- 4 Movie Quiz: starfield, gold, Anton (as in the app) ---------- */
.p-mq { background: #000; color: #fff;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 72% 12%, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 38% 64%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 88% 52%, #fff5 50%, transparent 51%), radial-gradient(1px 1px at 22% 86%, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 60% 92%, #fff4 50%, transparent 51%), radial-gradient(1px 1px at 94% 80%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 5% 50%, #fff5 50%, transparent 51%);
}
.p-mq h2 { font-family: "Anton", var(--sans); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; color: #facc15; transform: skewX(-8deg) rotate(-2deg); text-shadow: 0 0 24px rgba(250,204,21,.4); }
.p-mq .tag { color: #facc15; }
.p-mq .lead { color: #c9c9c9; }
.mq-modes { list-style: none; display: grid; gap: 10px; margin-top: 28px; max-width: 360px; }
.mq-modes li { font: 400 22px/1.1 "Anton", var(--sans); text-transform: uppercase; color: #facc15; padding: 12px 16px; border: 2px solid #facc15; border-radius: 12px; background: #1e2433; box-shadow: 0 0 18px rgba(250,204,21,.18); }
.mq-modes li span { display: block; margin-top: 4px; font: 400 14px/1.3 var(--system); text-transform: none; color: #b8bcc6; }

/* ---------- 5 Chameleon: the app's navy-to-green, Avenir Next ---------- */
.p-ch { background: linear-gradient(170deg, #16233a 0%, #22404a 55%, #1d4a3e 100%); color: #eef3f6; font-family: "Avenir Next", var(--system); }
.p-ch h2 { letter-spacing: -.03em; }
.p-ch .tag { color: #6ee7b7; }
.p-ch .lead { color: #c3d3db; }

/* ---------- 6 PlaceMatch: daylight map, blue ---------- */
.p-pm { background-color: #eef2e8; color: #0f172a; font-family: var(--system);
  background-image:
    repeating-radial-gradient(circle at 78% 30%, transparent 0 38px, rgba(29,78,216,.07) 39px 40px),
    linear-gradient(rgba(15,23,42,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.04) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px; }
.p-pm .brand > img { border-radius: 0; }
.p-pm .tag { color: #1d4ed8; }
.p-pm .lead { color: #334155; }
.pm-funnel { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 16px 20px; background: #fff; border-radius: 16px; box-shadow: 0 1px 0 #e2e8f0, 0 10px 30px -18px rgba(15,23,42,.35); max-width: 360px; }
.pm-funnel div { display: grid; gap: 4px; }
.pm-funnel b { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -.04em; color: #94a3b8; font-variant-numeric: tabular-nums; }
.pm-funnel div:last-child b { color: #1d4ed8; }
.pm-funnel span { font-size: 13px; color: #475569; line-height: 1.25; }
.pm-funnel svg { width: 22px; height: 22px; color: #1d4ed8; flex: none; }

/* Laptop frame (Echo desktop view) */
.laptop { width: 100%; max-width: 980px; }
.laptop-screen { background: #1c1c1e; padding: 2.2% 2.2% 2.6%; border-radius: 14px 14px 0 0; box-shadow: 0 0 0 1.5px #3a3a3e inset, 0 30px 60px -24px rgba(0,0,0,.45); }
.laptop-screen img { border-radius: 3px; }
.laptop-base { height: 14px; margin: 0 -6%; background: linear-gradient(#d4d4d8, #a1a1aa); border-radius: 0 0 14px 14px; position: relative; }
.laptop-base::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 14%; height: 6px; background: #8e8e93; border-radius: 0 0 8px 8px; }

/* ---------- Echo: neutral light UI, system font ---------- */
.p-ec { background: #efefed; color: #171717; font-family: var(--system); }
.p-ec .tag { color: #404040; }
.p-ec .lead { color: #525252; }
@media (min-width: 860px) { .p-wide.p-ec .p-text { display: block; max-width: 980px; } }

/* ---------- Tacho: black, amber, system font ---------- */
.p-ta { background: #000; color: #fff; font-family: var(--system); }
.p-ta h2 { font-weight: 800; letter-spacing: -.04em; }
.p-ta .tag { color: #ffb300; }
.p-ta .lead { color: #a3a3a3; }

/* ---------- Outro: dark closing block, centred ---------- */
.outro { background: #0a0a0a; color: #fafafa; padding: 88px var(--gutter) max(40px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr { width: 200px; height: 200px; border-radius: 24px; background: #fff; padding: 6px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 320px; margin-top: 28px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; border: 0; cursor: pointer; font: 500 16px/1 var(--sans); background: #fafafa; color: #0a0a0a; padding: 16px 18px; border-radius: 999px; }
.pill svg { width: 20px; height: 20px; flex: none; }
.share { background: transparent; color: #fafafa; box-shadow: 0 0 0 1px #3f3f46 inset; }
.share .done, .share.copied svg:first-child { display: none; }
.share.copied .done { display: block; }
.address { margin-top: 16px; font-size: 14px; color: #8a8a8a; user-select: all; }
.to-top { display: grid; place-items: center; width: 48px; height: 48px; margin-top: 64px; border-radius: 50%; color: #a3a3a3; box-shadow: 0 0 0 1px #2a2a2a inset; }
.to-top svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
