/*
 * Filename: public-pages.css
 * Purpose: Shared stylesheet for every public, crawlable static page on the
 *          InfiniView web host (/guides/, /about/, /network/, /guidelines/,
 *          /privacy/, /terms/, /contact/, /learn-more/).
 * Author: Kevin Doyle Jr. / Infinitum Imagery LLC
 * Last Modified: 2026-08-20
 * Dependencies: None. Plain CSS, no build step, no external font requests.
 * Platform Compatibility: Current Chrome, Edge, Safari, Firefox; mobile and desktop.
 *
 * WHY THIS FILE EXISTS
 * The public pages are intentionally plain server-rendered HTML, served outside
 * the Flutter app shell so that search crawlers and AdSense reviewers can read
 * the content without executing JavaScript. Before this file each page inlined
 * its own near-identical <style> block, which meant a chrome change had to be
 * repeated in every page. All shared chrome now lives here.
 *
 * AD LAYOUT CONTRACT
 * The `.iv-ad` classes reserve space for AdSense units so page content never
 * shifts when a unit fills, and they render the required "Advertisement" label.
 * Ad units may only be placed between or after substantial article sections —
 * never above the first heading, and never on a page whose only purpose is
 * navigation, legal text, or contact details. See web/guides/index.html.
 */

/* MARK: - Design tokens */

:root {
  --iv-bg: #0b0f14;
  --iv-surface: #141b24;
  --iv-surface-raised: #1b2431;
  --iv-text: #e8eef6;
  --iv-muted: #9aabbc;
  --iv-accent: #3db8a0;
  --iv-accent-soft: rgba(61, 184, 160, 0.14);
  --iv-border: #243041;
  --iv-warn: #f0b45f;
  --iv-danger: #ef7a7a;
  --iv-max: 46rem;
  --iv-radius: 12px;
}

/* MARK: - Base document */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2a33 0%, var(--iv-bg) 55%);
  background-attachment: fixed;
  color: var(--iv-text);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--iv-accent);
  outline-offset: 2px;
}

/* MARK: - Layout shell */

header,
main,
footer {
  max-width: var(--iv-max);
  margin: 0 auto;
  padding: 1.25rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--iv-border);
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--iv-text);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.95rem;
}

footer {
  border-top: 1px solid var(--iv-border);
  margin-top: 2.5rem;
  color: var(--iv-muted);
  font-size: 0.9rem;
}

/* MARK: - Typography */

h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin: 1.5rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.65rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.08rem;
  margin: 1.6rem 0 0.4rem;
}

p,
li {
  color: var(--iv-muted);
}

p strong,
li strong {
  color: var(--iv-text);
}

.lead {
  font-size: 1.1rem;
  color: var(--iv-text);
}

ul,
ol {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.35rem;
}

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

/* MARK: - Metadata rows */

.iv-meta {
  font-size: 0.85rem;
  color: var(--iv-muted);
  margin: 0 0 1.25rem;
}

.iv-breadcrumb {
  font-size: 0.85rem;
  color: var(--iv-muted);
  margin: 1rem 0 0;
}

/* MARK: - Panels and callouts */

.panel {
  background: var(--iv-surface);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius);
  padding: 1.1rem 1.2rem;
  margin: 1.25rem 0;
}

.panel h3 {
  margin-top: 0;
}

.iv-callout {
  background: var(--iv-accent-soft);
  border: 1px solid var(--iv-border);
  border-left: 3px solid var(--iv-accent);
  border-radius: var(--iv-radius);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
}

.iv-callout p {
  margin: 0;
  color: var(--iv-text);
}

/* MARK: - Do / Avoid lesson blocks */

.iv-practice {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

@media (min-width: 40rem) {
  .iv-practice {
    grid-template-columns: 1fr 1fr;
  }
}

.iv-practice section {
  background: var(--iv-surface);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius);
  padding: 0.9rem 1.1rem;
}

.iv-practice h4 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.iv-practice-do h4 {
  color: var(--iv-accent);
}

.iv-practice-avoid h4 {
  color: var(--iv-danger);
}

.iv-practice ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* MARK: - Article index cards */

.iv-card-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 44rem) {
  .iv-card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.iv-card {
  background: var(--iv-surface);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius);
  padding: 1.1rem 1.2rem;
}

.iv-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.iv-card h3 a {
  color: var(--iv-text);
}

.iv-card p {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.iv-card-meta {
  font-size: 0.8rem;
  color: var(--iv-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* MARK: - Table of contents */

.iv-toc {
  background: var(--iv-surface);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

.iv-toc h2 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iv-muted);
}

.iv-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

/* MARK: - Ad containers
 *
 * Reserved min-height prevents layout shift on fill. The label is required so a
 * reader can always distinguish sponsored inventory from InfiniView content.
 */

.iv-ad {
  margin: 2.25rem 0;
  padding-top: 0.25rem;
  border-top: 1px solid var(--iv-border);
}

.iv-ad-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--iv-muted);
  margin: 0.5rem 0 0.6rem;
}

.iv-ad-in-article {
  min-height: 280px;
}

.iv-ad-multiplex {
  min-height: 320px;
}

.iv-ad ins.adsbygoogle {
  display: block;
  width: 100%;
}

/* MARK: - Next / related links */

.iv-next {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.iv-next a {
  background: var(--iv-surface-raised);
  border: 1px solid var(--iv-border);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
}

/* MARK: - Print */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .iv-ad,
  nav {
    display: none;
  }
}

/*
 * Suggestions For Features and Additions Later:
 * - Add a light-theme block behind prefers-color-scheme: light.
 * - Migrate the inline <style> blocks in /learn-more/ to this stylesheet.
 * - Add an .iv-table class if guide pages start publishing comparison tables.
 */
