/* ============================================================
   CarrierEdge — landing page styles
   ------------------------------------------------------------
   Sections in this file:
   1. Tokens / variables
   2. Base / reset
   3. Layout helpers (.wrap, .mono)
   4. Top nav (incl. mobile hamburger)
   5. Hero (heading + seamless video)
   6. Generic section + two-column layout
   7. Network fabric strip + stats
   8. Contact form
   9. Footer
   10. Responsive overrides
   ============================================================ */


/* ---------- 1. Tokens ---------- */
:root {
  --ink:     #0A0A0B;
  --ink-2:   #1a1a1d;
  --mute:    #6b6b70;
  --line:    #e7e7ea;
  --paper:   #ffffff;
  --paper-2: #f4f4f2;
  --accent:  #0a5cff;

  --radius: 14px;
  --maxw:   1320px;
}


/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }


/* ---------- 3. Layout helpers ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 48px;
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}


/* ---------- 4. Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  line-height: 1;
}
.logo svg {
  display: block;
  transform: translateY(-22%);
  margin-right: -4px;
}

/* Wordmark: "Carrier" in Inter + "Edge" in Fira Code */
.wm           { display: inline-flex; align-items: baseline; letter-spacing: -0.025em; }
.wm-carrier   { font-family: "Inter", sans-serif; font-weight: 500; }
.wm-edge      { font-family: "Fira Code", ui-monospace, monospace; font-weight: 600; letter-spacing: -0.04em; }

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--accent); }

/* Hamburger button — hidden on desktop, shown via media query */
.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: none;
  padding: 10px;
  margin: -10px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }
.nav-toggle .bar {
  transition: transform .25s ease, opacity .15s ease;
  transform-origin: center;
}
.nav.open .nav-toggle .bar-top { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle .bar-mid { opacity: 0; }
.nav.open .nav-toggle .bar-bot { transform: translateY(-6px) rotate(-45deg); }


/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 40px;
  text-align: center;
}
.hero .mono { display: inline-block; margin-bottom: 28px; }

.hero h1 {
  font-size: clamp(40px, 6.2vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 auto 28px;
  text-wrap: balance;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: 6px;
  height: 10px;
  background: var(--accent);
  opacity: .18;
  z-index: -1;
  border-radius: 2px;
}

.hero-sub {
  max-width: 56ch;
  margin: 0 auto;
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.55;
  text-wrap: balance;
}

/* Hero video — full-bleed, plays once, right edge feathers into white */
.hero-video {
  position: relative;
  margin: 48px auto 0;
  max-width: 1600px;
  width: 100%;
}
.hero-video video {
  width: 100%;
  height: auto;
  display: block;
}
.hero-video::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 80px;
  pointer-events: none;
  background: linear-gradient(to right, transparent 0%, #fff 100%);
}


/* ---------- 6. Generic section + two-col ---------- */
.section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}
.section--no-top {
  padding-top: 0;
  border-top: none;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.eyebrow .tick {
  width: 22px; height: 22px;
  color: var(--ink);
  display: inline-block;
}

h2 {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}
.lede p + p { margin-top: 16px; }


/* ---------- 7. Network strip ---------- */
.network {
  background: var(--paper-2);
  border-radius: 24px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 56px;
  align-items: end;
}
.network h3 {
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 12px 0 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  border-top: 1px solid var(--ink);
  padding-top: 14px;
}
.stat .n {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat .n sup {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: super;
  margin-left: 2px;
  color: var(--mute);
}
.stat .l {
  margin-top: 10px;
  font-size: 13px;
  color: var(--mute);
}


/* ---------- 8. Contact form ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 96px;
  align-items: start;
}
.contact-lede { margin-top: 24px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form .fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.field input,
.field textarea {
  appearance: none;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  padding: 10px 0;
  border-radius: 0;
  outline: none;
  transition: border-color .15s;
}
.field textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}
.field input:focus,
.field textarea:focus { border-bottom-color: var(--ink); }

.btn {
  margin-top: 12px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn:hover     { background: var(--accent); }
.btn svg       { transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }

.form-success {
  display: none;
  padding: 18px 22px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: #fafafa;
  font-size: 15px;
  color: var(--ink);
}
.contact-form.sent .fields,
.contact-form.sent .btn          { display: none; }
.contact-form.sent .form-success { display: block; }


/* ---------- 9. Footer ---------- */
footer {
  background: var(--ink);
  color: #e9e9ea;
  padding: 60px 0 36px;
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.foot-inner .logo { color: #fff; }
.foot-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #8d8d93;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ---------- 10. Responsive ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 24px; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links a {
    padding: 16px 24px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav.open .nav-links { max-height: 400px; padding: 8px 0; }

  .two-col      { grid-template-columns: 1fr; gap: 32px; }
  .network      { grid-template-columns: 1fr; padding: 32px; gap: 32px; }
  .stats        { grid-template-columns: repeat(2, 1fr); }
  .contact-inner{ grid-template-columns: 1fr; gap: 48px; }
  .section      { padding: 80px 0; }

  .logo     { font-size: 18px; }
  .logo svg { width: 24px; height: 24px; }
}

@media (max-width: 900px) and (min-width: 761px) {
  .wrap          { padding: 0 24px; }
  .two-col       { grid-template-columns: 1fr; gap: 32px; }
  .network       { grid-template-columns: 1fr; padding: 32px; gap: 32px; }
  .stats         { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .section       { padding: 80px 0; }
}
