/* Grynd EMS landing page. Tokens from egems-design-system/Style.json (light theme only). */
:root {
  --yellow: #F9FF2D;
  --on-yellow: #010101;
  --glow-purple: #C0B7FF;
  --apollo-black: #1A1A1A;
  --true-black: #010101;
  --white: #FFFFFF;
  --canvas: #F3F4F8;
  --surface-alt: #F9F9FB;
  --ink: #111827;
  --ink-secondary: #6B7280;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --paid: #1F8738;
  --paid-soft: #ECFDF5;
  --due-soft: #FFFBEB;
  --overdue: #FD341D;
  --overdue-soft: #FEF2F2;
  --on-dark-secondary: rgba(255, 255, 255, 0.7);

  --font-sans: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-sm: 16px; --radius-md: 20px; --radius-full: 999px;
  --page-max: 1080px;
  --section-pad: 112px;
}

/* General Sans when installed on the device; self-host the woff2 under /fonts to make it exact. */
@font-face {
  font-family: "General Sans";
  src: local("General Sans");
  font-weight: 200 800;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.55; font-weight: 500;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p, ol, figure { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--true-black); outline-offset: 0; box-shadow: 0 0 0 6px var(--glow-purple); }
.on-dark :focus-visible { outline-color: var(--white); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--white); padding: 12px 16px; border-radius: var(--radius-full); }
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 760px; }

.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--canvas); }
.on-dark { background: var(--apollo-black); color: var(--white); }

.h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; max-width: 20ch; }
.lede { font-size: 19px; color: var(--ink-secondary); max-width: 46ch; margin-top: 16px; }
.on-dark .lede { color: var(--on-dark-secondary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 28px; border-radius: var(--radius-full); border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.btn svg.i { width: 18px; height: 18px; }
.btn-primary { background: var(--yellow); color: var(--on-yellow); }
.btn-primary:hover { background: #EDF31F; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--apollo-black); color: var(--white); }
.btn-dark:hover { background: var(--true-black); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* Chips and tags */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--radius-full); font-size: 13px; font-weight: 600; line-height: 18px; color: var(--ink); white-space: nowrap; }
.chip svg.i { width: 15px; height: 15px; }
.chip-paid { background: var(--paid-soft); } .chip-paid svg { color: var(--paid); }
.chip-due { background: var(--due-soft); } .chip-due svg { color: #B45309; }
.chip-overdue { background: var(--overdue-soft); } .chip-overdue svg { color: var(--overdue); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; background: var(--glow-purple); color: var(--ink); border-radius: var(--radius-full); padding: 2px 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--glow-purple); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; }
.brand img { width: 32px; height: 32px; }
.nav-actions { display: flex; align-items: center; gap: 24px; }
.nav-link { display: none; font-size: 15px; color: var(--ink-secondary); text-decoration: none; }
.nav-link:hover { color: var(--ink); }
@media (min-width: 640px) { .nav-link { display: inline; } }

/* Hero */
.hero { padding: 88px 0 var(--section-pad); text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-secondary); }
.hero h1 { margin: 20px auto 0; font-size: clamp(40px, 7vw, 76px); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; max-width: 13ch; }
.hero-sub { margin: 24px auto 0; font-size: clamp(18px, 2vw, 21px); color: var(--ink-secondary); max-width: 38ch; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.note { margin-top: 16px; font-size: 14px; color: var(--ink-secondary); }

.dash { margin: 72px auto 0; max-width: 760px; text-align: left; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; box-shadow: 0 4px 16px rgba(17, 24, 39, 0.08); }
.dash-top { display: flex; justify-content: space-between; align-items: center; }
.dash-top b { font-size: 16px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.kpis div { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 14px 16px; }
.kpis small { display: block; font-size: 13px; color: var(--ink-secondary); }
.kpis b { display: block; font-size: clamp(16px, 2.6vw, 24px); font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rows { margin-top: 12px; }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--border); font-size: 15px; }
.row:first-child { border-top: 0; }
.num { color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
@media (max-width: 559px) {
  .dash { padding: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis div:last-child { grid-column: span 2; }
  .row { grid-template-columns: 1fr auto; font-size: 14px; }
  .row .num { display: none; }
}

/* Problem band */
.band { padding: 96px 0; text-align: center; }
.band h2 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.band p { margin: 20px auto 0; font-size: 19px; color: var(--on-dark-secondary); max-width: 44ch; }

/* Features */
.features { display: grid; gap: 48px; margin-top: 56px; }
@media (min-width: 600px) { .features { grid-template-columns: repeat(2, 1fr); gap: 40px; } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.feature svg.i { width: 28px; height: 28px; }
.feature h3 { font-size: 21px; font-weight: 700; margin-top: 16px; }
.feature p { font-size: 17px; color: var(--ink-secondary); margin-top: 8px; }
.also { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 16px; color: var(--ink-secondary); }

/* Ledger */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.ledger { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 20px; }
.lrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); }
.lrow:first-child { border-top: 0; }
.lrow b { display: block; font-size: 16px; }
.lrow small { display: block; font-size: 14px; color: var(--ink-secondary); }

/* Steps */
.steps { display: grid; gap: 24px; margin-top: 48px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { display: flex; align-items: center; gap: 16px; font-size: 19px; font-weight: 600; }
.n { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--yellow); color: var(--on-yellow); display: grid; place-items: center; font-weight: 700; }

/* Pricing */
.prices { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 800px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.price { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px 24px 24px; display: flex; flex-direction: column; }
.price.featured { border: 2px solid var(--apollo-black); }
.price .tag { position: absolute; top: -12px; left: 24px; }
.price h3 { font-size: 15px; font-weight: 600; color: var(--ink-secondary); }
.price .cost { margin-top: 8px; font-size: 38px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price .cost i { font-style: normal; font-size: 16px; font-weight: 500; color: var(--ink-secondary); letter-spacing: 0; }
.price .yearly { margin: 6px 0 24px; font-size: 15px; color: var(--ink-secondary); flex: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 799px) { .price.featured { order: -1; } }
.billing { display: none; margin-top: 32px; padding: 4px; gap: 4px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-full); }
.js .billing { display: inline-flex; }
.bill-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 20px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--ink-secondary); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.bill-opt[aria-pressed="true"] { background: var(--apollo-black); color: var(--white); }
.bill-opt .save { font-size: 12px; background: var(--glow-purple); color: var(--ink); border-radius: var(--radius-full); padding: 2px 8px; }
.js .billing + .prices { margin-top: 24px; }
.prices[data-billing="yearly"] .m, .prices[data-billing="monthly"] .y { display: none; }
.price .cost s { display: block; font-size: 18px; font-weight: 500; color: var(--ink-secondary); letter-spacing: 0; }
.price-foot { margin-top: 24px; font-size: 16px; color: var(--ink-secondary); }
.price-foot a { color: var(--apollo-black); font-weight: 600; text-underline-offset: 3px; }

/* Contact */
.by { margin-top: 32px; font-size: 15px; color: var(--on-dark-secondary); }
.form { background: var(--white); color: var(--ink); border-radius: var(--radius-md); padding: 24px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field label span { font-weight: 500; color: var(--ink-secondary); }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-full); font: inherit; font-size: 16px; color: var(--ink); background: var(--white); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 18px; padding-right: 44px; }
.field input::placeholder { color: #9CA3AF; }
.field input:focus-visible, .field select:focus-visible { border-color: var(--true-black); }
.send { display: grid; gap: 12px; margin-top: 4px; }
@media (min-width: 560px) { .send.two { grid-template-columns: 1fr 1fr; } }
.fine { font-size: 13px; color: var(--ink-secondary); }
.fine a { color: var(--apollo-black); font-weight: 600; text-underline-offset: 3px; }

/* Footer */
.footer { padding: 32px 0; font-size: 14px; color: var(--ink-secondary); border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; gap: 20px; }
.footer a { color: var(--ink); text-underline-offset: 3px; }

/* Scroll reveal: only with JS and when motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 300ms ease-out, transform 300ms ease-out; }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
@media (max-width: 767px) { :root { --section-pad: 72px; } .band { padding: 72px 0; } .hero { padding-top: 56px; } }
