/* ══════════════════════════════════════════════════════════════
   page.css — shared styles for static content pages
   (support.html, privacy.html, terms.html, thanks.html).
   Mirrors the nav / card / footer look of index.html.
══════════════════════════════════════════════════════════════ */

:root { color-scheme: light; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  color: var(--text-primary);
}

/* ── Nav ───────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-brand span { font-size: 18px; font-weight: 700; color: var(--text-primary); }

.nav-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1.5px solid var(--purple-300);
  background: rgba(255,255,255,0.6);
  color: var(--purple-700);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--micro-duration, 150ms);
}
@media (hover: hover) {
  .nav-btn:hover { opacity: 0.7; }
}

/* ── Page body ─────────────────────────────────────────────── */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 24px 64px;
}

.card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  max-width: 720px;
  width: 100%;
  padding: 48px 44px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: #5C4E72; /* darker than --text-muted for 4.5:1 contrast */
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.card h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 34px 0 10px;
  padding-top: 22px;
  border-top: 0.5px solid rgba(42,31,61,0.08);
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 22px 0 6px;
}

.card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.card p + p { margin-top: 12px; }

.card .lede { font-size: 16px; margin-bottom: 8px; }
.card .updated { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

.card a { color: var(--purple-700); text-decoration: none; font-weight: 500; }
@media (hover: hover) {
  .card a:hover { text-decoration: underline; }
}

/* ── Legal pages (privacy.html, terms.html) ─────────────────
   Rendered from the Fixiv repo's docs/legal by
   scripts/render-legal-pages.rb; these rules cover the markdown
   constructs those documents use. */
.card.legal .company { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.card.legal strong { color: var(--text-primary); font-weight: 600; }
.card.legal ul { padding-left: 22px; margin: 10px 0 14px; }
.card.legal li { font-size: 15px; line-height: 1.7; color: var(--text-secondary); text-wrap: pretty; }
.card.legal li + li { margin-top: 6px; }
.card.legal .table-wrap { overflow-x: auto; margin: 12px 0 16px; }
.card.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.card.legal th, .card.legal td {
  text-align: left; vertical-align: top; padding: 10px 12px;
  border-top: 0.5px solid rgba(42,31,61,0.08);
  color: var(--text-secondary); line-height: 1.55;
}
.card.legal th {
  border-top: 0; color: var(--text-muted); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.card.legal h2 + p, .card.legal h3 + p { margin-top: 0; }

/* ── Contact block ─────────────────────────────────────────── */
.contact-box {
  background: var(--purple-bg);
  border-radius: var(--radius-chip);
  padding: 22px 24px;
  margin-top: 24px;
}
.contact-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.contact-link {
  font-size: 20px;
  font-weight: 700;
  color: var(--purple-700);
  text-decoration: none;
}
@media (hover: hover) {
  .contact-link:hover { text-decoration: underline; }
}
.contact-note { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

/* ── Placeholder disclaimer ────────────────────────────────── */
.placeholder-note {
  margin-top: 34px;
  padding: 16px 18px;
  border-radius: var(--radius-icon);
  background: var(--pink-bg);
  border: 1px solid var(--pink-border);
  font-size: 14px !important;
  line-height: 1.6;
  color: var(--text-secondary);
}
.placeholder-note.top { margin-top: 0; margin-bottom: 8px; }

/* ── Signup confirmation (thanks.html) ─────────────────────── */
/* Hidden states live in the `from` keyframes, so content stays visible if
   an animation never runs. Reduced motion keeps only the opacity fade. */
@keyframes fade-in    { from { opacity: 0; } }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }
@keyframes pop-in     { from { opacity: 0; scale: 0.6; } 60% { scale: 1.08; } }

.thanks .anim { animation: fade-in 300ms ease-out both; }
@media (prefers-reduced-motion: no-preference) {
  .thanks .anim { animation-name: fade-in-up; }
  .thanks .check-badge { animation: pop-in 500ms var(--spring-easing) both; }
}
/* Badge, then heading, install box and each step, 100ms apart */
.thanks .rise:nth-child(2) { animation-delay: 100ms; }
.thanks .install { animation-delay: 200ms; }
.thanks .next-steps li:nth-child(1) { animation-delay: 300ms; }
.thanks .next-steps li:nth-child(2) { animation-delay: 400ms; }

.card.thanks { max-width: 540px; text-align: center; }
.check-badge {
  width: 72px;
  height: 72px;
  border-radius: 36px;
  margin: 0 auto 26px;
  background: var(--purple-700);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgba(123,94,167,0.40);
  color: #FFFFFF;
}
.thanks .lede { max-width: 400px; margin: 0 auto; }

.install {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius-chip);
  background: var(--purple-bg);
}
.install p { margin-bottom: 14px; }
/* 2px less on the leading-icon side */
.install .btn-primary { max-width: 100%; padding: 0 20px 0 18px; white-space: nowrap; }
.card a.btn-primary { gap: 10px; color: #FFFFFF; font-weight: 600; text-decoration: none; }
.btn-primary:focus-visible { outline: 2px solid var(--purple-700); outline-offset: 3px; }

.next-steps { list-style: none; margin-top: 24px; text-align: left; }
.next-steps li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 0.5px solid rgba(42,31,61,0.07);
}
.next-steps .icon-bg { flex-shrink: 0; width: 42px; height: 42px; color: var(--purple-700); background: var(--purple-bg); }
.card .next-steps h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 3px;
  padding: 0;
  border: 0;
}
.card .next-steps p { font-size: 14px; line-height: 1.6; }

/* ── Back link ─────────────────────────────────────────────── */
.back-link {
  margin-top: 28px;
  color: var(--purple-700);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--micro-duration, 150ms);
}
@media (hover: hover) {
  .back-link:hover { opacity: 0.7; }
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  border-top: 0.5px solid rgba(42,31,61,0.08);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand img { width: 22px; height: 22px; border-radius: 6px; }
.footer-brand span { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--micro-duration, 150ms);
}
@media (hover: hover) {
  .footer-links a:hover { color: var(--purple-700); }
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 820px) {
  nav { padding-top: max(20px, calc(16px + env(safe-area-inset-top, 0px))); }
  main { padding: 110px 16px 48px; }
  .card { padding: 32px 24px; border-radius: 24px; }
  .install { padding: 20px 16px; }
  .install .btn-primary { width: 100%; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
