/* QuitIt — marketing, legal, and support site
   One stylesheet. No dependencies, no external requests.

   Layout follows theurgeapp.com: floating pill nav, three-phone hero with a
   masked fade, eyebrow-led sections, feature grid, vertical marquee, FAQ.
   Palette is black + one dark blue, used sparingly — eyebrows, icon chips,
   links, table headers. The primary button is off-white, not blue. */

:root {
  color-scheme: dark;

  --bg: #07080a;
  --surface: #0d1014;
  --surface-2: #12161c;
  --surface-3: #171c24;
  --line: #1b212a;
  --line-soft: #12171e;

  --ink: #f4f6f9;
  --ink-soft: rgba(244, 246, 249, 0.66);
  --ink-mute: rgba(244, 246, 249, 0.54);

  --accent: #5e8bd9;
  --accent-bright: #93b4ee;
  --accent-fill: #0f1a2e;
  --accent-line: #1f3255;

  /* The one loud blue on the site: the download CTA only. Deliberately
     brighter than --accent so it reads as the primary action. */
  --cta: #1d6ef0;
  --cta-hover: #3a85ff;

  --radius: 14px;
  --radius-lg: 22px;

  --wrap: 1120px;
  --wrap-doc: 720px;

  --nav-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

.wrap-doc {
  max-width: var(--wrap-doc);
}

.doc {
  padding: 40px 0 88px;
}

.section {
  padding: 84px 0;
  border-top: 1px solid var(--line-soft);
}

.section-plain {
  border-top: none;
}

.section-head {
  max-width: 660px;
  margin-bottom: 44px;
}

.section-head > :last-child {
  margin-bottom: 0;
}

/* ---------- Floating pill nav ---------- */

.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 60;
  background: none;
  border: none;
  pointer-events: none;
}

.nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 28px);
  max-width: 900px;
  margin: 0 auto;
  min-height: 0;
  padding: 8px 10px 8px 20px;
  background: rgba(13, 16, 20, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: none;
  white-space: nowrap;
  margin-right: auto;
}

/* The supplied logo is a wide wordmark centred on a square black canvas.
   `cover` on a short, wide box crops to the middle band — the wordmark —
   without needing the file re-cropped, and `screen` drops the black
   background so it sits on the pill rather than in a black rectangle. */
.brand-logo {
  display: block;
  width: 92px;
  height: 26px;
  object-fit: cover;
  mix-blend-mode: screen;
}

.nav-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links li,
.footer-links li {
  margin: 0;
}

.nav-links a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-3);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-3);
  font-weight: 550;
}

/* Compact download CTA that lives inside the pill, on the right. */
/* Specificity bumped: .btn-download's wide min-width is declared later in
   the file and would otherwise wrap the pill onto a second row. */
.nav-inner .nav-cta {
  flex: none;
  gap: 7px;
  padding: 8px 17px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 3px 14px -4px rgba(29, 110, 240, 0.75);
}

.nav-cta svg {
  width: 14px;
  height: 14px;
}

/* ---------- Typography ---------- */

h1 {
  font-size: clamp(38px, 6.4vw, 70px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--ink);
}

h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ink);
}

/* The nav is fixed, so every anchor target needs to clear it. */
[id] {
  scroll-margin-top: calc(var(--nav-h) + 14px);
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

p {
  margin: 0 0 15px;
  color: var(--ink-soft);
}

ul,
ol {
  margin: 0 0 15px;
  padding-left: 21px;
  color: var(--ink-soft);
}

li {
  margin-bottom: 9px;
}

li::marker {
  color: var(--accent);
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 180, 238, 0.3);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

a:hover {
  color: #b9d0f6;
  border-bottom-color: #b9d0f6;
}

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

.lede {
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.meta {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0 0 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.meta span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--ink-mute);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(48px, 7vw, 78px) 0 0;
  text-align: center;
  overflow-x: clip;
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
}

.hero .lede {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn-row {
  justify-content: center;
}

.hero-note {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 18px 0 0;
}

/* Three phones, centre one in front, fading out at the bottom. */
.hero-shots {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 54px auto 0;
  height: clamp(300px, 46vw, 520px);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}

.hero-shots .phone {
  position: absolute;
}

.hero-shots .phone-back-l {
  left: 3%;
  top: 9%;
  width: 35%;
  z-index: 1;
}

.hero-shots .phone-back-r {
  right: 3%;
  top: 9%;
  width: 35%;
  z-index: 1;
}

.hero-shots .phone-front {
  left: 50%;
  top: 0;
  width: 45%;
  transform: translateX(-50%);
  z-index: 2;
}

/* ---------- Phone frame ---------- */

/* The screenshots were captured during a phone call, so every status bar
   carries a green in-call pill. There is no image tooling in this repo, so
   the status bar is cropped here instead of being re-encoded: the frame is
   shortened by the same 108px the image is pulled up by, which leaves no
   gap and no distortion. Source images are 720x1560; 108/720 = 15%.
   To restore the full screenshot, drop the margin and set 9 / 19.5 back. */
.phone {
  border: 1px solid var(--surface-3);
  border-radius: 28px;
  background: #000;
  overflow: hidden;
  aspect-ratio: 720 / 1452;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -15%;
}

.phone-solo {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #0a0c10;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: opacity 0.18s var(--ease), transform 0.14s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn:hover {
  color: #0a0c10;
  opacity: 0.9;
  transform: translateY(-1px);
  border-bottom-color: var(--ink);
}

.btn:active {
  transform: translateY(0) scale(0.987);
}

.btn-sm {
  padding: 8px 17px;
  font-size: 14.5px;
}

.btn-accent {
  background: var(--accent-fill);
  color: #cdddf7;
  border-color: var(--accent-line);
}

.btn-accent:hover {
  color: #e4eefc;
  background: #142440;
  opacity: 1;
  border-bottom-color: var(--accent-line);
}

/* App Store CTA — the loudest element on the page by design.
   min-width keeps the badge from shrink-wrapping so the two text lines
   have room to sit on a common left edge beside the logo. */
.btn-download {
  background: var(--cta);
  border-color: var(--cta);
  color: #fff;
  padding: 13px 34px;
  min-width: 330px;
  gap: 14px;
  box-shadow: 0 6px 26px -6px rgba(29, 110, 240, 0.7);
}

.btn-download:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
  border-bottom-color: var(--cta-hover);
  color: #fff;
  opacity: 1;
  box-shadow: 0 10px 32px -6px rgba(58, 133, 255, 0.8);
}

/* Single line, sized to fill the badge, so the logo and every word share
   one baseline instead of stacking a caption above a title. */
.btn-download {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.018em;
  white-space: nowrap;
}

.btn-download svg {
  width: 21px;
  height: 21px;
  flex: none;
}

/* No App Store link yet: render the badge without an href so it is inert
   and not focusable, rather than a link that goes nowhere. */
.btn-download:not([href]) {
  cursor: default;
}

.cta-pending {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 12px 0 0;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--surface-3);
  border-bottom-color: var(--surface-3);
  opacity: 1;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

.doc .btn-row {
  margin: 28px 0 8px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 16px;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease),
    background-color 0.22s var(--ease);
}

.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card p {
  font-size: 15.5px;
  margin-bottom: 0;
}

.card-hover:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin: 0;
}

.grid .card {
  margin: 0;
}

.doc .grid {
  margin: 26px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-fill);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  margin-bottom: 16px;
}

.chip svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ---------- Alternating feature rows ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  margin-bottom: 84px;
}

.feature:last-child {
  margin-bottom: 0;
}

.feature-flip .feature-media {
  order: -1;
}

.feature-body > :last-child {
  margin-bottom: 0;
}

.feature-media {
  display: flex;
  justify-content: center;
}

.feature h3 {
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: -0.028em;
  margin-bottom: 12px;
}

/* ---------- Vertical marquee ---------- */

.marquee {
  position: relative;
  height: 330px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}

.marquee-track {
  display: flex;
  flex-direction: column;
  animation: marquee-y 28s linear infinite;
}

.marquee-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--ink);
}

.marquee-item span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

@keyframes marquee-y {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ---------- Callouts ---------- */

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-strong {
  background: var(--accent-fill);
  border-color: var(--accent-line);
}

.callout-title {
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}

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

.cta {
  text-align: center;
  padding: clamp(56px, 8vw, 96px) 0;
}

.cta .btn-row {
  justify-content: center;
}

.cta p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

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

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 21px 40px 21px 0;
  position: relative;
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 0.18s var(--ease);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease), margin-top 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.faq summary:hover {
  color: var(--accent-bright);
}

.faq-body {
  padding: 0 40px 24px 0;
  animation: faq-in 0.32s var(--ease);
}

.faq-body > :last-child {
  margin-bottom: 0;
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Steps ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 26px 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 44px;
  margin-bottom: 18px;
  color: var(--ink-soft);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent-fill);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps > li > :last-child {
  margin-bottom: 0;
}

/* ---------- Table of contents ---------- */

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 38px;
}

.toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 13px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
  font-size: 15px;
  color: var(--ink-mute);
}

.toc li {
  margin-bottom: 7px;
  break-inside: avoid;
}

.toc a {
  border-bottom: none;
  color: var(--ink-soft);
}

.toc a:hover {
  color: var(--accent-bright);
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

th {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: none;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 54px;
  font-size: 14px;
  color: var(--ink-mute);
}

.footer p {
  color: var(--ink-mute);
  font-size: 14px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.footer-links {
  gap: 8px 22px;
}

.footer-links a {
  color: var(--ink-soft);
  border-bottom: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent-bright);
}

/* ---------- Scroll reveal ----------
   Progressive enhancement: the hiding rule only applies once the inline
   script has set `js` on <html>. With scripting off, nothing is hidden. */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Accessibility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-fill);
  border: 1px solid var(--accent-line);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  border-bottom: none;
  z-index: 80;
}

.skip-link:focus {
  left: 0;
}

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

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

@media (max-width: 860px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 62px;
  }

  .feature-flip .feature-media {
    order: 0;
  }

  .feature-media {
    order: -1;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 60px 0;
  }

  .section-head {
    margin-bottom: 30px;
  }
}

@media (max-width: 620px) {
  /* Two rows of links + the 14px offset — must clear the fixed pill. */
  :root {
    --nav-h: 152px;
  }

  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 18px;
  }

  .doc {
    padding: 26px 0 60px;
  }

  /* Pill relaxes into a rounded panel so all five links fit on two rows
     instead of hiding behind a scroll the user has no reason to find. */
  .nav-inner {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 20px;
  }

  /* Row 1: wordmark + download. Row 2: the five links.
     Ordered explicitly because the CTA follows the links in the markup. */
  .brand {
    font-size: 17px;
    order: 1;
    margin-right: auto;
    padding-left: 4px;
  }

  .nav-inner .nav-cta {
    order: 2;
    width: auto;
    min-width: 0;
    padding: 7px 14px;
    font-size: 13.5px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    gap: 3px 1px;
  }

  .nav-links a {
    padding: 5px 10px;
    font-size: 13.5px;
  }

  .hero-shots {
    margin-top: 40px;
  }

  .toc ol {
    columns: 1;
  }

  .card,
  .callout,
  .toc {
    padding: 19px;
  }

  .btn {
    width: 100%;
  }

  /* Buttons go full-width on phones, except the ones that sit inline. */
  .btn-sm,
  .nav-cta {
    width: auto;
  }

  /* The hero badge's desktop min-width is wider than a 320px screen, so
     drop it here and let the full-width rule above do the sizing. */
  .btn-download {
    min-width: 0;
  }

  .marquee {
    height: 280px;
  }

  .faq summary {
    font-size: 16px;
  }
}

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

  .marquee-track {
    animation: none;
  }

  .faq-body {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* Legal documents get printed and filed. Give them paper. */
@media print {
  .nav,
  .footer,
  .toc,
  .btn-row,
  .skip-link,
  .hero-shots,
  .marquee {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    padding-top: 0;
  }

  h1, h2, h3, strong, p, li, td, th,
  .lede, .callout-title, .eyebrow {
    color: #000;
  }

  .card,
  .callout,
  .table-wrap {
    border: 1px solid #999;
    background: none;
  }

  a {
    color: #000;
    border-bottom: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .faq details {
    break-inside: avoid;
  }
}
