/* PantrySmith website. Tokens mirror src/constants/theme.ts in the app. */

:root {
  --ground: #FBF8F4;
  --card: #FFFFFF;
  --sunken: #F4EFE8;
  --line: #E8E1D8;
  --ink: #1F1F1F;
  --muted: #6B655E;          /* darker than the app's #8A8A8A so body text passes contrast on the cream ground */
  --coral: #FF6B4A;
  --coral-deep: #E0492A;     /* coral text on light backgrounds */
  --coral-soft: #FFEDE8;
  --amber: #FFA23A;
  --basil: #4CAF6D;
  --basil-soft: #E8F5EC;
  --honey: #E89B2C;
  --honey-soft: #FDF3E3;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius-photo: 28px;
  --radius-card: 20px;
  --shadow-lift: 0 18px 40px -18px rgba(70, 40, 20, 0.35), 0 2px 6px rgba(70, 40, 20, 0.06);

  --gutter: clamp(16px, 5vw, 48px);
  --max: 1160px;
}

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

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

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

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

a { color: var(--coral-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 14px; z-index: 10; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  padding: 22px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 104px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.hero .lede {
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 30em;
  margin: 0 0 32px;
}
.availability {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.pill-primary {
  background: linear-gradient(135deg, var(--coral), var(--amber));
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(255, 107, 74, 0.7);
}
.pill-primary:hover { color: #fff; filter: brightness(1.04); }
.pill-quiet {
  background: var(--sunken);
  color: var(--ink);
}
.availability-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* The photo with the recipe card made from what is on the table. */
.scene {
  position: relative;
  margin: 0;
}
.scene-photo {
  border-radius: var(--radius-photo);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 62%;
}
.scene-card {
  position: absolute;
  left: clamp(-56px, -4vw, -16px);
  bottom: clamp(20px, 6%, 48px);
  width: min(330px, 78%);
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-lift);
  animation: rise 700ms 250ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.scene-label {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.chip {
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--basil-soft);
  color: #2F7A47;
}
.scene-divider {
  height: 1px;
  background: var(--line);
  margin: 0 0 14px;
}
.recipe-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.recipe-meta li {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink);
}
.recipe-meta .ready { background: var(--coral-soft); color: var(--coral-deep); font-weight: 600; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-sunken { background: var(--sunken); }

.section h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  max-width: 18em;
}
.section .intro {
  color: var(--muted);
  font-size: 18px;
  max-width: 34em;
  margin: 0 0 48px;
}

/* How it works: a real sequence, so it is numbered. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--coral);
  color: var(--coral-deep);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 18px;
}
.steps h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 8px;
}
.steps p { margin: 0; color: var(--muted); max-width: 26em; }

/* Photo feature */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.feature img {
  border-radius: var(--radius-photo);
  width: 100%;
  aspect-ratio: 5 / 3.4;
  object-fit: cover;
}
.feature p { color: var(--muted); max-width: 30em; }

/* Allergy note */
.safety {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.safety ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
}
.safety li {
  padding-left: 22px;
  position: relative;
}
.safety li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
}
.safety strong { display: block; }
.safety .fine {
  font-size: 15px;
  color: var(--muted);
  border-left: 3px solid var(--honey);
  background: var(--honey-soft);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin: 28px 0 0;
}

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 20px;
  max-width: 880px;
}
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px 28px 30px;
}
.plan-pro {
  border: 2px solid var(--coral);
  box-shadow: var(--shadow-lift);
}
.plan h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 4px;
}
.plan .price {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 20px;
}
.plan .price strong {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--ink);
  font-weight: 700;
  margin-right: 4px;
}
.plan ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.plans-note { font-size: 14px; color: var(--muted); margin: 20px 0 0; max-width: 46em; }

/* ── Documents (privacy, terms, support, deletion) ──────────────────────── */

.doc {
  padding: clamp(24px, 4vw, 48px) 0 clamp(64px, 8vw, 104px);
}
.doc .wrap {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.doc-head { grid-column: 1 / -1; max-width: 40em; }
.doc-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.doc-head p { color: var(--muted); margin: 0 0 6px; font-size: 18px; }
.doc-head .updated { font-size: 15px; }

.toc {
  position: sticky;
  top: 24px;
  font-size: 14px;
}
.toc p { font-weight: 600; margin: 0 0 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--coral-deep); }

.prose { max-width: 40em; }
.prose h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  margin: 48px 0 14px;
  scroll-margin-top: 24px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: #3A3632; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  margin: 0 0 32px;
}
.callout p:last-child { margin-bottom: 0; }
.callout-warn {
  background: var(--honey-soft);
  border-color: #F3D9AE;
}
.email-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.email-card a.pill { white-space: nowrap; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  color: var(--coral-deep);
  font-size: 22px;
  line-height: 1;
  transition: transform 200ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero .wrap, .feature, .safety, .plans { grid-template-columns: minmax(0, 1fr); }
  .scene { max-width: 520px; }
  .scene-card { left: 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .doc .wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 14px; }
  .brand { font-size: 20px; }
  .brand img { width: 30px; height: 30px; }
  .scene-card { left: 12px; right: 12px; width: auto; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-card { animation: none; }
  .faq summary::after { transition: none; }
}
