/* Cometrail — marketing site.
   Committed to a single dark look on purpose: the product is a glowing trail on a
   night map, and a light variant would misrepresent it. */

:root {
  --ink:        #070a12;
  --ink-raise:  #0d111c;
  --line:       rgba(255, 255, 255, 0.09);
  --text:       #eef1f7;
  --text-dim:   #9aa3b5;
  --ember:      #ff8a1a;
  --ember-warm: #ffc46a;
  --ember-hot:  #fffdf6;

  --wrap: 1120px;

  /* Built-in easings are too weak to read as intentional. */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --font: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px; top: 16px;
  z-index: 99;
  background: var(--ember);
  color: #17110a;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-size: 17px;
}
.brand img { border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.nav-links > a:not(.btn) {
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links > a:not(.btn):hover { color: var(--text); }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms ease,
              border-color 160ms ease, color 160ms ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(180deg, var(--ember-warm), var(--ember));
  color: #1a1004;
  box-shadow: 0 8px 30px -10px rgba(255, 138, 26, 0.7);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255,255,255,0.16); }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding: 96px 0 112px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* Keeps the copy legible wherever the trail happens to be. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, var(--ink) 28%, color-mix(in srgb, var(--ink) 76%, transparent) 52%, transparent 74%),
    linear-gradient(0deg, var(--ink) 2%, transparent 34%);
}

.hero-inner { max-width: 720px; }

.eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ember-warm);
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(40px, 7.2vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 680;
}
h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--ember) 4%, var(--ember-warm) 48%, var(--ember-hot) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 36px;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--text-dim);
  max-width: 60ch;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.fineprint { margin: 0; font-size: 14px; color: #6d7689; }

/* ---------------------------------------------------------------- sections */

.section { padding: 104px 0; }
.section-alt {
  background: var(--ink-raise);
  border-block: 1px solid var(--line);
}

.section-title {
  margin: 0 0 56px;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.028em;
  font-weight: 660;
  max-width: 22ch;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 138, 26, 0.075), transparent 58%),
    rgba(255, 255, 255, 0.017);
  transition: transform 220ms var(--ease-out), border-color 220ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); border-color: rgba(255, 174, 92, 0.34); }
}

.card h3, .step h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.012em;
  font-weight: 640;
}
.card p, .step p { margin: 0; color: var(--text-dim); font-size: 15.5px; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  counter-reset: step;
}

.step { position: relative; padding-top: 44px; }
.step::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 40px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ember), transparent);
}
.step-n {
  position: absolute;
  top: 14px;
  left: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ember);
}

/* ---------------------------------------------------------------- closing */

.closing { text-align: center; }
.closing-inner { display: grid; justify-items: center; gap: 20px; }
.closing-icon { border-radius: 24px; box-shadow: 0 24px 70px -24px rgba(255, 138, 26, 0.55); }
.closing h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4.2vw, 44px);
  letter-spacing: -0.03em;
  font-weight: 670;
}
.closing p { margin: 0; color: var(--text-dim); max-width: 46ch; }

/* ---------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}
.muted { color: #6d7689; }

.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: var(--text); }
}

/* ---------------------------------------------------------------- reveal */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 620ms var(--ease-out) forwards;
}
.reveal:nth-child(1) { animation-delay:  40ms; }
.reveal:nth-child(2) { animation-delay: 100ms; }
.reveal:nth-child(3) { animation-delay: 160ms; }
.reveal:nth-child(4) { animation-delay: 220ms; }
.reveal:nth-child(5) { animation-delay: 280ms; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion means gentler, not absent: keep the fade, drop the movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; animation: fade 240ms ease forwards; }
  @keyframes fade { to { opacity: 1; } }
  .card { transition: border-color 220ms ease; }
  @media (hover: hover) and (pointer: fine) {
    .card:hover { transform: none; }
  }
}

/* Narrow screens: the copy runs full width, so the horizontal veil can't protect
   it. Drop the trail back to atmosphere instead of letting it fight the text. */
@media (max-width: 900px) {
  .hero-canvas { opacity: 0.34; }
  .hero-veil {
    background:
      linear-gradient(180deg, var(--ink) 5%, color-mix(in srgb, var(--ink) 55%, transparent) 46%, transparent 88%),
      linear-gradient(0deg, var(--ink) 3%, transparent 30%);
  }
}

@media (max-width: 620px) {
  .nav-links > a:not(.btn) { display: none; }
  .section { padding: 76px 0; }
  .hero { padding: 72px 0 88px; min-height: 0; }
}

/* ---------------------------------------------------------------- doc pages */
/* Privacy, Terms, Support: long-form text, measured for reading. */

.doc { padding: 72px 0 96px; }
.doc-inner { max-width: 72ch; margin-inline: auto; }
.doc h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.doc .updated { margin: 0 0 48px; color: #6d7689; font-size: 14px; }
.doc h2 {
  font-size: 21px;
  letter-spacing: -0.015em;
  margin: 44px 0 12px;
  font-weight: 640;
}
.doc p, .doc li { color: var(--text-dim); }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); font-weight: 620; }
.doc a { color: var(--ember-warm); text-underline-offset: 3px; }
.doc .callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--ember);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 28px;
  background: rgba(255, 138, 26, 0.045);
}
.doc .callout p:last-child { margin-bottom: 0; }
