/* ClinkRate content pages (guides + scorecard).
 *
 * Standalone stylesheet for the static SEO pages — these are plain HTML and
 * never load the React bundle or Tailwind. Tokens are copied from
 * frontend/tailwind.config.ts + frontend/src/index.css so the pages match the
 * app exactly; if the app's palette changes, mirror it here.
 *
 * Versioned filename (style.v1.css) on purpose: firebase.json caches *.css as
 * `immutable, max-age=31536000`. Bump to v2 (and update the <link> in every
 * page) when editing, otherwise returning visitors keep the old file.
 */

/* ---------- tokens ---------- */
:root {
  --deep: #0c0a08;
  --base: #161310;
  --card: rgba(22, 19, 15, 0.85);
  --gold: #d4a853;
  --gold-light: #e8c97a;
  --gold-dark: #9b7b3b;
  --text: #f0eae0;
  --text-dim: #8c8275;
  --text-muted: #5c564e;
  --border: rgba(212, 168, 83, 0.12);
  --border-strong: rgba(212, 168, 83, 0.25);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--deep);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* Warm atmospheric glow behind the header, mirroring the app's hero. */
body::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 140vw);
  height: 600px;
  background: radial-gradient(
    ellipse at center,
    rgba(212, 168, 83, 0.13),
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--deep);
  padding: 0.75rem 1rem;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- nav ---------- */
.nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 10, 8, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  color: var(--gold-light);
}
.brand svg {
  width: auto;
  height: 20px;
  flex: none;
  fill: var(--gold);
}
.site-footer .brand svg {
  height: 26px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.3s, background 0.2s;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--deep);
  box-shadow: 0 4px 24px rgba(212, 168, 83, 0.2);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(212, 168, 83, 0.3);
  color: var(--deep);
}
.btn-gold:active {
  transform: scale(0.97);
}
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(212, 168, 83, 0.08);
  border-color: var(--gold);
  color: var(--text);
}
.btn-lg {
  font-size: 1.05rem;
  padding: 0.85rem 1.75rem;
}

/* ---------- layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.page-wide {
  max-width: 1100px;
}

/* ---------- breadcrumbs ---------- */
.crumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.crumbs a {
  color: var(--text-dim);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--gold);
  text-decoration: underline;
}
.crumbs span {
  margin: 0 0.4rem;
}

/* ---------- typography ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--text);
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.6vw, 1.8rem);
  line-height: 1.25;
  margin: 3rem 0 0.9rem;
  color: var(--gold-light);
  scroll-margin-top: 1.5rem;
}
h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 1.9rem 0 0.4rem;
  color: var(--text);
}
p {
  margin: 0 0 1.15rem;
}
.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text);
}
strong {
  color: var(--text);
  font-weight: 700;
}
em {
  color: var(--text);
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}
a:hover {
  color: var(--gold-light);
}

ul,
ol {
  margin: 0 0 1.3rem;
  padding-left: 1.35rem;
}
li {
  margin-bottom: 0.6rem;
}
li::marker {
  color: var(--gold-dark);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0 2rem;
}

/* ---------- table of contents ---------- */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.97rem;
}
.toc li {
  margin-bottom: 0.35rem;
}

/* ---------- CTA callout ---------- */
.cta {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 1.75rem;
  margin: 2.5rem 0;
}
.cta h2,
.cta h3 {
  margin-top: 0;
}
.cta p:last-of-type {
  margin-bottom: 1.25rem;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.cta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
}

/* ---------- cards (hub) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}
.card-grid li {
  margin: 0;
}
.card {
  display: block;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.card:hover {
  background: rgba(30, 26, 20, 0.9);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  color: var(--text);
}
.card h2,
.card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin: 0 0 0.5rem;
}
.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}
.card-mark {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* ---------- scorecard preview ---------- */
.sheet {
  background: #fdfaf4;
  color: #1a1512;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.sheet h2 {
  font-family: var(--serif);
  color: #8b1a4a;
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}
.sheet .sheet-sub {
  color: #6b6259;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.sheet table {
  width: 100%;
  border-collapse: collapse;
}
.sheet th,
.sheet td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #e3dbcd;
  vertical-align: top;
}
.sheet th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6259;
  font-weight: 600;
}
.sheet .dots {
  color: #c8bda8;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */
.faq h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 600;
  margin: 1.9rem 0 0.5rem;
}

/* ---------- next-up cross-links ---------- */
.next-up {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  color: var(--text-dim);
  font-size: 0.97rem;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
  text-align: center;
}
.site-footer .brand {
  justify-content: center;
  margin-bottom: 0.5rem;
}
.site-footer p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0 0 0.9rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.88rem;
}
.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text-dim);
}
.footer-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }
  .page {
    padding: 1.75rem 1.1rem 3rem;
  }
  .cta {
    padding: 1.35rem;
  }
  .sheet {
    padding: 1rem;
    font-size: 0.82rem;
  }
}
