:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --fg: #1d1d1f;
  --fg-muted: #6e6e73;
  --fg-on-dark: #f5f5f7;
  --fg-muted-on-dark: #a1a1a6;
  --card: #ffffff;
  --card-on-dark: #1c1c1e;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --grad-a: #ff6a88;
  --grad-b: #a855f7;
  --grad-c: #3b82f6;
  --radius: 22px;
  --nav-h: 48px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #0d0d0f;
    --fg: #f5f5f7;
    --fg-muted: #a1a1a6;
    --card: #1c1c1e;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0d0d0f;
  --fg: #f5f5f7;
  --fg-muted: #a1a1a6;
  --card: #1c1c1e;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #2997ff;
  --accent-hover: #47a6ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1024px; margin: 0 auto; padding: 0 22px; }
.wrap.narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(22, 22, 23, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  max-width: 1024px; height: 100%; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand { color: #f5f5f7; font-weight: 600; font-size: 15px; white-space: nowrap; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: rgba(245, 245, 247, 0.8); font-size: 13px; }
.nav-links a:hover { color: #fff; text-decoration: none; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; background: var(--bg); }
.section.light { background: var(--bg-alt); }
.dark, .section.dark { background: var(--bg-dark); color: var(--fg-on-dark); }
.dark .section-lead, .dark .hero-lead, .dark .eyebrow { color: var(--fg-muted-on-dark); }

.eyebrow { font-size: 17px; font-weight: 600; color: var(--fg-muted); margin-bottom: 10px; }
.section-title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06; font-weight: 700; letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.section-lead {
  font-size: clamp(19px, 2.2vw, 24px); line-height: 1.38;
  color: var(--fg-muted); max-width: 720px; margin-bottom: 56px; font-weight: 500;
}
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 12px 24px; border-radius: 980px;
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  transition: background-color .2s ease, transform .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border: 1px solid currentColor; color: var(--fg-on-dark); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-block { width: 100%; }
.link-arrow { color: var(--accent); font-size: 17px; }
.dark .link-arrow { color: #2997ff; }
.link-arrow::after { content: " ›"; }

/* ---------- Hero ---------- */
.hero { min-height: 92vh; min-height: 92svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 80px) 0 100px; text-align: center; }
.hero-title {
  font-size: clamp(48px, 10vw, 112px);
  line-height: 1.02; font-weight: 800; letter-spacing: -0.045em;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 30%, #8e8e93 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: clamp(21px, 2.8vw, 28px); line-height: 1.3; font-weight: 500; max-width: 760px; margin: 0 auto 40px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: center; }

/* ---------- YoloFace intro ---------- */
.yf-intro { padding: 100px 0 0; overflow: hidden; }
.badge {
  display: inline-block; padding: 6px 14px; margin-bottom: 18px;
  border-radius: 980px; font-size: 13px; font-weight: 600;
  color: #fbcfe8; background: rgba(236, 72, 153, 0.14); border: 1px solid rgba(236, 72, 153, 0.3);
}
.product-name { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.product-tagline {
  font-size: clamp(44px, 8.5vw, 96px);
  line-height: 1.04; font-weight: 800; letter-spacing: -0.045em;
  margin-bottom: 28px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b) 50%, var(--grad-c));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.yf-intro .section-lead { margin-bottom: 36px; }

/* Phone mockup */
.phone {
  width: min(300px, 78vw); aspect-ratio: 9 / 19;
  margin: 72px auto -120px;
  border-radius: 48px; padding: 12px;
  background: linear-gradient(145deg, #3a3a3c, #1c1c1e);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 40px 120px rgba(168, 85, 247, 0.35);
}
.phone-screen {
  height: 100%; border-radius: 37px; overflow: hidden;
  background: #fff8f5; color: #1d1d1f;
  padding: 44px 14px 14px; text-align: left;
  display: flex; flex-direction: column; gap: 12px;
}
.ph-top { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ph-names { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-style: italic; color: #9d4b5f; }
.ph-date { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #8e8e93; }
.ph-upload { background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.ph-upload-row { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.ph-pct { color: #9d4b5f; }
.ph-bar { height: 5px; border-radius: 5px; background: #f1e4e7; overflow: hidden; }
.ph-bar i { display: block; height: 100%; width: 72%; border-radius: 5px; background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); animation: load 3.2s ease-in-out infinite; }
@keyframes load { 0% { width: 8%; } 80%, 100% { width: 100%; } }
.ph-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; align-content: start; }
.ph-grid i {
  aspect-ratio: 1; border-radius: 6px;
  background: linear-gradient(135deg, hsl(var(--h) 70% 82%), hsl(calc(var(--h) + 30) 60% 66%));
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--card); border-radius: var(--radius); padding: 36px 30px; }
.step-icon { width: 52px; height: 52px; margin-bottom: 22px; }
.step-icon svg, .project-icon svg { width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.step-num { font-size: 13px; font-weight: 600; color: var(--fg-muted); letter-spacing: 0.08em; }
.step h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 10px; }
.step p { color: var(--fg-muted); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }
.tile { background: var(--bg-alt); border-radius: var(--radius); padding: 34px 30px; display: flex; flex-direction: column; gap: 8px; }
.tile-wide { grid-column: span 2; }
.tile h3 { font-size: 24px; line-height: 1.17; font-weight: 700; letter-spacing: -0.02em; }
.tile p { color: var(--fg-muted); }
.tile-kicker { font-size: 14px; font-weight: 600; color: var(--fg-muted); margin-bottom: 4px; }
.tile-big { font-size: 48px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 14px; color: var(--fg) !important; }
.tile-accent { background: linear-gradient(135deg, #2b0b3d, #12082b 55%, #04122e); color: #f5f5f7; justify-content: flex-end; min-height: 300px; }
.tile-accent h3 { font-size: clamp(26px, 3vw, 34px); }
.tile-accent p, .tile-accent .tile-kicker { color: #c7c7cc; }
.tile-accent .tile-kicker { background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border-radius: 980px; background: var(--card); font-size: 15px; font-weight: 500; border: 1px solid var(--line); }
.chips-tech { justify-content: center; margin-top: 48px; }
.chips-tech li { background: var(--bg-alt); }

/* ---------- Stats ---------- */
.stats-section { background: radial-gradient(ellipse at 50% 0%, #1e1035 0%, #000 65%); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { white-space: nowrap;
  font-size: clamp(44px, 7vw, 80px); font-weight: 800; letter-spacing: -0.045em; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #a1a1a6); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--fg-muted-on-dark); font-size: 17px; font-weight: 500; }

/* ---------- Price ---------- */
.price-card {
  max-width: 440px; margin: 40px auto 0; text-align: left;
  background: var(--card); border-radius: 28px; padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}
.price-plan { font-size: 15px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.price { display: flex; align-items: baseline; gap: 14px; margin: 10px 0 6px; }
.price-old { font-size: 22px; color: var(--fg-muted); }
.price-new { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; }
.price-note { font-size: 14px; color: var(--fg-muted); margin-bottom: 26px; }
.price-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.price-list li { padding-left: 30px; position: relative; }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Architecture ---------- */
.arch { display: flex; align-items: stretch; gap: 0; margin-bottom: 56px; }
.arch-node {
  flex: 1; background: var(--bg-alt); border-radius: 18px; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 4px; text-align: center;
}
.arch-node b { font-size: 17px; }
.arch-node span { font-size: 14px; color: var(--fg-muted); }
.arch-arrow { flex: 0 0 36px; position: relative; }
.arch-arrow::before { content: ""; position: absolute; left: 6px; right: 10px; top: 50%; height: 2px; background: var(--fg-muted); opacity: .5; }
.arch-arrow::after { content: ""; position: absolute; right: 8px; top: calc(50% - 5px); border: 6px solid transparent; border-left-color: var(--fg-muted); border-right: 0; opacity: .5; }

.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tech { border-top: 1px solid var(--line); padding-top: 22px; }
.tech h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.tech p { color: var(--fg-muted); }

/* ---------- Project ---------- */
.project {
  display: flex; gap: 32px; align-items: flex-start; margin-top: 40px;
  background: var(--card); border-radius: var(--radius); padding: 40px 36px; color: var(--fg);
  transition: transform .3s ease, box-shadow .3s ease;
}
.project:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1); }
.project-icon { flex: 0 0 72px; height: 72px; padding: 12px; border-radius: 18px; background: var(--bg-alt); }
.project h3 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.project p { color: var(--fg-muted); margin-bottom: 16px; }

/* ---------- About ---------- */
.about { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.45; font-weight: 500; color: var(--fg-muted); margin-bottom: 24px; }
.about:first-of-type { color: var(--fg); }

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.contact .btn { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); color: var(--fg-muted); font-size: 12px; padding: 22px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ph-bar i { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .arch { flex-direction: column; }
  .arch-arrow { flex-basis: 28px; }
  .arch-arrow::before { left: 50%; right: auto; top: 4px; bottom: 8px; width: 2px; height: auto; }
  .arch-arrow::after { left: calc(50% - 5px); right: auto; top: auto; bottom: 4px; border: 6px solid transparent; border-top-color: var(--fg-muted); border-bottom: 0; }
}
@media (max-width: 734px) {
  body { font-size: 16px; }
  .wrap, .nav-inner { padding: 0 16px; }
  .section { padding: 84px 0; }
  .nav-links { display: none; }
  .br-wide { display: none; }
  .steps, .tech-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .project { flex-direction: column; gap: 20px; padding: 30px 24px; }
  .price-card { padding: 32px 24px; }
  .phone { margin-bottom: -90px; }
}

.tile-icon { width: 48px; height: 48px; margin-bottom: 14px; }
.tile-icon svg { width: 100%; height: 100%; fill: none; stroke: var(--fg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
