/* Pantry landing page. Layout only: colors, materials and controls come from shared/tokens.css.
   The dish card, badge, chips and action buttons copy the app's rules (app/styles.css) so the
   preview is the card people will see in the app. Nothing on this page moves. */

/* ---------- page ---------- */
html, body { height: auto; min-height: 100%; overflow-x: clip; }
.wrap { width: min(1100px, 100% - 48px); margin-inline: auto; }
h1, .title { font-family: "Source Serif 4", Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
p { text-wrap: pretty; }
.rule { border-top: 1px solid rgba(var(--ink),.08); }

/* ---------- top bar (same wordmark and nav capsule as the app) ---------- */
.topbar {
  height: 88px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(var(--ink),.08);
}
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: -.035em; }
.wordmark:hover { color: var(--text); }
.pillbar { display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; }

/* Links wearing pill classes: keep the button colors on hover (tokens' a:hover would tint them). */
a.prominent, a.prominent:hover { color: var(--on-accent); }
a.pill.ghost:hover { color: var(--text); }
.pill.go { padding: 0 14px 0 18px; }
.pill.lg.go { padding: 0 18px 0 22px; }
.pill.lg.plain { padding: 0 22px; }
.row-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- hero ---------- */
.hero {
  max-width: 760px; padding: 112px 0 72px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
h1 { font-size: 56px; line-height: 1.08; }
h1 em { font-style: italic; font-weight: 700; }
.tagline { font-family: "Source Serif 4", Georgia, "Times New Roman", serif; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; margin-top: -8px; text-wrap: balance; }
.lede { font-size: 18px; line-height: 1.5; color: var(--text-2); max-width: 560px; }
.hero .row-btns { margin-top: 8px; }

/* ---------- the product, shown once ---------- */
.product { display: flex; justify-content: center; padding: 8px 0 112px; }
.preview { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
.deck { position: relative; width: 100%; max-width: var(--card-w); }
.deck .card {
  position: absolute; inset: 0;
  height: var(--card-h);
  border-radius: var(--radius); background: var(--surface); overflow: hidden;
  display: flex; flex-direction: column;
  user-select: none; -webkit-user-select: none;
}
.deck .pos0 { position: relative; z-index: 3; }
.deck .pos1 { z-index: 2; transform: scale(.95) translateY(16px); opacity: .9; }
.deck .pos2 { z-index: 1; transform: scale(.90) translateY(32px); opacity: .75; }

.card-img { position: relative; height: 320px; flex-shrink: 0; background: var(--img-ph); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px 22px; flex-grow: 1; min-height: 0; }
.card-body h2 {
  font-size: 34px; line-height: 1.02; letter-spacing: -.03em; font-weight: 800;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-2); flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
}
.chip.have { background: rgba(var(--ink),.10); color: var(--text); padding-left: 8px; }

.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text); max-width: calc(100% - 28px);
}
.badge span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.badge.red { background: linear-gradient(135deg, rgba(var(--red-rgb),.42), rgba(var(--red-rgb),.20)); }
.badge.red .dot { background: var(--red); }

.actions { display: flex; align-items: flex-start; gap: 36px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hint { font-size: 11px; color: var(--text-3); letter-spacing: .02em; }
.circle.faux { pointer-events: none; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.reading { max-width: 640px; margin-inline: auto; }
.title { font-size: 32px; line-height: 1.15; }
.section .title { margin-bottom: 40px; }

/* how it works */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; padding: 28px 0; }
.step + .step { border-top: 1px solid rgba(var(--ink),.08); }
.step .num { font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--text-3); padding-top: 5px; }
.step-body { display: flex; flex-direction: column; gap: 10px; }
.step h3 { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.step p { font-size: 16px; line-height: 1.55; color: var(--text-2); }

/* the freshness panel: a plain raised surface, no glass */
.panel { margin: 10px 0 0; padding: 4px 20px; background: var(--surface); border-radius: 20px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.prow + .prow { border-top: 1px solid rgba(var(--ink),.08); }
.prow .name { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prow .name strong { font-size: 15px; font-weight: 500; }
.prow .name small { font-size: 13px; color: var(--text-2); }
.prow .fresh { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.prow .fresh small { font-size: 12px; color: var(--text-2); }
.bar { width: 72px; height: 6px; border-radius: 999px; background: rgba(var(--ink),.10); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; }
.bar.red i { background: var(--red); }
.bar.yellow i { background: var(--yellow); }
.bar.green i { background: var(--green); }

/* what it does differently: three text columns under one hairline */
.grid3 {
  list-style: none; margin: 0; padding: 32px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  border-top: 1px solid rgba(var(--ink),.08);
}
.grid3 li { display: flex; flex-direction: column; gap: 8px; }
.grid3 h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.grid3 p { font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* closing */
.closing { padding: 112px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 28px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid rgba(var(--ink),.08); padding: 28px 0 48px; display: flex; flex-direction: column; gap: 14px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 4px 0; }
.foot-links a:hover { color: var(--text); }
.foot .small { font-size: 13px; color: var(--text-3); }

/* ---------- narrower screens ---------- */
@media (max-width: 800px) {
  .grid3 { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { height: 72px; }
  .hero { padding: 64px 0 56px; gap: 20px; }
  h1 { font-size: 40px; }
  .tagline { font-size: 21px; }
  .product { padding-bottom: 80px; }
  /* the card follows the column width; the stack behind it stretches with the front card */
  .deck .card { height: auto; min-height: 520px; }
  .card-img { height: 280px; }
  .actions { gap: 28px; }
  .section { padding: 72px 0; }
  .section .title { margin-bottom: 28px; }
  .step { grid-template-columns: 40px minmax(0, 1fr); padding: 24px 0; }
  .panel { padding: 2px 16px; }
  .closing { padding: 80px 0; }
  .foot { padding: 24px 0 40px; }
  .foot-row.small { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- signed-in state: the avatar replaces "Sign in" (same rules as the app) ---------- */
.avatar {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; color: var(--text);
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
}
.avatar img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 50%; object-fit: cover; pointer-events: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 19px; }
a.avatar { color: var(--text); text-decoration: none; }
a.avatar:hover { text-decoration: none; }
