/* =====================================================================
   Cotton AI marketing site — shared theme
   Light palette taken from the app (app/static/styles.css).
   Loaded on every page AFTER the page's inline CSS, so it also remaps the
   legacy dark variables used by solution/, partners/, clients/, customize/.
   ===================================================================== */

:root {
  /* app tokens */
  --paper: #f6f4ee;
  --paper-2: #efebe1;
  --sand: #ece6d9;
  --sand-2: #c9bda6;
  --sage-pale: #dfe9dd;
  --sage: #779073;
  --forest: #355d4a;
  --forest-dark: #294b3b;
  --ink: #293029;
  --muted: #687068;
  --muted-2: #8a908a;
  --line: #ded9cd;
  --line-strong: #c9c2b3;
  --danger: #9a493f;
  --white: #fff;
  --shadow: 0 18px 50px rgba(41, 48, 41, .10);
  --shadow-sm: 0 6px 18px rgba(41, 48, 41, .08);

  /* chart accents */
  --up: #2d7a4f;
  --down: #9a493f;
  --warn: #bd8b34;
  --series: #4b6a8a;

  /* type */
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: var(--serif);

  /* layout */
  --gutter: clamp(16px, 5vw, 72px);
  --wrap: 1180px;
  --radius: 24px;
  --radius-sm: 12px;

  /* ---- legacy dark-page variables remapped to the light palette ---- */
  --bg: var(--paper);
  --bg-elevated: var(--paper-2);
  --bg-card: var(--white);
  --bg-card-hover: #fbfaf7;
  --bg-sidebar: #f1eee7;
  --bg-input: #fbfaf7;
  --bg-msg-ai: var(--white);
  --bg-surface: var(--white);
  --text: var(--ink);
  --text-dim: var(--muted);
  --text-muted: var(--muted-2);
  --gold: var(--forest);
  --gold-bright: var(--forest-dark);
  --gold-dim: var(--sage);
  --accent: var(--forest);
  --accent-dim: var(--sage);
  --border: var(--line);
  --border-gold: var(--line-strong);
  --border-subtle: var(--line);
  --green: var(--up);
  --green-signal: var(--up);
  --success: var(--up);
  --amber: var(--warn);
  --amber-signal: var(--warn);
  --warning: var(--warn);
  --blue: var(--series);
  --blue-signal: var(--series);
  --red: var(--down);
  --red-signal: var(--down);
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* grain overlays from the old dark pages */
body::after { display: none !important; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--forest); }
h4, h5, h6 { margin: 0; font-family: var(--sans); }
p { margin: 0; }
a { color: var(--forest); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: 820px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--paper-2); }

.eyebrow {
  display: block;
  margin: 0 0 12px;
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -.015em; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.h3 { font-size: 22px; }
.lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 640px; }
.sub { font-size: 15px; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.center { text-align: center; }
.center .lede, .center .eyebrow { margin-left: auto; margin-right: auto; }
.mono { font-family: var(--mono); font-size: .92em; }
.ul { margin: 0; padding-left: 20px; }
.ul li { margin: 6px 0; }
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--sage-pale); color: var(--ink); font-size: 14px;
}
.note b { color: var(--forest); }

/* ------------------------------------------------------------- buttons */
.btn, .btn-gold, .btn-outline, .button, .pricing-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  line-height: 1;
}
.btn-primary, .btn-gold, .button, .pricing-card.featured .pricing-btn {
  background: var(--forest); color: var(--white); border-color: var(--forest);
}
.btn-primary:hover, .btn-gold:hover, .button:hover, .pricing-card.featured .pricing-btn:hover {
  background: var(--forest-dark); border-color: var(--forest-dark); color: var(--white);
  transform: none; box-shadow: none;
}
.btn-secondary, .btn-outline, .pricing-btn {
  background: var(--white); color: var(--ink); border-color: var(--line-strong);
}
.btn-secondary:hover, .btn-outline:hover, .pricing-btn:hover {
  border-color: var(--forest); color: var(--forest); background: var(--white);
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }

/* --------------------------------------------------------------- cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h3 { font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--sage-pale); color: var(--forest);
  font-family: var(--serif); font-size: 17px; margin-bottom: 16px;
}

/* ----------------------------------------------------------- tier badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--sage-pale); color: var(--forest); white-space: nowrap;
}
.badge-outlook { background: var(--sage-pale); color: var(--forest); }
.badge-deals { background: var(--forest); color: var(--white); }
.badge-full { background: var(--ink); color: var(--paper); }
.badge-all { background: var(--sand); color: var(--ink); }

/* ------------------------------------------------------ screenshot frame */
.shot {
  position: relative;
  display: block;
  margin: 0;
  width: 100%;
  min-height: 240px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.shot::before {
  /* placeholder caption shown until the screenshot exists */
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 24px; text-align: center;
  color: var(--muted-2); font-size: 13px; font-weight: 600; letter-spacing: .04em;
}
.shot img, .shot picture { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shot.shot-missing img { visibility: hidden; }
.shot-sm { border-radius: 14px; min-height: 160px; }

/* -------------------------------------------------------------- navbar */
nav {
  position: sticky; top: 0; left: auto; right: auto; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 64px; padding: 0 var(--gutter);
  background: rgba(246, 244, 238, .92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 20px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.nav-logo-line { display: none; }
.brand-mark {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--forest); color: var(--white);
}
.brand-mark svg { display: block; }
.nav-panel { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
nav .nav-links a {
  font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--muted); text-decoration: none; transition: color .15s;
}
nav .nav-links a:hover { color: var(--ink); }
nav .nav-links a.active { color: var(--forest); }
nav .nav-signin {
  font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
}
nav .nav-signin:hover { color: var(--forest); }
nav .nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  background: var(--forest); color: var(--white); border: 1px solid var(--forest);
  font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none;
  text-decoration: none; white-space: nowrap; transition: background .15s;
}
nav .nav-cta:hover { background: var(--forest-dark); border-color: var(--forest-dark); color: var(--white); }
.nav-toggle { border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); border-radius: 10px; }

/* -------------------------------------------------------------- footer */
footer.site-footer {
  display: block; padding: 0; margin-top: 48px;
  border-top: 1px solid var(--line); background: var(--paper-2);
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px;
  padding-top: 56px; padding-bottom: 40px;
}
.foot-brand .nav-logo { margin-bottom: 14px; }
.foot-brand p { font-size: 13.5px; color: var(--muted); max-width: 32ch; line-height: 1.6; }
.foot-col h5 {
  margin: 0 0 14px; color: var(--forest);
  font-size: 10.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
.foot-col a, .foot-col span {
  display: block; margin-bottom: 10px;
  font-size: 14px; color: var(--ink); text-decoration: none; font-weight: 500;
}
.foot-col a:hover { color: var(--forest); }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}

/* -------------------------------------------------------- pricing bits */
.pricing-toggle-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pricing-toggle {
  display: inline-flex; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  box-shadow: var(--shadow-sm);
}
.pricing-toggle button {
  height: 36px; padding: 0 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.pricing-toggle button.is-active { background: var(--forest); color: var(--white); }
.pricing-toggle .save { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--sage-pale); color: var(--forest); }
.pricing-toggle button.is-active .save { background: rgba(255,255,255,.18); color: var(--white); }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.pricing-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 28px;
}
.pricing-card.featured { border-color: var(--forest); box-shadow: 0 22px 56px rgba(53, 93, 74, .16); }
.pricing-card .ribbon {
  position: absolute; top: -12px; left: 28px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--forest); color: var(--white);
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  display: inline-flex; align-items: center;
}
.pricing-name { font-family: var(--serif); font-size: 28px; margin: 4px 0 6px; }
.pricing-tagline { font-size: 14px; color: var(--muted); min-height: 44px; }
.pricing-amount { display: flex; align-items: baseline; gap: 2px; margin: 18px 0 2px; }
.pricing-amount .cur { font-size: 20px; color: var(--muted); }
.pricing-amount .num { font-family: var(--serif); font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.pricing-amount .per { font-size: 14px; color: var(--muted); margin-left: 4px; }
.pricing-note { font-size: 12.5px; color: var(--muted); min-height: 18px; }
.pricing-list { list-style: none; margin: 20px 0 24px; padding: 18px 0 0; border-top: 1px solid var(--line); flex: 1; }
.pricing-list li {
  position: relative; padding: 6px 0 6px 24px; font-size: 14px; color: var(--ink); line-height: 1.45;
}
.pricing-list li::before {
  content: ""; position: absolute; left: 2px; top: 12px;
  width: 11px; height: 6px; border-left: 2px solid var(--forest); border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}
.pricing-list li.dim { color: var(--muted-2); }
.pricing-list li.dim::before { border-color: var(--line-strong); }
.pricing-list li.hdr { padding-left: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); }
.pricing-list li.hdr::before { display: none; }
.pricing-btn { width: 100%; height: 48px; }
.pricing-fine { font-size: 13px; color: var(--muted); text-align: center; max-width: 720px; margin: 24px auto 0; }

.compare { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.compare th, .compare td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare th { background: var(--paper-2); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); }
.compare th:first-child, .compare td:first-child { text-align: left; font-weight: 600; }
.compare td.yes::before { content: ""; display: inline-block; width: 11px; height: 6px; border-left: 2px solid var(--forest); border-bottom: 2px solid var(--forest); transform: rotate(-45deg); }
.compare td.no { color: var(--line-strong); }
.compare td.no::before { content: "—"; }
.compare-wrap { overflow-x: auto; }

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faq .card { padding: 22px 24px; box-shadow: var(--shadow-sm); }
.faq h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; }
.faq p { font-size: 14px; color: var(--muted); }

.notice {
  margin: 0 auto 24px; max-width: 720px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: #f5ead6; border: 1px solid #e3cf9f; color: #6d4f16; font-size: 14px; font-weight: 600; text-align: center;
}

/* ---------------------------------------------------- data source chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); display: inline-block; }

/* ---------------------------------------------------------- prose pages */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose p, .prose li { font-size: 15.5px; color: var(--ink); line-height: 1.7; margin-bottom: 12px; }
.prose ul { padding-left: 22px; }
.prose .draft {
  display: inline-flex; gap: 8px; align-items: center; margin-bottom: 18px;
  padding: 6px 12px; border-radius: 999px; background: #f5ead6; color: #6d4f16;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}

/* ================================================================
   Legacy page fixes (solution/, partners/, clients/, customize/)
   ================================================================ */
.page-hero::before, .cta-section::before, .founding-section::before,
.hero::after, section.cta::before, .founder-photo::before { display: none; }
.page-hero { padding-top: 88px; padding-bottom: 56px; }
.page-overline, .section-overline, .kicker, .pricing-tier {
  font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--forest);
}
.page-overline::before, .section-overline::before { background: var(--forest); }
.page-hero h1, .section-heading, .founder-name, .partner-card h3, .feature-card h3, .why-card h3,
.client-logo-text, .stat-value, .feature-grid h2, .cta h2, .hero h1, .feature-num, .founder-initials, .step-num {
  font-family: var(--serif); font-weight: 400;
}
.hero h1 { font-size: clamp(44px, 6vw, 80px); line-height: 1.02; letter-spacing: -.02em; }
.hero .kicker { margin-bottom: 20px; }
.feature-num { font-size: 48px; color: var(--sage); }
.page-hero p, .cta-body, .founder-bio, .partner-card p, .team-card p, .why-card p, .client-desc,
.feature-card p, .footer-left p, .hero p.lede, .feature-grid p, .cta p, .msg-content, .chat-input,
.cred-value, .section-body { font-weight: 400; }
.h-rule { background: var(--line); }

.features-grid, .partners-grid, .team-grid, .why-grid, .client-card { gap: 16px; background: transparent; }
.feature-card, .partner-card, .team-card, .why-card, .client-info, .client-stats {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
}
.feature-card:hover, .partner-card:hover, .team-card:hover, .why-card:hover { background: var(--white); box-shadow: var(--shadow); }
.feature-card .num, .why-card .num { color: var(--sage); }
.client-tag { border-radius: 999px; color: var(--muted); }
.stat-value.gold, .client-ticker, .client-exclusive, .partner-role, .founder-title, .team-card .role, .partner-link { color: var(--forest); }
.exclusive-badge, .availability { border-color: var(--line-strong); color: var(--forest); background: var(--white); }
.founder-photo { background: var(--sand); border-color: var(--line); border-radius: 20px; }
.founder-initials { color: var(--forest); }
.team-avatar, .sidebar-avatar, .msg-user .msg-avatar { background: var(--forest); color: var(--white); }
.cta-section, .founding-section { background: var(--paper-2); }

/* solution/ app mock-up */
.product-frame { border-radius: 24px; box-shadow: var(--shadow); background: var(--white); border-color: var(--line); }
.browser-bar { background: var(--paper-2); }
.signal-card { background: var(--paper-2); border-color: var(--line); }
.msg-user .msg-content { background: var(--sage-pale); border-color: var(--sage-pale); }
.msg-ai .msg-avatar { background: var(--sage-pale); color: var(--forest); }
.sidebar-item:hover { background: rgba(255, 255, 255, .7); }
.sidebar-item.active { background: var(--white); color: var(--forest); }
.chat-input-box:hover { border-color: var(--line-strong); }
.chat-send { background: var(--forest); color: var(--white); }
.chat-send:hover { background: var(--forest-dark); }
.data-table td { border-bottom-color: var(--line); }
.chat-status { color: var(--up); }
.chat-status-dot { background: var(--up); }

/* customize/ mock-ups */
.mock { box-shadow: var(--shadow); border-radius: 20px; background: var(--white); border-color: var(--line); font-family: var(--mono); }
.setting-value, .log-row, .step-body .meta { font-family: var(--mono); }
.voice-avatar.selected { background: var(--sage-pale); box-shadow: 0 0 0 1px var(--forest); }
.voice-quote { background: var(--sage-pale); border-left-color: var(--forest); }
.log-status.executed { background: var(--sage-pale); }
.log-status.pending { background: #f5ead6; }
.merchant { border-radius: 999px; }
.merchant.connected { border-color: var(--sage); }
.toggle { background: var(--line-strong); }
.toggle.on { background: var(--forest); }
.toggle.on::after { background: var(--white); }
.toggle::after { background: var(--white); }
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--ink); }
.button { border-radius: var(--radius-sm); }

/* ----------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .grid-3, .pricing-grid { grid-template-columns: 1fr; }
  .grid-2, .faq { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  nav { height: 60px; padding: 0 16px; }
  .section { padding: 52px 0; }
  .page-hero { padding-top: 56px; padding-bottom: 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 40px; }
  .foot-brand { grid-column: 1 / -1; }
  .pricing-tagline { min-height: 0; }
  .hero h1 { font-size: clamp(38px, 10vw, 56px); }

  /* Phone menu: the base .nav-panel/.nav-links rules above (display:flex)
     load after mobile-overrides.css and kept the menu permanently open.
     Closed by default; the hamburger toggles nav.nav-open. */
  .nav-panel { display: none; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; gap: 12px; padding: 12px 20px 20px; }
  nav.nav-open .nav-panel { display: flex; }
  .nav-links { display: flex; flex-direction: column; gap: 0; }
  nav .nav-links a { display: block; padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  nav .nav-links li:last-child a { border-bottom: 0; }
  nav .nav-signin { padding: 10px 0; }

  .compare { font-size: 13px; }
  .compare th, .compare td { padding: 10px 8px; }
  .compare th { font-size: 10px; letter-spacing: .04em; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
}
