/* TallyKeep website — built from the TallyKeep design system tokens */
:root {
  --vandyke: #82241F;
  --vandyke-deep: #5E1A16;
  --spinel: #F27291;
  --turquoise: #B5DECC;

  --surface: #EEF7F2;
  --surface-raised: #FFFFFF;
  --line: #B5DECC;
  --line-strong: #7A4A47;
  --ink: #82241F;
  --ink-muted: #7A4A47;
  --action: #82241F;
  --action-pressed: #5E1A16;
  --on-action: #EEF7F2;
  --accent: #F27291;
  --on-accent: #5E1A16;
  --status-fresh: #B5DECC;
  --on-status-fresh: #82241F;
  --status-soon: #FBD3DD;
  --on-status-soon: #82241F;
  --status-expired: #82241F;
  --on-status-expired: #EEF7F2;
  --focus-ring: #82241F;

  --font-sans: Nunito, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1F1514;
    --surface-raised: #2B1D1B;
    --line: #4A3431;
    --line-strong: #C9ABA6;
    --ink: #F7E6E2;
    --ink-muted: #C9ABA6;
    --action: #F27291;
    --action-pressed: #E35A7C;
    --on-action: #4A1210;
    --on-accent: #4A1210;
    --on-status-fresh: #5E1A16;
    --status-soon: #4A2129;
    --on-status-soon: #FBD3DD;
    --on-status-expired: #F7E6E2;
    --focus-ring: #F27291;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-4); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--action); color: var(--on-action); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); z-index: 10; }
.skip:focus { left: var(--space-4); top: var(--space-4); }

/* Type */
.display { font-size: 56px; line-height: 60px; font-weight: 900; letter-spacing: -1.5px; margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 900; }
.h1 { font-size: 32px; line-height: 38px; letter-spacing: -0.5px; }
.h2 { font-size: 24px; line-height: 30px; }
.title { font-size: 17px; line-height: 24px; font-weight: 800; margin: 0; }
.overline { margin: 0 0 var(--space-3); font-size: 13px; line-height: 16px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.lead { font-size: 19px; line-height: 28px; max-width: 34em; margin: var(--space-4) 0 0; }
.muted { color: var(--ink-muted); }
p { margin: 0; }

/* Header */
.site-header { border-bottom: 1.5px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; min-height: 44px; }
.brand img { width: 36px; height: 36px; }
.wordmark { font-size: 24px; line-height: 28px; font-weight: 900; letter-spacing: -0.3px; }
.wordmark .keep { text-decoration: underline; text-decoration-color: var(--spinel); text-decoration-thickness: 4px; text-underline-offset: 4px; }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav a.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); font-weight: 800; font-size: 15px; text-decoration: none; border-radius: var(--radius-md); }
.nav a.link:hover { background: var(--surface-raised); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--spinel); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 22px; border-radius: var(--radius-md); border: 2px solid transparent; font: inherit; font-size: 15px; line-height: 20px; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-pressed); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-small { min-height: 44px; padding: 0 18px; }

/* Store buttons (placeholders until the apps are live) */
.stores { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 6px 20px; border-radius: var(--radius-md); border: 2px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); text-decoration: none; }
.store small { font-size: 12px; line-height: 14px; font-weight: 700; color: var(--ink-muted); }
.store strong { font-size: 17px; line-height: 22px; font-weight: 900; }
.store[aria-disabled="true"] { cursor: default; }

/* Hero */
.hero { padding: var(--space-12) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-12); align-items: center; }
.pagehero { padding: var(--space-12) 0 var(--space-8); }

/* Status tag + item row (from the design system) */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); font-size: 13px; line-height: 18px; font-weight: 800; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.tag.fresh { background: var(--status-fresh); color: var(--on-status-fresh); }
.tag.soon { background: var(--status-soon); color: var(--on-status-soon); }
.tag.expired { background: var(--status-expired); color: var(--on-status-expired); }
.dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--spinel); }
.item { display: flex; align-items: center; gap: var(--space-3); padding: 14px; min-height: 44px; border-radius: var(--radius-lg); background: var(--surface-raised); border: 1.5px solid var(--line); }
.item .txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .name { font-size: 17px; line-height: 24px; font-weight: 800; }
.item .meta { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Phone illustration */
.phone { width: 100%; max-width: 340px; margin: 0 auto; border: 2px solid var(--line-strong); border-radius: 40px; padding: 14px; background: var(--surface); }
.screen { border-radius: 28px; background: var(--surface); overflow: hidden; border: 1.5px solid var(--line); }
.screen-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.screen h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.5px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--turquoise); border-radius: var(--radius-md); }
.tabs span { flex: 1; text-align: center; padding: 8px 0; border-radius: var(--radius-sm); font-size: 14px; line-height: 20px; font-weight: 800; color: var(--vandyke); }
.tabs span.on { background: var(--action); color: var(--on-action); }
@media (prefers-color-scheme: dark) { .tabs span.on { background: var(--action); color: var(--on-action); } }
.bar { height: 72px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; justify-items: center; background: var(--surface-raised); border-top: 1.5px solid var(--line); margin-top: var(--space-2); }
.bar .scan { width: 60px; height: 60px; margin-top: -26px; border: 4px solid var(--surface); border-radius: var(--radius-lg); background: var(--accent); display: flex; align-items: center; justify-content: center; }
.bar svg { stroke: var(--ink-muted); }
.bar svg.on { stroke: var(--ink); }
.bar .scan svg { stroke: var(--on-accent); }

/* Sections */
section { padding: var(--space-12) 0; }
.band { background: var(--surface-raised); border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
.section-head { max-width: 36em; margin-bottom: var(--space-8); }
.section-head p { margin-top: var(--space-3); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.card { background: var(--surface-raised); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.band .card { background: var(--surface); }
.card p { color: var(--ink-muted); }
.icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--turquoise); display: flex; align-items: center; justify-content: center; }
.icon svg { stroke: var(--vandyke); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); }
.steps li::before { content: counter(s); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: var(--space-3); border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-weight: 900; font-size: 18px; }
.steps h3 { font-size: 20px; line-height: 26px; margin-bottom: var(--space-2); }
.steps p { color: var(--ink-muted); }

/* Status explainer */
.legend { display: flex; flex-direction: column; gap: var(--space-3); max-width: 420px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }

/* Feature blocks (features page) */
.feature { padding: var(--space-12) 0; border-top: 1.5px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
.feature.flip .copy { order: 2; }
.feature .copy p { margin-top: var(--space-3); }
.feature ul { margin: var(--space-4) 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.feature li { display: flex; gap: var(--space-3); align-items: flex-start; }
.feature li::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-top: 7px; border-radius: var(--radius-pill); background: var(--spinel); }
.panel { background: var(--surface-raised); border: 1.5px solid var(--line); border-radius: var(--radius-xl); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.pro-badge { display: inline-flex; align-self: flex-start; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 16px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; margin-bottom: var(--space-3); }

/* Label sheet illustration */
.sheet { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; background: #FFFFFF; border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 14px; }
.split .sheet { max-width: 400px; width: 100%; }
.sheet .cell { aspect-ratio: 1; border: 1.5px solid #B5DECC; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.sheet .cell img { width: 62%; }

/* Compare table */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { text-align: left; padding: 14px var(--space-4); border-bottom: 1.5px solid var(--line); font-size: 16px; line-height: 22px; vertical-align: top; }
th { font-weight: 900; }
tr:last-child td { border-bottom: 0; }
td.yes, th.col { font-weight: 800; }
.note { font-size: 13px; line-height: 18px; color: var(--ink-muted); margin-top: var(--space-3); }

/* CTA band */
.cta { background: var(--vandyke); color: var(--turquoise); }
.cta .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
.cta h2 { color: var(--turquoise); }
.cta p { color: #F7E6E2; margin-top: var(--space-3); }
.cta .mark { width: 72px; height: 72px; margin-bottom: var(--space-4); }
.waitlist { display: flex; flex-direction: column; gap: var(--space-3); }
.waitlist label { font-weight: 800; color: #F7E6E2; }
.waitlist .row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.waitlist input[type="email"] { flex: 1 1 220px; min-height: 48px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 2px solid #C9ABA6; background: #FFFFFF; color: #5E1A16; font: inherit; font-weight: 700; }
.waitlist input::placeholder { color: #7A4A47; }
.waitlist .btn { background: var(--spinel); color: #5E1A16; }
.waitlist .btn:hover { background: #F7849F; }
.cta .note { color: #E9CFCA; }
.cta :focus-visible { outline-color: #F27291; }

/* Footer */
.site-footer { padding: var(--space-8) 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); align-items: center; }
.site-footer p { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.site-footer a { text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 860px) {
  .display { font-size: 40px; line-height: 44px; letter-spacing: -1px; }
  .hero { padding: var(--space-8) 0; }
  .hero .wrap, .split, .feature .wrap, .cta .wrap { grid-template-columns: 1fr; gap: var(--space-8); }
  .feature.flip .copy { order: 0; }
  .grid3, .steps { grid-template-columns: 1fr; }
  section, .feature { padding: var(--space-8) 0; }
  .lead { font-size: 18px; line-height: 26px; }
}
@media (max-width: 480px) {
  .nav a.link:not([aria-current]) { display: none; }
  .nav a.btn { white-space: nowrap; padding: 0 14px; }
  .wordmark { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
