/* Follows docs/design.md: neutral palette, one accent, system font, 14/16/20/30/44 type scale, light + dark.
   Change the content in the HTML, not this look. Product UI can reuse the tokens and the .btn / .card / .field classes. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #09090b;
  --muted: #52525b;
  --surface: #fafafa;
  --border: #e4e4e7;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-fg: #ffffff;
  --ring: #2563eb;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 30px;
  --text-2xl: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --fg: #fafafa;
    --muted: #a1a1aa;
    --surface: #18181b;
    --border: #27272a;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-fg: #09090b;
    --ring: #93c5fd;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--text-xl); letter-spacing: -0.025em; }
h2 { font-size: var(--text-xl); letter-spacing: -0.02em; }
h3 { font-size: var(--text-lg); letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

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

.container { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 16px; }

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

/* Buttons and links: every tap target is at least 44 px high. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { background: var(--surface); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; text-decoration: none; color: var(--muted); }
.link:hover { color: var(--fg); text-decoration: underline; }

/* Form fields for the product UI. */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--text-sm); font-weight: 500; }
input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
textarea { min-height: 160px; resize: vertical; }

/* 1. Header */
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* 2. Hero */
.hero { padding: 48px 0 32px; }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-top: 16px; max-width: 60ch; font-size: var(--text-lg); color: var(--muted); }
.hero .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }

/* The real product (the working tool or a real sample output) sits right under the hero. */
.product { margin-top: 32px; padding: 0; }
.frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}
.frame img { border-radius: 6px; border: 1px solid var(--border); }

section { padding: 48px 0; }
.section-head { max-width: 68ch; margin-bottom: 24px; }
.section-head p { margin-top: 8px; color: var(--muted); }

/* 3. How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 4px 12px; align-content: start; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
}
.steps h3 { font-size: var(--text-base); line-height: 32px; }
.steps p { color: var(--muted); }

/* 4. Pricing */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.plan h3 { font-size: var(--text-base); }
.price { margin: 12px 0 16px; display: flex; align-items: baseline; gap: 6px; }
.price .amount { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price .period { color: var(--muted); font-size: var(--text-sm); }
.includes { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; flex: 1; }
.includes li { position: relative; padding-left: 24px; }
.includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 16px;
  height: 16px;
  background: var(--fg);
  /* Lucide "check" */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan .btn { width: 100%; }

/* 5. FAQ */
.faq { max-width: 68ch; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--muted); font-size: var(--text-lg); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 16px; color: var(--muted); }

/* 6. Footer */
.site-footer { border-top: 1px solid var(--border); padding: 16px 0; font-size: var(--text-sm); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* Plain text pages (privacy, terms) */
.prose { max-width: 68ch; padding: 32px 0 48px; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { font-size: var(--text-lg); margin: 32px 0 8px; }
.prose p, .prose ul { margin: 0 0 12px; }

@media (min-width: 640px) {
  .container { padding: 0 24px; }
  h1 { font-size: var(--text-2xl); }
  .hero { padding: 80px 0 40px; }
  section { padding: 64px 0; }
  .frame { padding: 24px; }
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
