/* ============================================================
   FORESIO DESIGN SYSTEM — v1.0
   Kitchen Ticket Aesthetic
   For frontend handoff — May 2026
   Colors: Ink / Paper / Signal Red / Margin Green / Receipt Tan
   Fonts: Fraunces (display) · Inter (body) · JetBrains Mono (data)
   Rule: Numbers always mono. Gradients never. Six colors max.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,400;1,9..144,700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Color */
  --ink:        #0A0A0A;
  --paper:      #F4F1EA;
  --red:        #D72638;
  --green:      #1F4D2B;
  --tan:        #E8DFC9;

  /* Color — opacity variants */
  --ink-60:     rgba(10, 10, 10, 0.60);
  --ink-40:     rgba(10, 10, 10, 0.40);
  --ink-20:     rgba(10, 10, 10, 0.20);
  --ink-08:     rgba(10, 10, 10, 0.08);
  --ink-04:     rgba(10, 10, 10, 0.04);

  --red-08:     rgba(215, 38, 56, 0.08);
  --green-08:   rgba(31, 77, 43, 0.08);

  /* Fonts */
  --f-display:  'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body:     'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:     'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;
  --sp-9: 128px;

  /* Layout */
  --max-w:   1200px;
  --gutter:  24px;
  --nav-h:   64px;

  /* Transitions */
  --t-fast:  0.12s ease;
  --t-base:  0.2s ease;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.flex   { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.t-display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(52px, 6.5vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.t-h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.t-h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.t-h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.t-body-lg { font-size: 18px; line-height: 1.7; }
.t-body    { font-size: 16px; line-height: 1.65; }
.t-small   { font-size: 14px; line-height: 1.55; }
.t-caption { font-size: 12px; line-height: 1.4; }

/* Mono variants */
.t-mono {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 400;
}
.t-mono-sm {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
}
.t-mono-xs {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

/* Section label — always mono, always uppercase, always small */
.section-label {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-40);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-4);
}
.section-label::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--red);
  flex-shrink: 0;
}

/* Timestamp prefix */
.ts {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-40);
  text-transform: uppercase;
}

/* Numbers always get mono treatment */
.num {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}
.num-lg {
  font-family: var(--f-mono);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Color utilities */
.c-red   { color: var(--red); }
.c-green { color: var(--green); }
.c-muted { color: var(--ink-40); }
.c-ink   { color: var(--ink); }

/* ── DIVIDERS ────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--ink-08);
  border: none;
  margin-block: var(--sp-6);
}
.divider--perf {
  border: none;
  background: none;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--ink-20);
  margin-block: var(--sp-5);
  overflow: hidden;
  white-space: nowrap;
}
.divider--perf::after {
  content: '· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·';
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
}
.btn-primary:hover {
  background: #b71f2d;
  border-color: #b71f2d;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-20);
}
.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.btn-ink:hover {
  background: #222;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1px solid var(--ink-40);
  letter-spacing: 0.1em;
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-lg { padding: 16px 36px; font-size: 12px; }
.btn-sm { padding: 9px 18px; font-size: 10px; }
.btn-full { width: 100%; }

/* ── NAVIGATION ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid var(--ink-08);
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav-logo {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.nav-logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  margin-left: 3px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.nav-links a {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
  transition: color var(--t-fast);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-cta { margin-left: var(--sp-4); }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: 6px;
}
.form-input {
  display: block;
  width: 100%;
  padding: 11px var(--sp-3);
  background: transparent;
  border: 1px solid var(--ink-20);
  border-radius: 0;
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--t-fast);
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--ink-40); }
.form-input:focus { border-color: var(--ink); }

.form-select {
  display: block;
  width: 100%;
  padding: 11px var(--sp-3);
  background: var(--paper);
  border: 1px solid var(--ink-20);
  border-radius: 0;
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%230A0A0A' stroke-width='1.5' fill='none' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color var(--t-fast);
}
.form-select:focus { border-color: var(--ink); }

/* ── TICKET COMPONENT ────────────────────────────────────────── */
/* The ticket is the core visual motif — all cards derive from it */
.ticket {
  background: white;
  border: 1px solid var(--tan);
  position: relative;
  overflow: hidden;
}
.ticket::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--tan);
  transition: background var(--t-base);
}
.ticket--red::after  { background: var(--red); }
.ticket--green::after { background: var(--green); }
.ticket--ink::after  { background: var(--ink); }

.ticket-head {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px dashed var(--ink-08);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ticket-body {
  padding: var(--sp-4);
}
.ticket-foot {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px dashed var(--ink-08);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-40);
}

/* ── STAT BLOCK ──────────────────────────────────────────────── */
.stat-block {
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--ink-08);
}
.stat-num {
  font-family: var(--f-mono);
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}
.stat-num.red   { color: var(--red); }
.stat-num.green { color: var(--green); }
.stat-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: var(--sp-1);
}
.stat-desc {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.45;
}

/* ── SECTIONS ────────────────────────────────────────────────── */
section { padding-block: var(--sp-8); }
section.tight { padding-block: var(--sp-6); }
section.flush { padding-block: 0; }

/* Dark section */
.section-dark {
  background: var(--ink);
  color: var(--paper);
}
.section-dark .section-label { color: rgba(244,241,234,0.4); }
.section-dark .section-label::before { background: var(--red); }
.section-dark .divider { background: rgba(244,241,234,0.08); }
.section-dark .divider--perf { color: rgba(244,241,234,0.15); }

/* Tan section */
.section-tan { background: var(--tan); }

/* ── PRICING ─────────────────────────────────────────────────── */
.price-card {
  border: 1px solid var(--ink-20);
  padding: var(--sp-6) var(--sp-5);
  position: relative;
}
.price-card.featured {
  border-color: var(--ink);
  border-width: 2px;
}
.price-badge {
  position: absolute;
  top: -1px; right: 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
}
.price-tier {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: var(--sp-3);
}
.price-amount {
  font-family: var(--f-mono);
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.price-period {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-40);
  margin-bottom: var(--sp-5);
}
.price-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.price-feature-check {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
}
.price-feature-dash {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-20);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── TABLE ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
  padding: 10px 16px;
  border-bottom: 1px solid var(--ink-20);
  text-align: left;
  font-weight: 500;
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-08);
  font-size: 14px;
  line-height: 1.4;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
.col-highlight { background: var(--green-08); }
.check-icon { color: var(--green); font-size: 15px; }
.cross-icon { color: var(--ink-20); font-size: 15px; }

/* ── AGENT LIST ──────────────────────────────────────────────── */
.agent-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--sp-3);
  align-items: start;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--ink-08);
}
.agent-row:last-child { border-bottom: none; }
.agent-index {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ink-40);
  padding-top: 5px;
}
.agent-info {}
.agent-name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 4px;
}
.agent-desc {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.5;
}
.agent-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 7px;
  flex-shrink: 0;
}
.agent-tag--p1 { background: var(--ink); color: var(--paper); }
.agent-tag--p2 { border: 1px solid var(--ink-20); color: var(--ink-40); }

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline { position: relative; }
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--ink-08);
  transform: translateX(-50%);
}
.timeline-time {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-40);
  padding-top: 4px;
  text-align: right;
  padding-right: var(--sp-4);
}
.timeline-content {
  padding-left: var(--sp-4);
}
.timeline-event {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.timeline-detail {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.5;
}
.timeline-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-top: 6px;
  text-transform: uppercase;
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-item {
  border-top: 1px solid var(--ink-08);
  padding: var(--sp-4) 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--ink-08); }
.faq-q {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: var(--sp-2);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--sp-3);
}
.faq-a {
  font-size: 15px;
  color: var(--ink-60);
  line-height: 1.65;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--sp-7);
  border-top: 1px solid var(--ink);
}
.footer-logo {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.footer-tagline {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.35);
  margin-bottom: var(--sp-6);
}
.footer-col-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.3);
  margin-bottom: var(--sp-3);
}
.footer-links { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-links a {
  font-size: 14px;
  color: rgba(244,241,234,0.6);
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--paper); }
.footer-bottom {
  margin-top: var(--sp-7);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(244,241,234,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(244,241,234,0.25);
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .grid-2 { grid-template-columns: 1fr; gap: var(--sp-5); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-cta { margin-left: 0; }
  section { padding-block: var(--sp-6); }
  .t-display { font-size: clamp(40px, 8vw, 60px); }
  .timeline-item { grid-template-columns: 60px 1fr; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .price-card { padding: var(--sp-5) var(--sp-4); }
  .agent-row { grid-template-columns: 32px 1fr; }
  .agent-tag { display: none; }
  .footer-bottom { flex-direction: column; gap: var(--sp-3); text-align: center; }
}

/* ── UTILITIES ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.pt-nav { padding-top: var(--nav-h); }
.w-full { width: 100%; }
.hidden { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
