:root {
  --red: #ff1430;
  --red-dark: #b0101f;
  --blue: #1a44ff;
  --blue-dark: #0d2bb8;
  --ink: #0b0b1e;
  --ink-soft: #4a4a63;
  --paper: #fffdf8;
  --card: #ffffff;
  --line: rgba(11, 11, 30, 0.1);
  --tint-red: #fff0f1;
  --tint-blue: #eef1ff;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(11, 11, 30, 0.06), 0 12px 32px -12px rgba(11, 11, 30, 0.18);
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f4fb;
    --ink-soft: #b2b2c8;
    --paper: #0d0d1c;
    --card: #17172a;
    --line: rgba(244, 244, 251, 0.12);
    --tint-red: #2a1219;
    --tint-blue: #141a3a;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(60rem 36rem at 85% -8rem, color-mix(in srgb, var(--blue) 9%, transparent), transparent 70%),
    radial-gradient(48rem 30rem at -10% 4rem, color-mix(in srgb, var(--red) 7%, transparent), transparent 70%),
    var(--paper);
  background-repeat: no-repeat;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand img { width: 128px; height: 64px; }
.nav { display: flex; gap: 6px; }
.nav a { font-weight: 800; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 16px; }
.nav a:hover { background: var(--tint-blue); }
.nav a.cta { background: var(--ink); color: var(--paper); }
.nav a.cta:hover { background: var(--blue); color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 19px; text-decoration: none; padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; transition: transform 0.15s cubic-bezier(.3,1.6,.5,1), box-shadow 0.15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-dark); }
.btn-red:active { box-shadow: 0 2px 0 var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); background: var(--tint-blue); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); font-weight: 700; }
.hero h1 .pop { color: var(--red); display: inline-block; }
.hero .lede { font-size: 21px; color: var(--ink-soft); margin: 22px 0 32px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Spring toy */
.toy { position: relative; display: flex; flex-direction: column; align-items: center; user-select: none; -webkit-user-select: none; }
.toy-stage { position: relative; width: 100%; max-width: 360px; height: 420px; display: flex; align-items: flex-end; justify-content: center; }
.toy-btn { color: var(--ink); background: none; border: 0; padding: 0; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; border-radius: 40px; }
.toy-btn:active { cursor: grabbing; }
.toy-btn svg { width: 240px; height: auto; overflow: visible; display: block; }
.toy-shadow { position: absolute; bottom: 4px; left: 50%; width: 200px; height: 22px; margin-left: -100px; border-radius: 50%; background: rgba(11, 11, 30, 0.14); filter: blur(4px); pointer-events: none; }
.toy-hint { font-weight: 800; font-size: 15px; color: var(--ink-soft); margin-top: 14px; text-align: center; min-height: 1.6em; }
.toy-meter { display: flex; gap: 10px; margin-top: 10px; }
.chip { font-family: var(--display); font-size: 15px; font-weight: 500; padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); white-space: nowrap; }
.chip b { font-weight: 700; }
.chip.best b { color: var(--red); }
.charge { position: absolute; left: 50%; bottom: -2px; width: 160px; margin-left: -80px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity 0.2s; }
.charge.on { opacity: 1; }
.charge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--red)); border-radius: 99px; }
.burst { position: absolute; font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--red); pointer-events: none; animation: burst 0.9s ease-out forwards; white-space: nowrap; }
@keyframes burst { 0% { transform: translate(-50%, 0) scale(0.4) rotate(-8deg); opacity: 0; } 20% { opacity: 1; transform: translate(-50%, -10px) scale(1.15) rotate(-6deg); } 100% { transform: translate(-50%, -70px) scale(1) rotate(4deg); opacity: 0; } }

/* Sections */
section { padding: 64px 0; scroll-margin-top: 60px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 48px); }
.section-head p { color: var(--ink-soft); max-width: 30em; }
.kicker { font-weight: 800; color: var(--red); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }

/* Project cards */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: transform 0.25s cubic-bezier(.3,1.5,.5,1), box-shadow 0.25s; }
a.project:hover { transform: translateY(-6px) rotate(-0.6deg); }
.project.featured { grid-column: span 2; flex-direction: row; }
.project.featured .shot { flex: 1.1; min-height: 320px; aspect-ratio: auto; }
.project.featured .body { flex: 1; }
.shot { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; background: repeating-linear-gradient(-45deg, var(--tint-blue) 0 14px, transparent 14px 28px), var(--tint-red); color: var(--ink-soft); font-weight: 800; font-size: 14px; text-align: center; }
.shot span { background: var(--card); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.shot .mark { width: 72px; height: 72px; margin: 0 auto 12px; }
.body { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.body h3 { font-size: 30px; }
.body p { color: var(--ink-soft); font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--tint-blue); color: var(--blue); }
.tag.live { background: #e6f9ee; color: #10773e; }
.tag.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #18a957; margin-right: 6px; vertical-align: 1px; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-color-scheme: dark) { .tag.live { background: #0f2c1c; color: #6fe3a1; } }
.more { margin-top: auto; font-family: var(--display); font-weight: 600; color: var(--red); font-size: 18px; }
.project.soon { background: transparent; box-shadow: inset 0 0 0 2px var(--line); border: 0; }
.project.soon .shot { background: transparent; aspect-ratio: 16 / 9; }
.project.soon h3 { color: var(--ink-soft); }
.soon-icon { font-family: var(--display); font-size: 54px; font-weight: 700; color: var(--line); }

/* About */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.about-art { position: relative; aspect-ratio: 1; max-width: 380px; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; background: var(--tint-blue); display: grid; place-items: center; }
.about-art img { width: 70%; animation: bob 4s ease-in-out infinite; }
.about-art .pin { position: absolute; bottom: 8%; right: 4%; background: var(--card); box-shadow: var(--shadow); padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 15px; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(2deg); } }
.about h2 { font-size: clamp(34px, 4.4vw, 48px); margin-bottom: 18px; }
.about p { font-size: 19px; color: var(--ink-soft); margin-bottom: 16px; }
.about p strong { color: var(--ink); }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.principle { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.principle .num { font-family: var(--display); font-weight: 700; font-size: 18px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--red); margin-bottom: 14px; }
.principle:nth-child(2) .num { background: var(--blue); }
.principle:nth-child(3) .num { background: var(--ink); color: var(--paper); }
.principle h3 { font-size: 22px; margin-bottom: 6px; }
.principle p { color: var(--ink-soft); font-size: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-soft); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer img { width: 96px; height: 48px; }

/* App profile page */
.app-hero { padding: 56px 0 32px; }
.back { display: inline-flex; gap: 6px; font-weight: 800; text-decoration: none; color: var(--ink-soft); margin-bottom: 26px; font-size: 16px; }
.back:hover { color: var(--ink); }
.app-hero .wrap > .grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.app-hero h1 { font-size: clamp(46px, 6vw, 72px); font-weight: 700; margin: 14px 0 18px; }
.app-hero .lede { font-size: 21px; color: var(--ink-soft); margin-bottom: 18px; }
.note { font-size: 15px; background: var(--tint-blue); border-radius: 14px; padding: 12px 16px; margin-bottom: 26px; }
.phones { display: flex; justify-content: center; gap: 16px; }
.phone { width: 170px; aspect-ratio: 9 / 19; border-radius: 30px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 7px var(--ink); padding: 7px; }
.phone .shot { aspect-ratio: auto; height: 100%; border-radius: 24px; font-size: 13px; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 24px; }
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start; text-align: center; }
.gallery .phone { width: 190px; transform: none; }
.gallery figcaption { font-family: var(--display); font-weight: 600; font-size: 18px; margin-top: 14px; }
.shot-phones { display: flex; align-items: center; justify-content: center; gap: 18px; overflow: hidden; padding: 28px 0; }
.shot-phones .phone { width: 140px; flex: 0 0 auto; }
.shot-phones .phone:nth-child(1) { transform: rotate(-6deg); }
.shot-phones .phone:nth-child(2) { transform: rotate(5deg) translateY(16px); }
.phone:nth-child(1) { transform: rotate(-5deg) translateY(14px); }
.phone:nth-child(3) { transform: rotate(5deg) translateY(14px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.split h2 { font-size: clamp(30px, 3.6vw, 42px); margin-bottom: 18px; }
.split p { color: var(--ink-soft); margin-bottom: 14px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature .ico { font-size: 30px; line-height: 1; margin-bottom: 12px; }
.feature h3 { font-size: 21px; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: 16px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: baseline; background: var(--card); padding: 14px 18px; border-radius: 16px; box-shadow: var(--shadow); font-weight: 700; }
.facts li::before { content: "✓"; color: var(--red); font-weight: 900; }
.cta-band { background: var(--ink); color: var(--paper); border-radius: 32px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(30px, 3.6vw, 42px); }
.cta-band p { opacity: 0.75; margin-top: 8px; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap, .app-hero .wrap > .grid, .about, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .projects, .features, .principles { grid-template-columns: 1fr; }
  .project.featured { grid-column: auto; flex-direction: column; }
  .project.featured .shot { min-height: 0; aspect-ratio: 16 / 10; }
  .about-art { max-width: 280px; margin: 0 auto; }
  .nav a:not(.cta) { display: none; }
  .toy-stage { height: 360px; }
  .phone { width: 120px; }
}
@media (max-width: 600px) and (min-width: 0) {
  .features { grid-template-columns: 1fr; }
}

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