:root {
  --ink: #17181C;
  --muted: #4B4D55;
  --paper: #FAFAF7;
  --line: #E4E2DB;
  --accent: #C8102E;
  --s: 0.78; /* phone scale, set by app.js */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.55 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }

/* Header */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.brand { font-weight: 800; font-size: 20px; text-decoration: none; }
.top nav { display: flex; gap: 28px; font-weight: 600; font-size: 16px; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 700; text-decoration: none; font-size: 16px; border: 2px solid var(--ink); cursor: pointer; font-family: inherit; transition: transform 160ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }

/* Hero: text · phone · info */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.9fr); gap: 48px; align-items: center; padding-top: 16px; padding-bottom: 72px; }
.intro { display: flex; flex-direction: column; gap: 20px; }
h1 { margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.accent { color: var(--accent); transition: color 300ms var(--ease); }
.lede { margin: 0; color: var(--muted); max-width: 440px; }

/* Phone */
.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone { width: calc(418px * var(--s)); height: calc(872px * var(--s)); }
.device {
  position: relative; width: 418px; height: 872px; padding: 14px;
  background: #111; border-radius: 66px;
  transform: scale(var(--s)); transform-origin: top left;
  box-shadow: 0 0 0 2px #2b2b2e inset, 0 40px 80px -30px rgba(23, 24, 28, 0.45);
}
.island { position: absolute; top: 26px; left: 50%; width: 120px; height: 34px; margin-left: -60px; background: #000; border-radius: 20px; z-index: 4; pointer-events: none; }
.screen { position: relative; width: 390px; height: 844px; border-radius: 52px; overflow: hidden; background: #EDEAE3; }

.home { position: absolute; inset: 0; padding: 96px 28px 28px; display: flex; flex-direction: column; gap: 28px; transition: transform 380ms var(--ease), opacity 380ms var(--ease); }
.home-hint { margin: 0; font-size: 16px; color: var(--muted); }
.icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 14px; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.app-icon img { width: 70px; height: 70px; border-radius: 17px; box-shadow: 0 6px 14px -8px rgba(0,0,0,0.5); transition: transform 200ms var(--ease); }
.app-icon:hover img { transform: translateY(-2px); }
.app-icon:active img { transform: scale(0.94); }
.app-icon:focus-visible img { outline: 3px solid var(--accent); outline-offset: 3px; }
.app-icon .soon { width: 70px; height: 70px; border-radius: 17px; border: 2px dashed #B9B5AB; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #8B877E; }

.app-layer { position: absolute; inset: 0; background: #fff; transform-origin: var(--ox, 50%) var(--oy, 30%); animation: zoomIn 420ms var(--ease); }
.app-layer[hidden] { display: none; }
@keyframes zoomIn { from { transform: scale(0.2); opacity: 0; border-radius: 40px; } to { transform: scale(1); opacity: 1; } }
.app-layer iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.status { display: none; height: 54px; padding: 0 34px 0 46px; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 700; color: #000; }
.status-icons { display: flex; gap: 6px; align-items: center; fill: currentColor; color: #000; }
.app-layer.with-status .status { display: flex; }
.app-layer.with-status iframe { height: calc(100% - 54px); }
.boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #fff; transition: opacity 300ms var(--ease); }
.boot.done { opacity: 0; pointer-events: none; }
.boot img { width: 88px; height: 88px; border-radius: 21px; }
.bar { width: 140px; height: 4px; border-radius: 2px; background: #E8E6E0; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 300ms linear; }
.boot p { margin: 0; font-size: 14px; color: var(--muted); }

.home-indicator { position: absolute; bottom: 8px; left: 50%; width: 140px; height: 24px; margin-left: -70px; padding: 0; border: 0; background: transparent; cursor: pointer; z-index: 5; }
.home-indicator::after { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.55); }
.stage-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; max-width: 320px; }

/* Info panel */
.info { display: flex; flex-direction: column; gap: 16px; }
.kicker { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.info h2 { margin: 0; font-size: 32px; line-height: 1.12; font-weight: 800; letter-spacing: -0.01em; }
.info dl { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.info dt { font-weight: 700; }
.info dd { margin: 0; color: var(--muted); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.stores .btn { min-height: 44px; font-size: 15px; padding: 0 16px; }

/* About + apps */
.about, .apps { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.about p { margin: 0; max-width: 760px; font-size: 21px; line-height: 1.6; }
.app-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 32px; }
.app-card { display: flex; gap: 20px; align-items: flex-start; }
.app-card img { border-radius: 15px; flex-shrink: 0; }
.app-card h3 { margin: 0 0 6px; font-size: 21px; }
.app-card p { margin: 0 0 8px; color: var(--muted); }
.app-card .links { font-weight: 700; color: var(--ink); }

/* Experience + contact */
.experience { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.about h2, .apps h2, .experience h2, .contact h2 { margin: 0 0 24px; font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-weight: 600; }
.timeline div { display: flex; flex-direction: column; }
.timeline span { color: var(--muted); }
.contact { padding-top: 56px; padding-bottom: 80px; border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 40px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }

/* Full-screen sheet for phones */
.sheet { position: fixed; inset: 0; z-index: 20; background: #fff; display: flex; flex-direction: column; animation: sheetUp 360ms var(--ease); }
.sheet[hidden] { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-bar { display: flex; align-items: center; gap: 12px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--line); font-weight: 700; }
.sheet-close { min-height: 40px; padding: 0 14px; font-size: 15px; }
.sheet iframe { flex: 1; width: 100%; border: 0; }

/* Layout breakpoints */
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; }
  .info { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .stage { order: 2; }
  .info { order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
