/* ============================================================================
   COD Confirm — landing pages: lead capture modal + mobile navigation.

   Shared by index.html, pricing.html and partners.html. Reuses the design
   tokens already declared in each page (--purple, --ink, --line, ...) with
   literal fallbacks so this file also survives a page regenerated from Canva
   with a slightly different :root block.

   Adding this file to a page = two lines:
     <link rel="stylesheet" href="/landing/leadform.css">   (before </head>)
     <script defer src="/landing/leadform.js"></script>     (before </body>)
   ========================================================================== */

/* ---------- mobile navigation ------------------------------------------- */
/* The pages hide .nav-links below 980px and ship no replacement, so the top
   menu simply vanished on phones. The burger below restores it.             */

.cc-burger {
  display: none;
  background: none;
  border: 1px solid var(--line2, #e1e1ec);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink, #141430);
}
.cc-burger:hover { background: var(--soft, #fafafc); }
.cc-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: background .16s ease;
}
.cc-burger span::before,
.cc-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .18s ease, top .18s ease;
}
.cc-burger span::before { top: -6px; }
.cc-burger span::after  { top: 6px; }
.cc-burger[aria-expanded="true"] span { background: transparent; }
.cc-burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.cc-burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

.cc-mobile-nav {
  display: none;
  border-top: 1px solid var(--line, #ececf3);
  background: #fff;
  padding: 14px 0 20px;
}
.cc-mobile-nav.open { display: block; }
.cc-mobile-nav a {
  display: block;
  padding: 13px 0;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink2, #2a2a48);
  border-bottom: 1px solid var(--line, #ececf3);
}
.cc-mobile-nav a:last-child { border-bottom: 0; }
.cc-mobile-nav a:hover { color: var(--purple, #8042f0); }
.cc-mobile-nav .cc-mobile-cta {
  margin-top: 16px;
  border-bottom: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* The generic `.cc-mobile-nav a` rule above is more specific than `.btn`,
   so without these overrides the cloned CTA loses its flex centring (it
   falls back to display:block, left-aligned, no horizontal padding) and
   its white ink. Restore the button's own styling. */
.cc-mobile-nav .cc-mobile-cta .btn {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 15px 24px;
  border-bottom: 0;
  font-size: 1rem;
}
.cc-mobile-nav .cc-mobile-cta .btn-primary,
.cc-mobile-nav .cc-mobile-cta .btn-primary:hover { color: #fff; }
.cc-mobile-nav .cc-mobile-cta .btn-ghost { color: var(--ink, #141430); }

@media (max-width: 980px) {
  .cc-burger { display: inline-flex; }
  /* The trial CTA moves into the drawer on small screens so the bar stays
     readable; "Log in" stays visible in the bar. */
  .nav-right .btn { display: none; }
}
@media (max-width: 980px) {
  .cc-mobile-nav.open { display: block; }
}
@media (min-width: 981px) {
  .cc-mobile-nav { display: none !important; }
}

/* ---------- phone polish ------------------------------------------------- */
/* Fixes measured on a 390px viewport (iPhone 14/15). Loaded after the page's
   own <style>, so equal-specificity rules here win.                          */

@media (max-width: 760px) {
  /* 1. Comparison table.
     The page turns it into a nowrap horizontal scroller, which on a phone
     shows one and a half columns of clipped text and hides the "COD Confirm"
     column entirely — the one column that sells. Stack each row as a card
     instead, with the column name printed above each value. */
  .cmp {
    display: block;
    overflow: visible;
    white-space: normal;
    border: 0;
    border-radius: 0;
  }
  .cmp thead { display: none; }
  .cmp tbody { display: block; }
  .cmp tr {
    display: block;
    border: 1px solid var(--line2, #e1e1ec);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
  }
  .cmp td {
    display: block;
    width: auto;
    border-top: 0;
    white-space: normal;
    padding: 13px 17px;
  }
  .cmp td.k {
    font-size: 1.02rem;
    font-weight: 700;
    padding: 15px 17px 11px;
  }
  .cmp td.a,
  .cmp td.b { font-size: .93rem; line-height: 1.5; }
  .cmp td.a::before,
  .cmp td.b::before {
    display: block;
    font-family: var(--mono, ui-monospace, Menlo, monospace);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin: 0 0 5px;
  }
  .cmp td.a::before {
    content: "A call center alone";
    color: var(--muted, #8e8ea0);
  }
  /* Overrides the page's decorative "✓" so the column keeps its name on
     mobile, where there is no header row left to explain it. */
  .cmp td.b::before {
    content: "COD Confirm";
    color: var(--purple, #8042f0);
    margin-right: 0;
    font-weight: 700;
  }

  /* 2. Full-width CTAs. Side by side they end up on two lines at unequal
     widths, which reads as a rendering glitch. */
  .hero-cta { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  /* 3. Tap targets. Footer and nav links sat at 19-25px tall; 44px is the
     Apple/Google minimum for a reliable thumb tap. */
  .ft-col a {
    display: block;
    padding: 9px 0;
    line-height: 1.4;
  }
  .ft-legal a { padding: 6px 0; }

  /* 4. Small print. 11.5px is below the comfortable reading floor on a
     phone; nudge the smallest type up without touching the desktop scale. */
  .microcopy,
  .ft-bot,
  .estonia { font-size: .8rem; }

  /* 5. FAQ rows overflowed their container by a few pixels. The question is
     a bare text node (an anonymous flex item), so it cannot be given a
     min-width — tighten the gap and clip the leftover instead. */
  details.qa summary { gap: 12px; }
  .faq-list { overflow: hidden; }
  .faq-list, details.qa, details.qa summary { max-width: 100%; }

  /* 6. The "store → COD Confirm → warehouse" chain.
     It is a wrapping flex row with no mobile rule: on a phone each box drops
     onto its own line but keeps its arrow pointing RIGHT, next to a
     flow that now reads downwards — and the boxes, sized by their text,
     end up at three different widths. Stack it properly and turn the
     arrows down. */
  .arch { flex-direction: column; align-items: stretch; gap: 10px; margin: 34px 0 26px; }
  .arch .node { width: 100%; text-align: center; padding: 15px 20px; }
  .arch .arw {
    align-self: center;
    transform: rotate(90deg);
    font-size: 1.3rem;
    line-height: 1;
  }

  /* 7. Hero chips were centred at their natural widths, so three pills of
     different lengths cascaded like a staircase. */
  .chips { flex-direction: column; align-items: stretch; gap: 10px; }
  .chips > * { justify-content: center; }

  /* 8. The decorative halo inside the final CTA is a 420px circle pinned
     to the right edge; it escaped the rounded box on narrow screens. */
  .cta-final { overflow: hidden; }
}

@media (max-width: 440px) {
  /* The hero headline hits its clamp floor (2.5rem) and eats five lines on
     a 390px screen. A slightly smaller floor keeps the same impact in four. */
  .hero h1 { font-size: 2.15rem; }
  .cta-final { padding: 44px 22px; }
}

/* ---------- footer legal links ------------------------------------------ */
/* The footer bottom bar sits on the dark block, hence the light ink. */

.ft-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
.ft-legal a {
  color: rgba(255, 255, 255, .62);
  transition: color .15s ease;
  white-space: nowrap;
}
.ft-legal a:hover { color: #fff; }
.ft-legal a + a { margin-left: 0; }
.ft-legal a:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: rgba(255, 255, 255, .28);
}

@media (max-width: 620px) {
  .ft-legal { justify-content: center; row-gap: 6px; }
}

/* ---------- modal ------------------------------------------------------- */

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 40px;
  overflow-y: auto;
  background: rgba(20, 20, 48, .52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.cc-modal.open { opacity: 1; visibility: visible; }

.cc-dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line, #ececf3);
  box-shadow: 0 24px 70px rgba(20, 20, 48, .22);
  padding: 34px 34px 30px;
  transform: translateY(10px) scale(.99);
  transition: transform .2s ease;
}
.cc-modal.open .cc-dialog { transform: none; }

.cc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  color: var(--muted, #8e8ea0);
  font-size: 1.35rem;
  line-height: 1;
}
.cc-close:hover { background: var(--soft, #fafafc); color: var(--ink, #141430); }

.cc-eyebrow {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--purple, #8042f0);
  display: block;
  margin-bottom: 12px;
}
.cc-dialog h3 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--ink, #141430);
  margin-bottom: 8px;
}
.cc-dialog .cc-sub {
  color: var(--gray, #5c5c6e);
  font-size: .98rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.cc-field { margin-bottom: 15px; }
.cc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
@media (max-width: 520px) { .cc-row { grid-template-columns: 1fr; gap: 15px; } }

.cc-field label {
  display: block;
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink2, #2a2a48);
  margin-bottom: 6px;
}
.cc-field label .cc-opt {
  font-weight: 400;
  color: var(--muted, #8e8ea0);
}
.cc-field input,
.cc-field select,
.cc-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: .97rem;
  color: var(--ink, #141430);
  background: #fff;
  border: 1px solid var(--line2, #e1e1ec);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cc-field textarea { resize: vertical; min-height: 82px; }
.cc-field input:focus,
.cc-field select:focus,
.cc-field textarea:focus {
  outline: none;
  border-color: var(--purple, #8042f0);
  box-shadow: 0 0 0 3px rgba(128, 66, 240, .13);
}
.cc-field input::placeholder,
.cc-field textarea::placeholder { color: #b3b3c2; }
.cc-field.cc-invalid input,
.cc-field.cc-invalid select { border-color: #dc2626; }
.cc-error {
  display: none;
  font-size: .82rem;
  color: #dc2626;
  margin-top: 5px;
}
.cc-field.cc-invalid .cc-error { display: block; }

/* why we ask for a field — sits under the input, muted */
.cc-hint {
  font-size: .81rem;
  color: var(--muted, #8e8ea0);
  line-height: 1.4;
  margin-top: 6px;
}

/* Native select chrome differs on every OS (and is ugly on iOS). Draw our own
   chevron so the control matches the text inputs. */
.cc-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%238e8ea0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

/* ---------- radio group (e.g. "Where are you with COD?") ----------------- */
/* Every selector below is scoped to `.cc-field` so it outranks the generic
   `.cc-field label` / `.cc-field input` rules above — without that, the option
   cards fall back to display:block and the custom control never shows. */

.cc-field .cc-grouplabel {
  display: block;
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink2, #2a2a48);
  margin-bottom: 8px;
}
.cc-field .cc-radios {
  display: grid;
  gap: 8px;
}
/* Side by side once there is room — two short answers read as one question. */
@media (min-width: 460px) {
  .cc-field .cc-radios { grid-template-columns: 1fr 1fr; }
}

.cc-field .cc-radio {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 13px 15px;
  font-size: .93rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink2, #2a2a48);
  background: #fff;
  border: 1px solid var(--line2, #e1e1ec);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.cc-field .cc-radio:hover { border-color: #cfcfdd; background: var(--soft, #fafafc); }

/* custom control: a ring that fills with the brand purple when picked */
.cc-field .cc-radio input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #c9c9d8;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cc-field .cc-radio input:checked {
  border-color: var(--purple, #8042f0);
  border-width: 5px;
}
.cc-field .cc-radio input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(128, 66, 240, .18);
}
.cc-field .cc-radio:has(input:checked) {
  border-color: var(--purple, #8042f0);
  background: rgba(128, 66, 240, .045);
  box-shadow: 0 0 0 1px var(--purple, #8042f0);
  color: var(--ink, #141430);
}
.cc-field-radio.cc-invalid .cc-radio { border-color: #dc2626; }
.cc-field-radio.cc-invalid .cc-radio input { border-color: #dc2626; }

/* conditional field, hidden until its trigger matches */
.cc-field.cc-hidden { display: none; }

/* honeypot — hidden from humans, tempting for bots */
.cc-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cc-actions { margin-top: 22px; }
.cc-actions .btn { width: 100%; justify-content: center; }
.cc-actions .btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.cc-legal {
  margin-top: 13px;
  font-size: .8rem;
  color: var(--muted, #8e8ea0);
  line-height: 1.45;
  text-align: center;
}
.cc-legal a { color: var(--gray, #5c5c6e); text-decoration: underline; }

.cc-formerror {
  display: none;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: .88rem;
}
.cc-formerror.show { display: block; }

/* success state */
.cc-success { display: none; text-align: center; padding: 12px 0 6px; }
.cc-success.show { display: block; }
.cc-success .cc-check {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--green-l, #e7f6ee);
  color: var(--green, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.7rem;
}
.cc-success h3 { margin-bottom: 10px; }
.cc-success p { color: var(--gray, #5c5c6e); font-size: .98rem; line-height: 1.55; }
.cc-form.hide { display: none; }

@media (max-width: 520px) {
  .cc-dialog { padding: 28px 22px 24px; }
  .cc-dialog h3 { font-size: 1.38rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-modal, .cc-dialog, .cc-burger span, .cc-burger span::before, .cc-burger span::after {
    transition: none !important;
  }
}
