/* ==========================================================================
   KartGarage — kartgarage.net
   Palette and typeface match app_store_assets/config/screenshots_*.json so the
   site, the App Store screenshots, and the app itself read as one product.
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/PlusJakartaSans-VF.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #060912;
  --bg-elev: #0e1320;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent: #e5323c;
  --accent-soft: #f7616b;
  --accent-dim: rgba(229, 50, 60, 0.14);

  --text: #f8fafc;
  --muted: #93a4bc;
  --muted-dim: #64748b;

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-soft);
  text-decoration-color: rgba(247, 97, 107, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 18, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--text);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch a,
.lang-switch span {
  padding: 4px 11px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.lang-switch a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.lang-switch [aria-current='true'] {
  background: var(--accent);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px -10px rgba(229, 50, 60, 0.8);
}

.btn-primary:hover {
  background: #f0404a;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

section {
  position: relative;
  padding-block: clamp(64px, 10vw, 112px);
}

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 14px;
}

.section-head {
  max-width: 620px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
}

.section-head p {
  color: var(--muted);
  margin: 16px 0 0;
  font-size: 1.06rem;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  margin: 20px 0 0;
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(48px, 8vw, 88px);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -280px;
  right: -160px;
  width: 780px;
  height: 780px;
  background: radial-gradient(circle, rgba(229, 50, 60, 0.22), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.8rem);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.hero-note {
  color: var(--muted-dim);
  font-size: 0.9rem;
  margin: 18px 0 0;
}

.hero-shot {
  justify-self: center;
}

/* --------------------------------------------------------------------------
   Device frame
   -------------------------------------------------------------------------- */

.device {
  position: relative;
  width: 320px;
  max-width: 100%;
  padding: 11px;
  background: #0a0d14;
  border: 1px solid var(--border-strong);
  border-radius: 46px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* No synthetic Dynamic Island: the raw screenshots have no status bar, so app
   content starts at the very top of the frame and a notch would cover it. */

.device img {
  width: 100%;
  border-radius: 36px;
  background: #000;
}

/* --------------------------------------------------------------------------
   Feature rows
   -------------------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  margin-bottom: clamp(64px, 9vw, 104px);
}

.feature:last-of-type {
  margin-bottom: 0;
}

.feature:nth-child(even) .feature-media {
  order: -1;
}

.feature-media {
  display: flex;
  justify-content: center;
}

.feature h3 {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
}

.feature p {
  color: var(--muted);
  margin: 16px 0 0;
  font-size: 1.06rem;
}

.feature ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 11px;
}

.feature li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  font-size: 0.99rem;
}

.feature li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   Card grid
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 20px;
}

.card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.card h3 {
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 0.97rem;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--accent-dim);
  color: var(--accent-soft);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  max-width: 800px;
}

.plan {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.plan-featured {
  border-color: rgba(229, 50, 60, 0.5);
  background: linear-gradient(
    180deg,
    rgba(229, 50, 60, 0.09),
    rgba(255, 255, 255, 0.02)
  );
}

.plan h3 {
  font-size: 1.35rem;
}

.plan-price {
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 0.98rem;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.plan li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 0.97rem;
}

.plan li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.42em;
  width: 15px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.plan-note {
  color: var(--muted-dim);
  font-size: 0.86rem;
  margin: 26px 0 0;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  max-width: 760px;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  padding: 20px 40px 20px 0;
  font-weight: 700;
  font-size: 1.04rem;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: translateY(-20%) rotate(-135deg);
}

.faq details p {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.cta-band {
  text-align: center;
  border-top: 1px solid var(--border);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(229, 50, 60, 0.12),
    transparent 60%
  );
}

.cta-band h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
}

.cta-band p {
  color: var(--muted);
  margin: 16px auto 32px;
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px 40px;
  background: var(--bg-elev);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}

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

.footer-legal {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--muted-dim);
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
}

.footer-legal p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Legal / prose pages
   -------------------------------------------------------------------------- */

.prose {
  max-width: 760px;
  padding-block: clamp(48px, 7vw, 80px);
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.prose .updated {
  color: var(--muted-dim);
  font-size: 0.92rem;
  margin: 14px 0 0;
}

.prose h2 {
  font-size: 1.32rem;
  margin: 44px 0 14px;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 32px 0 10px;
  letter-spacing: -0.005em;
}

.prose p {
  color: var(--muted);
  margin: 0 0 16px;
}

.prose ul {
  color: var(--muted);
  padding-left: 22px;
  margin: 0 0 16px;
}

.prose li {
  margin-bottom: 9px;
}

.prose .intro {
  font-size: 1.09rem;
  color: var(--muted);
  margin-top: 28px;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

.callout {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 28px;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero .wrap,
  .feature {
    grid-template-columns: 1fr;
  }

  .hero-shot,
  .feature-media {
    order: 0 !important;
  }

  .feature-media {
    margin-top: 8px;
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .device {
    width: 268px;
    border-radius: 40px;
  }

  .device img {
    border-radius: 31px;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
