:root {
  /* Colors */
  --canvas: #F4F4F3;
  --surface: #FFFFFF;
  --ink: #18181B;
  --ink-2: #3F3F46;
  --muted: #71717A;
  --faint: #A1A1AA;
  --hair: rgba(24,24,27,.10);
  --hair-2: rgba(24,24,27,.07);
  --accent: #C8451F;
  --accent-ink: #7A2A12;
  --accent-tint: #F6E7E0;
  --dark: #1A1A1A;
  --dark-2: #232323;

  /* Radius */
  --r-tile: 20px;
  --r-img: 16px;
  --r-input: 12px;

  /* Shadow */
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 18px 40px rgba(24,24,27,.07);

  /* Typography */
  --font-sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Layout */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Nav */
.nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--hair);
  background: var(--canvas);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-brand .brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-cta {
  display: none;
}

/* Nav right cluster */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--hair);
  background: var(--surface);
  cursor: pointer;
  color: var(--ink-2);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.theme-toggle .icon-moon { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Mobile nav toggle */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--hair);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-burger svg { width: 18px; height: 18px; }

/* Sections */
.section {
  padding: 88px 40px;
}

.section-head { margin-bottom: 48px; }

.section-head h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow .bar {
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary { background: var(--accent); color: var(--surface); }
.btn-primary:hover { background: #B43C18; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--hair); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

/* Cards / Tiles */
.tile {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--r-tile);
  padding: 26px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.tile h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.tile p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}

.tile .tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 6px;
}

.tile .mono {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  overflow: hidden;
}

.tile .mono img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile .mono .mono-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Footer */
.footer {
  background: var(--dark);
  color: #A1A1AA;
  padding: 64px 40px 32px;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer h5 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #71717A;
  margin-bottom: 16px;
}

.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer a {
  font-size: 14px;
  color: #A1A1AA;
  transition: color 0.2s ease;
}

.footer a:hover { color: var(--surface); }

.footer-base {
  max-width: 1240px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  color: #52525B;
  font-family: var(--font-mono);
}

.footer-base a { color: #52525B; }

/* Page hero */
.page-hero {
  padding: 72px 40px 56px;
  max-width: 1240px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-hero .lede {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 52ch;
}

/* Content sections */
.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 40px;
}

.content-section h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.content-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 32px;
}

.content-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.content-section ul,
.content-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-section li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 8px;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
}

.step .num {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* Product screenshot */
.product-shot {
  border-radius: var(--r-tile);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--surface);
}

.product-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============ Dark Mode ============ */
:root[data-theme="dark"] {
  --canvas: #131316;
  --surface: #1C1C20;
  --ink: #E4E4E7;
  --ink-2: #B4B4B8;
  --muted: #8B8B90;
  --faint: #6B6B70;
  --hair: rgba(255,255,255,.10);
  --hair-2: rgba(255,255,255,.06);
  --accent-tint: #3A1F15;
  --dark: #0A0A0C;
  --dark-2: #161618;
}

:root[data-theme="dark"] body {
  background: var(--canvas);
  color: var(--ink);
}

:root[data-theme="dark"] .nav,
:root[data-theme="dark"] .section {
  background: var(--canvas);
}

:root[data-theme="dark"] .tile {
  background: var(--surface);
}

:root[data-theme="dark"] .nav-links.open {
  background: var(--canvas);
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .nav-burger {
  background: var(--surface);
}

/* ============ Mobile ============ */
@media (max-width: 768px) {
  .nav {
    height: 58px;
    padding: 0 20px;
  }
  .nav-right { gap: 12px; }
  .nav-brand .brand-sub { display: none; }
  .nav-brand span:not(.brand-sub) { font-size: 16px; }
  .nav-brand img { width: 28px; height: 28px; }
  .nav-links {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--canvas);
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--hair);
    z-index: 99;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    border-bottom: 1px solid var(--hair-2);
  }
  .nav-links a {
    display: block;
    padding: 16px 20px;
    font-size: 16px;
  }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-search-btn, .lang-toggle { width: 36px; height: 36px; }
  .nav-right { gap: 8px; }

  .section { padding: 52px 22px; }
  .page-hero { padding: 48px 22px 36px; }
  .content-section { padding: 32px 22px; }
  .container { padding: 0 22px; }

  .product-grid { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer { padding: 48px 22px 24px; }
  .footer-base {
    flex-direction: column;
    gap: 8px;
    padding: 24px 0 0;
  }

  /* Hero stacks vertically */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .hero-grid .hero-visual { order: -1; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn {
    justify-content: center;
    height: 48px;
  }

  /* About stacks */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .about-grid > div:first-child {
    max-width: 220px;
    margin: 0 auto;
  }

  /* Product detail hero stacks */
  .detail-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .detail-hero-grid .hero-visual { order: -1; }

  /* Steps stack tighter */
  .step { grid-template-columns: 28px 1fr; gap: 12px; }
  .step .num { width: 28px; height: 28px; font-size: 12px; }

  /* Feature 2-col → 1-col */
  .feature-grid { grid-template-columns: 1fr !important; }

  /* Page hero smaller */
  .page-hero h1 { font-size: 30px; }
  .page-hero .lede { font-size: 15px; }
}

/* Product detail */
.product-hero-detail {
  padding: 72px 40px 56px;
  max-width: 1240px;
  margin: 0 auto;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 56px;
  align-items: center;
}

.detail-hero-grid h1 {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.product-tagline {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 20px;
}

.product-liner {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 44ch;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.product-hero-shot {
  aspect-ratio: 5 / 4;
}

.product-story-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: start;
}

.product-story-grid h2,
.product-gallery-section h2 {
  margin-bottom: 18px;
}

.product-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.proof-card {
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: var(--r-img);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.proof-card div {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.proof-card span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.product-gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
  align-items: stretch;
}

.gallery-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--hair);
  border-radius: var(--r-tile);
  background: var(--canvas);
}

.gallery-image {
  border-radius: var(--r-img);
  overflow: hidden;
  border: 1px solid var(--hair-2);
  background: var(--surface);
  aspect-ratio: 4 / 3;
}

.gallery-card-large .gallery-image {
  aspect-ratio: 16 / 10;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card figcaption {
  padding: 18px 4px 2px;
}

.gallery-card h3 {
  margin: 0 0 8px;
}

.gallery-card p {
  margin-bottom: 0;
}

/* Product overview cards */
.product-overview-card {
  overflow: hidden;
}

.product-card-media {
  position: relative;
  height: 220px;
  margin: -10px -10px 24px;
  border-radius: var(--r-img);
  overflow: hidden;
  border: 1px solid var(--hair-2);
  background: var(--accent-tint);
}

.product-card-scene {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-screen {
  position: absolute;
  right: 16px;
  bottom: -18px;
  width: 38%;
  max-height: 82%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.66);
  box-shadow: 0 16px 36px rgba(24,24,27,.20);
}

@media (max-width: 768px) {
  .product-hero-detail { padding: 48px 22px 36px; }
  .product-story-grid,
  .product-gallery-grid,
  .product-proof-grid { grid-template-columns: 1fr; }
  .product-card-media { height: 200px; }
}
