/* TidyDesk Supply Co. — premium storefront design system
   Fonts: Fraunces (display) + Inter (UI), loaded in <head>.
   Tokens first; component styles preserve class names used by app.js,
   product.js, and the boardroom build. */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --ink: #14181c;
  --ink-soft: #5c636b;
  --ink-faint: #9aa1a9;
  --accent: #14624a;
  --accent-deep: #0d4433;
  --accent-ink: #ffffff;
  --accent-soft: #e3efe9;
  --line: #e7e4dc;
  --gold: #b98e2f;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(20 24 28 / 0.05);
  --shadow-md: 0 6px 24px -8px rgb(20 24 28 / 0.14);
  --shadow-lg: 0 24px 60px -20px rgb(20 24 28 / 0.25);
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101418;
    --surface: #171c22;
    --surface-2: #1e242b;
    --ink: #eceef0;
    --ink-soft: #a6adb5;
    --ink-faint: #6d747c;
    --accent: #2e9e78;
    --accent-deep: #47c298;
    --accent-ink: #08120e;
    --accent-soft: #16352a;
    --line: #2a313a;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 6px 24px -8px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 0.7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- announcement bar ---------- */
.announce {
  background: var(--accent-deep);
  color: #eaf5f0;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 8px 16px;
}
.announce strong { color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink);
}
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; font-weight: 500;
  transition: color 0.2s ease;
}
.site-header nav a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent); color: var(--accent-ink) !important;
  padding: 8px 18px; border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 84px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(600px 420px at 78% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(520px 380px at 12% 80%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-kicker::before { content: ""; width: 26px; height: 1.5px; background: var(--accent); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0 0 20px;
  max-width: 14ch;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { color: var(--ink-soft); max-width: 480px; font-size: 1.06rem; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-stats {
  display: flex; gap: 34px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stat { font-size: 0.85rem; color: var(--ink-soft); }
.hero-stat strong { display: block; font-size: 1.25rem; color: var(--ink); font-family: var(--font-display); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border: 1.5px solid var(--accent); cursor: pointer; font-family: var(--font-ui);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-lg { padding: 14px 34px; font-size: 1.02rem; }

/* ---------- section headers ---------- */
.section-head { margin: 72px 0 12px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 560; letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.section-head p { color: var(--ink-soft); margin: 0; max-width: 560px; }

/* ---------- category filter ---------- */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 26px; }
.chip {
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); font-size: 0.88rem; font-weight: 550; font-family: var(--font-ui);
  padding: 8px 18px; border-radius: 999px; cursor: pointer;
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}
.product-card {
  --hue: 152;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card-link { text-decoration: none; color: inherit; display: block; }
.product-art {
  aspect-ratio: 1 / 1; height: auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ffffff, #f1f0ec);
  color: hsl(var(--hue) 55% 32%);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .product-art { background: linear-gradient(160deg, #f4f3f0, #e7e5df); }
}
.product-art img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.product-card:hover .product-art img { transform: scale(1.05); }
.product-art svg { width: 30%; height: 30%; transition: transform 0.3s ease; }
.product-card:hover .product-art svg { transform: scale(1.1); }
.product-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { margin: 0; font-size: 1.02rem; font-weight: 640; letter-spacing: -0.005em; }
.card-title-link { text-decoration: none; color: inherit; }
.card-title-link:hover { color: var(--accent); }
.product-body p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; flex: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.price { font-weight: 700; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.product-footer .btn { padding: 8px 20px; font-size: 0.88rem; }
.view-link { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.card-cat {
  font-size: 0.7rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- trust / standard section ---------- */
.standard { margin: 80px 0 30px; }
.standard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 28px; }
.standard-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px;
}
.standard-card .std-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.2rem;
  margin-bottom: 14px;
}
.standard-card h3 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 640; }
.standard-card p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- about strip ---------- */
.about { padding: 10px 0 30px; }
.about p { color: var(--ink-soft); max-width: 640px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 70px; padding: 44px 0 34px;
  font-size: 0.88rem; color: var(--ink-soft);
  background: var(--surface);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 30px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.site-footer h4 { margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.site-footer a { color: var(--ink-soft); text-decoration: none; display: block; margin-bottom: 6px; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.8rem; color: var(--ink-faint); }

.loading { color: var(--ink-soft); }

/* ---------- scroll reveal ---------- */
.reveal-up { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal-up.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .product-card, .product-art img, .btn { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgb(10 12 14 / 0.55); z-index: 50; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line);
  max-width: 440px; width: 100%; padding: 30px; position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 { margin-top: 0; font-family: var(--font-display); font-weight: 600; }
.modal-card p { color: var(--ink-soft); }
.modal-close {
  position: absolute; top: 12px; right: 16px; border: none; background: none;
  font-size: 1.5rem; color: var(--ink-faint); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }

/* ---------- product detail page ---------- */
.pd { --hue: 152; padding-top: 28px; min-height: 40vh; }
.crumb { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 24px; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb span { margin: 0 6px; color: var(--ink-faint); }
.crumb-here { color: var(--ink); font-weight: 600; }

.pd-grid { display: grid; grid-template-columns: minmax(300px, 1fr) 1.15fr; gap: 48px; align-items: start; }
@media (max-width: 780px) { .pd-grid { grid-template-columns: 1fr; } }

.pd-art {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ffffff, #f1f0ec);
  color: hsl(var(--hue) 55% 32%);
  position: sticky; top: 92px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.pd-art svg { width: 40%; height: 40%; }
.pd-art img { width: 100%; height: 100%; object-fit: cover; }

.pd-info h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 580; letter-spacing: -0.015em; line-height: 1.15;
}
.pd-short { color: var(--ink-soft); font-size: 1.08rem; margin: 0 0 24px; }
.pd-price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.pd-price { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-desc { color: var(--ink-soft); margin: 0 0 24px; }

.feature-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 11px; }
.feature-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.95rem; }
.feature-list svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 4px; color: var(--accent); }

.pd-h2 { font-size: 1.05rem; margin: 0 0 12px; font-weight: 650; }
.specs { border-collapse: collapse; width: 100%; max-width: 480px; margin-bottom: 34px; }
.specs th, .specs td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: top; }
.specs th { color: var(--ink-soft); font-weight: 500; white-space: nowrap; padding-right: 28px; }

.related-wrap h2 { margin: 16px 0 22px; font-family: var(--font-display); font-weight: 580; }
.related-wrap h2.hidden { display: none; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.revealed .reveal { opacity: 1; transform: none; }
.revealed .pd-info > *:nth-child(2) { transition-delay: 0.06s; }
.revealed .pd-info > *:nth-child(3) { transition-delay: 0.12s; }
.revealed .pd-info > *:nth-child(4) { transition-delay: 0.18s; }
.revealed .pd-info > *:nth-child(5) { transition-delay: 0.24s; }
.revealed .pd-info > *:nth-child(6) { transition-delay: 0.3s; }
.revealed .pd-info > *:nth-child(7) { transition-delay: 0.36s; }

/* ---------- boardroom (unchanged contracts) ---------- */
.br { padding: 28px 20px 40px; }
.br h1 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 600; }
.br-sub { color: var(--ink-soft); max-width: 640px; margin: 0 0 28px; }
.br h2 { margin: 36px 0 16px; font-family: var(--font-display); font-weight: 600; }
.br-badge { font-size: 0.9rem; color: var(--ink-soft); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-pending .kpi-value { color: var(--ink-soft); font-weight: 600; font-size: 1.15rem; padding: 4px 0; }
.kpi-name { font-size: 0.85rem; font-weight: 600; margin-top: 2px; }
.kpi-src { font-size: 0.72rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.35; }

.office-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.desk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.desk-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.desk-avatar { font-size: 1.8rem; }
.desk-name { font-weight: 700; font-size: 0.95rem; }
.desk-status { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }
.desk-active .desk-dot { color: var(--accent); }
.desk-scheduled .desk-dot, .desk-standby .desk-dot { color: var(--ink-soft); }
.desk-blocked .desk-dot { color: #b3542e; }
.desk-task { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; }

.feed { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.feed-item { padding: 14px 0 14px 20px; position: relative; }
.feed-item::before {
  content: ''; position: absolute; left: -6px; top: 22px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-soft);
}
.feed-win::before { background: var(--accent); }
.feed-mistake::before { background: #b3542e; }
.feed-human::before { background: #7a6df0; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 4px; }
.feed-kind { font-weight: 600; }
.feed-title { margin: 0 0 4px; font-size: 1rem; }
.feed-detail { margin: 0; font-size: 0.9rem; color: var(--ink-soft); max-width: 720px; }
