/* ============================================================
   ENDCAP — marketing site design system
   Light "warm paper" surface, emerald brand, Geist type.
   Benchmark: Linear's craft + Stripe's trust.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- surfaces (light / paper) ---- */
  --canvas:   #F6F7F9;
  --paper:    #FFFFFF;
  --raised:   #F1F3F6;
  --hover:    #ECEFF3;
  --border:   #E5E8EE;
  --border-hi:#D3D8E0;

  /* ---- ink ---- */
  --ink:   #0E1622;
  --ink-2: #51596B;
  --ink-3: #8A93A2;
  --ink-4: #AEB5C0;

  /* ---- brand ---- */
  --emerald:      #059669;   /* solid fills */
  --emerald-ink:  #0B7A53;   /* emerald text on white (AA) */
  --emerald-deep: #064E3B;
  --emerald-dim:  #E7F6EF;
  --emerald-bd:   #BCE6D3;
  --emerald-glow: rgba(5,150,105,.18);

  /* ---- dark band (console) ---- */
  --dark:      #030712;
  --dark-2:    #0B1220;
  --dark-card: #111827;
  --dark-raised:#1B2433;
  --dark-border:#222C3D;
  --dark-border-hi:#33415A;
  --dark-fg:   #F3F4F6;
  --dark-fg2:  #9CA3AF;
  --dark-fg3:  #6B7280;
  --emerald-bright: #34D399;

  /* ---- accents (status) ---- */
  --amber:  #B45309; --amber-dim:#FBF1E2; --amber-bd:#F2D9AE;
  --blue:   #2563EB; --blue-dim:#EAF0FE; --blue-bd:#CBD9FB;
  --violet: #7C3AED; --violet-dim:#F1ECFE;

  /* ---- type ---- */
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;

  /* ---- radii ---- */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-2xl: 28px;

  /* ---- shadow ---- */
  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 4px 12px -2px rgba(16,24,40,.08), 0 2px 6px rgba(16,24,40,.05);
  --shadow-lg: 0 24px 48px -12px rgba(16,24,40,.18), 0 8px 16px -8px rgba(16,24,40,.10);
  --shadow-xl: 0 40px 80px -24px rgba(16,24,40,.28), 0 12px 24px -12px rgba(16,24,40,.12);
  --shadow-dark: 0 40px 80px -24px rgba(0,0,0,.55), 0 12px 28px -10px rgba(0,0,0,.45);

  --maxw: 1180px;
  --nav-h: 68px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--emerald-dim); color: var(--emerald-deep); }
[id] { scroll-margin-top: 90px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-tight { max-width: 920px; }
.wrap-wide { max-width: 1320px; }
section { position: relative; }
.section { padding: 104px 0; }
.section-sm { padding: 72px 0; }
.band-paper { background: var(--paper); }
.band-canvas { background: var(--canvas); }
.band-dark { background: var(--dark); color: var(--dark-fg); }
.divider { border-top: 1px solid var(--border); }

/* ============================================================
   TYPE
   ============================================================ */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--emerald-ink);
}
.eyebrow-muted { color: var(--ink-3); }
.band-dark .eyebrow { color: var(--emerald-bright); }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.022em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: #fff; }

.display { font-size: clamp(40px, 6vw, 72px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; }
.h1 { font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.03em; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.028em; }
.h3 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2); font-weight: 400; text-wrap: pretty; }
.band-dark .lead { color: var(--dark-fg2); }
.body { font-size: 16px; color: var(--ink-2); text-wrap: pretty; }
.small { font-size: 14px; color: var(--ink-2); }
.micro { font-size: 13px; color: var(--ink-3); }
.mono { font-family: var(--mono); }
.em-text { color: var(--emerald-ink); }
.band-dark .em-text { color: var(--emerald-bright); }

/* ============================================================
   BRAND MARKS
   ============================================================ */
.mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--emerald); color: #04110A;
  font: 700 17px/1 var(--sans); letter-spacing: -0.03em;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.wordmark {
  font: 700 20px/1 var(--sans); letter-spacing: -0.01em; white-space: nowrap;
  color: var(--ink);
}
.wordmark .cap { color: var(--emerald-ink); }
.band-dark .wordmark { color: #fff; }
.band-dark .wordmark .cap { color: var(--emerald-bright); }
.lockup { display: inline-flex; align-items: center; gap: 10px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sans);
  padding: 13px 20px; border-radius: var(--r-md);
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap; cursor: pointer;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--emerald); color: #fff;
  box-shadow: 0 1px 2px rgba(5,150,105,.3), 0 6px 16px -6px var(--emerald-glow);
}
.btn-primary:hover { background: #047a55; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(5,150,105,.32), 0 10px 22px -6px var(--emerald-glow); }
.btn-ghost {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--border-hi); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--raised); border-color: var(--ink-4); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1d2735; transform: translateY(-1px); }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-sm { padding: 9px 15px; font-size: 14px; }
.band-dark .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.16); box-shadow: none; }
.band-dark .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 15px/1 var(--sans); color: var(--emerald-ink);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s ease; }
.link-arrow:hover svg { transform: translateX(3px); }
.band-dark .link-arrow { color: var(--emerald-bright); }

/* ============================================================
   PILLS / CHIPS / TAGS
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 13px/1 var(--sans);
  padding: 7px 13px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--border);
  color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.pill-emerald { background: var(--emerald-dim); border-color: var(--emerald-bd); color: var(--emerald-ink); box-shadow: none; }
.pill .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--emerald); }
.pill .dot.live { box-shadow: 0 0 0 0 var(--emerald-glow); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(5,150,105,.4)} 70%{box-shadow:0 0 0 7px rgba(5,150,105,0)} 100%{box-shadow:0 0 0 0 rgba(5,150,105,0)} }

.tag-mono {
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}

/* status badges (in UI mocks) */
.badge { font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; }
.badge-primary { background: var(--emerald-dim); color: var(--emerald-ink); border: 1px solid var(--emerald-bd); }
.badge-info { background: var(--blue-dim); color: var(--blue); border: 1px solid var(--blue-bd); }
.badge-warn { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber-bd); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--paper); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 28px; }
.card-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-hi); }

/* lit edge for dark cards */
.lit-edge { position: relative; }
.lit-edge::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--dark-border-hi), transparent);
  pointer-events: none;
}

/* ============================================================
   NAV (sticky header)
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(246,247,249,.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(246,247,249,.9); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
  font: 500 14.5px/1 var(--sans); color: var(--ink-2);
  padding: 9px 13px; border-radius: var(--r-sm); transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: var(--hover); }
.nav-link.active { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-mobile-toggle { display: none; }

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }
.center-x { margin-left: auto; margin-right: auto; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-40{margin-top:40px}.mt-56{margin-top:56px}
.maxw-560 { max-width: 560px; } .maxw-640 { max-width: 640px; } .maxw-720 { max-width: 720px; }

/* ============================================================
   FEATURE BLOCKS
   ============================================================ */
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--emerald-dim); color: var(--emerald-ink);
  border: 1px solid var(--emerald-bd);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-title { font: 600 19px/1.2 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.feature-body { font-size: 15px; color: var(--ink-2); line-height: 1.6; margin-top: 8px; text-wrap: pretty; }

/* numbered step */
.step-num {
  font: 500 12px/1 var(--mono); letter-spacing: .1em;
  color: var(--emerald-ink); 
}

/* ============================================================
   STAT
   ============================================================ */
.stat-num { font: 600 clamp(40px,5vw,60px)/1 var(--sans); letter-spacing: -0.04em; color: var(--ink); }
.band-dark .stat-num { color: #fff; }
.stat-num .unit { color: var(--emerald-ink); }
.band-dark .stat-num .unit { color: var(--emerald-bright); }
.stat-label { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.band-dark .stat-label { color: var(--dark-fg2); }

/* ============================================================
   BRACKET MOTIF (brand symbol)
   ============================================================ */
.bracket-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23059669' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round' opacity='0.06'%3E%3Cpath d='M21 27 H75 V75 H57 M21 27 V75 H39'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px;
}
.band-dark .bracket-bg {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%2334D399' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round' opacity='0.05'%3E%3Cpath d='M21 27 H75 V75 H57 M21 27 V75 H39'/%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--dark); color: var(--dark-fg2); padding: 72px 0 36px; position: relative; overflow: hidden; }
.footer h4 { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; position: relative; }
.footer-col-title { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dark-fg3); margin-bottom: 16px; }
.footer-link { display: block; font-size: 14.5px; color: var(--dark-fg2); padding: 6px 0; transition: color .15s; }
.footer-link:hover { color: #fff; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--dark-border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--dark-fg3); position: relative;
}

/* ============================================================
   UI MOCK PRIMITIVES (recreated app surfaces)
   ============================================================ */
.browser {
  background: var(--dark-card); border: 1px solid var(--dark-border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-dark);
}
.browser-bar {
  height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  background: #0c1320; border-bottom: 1px solid var(--dark-border);
}
.traffic { width: 11px; height: 11px; border-radius: 999px; }
.browser-url {
  margin-left: 10px; flex: 1; max-width: 280px; height: 22px;
  display: flex; align-items: center; gap: 7px; padding: 0 10px;
  background: #060b15; border: 1px solid var(--dark-border); border-radius: 6px;
  font: 400 11px/1 var(--mono); color: var(--dark-fg3);
}

/* phone */
.phone {
  width: 290px; border-radius: 40px; background: #0b1018;
  border: 1px solid #1b2433; padding: 10px;
  box-shadow: var(--shadow-xl);
}
.phone-screen {
  border-radius: 30px; overflow: hidden; background: var(--dark); position: relative;
  aspect-ratio: 9 / 19.2;
}
.phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: #000; border-radius: 999px; z-index: 5;
}

/* report (light deliverable) */
.report {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-xl); overflow: hidden;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .pill .dot.live { animation: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 920px) {
  .section { padding: 72px 0; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--ink); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .btn-hero-row { flex-direction: column; align-items: stretch; }
}
