/* ---------------------------------------------------------------------------
   QuickHand content pages (comparison, alternatives, listicle).

   Shared stylesheet for the hand-authored static pages under public/. It
   mirrors the tokens the React app already uses on /terms and /privacy:
   black ground, Inter Tight for everything, Fraunces italic for the accent
   word, white-opacity text ramp, 20px glass cards, pill CTAs.

   One file, linked from every content page, so the browser caches it once and
   the pages stay light. No JavaScript anywhere: these pages are text.
--------------------------------------------------------------------------- */

:root {
  --ground: #000000;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.75);
  --ink-3: rgba(255, 255, 255, 0.55);
  --ink-4: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hi: rgba(255, 255, 255, 0.08);
  --blue: rgba(51, 102, 255, 1);
  --ember: rgba(255, 76, 51, 1);

  --font-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;

  --measure: 54rem;
  --radius: 20px;
  --radius-sm: 14px;

  --dur: 150ms;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Ambient ground -----------------------------------------------------
   The same whisper-level glows the home page uses, so a content page still
   feels like the same product. Fixed, behind everything, zero interaction. */

.qh-atmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    rgba(46, 68, 120, 0.085),
    rgba(24, 34, 62, 0.03) 34%,
    rgba(0, 0, 0, 0) 58%
  );
}

.qh-atmos::before,
.qh-atmos::after {
  content: "";
  position: absolute;
  width: 72vmax;
  height: 72vmax;
  border-radius: 9999px;
}

.qh-atmos::before {
  left: -26vmax;
  bottom: -32vmax;
  background: radial-gradient(circle, var(--blue) 0%, rgba(51, 102, 255, 0) 62%);
  opacity: 0.05;
  animation: qh-breathe-a 64s ease-in-out infinite;
}

.qh-atmos::after {
  right: -30vmax;
  top: 26vmax;
  background: radial-gradient(circle, var(--ember) 0%, rgba(255, 76, 51, 0) 60%);
  opacity: 0.04;
  animation: qh-breathe-b 52s ease-in-out infinite;
}

@keyframes qh-breathe-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.04; }
  50%      { transform: translate3d(6vmax, -4vmax, 0) scale(1.12); opacity: 0.07; }
}

@keyframes qh-breathe-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.06); opacity: 0.035; }
  50%      { transform: translate3d(-5vmax, 5vmax, 0) scale(0.94); opacity: 0.065; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .qh-atmos::before,
  .qh-atmos::after { animation: none; }
}

/* ---- Skip link ---------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #000;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 13px;
  font-weight: 500;
}

.skip:focus {
  left: 0;
}

/* ---- Header ------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-head__in {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-head__back {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) ease;
}

.site-head__back:hover,
.site-head__back:focus-visible {
  color: var(--ink);
}

.site-head__nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.site-head__link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) ease;
}

.site-head__link:hover,
.site-head__link:focus-visible {
  color: rgba(255, 255, 255, 0.85);
}

/* ---- Layout ------------------------------------------------------------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.5rem 8rem;
}

section {
  margin-top: 3.5rem;
}

/* ---- Type --------------------------------------------------------------- */

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

h1 {
  margin: 0.75rem 0 0;
  font-weight: 300;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

h2 {
  margin: 0 0 0.85rem;
  font-weight: 500;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h3 {
  margin: 0 0 0.5rem;
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}

.lede {
  margin: 1.5rem 0 0;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.7;
  color: var(--ink-2);
}

p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--ink-2);
}

p:last-child { margin-bottom: 0; }

.meta {
  margin-top: 1.75rem;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-4);
}

a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--dur) ease;
}

a:hover,
a:focus-visible {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
  border-radius: 4px;
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--ink-2);
}

li { margin-bottom: 0.35rem; }
li:last-child { margin-bottom: 0; }

strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---- Cards -------------------------------------------------------------- */

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.card + .card { margin-top: 1rem; }

.card--quiet { background: rgba(255, 255, 255, 0.025); }

.card__label {
  margin: 0 0 0.75rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* Two-up honest-tradeoff blocks */
.split {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split .card + .card { margin-top: 0; }
}

/* ---- Comparison table ---------------------------------------------------
   A real table with scoped headers. Above 640px it reads as a grid; below,
   each row becomes its own block with the column name printed in front of
   the value, so nothing ever scrolls sideways on a phone. */

.cmp {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.875rem;
}

.cmp caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 0.9rem;
  font-size: 12px;
  color: var(--ink-4);
}

.cmp th,
.cmp td {
  text-align: left;
  vertical-align: top;
  padding: 0.9rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.6;
}

.cmp thead th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.cmp thead th.is-qh { color: rgba(255, 255, 255, 0.9); }

.cmp tbody th {
  font-weight: 500;
  color: var(--ink);
  width: 30%;
}

.cmp td { color: var(--ink-2); }

.cmp td.is-qh {
  background: rgba(51, 102, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
}

.cmp tbody tr:last-child th,
.cmp tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  /* `caption` must be listed here too: left as display:table-caption inside a
     table that is now display:block, it shrink-wraps to the width of its
     longest word and renders one word per line. */
  .cmp,
  .cmp caption,
  .cmp tbody,
  .cmp tr,
  .cmp th,
  .cmp td { display: block; width: auto; }

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

  .cmp tbody tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.25rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
  }

  .cmp tbody th {
    width: auto;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 0.6rem;
  }

  .cmp tbody td {
    border-bottom: 0;
    padding-top: 0.65rem;
    padding-bottom: 0.15rem;
  }

  .cmp tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
  }

  .cmp tbody td.is-qh {
    background: transparent;
    color: var(--ink-2);
  }

  .cmp tbody td.is-qh::before { color: rgba(140, 170, 255, 0.85); }
}

/* ---- Listicle entries --------------------------------------------------- */

.entry {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
  margin-top: 1.75rem;
}

.entry__rank {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.entry__best {
  margin: 0.35rem 0 0.9rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.entry--qh {
  border-top-color: rgba(51, 102, 255, 0.35);
}

.pros-cons {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}

@media (min-width: 700px) {
  .pros-cons { grid-template-columns: 1fr 1fr; }
}

.pros-cons h4 {
  margin: 0 0 0.45rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.pros-cons ul {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ---- FAQ ---------------------------------------------------------------- */

.faq dt {
  margin-top: 1.5rem;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}

.faq dd {
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--ink-2);
}

/* ---- CTA ---------------------------------------------------------------- */

.cta {
  margin-top: 4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
}

.cta h2 { margin-bottom: 0.6rem; }

.cta p {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.5rem;
  margin-top: 1.25rem;
  border-radius: 9999px;
  background: #ffffff;
  color: #000000;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--dur) ease, transform var(--dur) ease;
}

.btn:hover,
.btn:focus-visible {
  background: #e2e2e6;
  color: #000000;
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--surface-hi);
  color: var(--ink);
  border: 1px solid var(--line);
  margin-left: 0.5rem;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

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

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem 4rem;
}

.site-foot__in {
  max-width: var(--measure);
  margin: 0 auto;
}

.site-foot__cols {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  /* auto-fit rather than a fixed count: the footer carries three columns on
     some pages and four on others, and a column that cannot hold 12rem drops
     to the next row instead of squeezing the link text into one word per
     line. */
  .site-foot__cols { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
}

.site-foot h2 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.75rem;
}

.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.site-foot li { margin-bottom: 0.45rem; }

.site-foot a {
  color: var(--ink-3);
  text-decoration: none;
}

.site-foot a:hover,
.site-foot a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.site-foot__note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-4);
}
