/* DinnerSorted marketing site — tokens mirror ios-app/src/lib/theme.ts */

:root {
  --primary: #af540d;
  --primary-dark: #8a4209;
  --text-primary: #1a1a1a;
  --text-secondary: #6b6560;
  --background: #f7f3ee;
  --surface: #ffffff;
  --success: #27ae60;
  --border: #e5dfd6;
  --separator: #ede7df;
  --primary-foreground: #ffffff;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(26, 17, 9, 0.06);
  --shadow-lg: 0 12px 32px rgba(26, 17, 9, 0.12);
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #f39c12;
    --primary-dark: #d98505;
    --text-primary: #f4efe9;
    --text-secondary: #a89e94;
    --background: #14110f;
    --surface: #1e1a17;
    --border: #3a322b;
    --separator: #2a2420;
    --primary-foreground: #1a1109;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- nav */

.nav {
  padding: 20px 0;
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text-primary);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- hero */

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

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero .accent {
  color: var(--primary);
}

.hero p.lede {
  font-size: 19px;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 46ch;
}

.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-media img {
  width: min(260px, 70vw);
  filter: drop-shadow(0 24px 40px rgba(26, 17, 9, 0.18));
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--background);
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
  }
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.trust-line {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------------------------------------------------------------- sections */

section {
  padding: 56px 0;
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px;
}

h2 {
  font-size: clamp(26px, 3.5vw, 34px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-lede {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 60ch;
  margin: 0 0 36px;
}

/* problem */

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

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

.problem-card .glyph {
  font-size: 26px;
  margin-bottom: 12px;
  display: block;
}

.problem-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.problem-card p {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

/* how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 4px;
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.step p {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

/* features */

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

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

.feature .glyph {
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}

.feature h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.feature p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* screenshots */

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

.shots img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* email capture */

.capture {
  background: var(--text-primary);
  color: var(--background);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .capture {
    background: var(--surface);
    border: 1px solid var(--border);
  }
}

.capture h2 {
  color: inherit;
}

.capture .section-lede {
  color: rgba(247, 243, 238, 0.75);
  margin-left: auto;
  margin-right: auto;
}

@media (prefers-color-scheme: dark) {
  .capture .section-lede {
    color: var(--text-secondary);
  }
}

.capture-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-code {
  width: 132px;
  height: 132px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-lg);
}

.qr-code svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-caption {
  margin: 0;
  font-size: 13px;
  color: rgba(247, 243, 238, 0.7);
}

@media (prefers-color-scheme: dark) {
  .qr-caption {
    color: var(--text-secondary);
  }
}

.capture-divider {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(247, 243, 238, 0.45);
}

@media (prefers-color-scheme: dark) {
  .capture-divider {
    color: var(--text-secondary);
  }
}

.signup-form {
  display: flex;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 16px;
  font-family: var(--font);
}

.signup-form button {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font);
}

.signup-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  min-height: 20px;
}

.form-status[data-state="success"] {
  color: #6fd68f;
}

.form-status[data-state="error"] {
  color: #ec7063;
}

.form-note {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(247, 243, 238, 0.55);
}

@media (prefers-color-scheme: dark) {
  .form-note {
    color: var(--text-secondary);
  }
}

/* faq */

.faq-list {
  max-width: 760px;
}

.faq-item {
  border-bottom: 1px solid var(--separator);
  padding: 20px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  color: var(--text-secondary);
  margin: 12px 0 0;
  font-size: 15px;
  max-width: 65ch;
}

/* footer */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--separator);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

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

footer a {
  text-decoration: none;
  color: var(--text-secondary);
}

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

/* ---------------------------------------------------------------- responsive */

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

  .hero-media {
    order: -1;
  }

  .hero-media img {
    width: min(220px, 55vw);
  }

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

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .shots {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
  }

  .capture {
    padding: 32px 20px;
  }

  .capture-grid {
    flex-direction: column;
    gap: 20px;
  }

  .signup-form {
    max-width: 280px;
  }

  .signup-form input[type="email"] {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .features {
    grid-template-columns: 1fr;
  }
}
