/* ==========================================================================
   Design tokens
   Colors come from the app icon: a dark navy, a range of blues and one
   amber accent. System fonts only: nothing is loaded from a third party.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;

  --bg: #f6f7f9;
  --bg-surface: #ffffff;
  --bg-inset: #eef1f5;
  --border: #dfe3ea;
  --text: #141c2b;
  --text-muted: #556072;
  --text-faint: #626b7b;

  --accent: #e58f12;
  --accent-hover: #cf7f0b;
  --accent-text: #141c2b;
  --accent-soft: rgb(249 165 48 / 16%);
  --blue: #2d6382;

  --success: #2e9e4f;
  --danger: #cf3a3a;

  --quality-excellent: #2e9e4f;
  --quality-good: #8bc34a;
  --quality-fair: #f39c12;
  --quality-poor: #d64541;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 12px 40px rgb(20 28 43 / 12%);
  --width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141f;
    --bg-surface: #161e2e;
    --bg-inset: #1c2638;
    --border: #283349;
    --text: #e8ecf2;
    --text-muted: #a3adbd;
    --text-faint: #8d97a8;

    --accent: #f9a530;
    --accent-hover: #fdc66a;
    --accent-soft: rgb(249 165 48 / 14%);
    --blue: #79c0d1;

    --success: #4fc173;
    --danger: #f06666;
    --shadow: 0 12px 40px rgb(0 0 0 / 45%);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(34px, 5.5vw, 56px);
}

h2 {
  font-size: clamp(26px, 3.5vw, 36px);
}

h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: var(--text-muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.button-ghost:hover {
  background: var(--bg-inset);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.header-nav .button {
  min-height: 38px;
  padding: 0 16px;
  color: var(--accent-text);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 80px 0 64px;
}

.signup .container > * {
  min-width: 0;
}

/* Text first, then the screenshot at full width so its details stay legible. */
.hero-text {
  max-width: 760px;
}

.hero-tagline {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 16px;
}

.hero-note {
  font-size: 14px;
  color: var(--text-faint);
}

/* App screenshots: transparent PNG exports with their own window shadow. */
.hero-shot img,
.screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-shot {
  margin-top: 40px;
}

.screenshot {
  margin: 48px 0 0;
}

.screenshot figcaption {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
}

/* ==========================================================================
   Sections
   ========================================================================== */

section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.section-alt .card {
  background: var(--bg);
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

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

/* How it works: numbered steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* FAQ: every answer stays visible, for readers and search engines. */

.faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 48px;
}

.faq p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* About */

.about {
  max-width: 720px;
}

.about a {
  color: var(--accent);
}

/* Roadmap */

.roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Direct children only: the nested feature lists stay plain. */
.roadmap > li {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.roadmap ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 16px;
}

.tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-inset);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.tag-done {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
}

.tag-next {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ==========================================================================
   Signup form
   ========================================================================== */

.signup .container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
}

.field .optional {
  color: var(--text-faint);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-muted);
}

.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* Honeypot: hidden from people, filled in by most bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.5em;
  margin: 0;
  font-size: 15px;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--danger);
}

/* ==========================================================================
   Footer and legal pages
   ========================================================================== */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.legal {
  max-width: 760px;
  padding: 56px 20px 72px;
}

.legal h2 {
  margin-top: 40px;
  font-size: 22px;
}

.legal p,
.legal li {
  color: var(--text-muted);
}

.legal h3 {
  margin-top: 24px;
}

.legal ul {
  padding-left: 20px;
}

/* 404 pages: a short list of places to go instead. */

.notfound-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 32px;
  padding: 0;
  list-style: none;
}

.notfound-links a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}

.notfound-links a:hover {
  background: var(--bg-inset);
}

/* ==========================================================================
   Narrow screens
   ========================================================================== */

@media (max-width: 860px) {
  .hero {
    padding-top: 48px;
  }

  .signup .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .grid,
  .roadmap,
  .steps,
  .faq {
    grid-template-columns: 1fr;
  }

  .header-nav .nav-link {
    display: none;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 16px;
  }

  .form {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

}

/* ==========================================================================
   Language menu: a native <details>, so it works without JS.
   ========================================================================== */

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  list-style: none;
  cursor: pointer;
  user-select: none;
}

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

.lang-menu summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin: -3px 0 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  background: var(--bg-inset);
  color: var(--text);
}

.lang-menu summary svg {
  width: 17px;
  height: 17px;
}

.lang-menu ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  box-shadow: var(--shadow);
  list-style: none;
}

.header-nav .lang-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
}

.header-nav .lang-menu a:hover {
  background: var(--bg-inset);
}

.header-nav .lang-menu a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 520px) {
  .lang-menu summary span {
    display: none;
  }
}
