/* Kitesmith site stylesheet
   One file for every page. Colours follow BRD section 16.
   Contrast (checked): navy on white 14.1:1, navy on Paper 13.0:1,
   muted text 7.4:1 / 6.9:1, white on navy 14.1:1, coral on navy 4.9:1.
   Coral is never used for text on white (2.9:1). */

/* ---------- Colours and sizes ---------- */
:root {
  color-scheme: light dark;

  /* Brand palette */
  --kite-navy: #1F2B45;
  --ember-coral: #EF7457;
  --white: #FFFFFF;
  --paper: #F5F6F8;

  /* Light mode (default) */
  --bg: var(--white);
  --bg-alt: var(--paper);
  --surface: var(--white);
  --text: var(--kite-navy);
  --text-muted: #4A5570;
  --border: #DDE1E8;
  --focus: var(--kite-navy);
  --accent: var(--ember-coral);       /* small accents only, never text on white */
  --button-bg: var(--kite-navy);
  --button-text: var(--white);

  /* Type and spacing */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --radius: 12px;
  --max-width: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--kite-navy);
    --bg-alt: #26334F;
    --surface: #2A3857;
    --text: var(--white);
    --text-muted: #C9CFDA;
    --border: #3A4866;
    --focus: var(--ember-coral);
    --button-bg: var(--white);
    --button-text: var(--kite-navy);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--space-2); }
h1 { font-size: var(--step-3); letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-2); }

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section { padding-block: var(--space-5); }
.section--alt { background: var(--bg-alt); }

.muted { color: var(--text-muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip link: hidden until focused with the keyboard */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 10;
  padding: var(--space-1) var(--space-2);
  background: var(--button-bg);
  color: var(--button-text);
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: var(--space-2); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding-block: var(--space-2);
}

.site-logo { display: inline-block; }
.site-logo img { width: 150px; height: auto; } /* above the 96 px minimum */

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: var(--space-1);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { text-decoration: underline; }

/* Current page: bold + a small coral bar (not colour alone) */
.site-nav a[aria-current="page"] {
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--accent);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 0.7em 1.2em;
  border: 2px solid var(--button-bg);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { text-decoration: underline; }

.button--ghost {
  background: transparent;
  color: var(--text);
}

.site-nav .button { padding: 0.55em 1em; }

/* ---------- Hero ---------- */
.hero { padding-block: var(--space-5); }
.hero__lead {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 38rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
}

/* ---------- Section headings ---------- */
.section__intro {
  max-width: 40rem;
  margin-bottom: var(--space-4);
}
.section__intro p { color: var(--text-muted); font-size: var(--step-1); }

/* Small label above a heading, e.g. "In development" */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--space-2);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {             /* small coral dot: decoration only */
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.card h3 { margin-bottom: var(--space-1); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-muted); }

/* ---------- Product feature (home page) ---------- */
.product-feature {
  display: grid;
  gap: var(--space-4);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) {
  .product-feature { grid-template-columns: 14rem 1fr; }
}
.product-feature__icon { width: 14rem; max-width: 60vw; }

/* ---------- Product hero (Quietdesk page) ---------- */
.product-hero {
  display: grid;
  gap: var(--space-4);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) {
  .product-hero { grid-template-columns: 1fr 18rem; }
}
.product-hero__icon { width: 18rem; max-width: 60vw; }
/* Waitlist page: skip the big icon on phones so the form comes sooner */
@media (max-width: 47.99rem) {
  .product-hero__icon--wide-only { display: none; }
}
.product-hero__note {
  margin-top: var(--space-3);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ---------- Ticked list ---------- */
.ticks {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: var(--space-1);
}
.ticks li::before {            /* tick drawn with borders, in text colour */
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.35em;
  width: 0.45em;
  height: 0.8em;
  border: solid var(--text);
  border-width: 0 0.15em 0.15em 0;
  transform: rotate(45deg);
}

/* ---------- Numbered steps ---------- */
.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps > li { counter-increment: step; }
.steps h3::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: var(--step-0);
  vertical-align: 0.1em;
}

/* ---------- Call to action band ---------- */
.cta {
  text-align: center;
}
.cta p {
  max-width: 34rem;
  margin-inline: auto;
  color: var(--text-muted);
}
.cta .hero__actions { justify-content: center; }

/* ---------- Simple page header (Pricing, Support, ...) ---------- */
.page-header { padding-block: var(--space-5) var(--space-4); }
.page-header p { color: var(--text-muted); font-size: var(--step-1); max-width: 40rem; }

/* ---------- Long text (Privacy, Changelog) ---------- */
/* Reading width applies to the children, so text lines up with page titles */
.prose > *, .faq > *, .contact > * { max-width: 42rem; }
.prose h2 { margin-top: var(--space-4); }
.prose h3 { margin-top: var(--space-3); }
.prose ul { padding-left: 1.25em; margin: 0 0 var(--space-2); }
.prose li { margin-bottom: 0.35em; }

/* ---------- Comparison table (Pricing) ---------- */
.table-wrap {
  overflow-x: auto;              /* scrolls inside itself on small phones */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.compare {
  width: 100%;
  /* no minimum width: all three columns shrink to fit, even on a 320 px phone */
  border-collapse: collapse;
}
.compare caption {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
}
.compare th, .compare td {
  padding: 0.85rem var(--space-3);
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--border);
}
@media (max-width: 40rem) {
  .compare th, .compare td { padding: 0.75rem 0.5rem; font-size: var(--step--1); hyphens: auto; }
  .compare thead th { font-size: var(--step-0); }
}
.compare thead th { font-size: var(--step-1); }
.compare tbody th { font-weight: 500; }
.compare small { display: block; font-weight: 400; color: var(--text-muted); }
.table-note { margin-top: var(--space-2); }

/* ---------- FAQ (native details/summary, no JavaScript) ---------- */
.faq details {
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-2);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--step-1);
}
.faq details p { margin: var(--space-1) 0 0; color: var(--text-muted); }

/* ---------- Contact box ---------- */
.contact__email {
  font-size: var(--step-2);
  font-weight: 700;
  word-break: break-word;
}

/* ---------- Signup form (Waitlist) ---------- */
.signup {
  max-width: 34rem;
  padding: var(--space-4) var(--space-3);
}
.signup label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
}
.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.7em 1em;
  border: 2px solid var(--text-muted);   /* 7:1 on white, 3:1+ rule for inputs */
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.signup input[type="email"]::placeholder { color: var(--text-muted); }
.signup__note {
  margin: var(--space-2) 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: var(--space-4);
  font-size: var(--step--1);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.site-footer__brand img { width: 28px; height: 28px; }

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a { display: inline-block; padding-block: 0.25rem; }

.site-footer__legal {
  width: 100%;
  margin: 0;
  color: var(--text-muted);
}
