/* =========================================================
   Sellarge Marketing Site — Design System
   Brand tokens mirror the Sellarge app exactly for full
   cross-property consistency.
   ========================================================= */

:root {
  --color-orange: #ff6600;
  --color-tang: #ff8c42;
  --color-burnt: #d35400;
  --color-black: #0a0a0a;
  --color-white: #ffffff;
  --color-gray-50: #f9f9f9;
  --color-gray-100: #f4f4f4;
  --color-gray-200: #e8e8e8;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #9a9a9a;
  --color-gray-600: #555555;
  --color-gray-700: #3a3a3a;
  --color-gray-800: #1e1e1e;

  --color-green: #22c55e;
  --color-green-dark: #16a34a;
  --color-blue: #3b82f6;
  --color-red: #ef4444;

  --font-display: 'Syne', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-financial: 'Sora', ui-sans-serif, system-ui, sans-serif;

  --container-w: 1120px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(10,10,10,0.04), 0 1px 3px rgba(10,10,10,0.06);
  --shadow-md: 0 8px 24px rgba(10,10,10,0.08);
  --shadow-lg: 0 24px 60px rgba(10,10,10,0.14);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; width: 100%; }
body {
  font-family: var(--font-body);
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.12; }

::selection { background: var(--color-orange); color: var(--color-white); }
:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 2px; border-radius: 4px; }

* { scrollbar-width: thin; scrollbar-color: var(--color-gray-400) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-gray-400); border-radius: 999px; border: 2px solid var(--color-white); }
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-600); }

/* ---------- Layout ---------- */
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .container, .container-narrow { padding: 0 20px; }
}

/* ---------- Typography scale ---------- */
.h-hero { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.h-xl { font-size: clamp(2rem, 3.6vw, 3rem); }
.h-lg { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
.h-md { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
.text-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--color-gray-700); line-height: 1.6; }
.text-muted { color: var(--color-gray-600); }
.font-mono { font-family: var(--font-mono); }
.font-financial { font-family: var(--font-financial); }

/* ---------- Sellarge wordmark treatment ----------
   "Se" + "arge" in white on a dark chip; the two "L"s each take
   one of the logo's two orange tones — a typographic echo of the
   two-bar icon mark. */
.word-sellarge {
  display: inline-block;
  background: var(--color-black);
  color: var(--color-white);
  padding: 0.05em 0.28em 0.1em;
  border-radius: 0.18em;
  font-family: var(--font-display);
  font-weight: 700;
}
.word-sellarge .l1 { color: var(--color-burnt); }
.word-sellarge .l2 { color: var(--color-tang); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 13px 26px; border-radius: var(--radius-pill);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--color-orange); color: var(--color-white); box-shadow: 0 1px 2px rgba(255,102,0,0.15); }
.btn-primary:hover { background: var(--color-tang); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); background: var(--color-burnt); }
.btn-dark { background: var(--color-black); color: var(--color-white); }
.btn-dark:hover { background: var(--color-gray-800); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--color-black); border: 1.5px solid var(--color-gray-300); }
.btn-outline:hover { border-color: var(--color-orange); color: var(--color-burnt); }
.btn-outline-light { background: transparent; color: var(--color-white); border: 1.5px solid rgba(255,255,255,0.3); }
.btn-outline-light:hover { border-color: var(--color-tang); color: var(--color-tang); }
.btn-lg { padding: 16px 32px; font-size: 1.02rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card-dark {
  background: var(--color-black);
  color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-200);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.nav-logo img { width: 30px; height: 30px; border-radius: 22%; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.92rem; color: var(--color-gray-700); font-weight: 500; transition: color 0.15s ease; position: relative; }
.nav-links a:hover { color: var(--color-orange); }
.nav-links a.active { color: var(--color-burnt); font-weight: 700; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--color-orange); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* Hamburger → X morph */
.nav-toggle {
  position: relative; width: 44px; height: 44px;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  flex-shrink: 0;
}
.hamburger-bar {
  width: 22px; height: 2px; background: var(--color-black); border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
}
.nav-toggle.open .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-inner { padding: 14px 0; }
  .nav-links {
    position: fixed; top: 70px; left: 0; right: 0; bottom: 0; width: 100%; height: calc(100vh - 70px);
    background: var(--color-white); z-index: 99;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 20px 24px 32px; overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.32s;
  }
  .nav-links.open { transform: translateX(0); visibility: visible; transition: transform 0.32s cubic-bezier(0.4,0,0.2,1); }
  .nav-links a {
    width: 100%; padding: 18px 4px; border-bottom: 1px solid var(--color-gray-100);
    font-size: 1.15rem; font-family: var(--font-display); font-weight: 700;
  }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { color: var(--color-orange); }
  .nav-links .btn-primary { margin-top: 24px !important; text-align: center; font-size: 1rem; padding: 16px 26px; }
  .nav-actions .btn-outline { display: none; }
  .nav-toggle { display: inline-flex; color: var(--color-black); position: relative; z-index: 101; }
}

/* ---------- Footer ---------- */
.footer { background: var(--color-black); color: var(--color-gray-400); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: var(--color-white); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.9rem; padding: 6px 0; color: var(--color-gray-400); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--color-tang); }
.footer-bottom { border-top: 1px solid var(--color-gray-800); margin-top: 56px; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 0.82rem; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--color-gray-700); color: var(--color-gray-400); transition: color 0.15s ease, border-color 0.15s ease; }
.social-link:hover { color: var(--color-white); border-color: var(--color-tang); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Scenario blocks ---------- */
.scenario {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-black);
}
.scenario .dim { color: var(--color-gray-400); }
.scenario-line { display: block; }

.scenario-card {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.scenario-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-gray-300); }
.scenario-card p { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; line-height: 1.4; }

/* ---------- Broken-tools grid ---------- */
.tool-card { border: 1px solid var(--color-gray-200); border-radius: var(--radius-md); padding: 26px; background: var(--color-white); }
.tool-card h3 { font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.tool-card p { color: var(--color-gray-600); font-size: 0.94rem; }
.tool-card .strike { text-decoration: line-through; color: var(--color-gray-400); }

/* ---------- Lifecycle ---------- */
.lifecycle { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.lifecycle-step { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; min-width: 110px; text-align: center; }
.lifecycle-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--color-orange); }
.lifecycle-label { font-size: 0.85rem; font-weight: 600; }
.lifecycle-line { flex: 1.4; height: 2px; background: linear-gradient(90deg, var(--color-orange), var(--color-gray-200)); min-width: 24px; }
@media (max-width: 700px) {
  .lifecycle { flex-direction: column; align-items: stretch; }
  .lifecycle-line { width: 2px; height: 28px; margin: 0 auto; background: linear-gradient(180deg, var(--color-orange), var(--color-gray-200)); }
  .lifecycle-step { flex-direction: row; text-align: left; }
}

/* ---------- Persona tabs ---------- */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.tab-btn {
  padding: 10px 20px; border-radius: var(--radius-pill); border: 1.5px solid var(--color-gray-200);
  font-size: 0.9rem; font-weight: 600; color: var(--color-gray-700); background: var(--color-white);
  transition: all 0.15s ease;
}
.tab-btn.active { background: var(--color-black); color: var(--color-white); border-color: var(--color-black); }
.tab-panel { display: none !important; }
.tab-panel.active { display: block !important; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--color-gray-200); border-radius: var(--radius-sm);
  font-size: 0.95rem; transition: border-color 0.15s ease;
  background: var(--color-white);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--color-orange); outline: none; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }

.bg-black { background: var(--color-black); color: var(--color-white); }
.bg-gray { background: var(--color-gray-50); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Toast (early access confirmation) ---------- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--color-black); color: var(--color-white);
  padding: 14px 20px; border-radius: var(--radius-sm); font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* =========================================================
/* =========================================================
   Horizontal scrollytelling carousel
   Auto-advances one card every 2s and loops infinitely in both
   directions — it never visibly "hits an end." The current card
   sits centered and lifted, as if hovered, so it's obvious which
   one is in focus; the rest recede. This runs on a CSS transform,
   not native scroll, so the mouse wheel always passes straight
   through to the page — nothing can trap a scroll mid-page.
   Drag/swipe still moves it manually, and autoplay pauses on
   hover, drag, or the pause button.
   ========================================================= */
.hscroll { position: relative; }
.hscroll-viewport {
  overflow: hidden;
  touch-action: pan-y;
  padding: 30px 0;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.hscroll-viewport.is-dragging { cursor: grabbing; }
.hscroll-track { display: flex; gap: 20px; will-change: transform; }
.hscroll-item {
  flex: 0 0 auto;
  width: min(78vw, 340px);
  opacity: 0.4;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: pointer;
}
@media (min-width: 700px) { .hscroll-item { width: min(44vw, 360px); } }
@media (min-width: 1080px) { .hscroll-item { width: 360px; } }
.hscroll-item.is-active { opacity: 1; transform: scale(1); cursor: default; }
.hscroll-item .scenario-card,
.hscroll-item .tool-card { height: 100%; transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; }
.hscroll-item.is-active .scenario-card,
.hscroll-item.is-active .tool-card { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-orange); }

.hscroll-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; }
.hscroll-arrow, .hscroll-playpause {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--color-gray-200); background: var(--color-white);
  color: var(--color-black); flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.hscroll-arrow:hover, .hscroll-playpause:hover { border-color: var(--color-orange); color: var(--color-burnt); transform: translateY(-1px); }
.hscroll-arrow svg, .hscroll-playpause svg { width: 16px; height: 16px; }
.bg-black .hscroll-arrow, .bg-black .hscroll-playpause { background: transparent; border-color: var(--color-gray-700); color: var(--color-white); }
.bg-black .hscroll-arrow:hover, .bg-black .hscroll-playpause:hover { border-color: var(--color-tang); color: var(--color-tang); }

.hscroll-dots { display: flex; align-items: center; gap: 7px; }
.hscroll-dot {
  width: 6px; height: 6px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: var(--color-gray-300); transition: all 0.2s ease; flex-shrink: 0;
}
.hscroll-dot.active { width: 20px; border-radius: 3px; background: var(--color-orange); }
.bg-black .hscroll-dot { background: var(--color-gray-700); }
.bg-black .hscroll-dot.active { background: var(--color-tang); }

@media (max-width: 640px) {
  .hscroll-viewport { padding: 22px 0; }
  .hscroll-controls { gap: 10px; }
}

/* Standalone "Sellarge" resolution card — sits centered below the
   broken-tools scroll strip instead of living inside it. */
.resolution-card {
  max-width: 560px; margin: 40px auto 0; text-align: center;
  padding: 36px 32px; border-radius: var(--radius-md);
  background: var(--color-black); border: 1px solid var(--color-black);
  position: relative;
}
.resolution-card::before {
  content: ""; position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 1.5px; height: 22px; background: linear-gradient(180deg, var(--color-gray-300), transparent);
}
.resolution-card h3 { color: var(--color-white); font-size: 1.15rem; margin-bottom: 10px; }
.resolution-card p { color: var(--color-gray-400); font-size: 1rem; line-height: 1.55; }
@media (max-width: 640px) {
  .resolution-card { padding: 28px 22px; margin-top: 32px; }
  .resolution-card::before { height: 16px; top: -16px; }
}

/* ---------- Every Deal Room Includes — fixed alignment ----------
   Previous markup put a <strong> and a bare text node inside a
   flex <li>, which put stray text into its own anonymous flex
   item and caused ragged wrapping on narrow screens. This uses
   an icon-left, text-right grid so label + description always
   sit together as one block, at any width. */
.dealroom-list { display: flex; flex-direction: column; gap: 18px; }
.dealroom-item { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.dealroom-item .dealroom-check {
  width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  background: rgba(255,102,0,0.1); color: var(--color-burnt);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dealroom-item .dealroom-check svg { width: 12px; height: 12px; }
.dealroom-item p { line-height: 1.5; }
.dealroom-item strong { color: var(--color-black); }

/* =========================================================
   Mobile refinement pass — tuned deliberately for phones,
   not just a shrunk desktop layout.
   ========================================================= */
@media (max-width: 640px) {
  .card, .card-dark, .scenario-card, .tool-card { padding: 20px; border-radius: var(--radius-sm); }
  .grid-2, .grid-3, .grid-4 { gap: 16px; }
  section { padding: 56px 0; }

  /* Buttons stack full-width and grow into proper tap targets */
  .btn { padding: 15px 24px; }
  .btn-sm { padding: 9px 18px; }
  .btn-group { flex-direction: column; align-items: stretch !important; }
  .btn-group .btn { width: 100%; }

  /* Persona tabs: horizontal scroll instead of cramped wrapping */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start !important; padding-bottom: 4px; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; white-space: nowrap; }

  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
  .toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }

  .lifecycle-label { font-size: 0.8rem; }

  .dealroom-item { grid-template-columns: 22px 1fr; gap: 10px; }
}

@media (max-width: 420px) {
  .h-hero { font-size: 2rem; }
  .h-xl { font-size: 1.7rem; }
  .container, .container-narrow { padding: 0 16px; }
  .card, .card-dark, .scenario-card, .tool-card { padding: 18px; }
  .tabs { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}
