/* ==========================================================================
   CrewLineCRM — marketing site
   Tokens deliberately mirror the product UI (indigo brand, serif display,
   system sans body) so the site and the app read as one thing.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg:          #ffffff;
  --bg-soft:     #f6f7fb;
  --surface:     #ffffff;
  --surface-2:   #fbfcfe;
  --ink:         #14182a;
  --ink-soft:    #454d6e;
  --ink-mute:    #6f77a0;
  --line:        #e3e6f0;
  --line-soft:   #edeff6;

  --brand:       #4f46e5;
  --brand-2:     #7c67f5;
  --brand-ink:   #4338ca;
  --brand-wash:  #eef0fe;
  --accent:      #0f9d78;
  --accent-wash: #e6f6f0;
  --warn:        #b06a08;
  --warn-wash:   #fdf1dc;

  --shadow-sm: 0 1px 2px rgba(20, 24, 42, .06), 0 4px 12px -6px rgba(20, 24, 42, .12);
  --shadow:    0 1px 2px rgba(20, 24, 42, .06), 0 12px 32px -14px rgba(20, 24, 42, .22);
  --shadow-lg: 0 32px 70px -34px rgba(20, 24, 42, .40);

  --serif: "Charter", "Iowan Old Style", Georgia, Cambria, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1160px;
  --radius: 14px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0b0d16;
    --bg-soft:     #0f1220;
    --surface:     #141827;
    --surface-2:   #181c2d;
    --ink:         #eef0f8;
    --ink-soft:    #b7bfda;
    --ink-mute:    #858eb0;
    --line:        #262b40;
    --line-soft:   #1f2436;

    --brand:       #8b7cff;
    --brand-2:     #a695ff;
    --brand-ink:   #c3b8ff;
    --brand-wash:  #1b1c33;
    --accent:      #37d3a6;
    --accent-wash: #0e2a23;
    --warn:        #e2a54a;
    --warn-wash:   #2b2213;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px -8px rgba(0, 0, 0, .6);
    --shadow:    0 1px 2px rgba(0, 0, 0, .45), 0 14px 36px -18px rgba(0, 0, 0, .75);
    --shadow-lg: 0 36px 80px -36px rgba(0, 0, 0, .85);
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d16; --bg-soft: #0f1220; --surface: #141827; --surface-2: #181c2d;
  --ink: #eef0f8; --ink-soft: #b7bfda; --ink-mute: #858eb0;
  --line: #262b40; --line-soft: #1f2436;
  --brand: #8b7cff; --brand-2: #a695ff; --brand-ink: #c3b8ff; --brand-wash: #1b1c33;
  --accent: #37d3a6; --accent-wash: #0e2a23; --warn: #e2a54a; --warn-wash: #2b2213;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px -8px rgba(0,0,0,.6);
  --shadow:    0 1px 2px rgba(0,0,0,.45), 0 14px 36px -18px rgba(0,0,0,.75);
  --shadow-lg: 0 36px 80px -36px rgba(0,0,0,.85);
}

/* --- base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.018em;
  line-height: 1.14;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.85rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.22rem; letter-spacing: -.01em; }
p  { margin: 0; text-wrap: pretty; }

a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--brand); }

img { max-width: 100%; height: auto; display: block; }
ul  { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 18px;
  border-radius: 0 0 10px 10px; font-weight: 600; text-decoration: none;
  transition: top .16s ease;
}
.skip:focus { top: 0; color: #fff; }

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 11px;
  font: inherit; font-weight: 650; font-size: .97rem;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .14s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 1px 2px rgba(20,24,42,.14), 0 12px 26px -12px color-mix(in srgb, var(--brand) 70%, transparent);
}
.btn-primary:hover { color: #fff; box-shadow: 0 2px 4px rgba(20,24,42,.16), 0 18px 34px -14px color-mix(in srgb, var(--brand) 78%, transparent); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); }

.btn-quiet { background: transparent; color: var(--ink-soft); padding: 10px 14px; }
.btn-quiet:hover { color: var(--ink); background: var(--bg-soft); }

.btn-lg { padding: 16px 28px; font-size: 1.02rem; }

/* --- header -------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-head.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 22px -18px rgba(20,24,42,.5); }
.head-in { display: flex; align-items: center; gap: 14px; padding: 13px 0; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; letter-spacing: -.022em; font-size: 1.06rem; }
.brand:hover { color: var(--ink); }
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: var(--shadow-sm);
}
.brand .mark svg { width: 18px; height: 18px; }

.head-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.head-nav a.navlink {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 550;
  padding: 9px 13px; border-radius: 9px;
}
.head-nav a.navlink:hover { color: var(--ink); background: var(--bg-soft); }
.head-cta { display: flex; align-items: center; gap: 9px; margin-left: 10px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  width: 42px; height: 42px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .head-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-head.nav-open .head-nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; inset: 100% 20px auto 20px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 10px; gap: 2px;
    box-shadow: var(--shadow-lg); margin-left: 0;
  }
  .site-head.nav-open .head-nav a.navlink { padding: 12px 14px; }
  .site-head.nav-open .head-cta { flex-direction: column; align-items: stretch; margin: 8px 0 2px; }
  .site-head.nav-open .head-cta .btn { width: 100%; }
}

/* --- section rhythm ------------------------------------------------------ */
section { padding-block: clamp(64px, 8vw, 108px); }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-ink); background: var(--brand-wash);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.section-head { max-width: 62ch; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.09rem; margin-top: 16px; }

.lede { color: var(--ink-soft); font-size: clamp(1.06rem, 1.6vw, 1.22rem); }

/* --- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(48px, 6vw, 78px);
  padding-bottom: 0;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(760px 420px at 78% -6%, var(--brand-wash), transparent 62%),
    radial-gradient(620px 380px at 8% 2%, var(--accent-wash), transparent 58%);
  pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero-copy { max-width: 44rem; }
.hero h1 { margin-bottom: 20px; }
.hero .lede { max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 18px; color: var(--ink-mute); font-size: .93rem; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

.hero-shot { margin-top: clamp(44px, 6vw, 70px); }

/* Browser-chrome frame: the screenshots are real product captures, so they get
   a real window around them rather than a floating rectangle. */
.frame {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.frame-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 15px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.frame-dots { display: flex; gap: 6px; }
.frame-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.frame-url {
  margin-inline: auto;
  font-family: var(--mono); font-size: .76rem; color: var(--ink-mute);
  background: var(--surface); border: 1px solid var(--line);
  padding: 4px 14px; border-radius: 999px;
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.frame img { width: 100%; display: block; }

.hero-shot .frame { transform: perspective(2200px) rotateX(1.4deg); transform-origin: top center; }
@media (max-width: 700px) { .hero-shot .frame { transform: none; } }

/* --- proof strip --------------------------------------------------------- */
.proof { padding-block: clamp(38px, 5vw, 56px); }
.proof-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.proof-item { text-align: center; padding: 8px; }
.proof-item b { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; }
.proof-item span { color: var(--ink-mute); font-size: .92rem; }

/* --- feature rows -------------------------------------------------------- */
.feature-row {
  display: grid; align-items: center; gap: clamp(32px, 5vw, 68px);
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}
.feature-row + .feature-row { margin-top: clamp(64px, 8vw, 104px); }
.feature-row.flip .feature-copy { order: 2; }
.feature-row h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); }
.feature-copy p { color: var(--ink-soft); margin-top: 16px; }
.feature-list { margin-top: 24px; display: grid; gap: 13px; }
.feature-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-soft); font-size: .98rem; }
.feature-list svg { width: 19px; height: 19px; flex: none; margin-top: 3px; color: var(--accent); }
@media (max-width: 880px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.flip .feature-copy { order: 0; }
}

/* --- capability grid ----------------------------------------------------- */
.cap-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}
.cap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cap:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.cap-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-wash); color: var(--brand-ink); margin-bottom: 15px;
}
.cap-icon svg { width: 21px; height: 21px; }
.cap h3 { margin-bottom: 7px; }
.cap p { color: var(--ink-soft); font-size: .95rem; }

/* --- mobile split -------------------------------------------------------- */
.mobile-split {
  display: grid; gap: clamp(32px, 5vw, 64px); align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
}
.phone {
  border-radius: 34px; border: 9px solid #1b1f30; background: #1b1f30;
  box-shadow: var(--shadow-lg); overflow: hidden; margin-inline: auto;
  max-width: 300px;
}
.phone img { border-radius: 25px; }
@media (max-width: 880px) { .mobile-split { grid-template-columns: 1fr; } }

/* --- pricing ------------------------------------------------------------- */
.price-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  align-items: start;
}
.plan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; height: 100%;
}
.plan.featured {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  box-shadow: var(--shadow);
  position: relative;
}
.plan.featured::after {
  content: "Most popular"; position: absolute; top: -12px; left: 26px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px;
}
.plan h3 { font-family: var(--sans); font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-mute); }
.plan .amount { font-family: var(--serif); font-size: 3rem; font-weight: 600; letter-spacing: -.03em; margin-top: 12px; line-height: 1; }
.plan .amount small { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--ink-mute); letter-spacing: 0; }
.plan .plan-for { color: var(--ink-soft); font-size: .95rem; margin-top: 12px; min-height: 3em; }
.plan ul { margin: 22px 0 26px; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink-soft); }
.plan li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.plan .btn { margin-top: auto; width: 100%; }

.price-foot {
  margin-top: 30px; text-align: center; color: var(--ink-mute); font-size: .94rem;
}

/* --- FAQ ----------------------------------------------------------------- */
.faq { max-width: 800px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 19px 22px; font-weight: 650; font-size: 1.02rem;
  display: flex; align-items: center; gap: 14px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; flex: none;
  width: 10px; height: 10px; border-right: 2px solid var(--ink-mute); border-bottom: 2px solid var(--ink-mute);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.faq details[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq .answer { padding: 18px 22px 22px; color: var(--ink-soft); font-size: .99rem; }
.faq .answer p + p { margin-top: 12px; }

/* --- CTA / access form --------------------------------------------------- */
.access {
  background: linear-gradient(150deg, #171b2e, #0e1120 62%);
  color: #eef0f8;
  border-radius: clamp(18px, 3vw, 28px);
  padding: clamp(34px, 5vw, 60px);
  box-shadow: var(--shadow-lg);
  display: grid; gap: clamp(30px, 4vw, 54px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: start;
}
.access h2 { color: #fff; }
.access p { color: #b9c0da; margin-top: 15px; }
.access .access-points { margin-top: 24px; display: grid; gap: 12px; }
.access .access-points li { display: flex; gap: 11px; color: #b9c0da; font-size: .96rem; align-items: flex-start; }
.access .access-points svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: #37d3a6; }
@media (max-width: 900px) { .access { grid-template-columns: 1fr; } }

.form-card {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px);
  backdrop-filter: blur(6px);
}
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: .87rem; font-weight: 600; color: #d5dae8; }
.field .hint { font-size: .8rem; color: #8790b4; font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .97rem;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(9, 11, 20, .55);
  color: #eef0f8;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #6f77a0; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-color: var(--brand-2); border-color: var(--brand-2); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8790b4 50%), linear-gradient(135deg, #8790b4 50%, transparent 50%); background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px); background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field select option { background: #141827; color: #eef0f8; }

.form-card .btn-primary { width: 100%; margin-top: 6px; }
.form-legal { margin-top: 15px; font-size: .82rem; color: #8790b4; text-align: center; }
.form-legal a { color: #b9c0da; }

.form-status { margin-top: 14px; font-size: .93rem; border-radius: 10px; padding: 13px 15px; display: none; }
.form-status.show { display: block; }
.form-status.ok   { background: rgba(55, 211, 166, .12); border: 1px solid rgba(55, 211, 166, .35); color: #9ff0d7; }
.form-status.err  { background: rgba(226, 165, 74, .12); border: 1px solid rgba(226, 165, 74, .35); color: #f2ce97; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- footer -------------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 52px 40px;
  background: var(--bg-soft);
}
.foot-grid {
  display: grid; gap: 34px;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
}
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-about p { color: var(--ink-mute); font-size: .92rem; margin-top: 14px; max-width: 34ch; }
.foot-col h4 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px; }
.foot-col li + li { margin-top: 9px; }
.foot-col a { color: var(--ink-soft); text-decoration: none; font-size: .94rem; }
.foot-col a:hover { color: var(--brand-ink); text-decoration: underline; }
.foot-base {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center;
  color: var(--ink-mute); font-size: .87rem;
}
.foot-base .spacer { margin-left: auto; }

/* --- legal pages --------------------------------------------------------- */
.legal { max-width: 760px; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 10px; }
.legal .updated { color: var(--ink-mute); font-size: .92rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.42rem; margin-top: 40px; margin-bottom: 12px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal p + p { margin-top: 14px; }
.legal ul { list-style: disc; padding-left: 22px; margin-top: 12px; display: grid; gap: 8px; }
.legal a { color: var(--brand-ink); }

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