/* ClearDash marketing site: shared tokens, type, wordmark, trial form,
   closing band and footer. Home-only styles live in index.css, inner
   pages in page.css. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

/* Archivo's ampersand is an epsilon form that misreads in running text;
   take "&" alone from a neo-grotesk already on the visitor's machine. */
@font-face {
  font-family: "Amp";
  src: local("Helvetica Neue"), local("HelveticaNeue"), local("Helvetica"), local("Arial");
  unicode-range: U+0026;
}

:root {
  --navy: #0f2340;
  --mist: #c3cfdf;          /* secondary text on navy */
  --paper: #ffffff;
  --ink: #0f2340;           /* headings and body on white */
  --ink-soft: #4b586a;      /* secondary text on white */
  --rule: #d5dbe3;
  --rule-strong: #0f2340;
  --green: #7baa3a;         /* reserved for the primary action */
  --green-hover: #8dbd4a;

  /* Route colours, after the New York subway palette */
  --route-t: #e2332a;
  --route-n: #00933c;
  --route-q: #ff6319;
  --route-p: #b933ad;
  --route-b: #0039a6;
  --route-c: #fccc0a;
  --route-a: #996633;
  --route-r: #808183;

  --gutter: clamp(20px, 4.5vw, 64px);
  --face: "Amp", "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--navy);
}

::selection { background: var(--navy); color: #fff; }
.cover ::selection, .closing ::selection { background: #fff; color: var(--navy); }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.cover :focus-visible, .closing :focus-visible { outline-color: #fff; }

h1, h2 { font-weight: 700; font-stretch: 92%; text-wrap: balance; margin: 0; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--navy); color: #fff; padding: 10px 16px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* Logo: the boxed C in the word, outlined from Archivo (images/cleardash-logo*.svg). */
.wordmark {
  display: block;
  align-self: flex-start;
  padding: 5px 0;
  line-height: 0;
}
.wordmark img { display: block; height: 34px; width: auto; }

/* Trial form (cover and closing band) */
.trial { margin-top: 40px; display: grid; gap: 10px; max-width: 30rem; }
.trial label { font-size: 14px; font-weight: 600; color: var(--mist); letter-spacing: 0.01em; }
.trial input {
  height: 56px;
  padding: 0 16px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.trial input::placeholder { color: #66727f; }
.trial button,
.trial-cta {
  height: 60px;
  border: 0;
  border-radius: 3px;
  background: var(--green);
  color: var(--navy);
  font: inherit;
  font-size: 20px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.trial button:hover, .trial-cta:hover { background: var(--green-hover); }
.trial button:active, .trial-cta:active { transform: translateY(1px); }
.trial-cta { display: inline-flex; align-items: center; justify-self: start; padding: 0 32px; text-decoration: none; }
.trial-status { margin: 4px 0 0; min-height: 1.5em; font-size: 15px; font-weight: 600; color: #fff; }
.trial-status:empty { min-height: 0; margin: 0; }

/* ---------- Route bullets (map key, contents rows) ---------- */

.bullet {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-size: 17px; font-weight: 750; font-stretch: 100%;
  flex: none;
}
.b-t { background: var(--route-t); }
.b-n { background: var(--route-n); }
.b-q { background: var(--route-q); }
.b-p { background: var(--route-p); }
.b-b { background: var(--route-b); }
.b-c { background: var(--route-c); color: #111; }
.b-a { background: var(--route-a); }
.b-r { background: var(--route-r); }

/* ---------- Closing band ---------- */

.closing {
  background: var(--navy);
  color: #fff;
  padding: 104px var(--gutter);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px var(--gutter);
  align-items: end;
}
.closing h2 {
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 11em;
}
.trial-closing { margin-top: 0; grid-template-columns: 1fr auto; column-gap: 10px; max-width: none; }
.trial-closing label, .trial-closing .trial-status { grid-column: 1 / -1; }
.trial-closing button { padding: 0 32px; }

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 32px var(--gutter);
  padding: 56px var(--gutter) 48px;
  font-size: 15px;
}
.wordmark-small img { height: 26px; }
.site-footer nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; text-decoration: none; color: var(--ink-soft); }
.site-footer li a:hover { color: var(--ink); text-decoration: underline; }
.site-footer li a[aria-current="page"] { color: var(--ink); font-weight: 650; }
.legal { grid-column: 1 / -1; margin: 16px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .closing, .site-footer { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .closing { padding: 72px var(--gutter); }
  .trial-closing { grid-template-columns: 1fr; }
  .site-footer nav { grid-template-columns: 1fr 1fr; }
}
