/* Glyphboard marketing / support / privacy site — shared styles. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --fg: #1c1c1e;
  --muted: #6e6e73;
  --card: #f5f5f7;
  --card-2: #ffffff;
  --border: #e5e5ea;
  --accent: #007aff;
  --accent-rgb: 0, 122, 255;
  --hero-top: #3b94fd;
  --hero-bottom: #0061eb;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #0c0c0e;
    --fg: #f5f5f7;
    --muted: #98989d;
    --card: #1c1c1e;
    --card-2: #17171a;
    --border: #2c2c2e;
    --accent: #0a84ff;
    --accent-rgb: 10, 132, 255;
    --hero-top: #1c66c9;
    --hero-bottom: #003a91;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
nav.site-nav .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
  margin-right: auto;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14.5px;
  color: var(--muted);
}
.nav-links a { color: inherit; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 620px) {
  .nav-links { display: none; }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 980px;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.85; }
.btn-ghost {
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  color: var(--fg);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--fg) 14%, transparent); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }

.badge-link { display: inline-flex; border-radius: 10px; transition: transform .15s ease; }
.badge-link:hover { transform: translateY(-1px); }
.badge-link img { height: 44px; width: auto; display: block; }
.badge-link .badge-black { display: block; }
.badge-link .badge-white { display: none; }
@media (prefers-color-scheme: dark) {
  .badge-link .badge-black { display: none; }
  .badge-link .badge-white { display: block; }
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom));
  color: #fff;
  padding: 64px 20px 88px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 55%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-icon {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}
.hero p.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.5;
  max-width: 560px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.92);
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 22px;
}
.hero .btn-primary {
  background: #fff;
  color: #0a3a8f;
}
.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.26); }
.hero .badge-link .badge-black { display: none; }
.hero .badge-link .badge-white { display: block; }
.trust-line {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  opacity: 0.7;
}

/* Sections */
section { padding: 72px 0; }
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 44px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 10px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.section-head p {
  color: var(--muted);
  font-size: 16.5px;
  margin: 0;
}

/* Screenshot gallery */
.gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 4px 20px 20px;
  padding: 4px 20px 20px;
  margin: 0 calc(50% - 50vw);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.shot {
  flex: 0 0 auto;
  width: 220px;
  margin: 0;
  scroll-snap-align: start;
  text-align: center;
}
.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 296 / 640;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.shot h3 {
  font-size: 15.5px;
  margin: 0 0 4px;
}
.shot p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.feature .glyph {
  font-size: 26px;
  line-height: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 700;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform .12s ease, box-shadow .12s ease;
}
.feature:hover .glyph {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}
.feature:active .glyph {
  transform: translateY(1px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}
.feature h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.feature p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* Escape-code strip (developer feature callout) */
.escape-strip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14.5px;
  max-width: 460px;
  margin: 0 auto;
}
.escape-strip .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
}
.escape-strip .row:last-child { border-bottom: none; }
.escape-strip .k { color: var(--muted); font-family: var(--font); font-size: 13.5px; }
.escape-strip .v { color: var(--fg); }

/* Numbered steps */
ol.steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
}
ol.steps li:last-child { margin-bottom: 0; }
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: 50%;
}

/* Cards used on support/privacy pages */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 16px;
}

/* FAQ accordion */
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 20px;
  color: var(--muted);
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "\2212"; }
.faq p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
}

/* Privacy list */
.privacy-list { margin: 0 0 16px; padding-left: 0; list-style: none; }
.privacy-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.privacy-list li strong { display: block; margin-bottom: 2px; }
.privacy-list li span { color: var(--muted); }

/* Generic page header (support/privacy sub-pages) */
.page-header {
  padding: 44px 0 8px;
}
.page-header h1 {
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.page-header .tagline,
.page-header .updated {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}
h2.label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 40px 0 14px;
}
dl { margin: 0; }
dt { font-weight: 600; margin-top: 18px; }
dt:first-child { margin-top: 0; }
dd { margin: 4px 0 0; color: var(--muted); }

footer.site-footer {
  margin-top: 40px;
  padding: 32px 0 60px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
}
footer.site-footer .wrap,
footer.site-footer.narrow-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}
footer.site-footer a { color: var(--muted); }
footer.site-footer a:hover { color: var(--fg); }
.footer-links { display: flex; gap: 18px; }
