/*
 * Glide Home - support, privacy and terms site.
 *
 * Self-contained on purpose: no web fonts, no CDNs, no images loaded from
 * anywhere. Everything the pages show is in this file or inline in the HTML,
 * which is what lets the privacy policy say the site makes no third-party
 * requests. Keep it that way.
 *
 * Colors are tokens on :root and redefined for dark mode. Text/background
 * pairs below were chosen for WCAG 2.2 AA (4.5:1 for body text) in both themes.
 */

:root {
  color-scheme: light dark;

  --bg-top: #e3f0ff;
  --bg-bottom: #eee6ff;
  --surface: #ffffff;
  --surface-soft: #f5f8ff;
  --border: #d5def3;
  --text: #1f2a44;
  --text-muted: #4a5878;
  --accent: #3b4fd8;
  --accent-hover: #2c3cb4;
  --accent-text: #ffffff;
  --focus: #b0277a;
  --shadow: 0 1px 2px rgb(31 42 68 / 6%), 0 8px 24px rgb(59 79 216 / 8%);

  /* Blob palette, decorative only (never the sole carrier of meaning). */
  --blob-pink: #ff8fb8;
  --blob-mint: #5fd3b0;
  --blob-sun: #ffc85c;
  --blob-sky: #6fb6ff;
  --blob-eye: #1f2a44;
  --ice: #ffffff;
  --ice-line: #c9dcf7;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --gutter: 16px;
  --max-width: 880px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #0f1730;
    --bg-bottom: #1d1638;
    --surface: #1b2340;
    --surface-soft: #212a4b;
    --border: #323d66;
    --text: #e8ecff;
    --text-muted: #b4bddc;
    --accent: #9fb0ff;
    --accent-hover: #c0cbff;
    --accent-text: #0f1730;
    --focus: #ff9bd2;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);

    --blob-pink: #ff8fb8;
    --blob-mint: #5fd3b0;
    --blob-sun: #ffc85c;
    --blob-sky: #6fb6ff;
    --blob-eye: #0f1730;
    --ice: #2a3561;
    --ice-line: #3d4a80;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-top);
  background-image: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  overflow-wrap: break-word;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.7rem);
  margin-top: 0.2em;
}

h3 {
  font-size: 1.1rem;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 0.35em;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.6em 1em;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 10;
}

.skip-link:focus {
  top: var(--gutter);
}

.wrap {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header {
  padding-top: 20px;
  padding-bottom: 8px;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand svg {
  width: 36px;
  height: 36px;
  flex: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--surface);
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}

main {
  padding-bottom: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 20px 0;
}

@media (min-width: 400px) {
  .card {
    padding: 24px;
  }
}

@media (min-width: 640px) {
  .card {
    padding: 32px 36px;
  }
}

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

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

.hero {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 24px 0 8px;
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: 1.15fr 1fr;
    gap: 32px;
    padding-top: 40px;
  }
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 34em;
}

.hero-art {
  width: 100%;
  max-width: 380px;
  justify-self: center;
}

/* Plain-text availability note. Deliberately not Apple's badge artwork. */
.store-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.store-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blob-mint);
  flex: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--accent);
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.button.secondary:hover {
  background: var(--surface);
  color: var(--accent-hover);
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.features li {
  margin: 0;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
}

.features h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.35em;
}

.features p {
  margin: 0;
  color: var(--text-muted);
}

.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
}

.dot.pink { background: var(--blob-pink); }
.dot.mint { background: var(--blob-mint); }
.dot.sun { background: var(--blob-sun); }
.dot.sky { background: var(--blob-sky); }

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

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1em;
}

.contact .email {
  font-weight: 700;
  font-size: 1.1rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 0 18px;
}

.faq details + details {
  margin-top: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style-position: outside;
}

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

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.faq details > :not(summary) {
  color: var(--text);
}

.faq details > :last-child {
  margin-bottom: 14px;
}

/* ---------- Legal pages ---------- */

.legal h2 {
  margin-top: 1.6em;
  padding-top: 0.2em;
}

.legal h2:first-of-type {
  margin-top: 0.6em;
}

.meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.summary-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 6px solid var(--blob-mint);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 1em 0 1.5em;
}

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

.legal .summary-box h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5em;
  padding-top: 0;
}

.legal h3 {
  margin-top: 1.4em;
}

/* Data tables: a normal table on wide screens, one card per row on phones. */
.table-wrap {
  margin: 0 0 1em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.data-table caption {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-bottom: 8px;
}

.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.data-table thead th {
  background: var(--surface-soft);
  border-bottom: 2px solid var(--border);
}

.data-table tbody th {
  font-weight: 700;
}

@media (max-width: 639px) {
  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .data-table,
  .data-table caption,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table tr {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
  }

  .data-table th,
  .data-table td {
    border: 0;
    padding: 2px 0;
  }

  .data-table tbody th {
    font-size: 1.05rem;
    padding-bottom: 6px;
  }

  .data-table td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--text-muted);
  }
}

.toc ol {
  columns: 2 220px;
  column-gap: 24px;
  margin-bottom: 0;
}

.toc li {
  break-inside: avoid;
}

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

.site-footer {
  padding: 8px 0 40px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0;
}

/* ---------- Art ---------- */

.art-ice {
  fill: var(--ice);
  stroke: var(--ice-line);
  stroke-width: 2;
}

.art-line {
  stroke: var(--ice-line);
  stroke-width: 2;
  stroke-linecap: round;
}

.art-pink { fill: var(--blob-pink); }
.art-mint { fill: var(--blob-mint); }
.art-sun { fill: var(--blob-sun); }
.art-sky { fill: var(--blob-sky); }
.art-eye { fill: var(--blob-eye); }
.art-shine { fill: #ffffff; opacity: 0.55; }
.art-symbol { fill: none; stroke: var(--blob-eye); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; opacity: 0.7; }
.art-burrow { fill: none; stroke-width: 5; stroke-dasharray: 2 7; stroke-linecap: round; }
.art-burrow.pink { stroke: var(--blob-pink); }
.art-burrow.mint { stroke: var(--blob-mint); }
.art-trail { stroke: var(--ice-line); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; fill: none; }

@media (prefers-reduced-motion: no-preference) {
  .float {
    animation: float 4.5s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
  }

  .float.delay {
    animation-delay: -2.2s;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-nav,
  .skip-link,
  .hero-art,
  .cta-row {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
}
