/* OnPlate — shared styles */

:root {
  color-scheme: light dark;
  --bg: #fdf8f3;
  --surface: #ffffff;
  --text: #1b1410;
  --muted: #6b5f54;
  --border: rgba(43, 28, 16, 0.1);
  --accent: #f4511e;
  --accent-hover: #d83c10;
  --accent-soft: rgba(244, 81, 30, 0.09);
  --ok: #16a34a;
  --warn: #b45309;
  --shadow-sm: 0 1px 2px rgba(43, 28, 16, 0.04), 0 1px 3px rgba(43, 28, 16, 0.06);
  --shadow-md: 0 4px 6px rgba(43, 28, 16, 0.04), 0 12px 28px rgba(43, 28, 16, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --container: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15100c;
    --surface: #1f1812;
    --text: #f4ece4;
    --muted: #b4a596;
    --border: rgba(244, 236, 228, 0.12);
    --accent: #ff7a45;
    --accent-hover: #ff966b;
    --accent-soft: rgba(255, 122, 69, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; word-break: break-word; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 243, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(21, 16, 12, 0.78); }
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-primary a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-primary a:hover { color: var(--text); text-decoration: none; }
.nav-primary .btn {
  margin-left: 6px;
  color: #ffffff;
  font-weight: 600;
}
.nav-primary .btn:hover { color: #ffffff; }

@media (max-width: 640px) {
  .nav-primary { gap: 14px; }
  .nav-primary a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--accent-soft); color: var(--text); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

.apple-logo {
  width: 0.95em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.18em;
}

/* ---------- Sections / cards ---------- */
main { padding: 32px 0 56px; }

.section { padding: 56px 0; }
.section-narrow { max-width: 820px; margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

h1, h2, h3, h4 { color: var(--text); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 650; }

p { margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 24px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-line { margin-top: 18px; color: var(--muted); font-size: 0.9rem; }

.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: center;
}
.hero-visual img {
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.hero-visual img:first-child { transform: translateY(18px); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { grid-template-columns: repeat(2, 1fr); max-width: 480px; }
}

/* ---------- Features grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.feature .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Screenshots ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.screens img {
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
@media (max-width: 900px) {
  .screens {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .screens img { scroll-snap-align: start; }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: 0.97rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pricing teaser ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
}
.plan {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.plan-featured { border-color: var(--accent); }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.plan .plan-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.plan .price {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 8px 0 0;
  letter-spacing: -0.02em;
}
.plan .price-sub { color: var(--muted); margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.plan ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.plan ul li:last-child { border-bottom: 0; }
.plan ul li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--muted);
  transition: transform 160ms ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details > p, .faq details > div {
  padding: 0 18px 16px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Legal / content pages ---------- */
.legal {
  max-width: 820px;
  margin: 0 auto;
}
.legal header.legal-header {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 24px;
}
.legal h1 { font-size: 2rem; margin-bottom: 6px; }
.legal .sub { margin: 0; color: var(--muted); }
.legal nav.toc {
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  margin: 18px 0;
  background: var(--surface);
}
.legal nav.toc a { margin-right: 14px; white-space: nowrap; font-size: 0.94rem; }
.legal section { margin: 28px 0; }
.legal h2 { font-size: 1.3rem; margin-bottom: 10px; }
.legal h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.legal .small { font-size: 0.92rem; color: var(--muted); }
.legal ul { padding-left: 20px; }
.legal ul li { margin: 4px 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 56px;
  padding: 36px 0 28px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.site-footer h4 {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 3px 0; }
.site-footer ul a { color: var(--text); font-size: 0.95rem; }
.site-footer ul a:hover { color: var(--accent); text-decoration: none; }
.site-footer .brand-block p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 10px;
  max-width: 360px;
}
.site-footer .fine {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .brand-block { grid-column: 1 / -1; }
}

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
