/* ============================================================
   LinkCommerce — Marketing landing page
   Design tokens follow /design/design.md §2–§4.
   Accent: warm ochre (#8A6A24) per brand direction; all other
   colors are the design doc's warm-neutral token set.
   ============================================================ */

:root {
  /* Core tokens (design.md §2) */
  --canvas: #FAF9F7;
  --surface: #FFFFFF;
  --subtle: #F4F3F0;
  --subtle-2: #EDEAE5;
  --border: #E7E4DD;
  --border-strong: #D6D2C9;
  --ink: #211D19;
  --ink-hover: #3A342E;
  --text-secondary: #6E675E;
  --text-tertiary: #9A938A;

  /* Warm ochre accent + split-segment colors */
  --accent: #8A6A24;
  --accent-hover: #6F551C;
  --accent-tint: #F6EFDD;
  --seg-seller: #8A6A24;    /* warm brown / ochre */
  --seg-seller-tint: #F6EFDD;
  --seg-creator: #5B8A6E;   /* mist green */
  --seg-creator-tint: #E9F1EA;
  --seg-platform: #9A938A;  /* neutral gray */
  --seg-platform-tint: #EDEAE5;

  --radius-card: 10px;
  --radius-btn: 7px;
  --shadow-card: 0 1px 2px rgba(28, 25, 23, .04);
  --shadow-card-hover: 0 1px 2px rgba(28, 25, 23, .05), 0 6px 16px rgba(28, 25, 23, .07);
  --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.011em; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid rgba(138, 106, 36, .55);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 550;
  font-size: 14px;
  line-height: 20px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 90ms ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }

.btn-primary { background: var(--ink); color: #FAF9F7; }
.btn-primary:hover { background: var(--ink-hover); color: #FAF9F7; }

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--subtle); color: var(--ink); }

.btn-light { background: #FAF9F7; color: var(--ink); }
.btn-light:hover { background: #FFFFFF; color: var(--ink); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14.5px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 120ms ease;
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-cta { margin-left: 4px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 88px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 22px;
}

.lede {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Split card (hero visual) */
.split-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.split-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.split-card-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.split-card-id { font-size: 12px; color: var(--text-tertiary); }

.split-bar {
  display: flex;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--subtle-2);
}
.split-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  min-width: 0;
  color: #FAF9F7;
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  transition: width 900ms var(--ease-entrance);
}
.seg-seller { background: var(--seg-seller); }
.seg-creator { background: var(--seg-creator); }
.seg-platform { background: var(--seg-platform); }
.split-bar.is-grown .split-seg { width: calc(var(--w) * 1%); }
.seg-platform span { font-size: 11.5px; }

.split-legend { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.split-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.legend-pct { margin-left: auto; font-size: 12.5px; color: var(--ink); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dot-seller { background: var(--seg-seller); }
.dot-creator { background: var(--seg-creator); }
.dot-platform { background: var(--seg-platform); }

.split-card-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
section[id] { scroll-margin-top: 76px; }
.section-alt {
  background: var(--subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2, .cta-inner h2, .audience-card h2, .split-detail-copy h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-sub {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.section-sub.strong { color: var(--ink); font-weight: 500; margin-top: 16px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }

.card h3 { font-size: 15.5px; margin-bottom: 8px; }
.card p { font-size: 13.5px; line-height: 1.65; color: var(--text-secondary); }

.card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.card-icon svg { width: 18px; height: 18px; }

.step-card { position: relative; }
.step-num {
  position: absolute;
  top: 20px;
  right: 22px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ---------- Split model detail ---------- */
.split-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
}
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.order-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.order-row-total { color: var(--ink); font-weight: 500; }
.order-row-total .amount { font-size: 18px; font-weight: 500; }
.amount { color: var(--ink); font-size: 14px; }

.order-divider { height: 1px; background: var(--border); margin: 4px 0; }

.order-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ---------- Compliance grid ---------- */
.compliance-grid .card p { font-size: 13.5px; }

/* ---------- Audience ---------- */
.audience-grid { align-items: stretch; }
.audience-card { padding: 32px; }
.audience-card h2 { font-size: 24px; margin-bottom: 24px; }

.check-list { display: flex; flex-direction: column; gap: 16px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.check {
  flex: none;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--seg-creator-tint);
  color: #3E6B4C;
  border-radius: 50%;
  margin-top: 1px;
}
.check svg { width: 12px; height: 12px; }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--subtle-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}
.trust-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* ---------- CTA ---------- */
.cta-section { padding: 96px 0; }
.cta-inner {
  background: var(--ink);
  color: #FAF9F7;
  border-radius: 14px;
  padding: 72px 32px;
  text-align: center;
}
.cta-inner h2 { color: #FAF9F7; }
.cta-inner .section-sub {
  color: #B8B1A7;
  max-width: 520px;
  margin: 0 auto 32px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.footer-tag { font-size: 13.5px; color: var(--text-secondary); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.footer-links a { font-size: 13px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: 12.5px; color: var(--text-tertiary); margin-top: 6px; }

/* ---------- Scroll reveal ---------- */
/* Hidden state only applies when JS is active (no-JS = always visible) */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 340ms ease-out, transform 340ms ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 64px 0 64px; }
  .section { padding: 72px 0; }
  .hero-grid,
  .split-detail { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-card-hover);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }
  .nav-cta { margin: 12px 0 0; }

  .cta-inner { padding: 56px 24px; }
  .audience-card { padding: 24px; }
  .split-card { padding: 22px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .split-seg { transition: none; }
  .card, .btn, .nav-toggle span { transition: none; }
}
