/* ============================================================
   Peninsula News Group — shared stylesheet
   Light pages (cream/white) with navy header & footer.
   Refined institutional look — generous spacing, blue hairlines.
   ============================================================ */

/* ---------- Design tokens ---------- */
/* Palette derived from the brand lockup:
   navy #0c2745 (primary), blue #437eb5 (accent),
   cream #f6f3ec page ground, white #ffffff.
   Hairline rules use the blue accent at low opacity. */
:root {
  /* Palette */
  --navy: #0c2745;
  --navy-deep: #061a30;
  --blue: #437eb5;
  --cream: #f6f3ec;
  --white: #ffffff;
  --ink: #0c2745;
  --muted: #5b647d;
  --line: rgba(67, 126, 181, 0.30);    /* blue hairline on light */
  --line-on-navy: rgba(67, 126, 181, 0.45);

  /* Typography */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 9vw, 128px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; height: auto; }
a   { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.25rem); font-weight: 400; }
h2 { font-size: clamp(1.85rem, 3.2vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 500; }
h4 { font-size: 1.05rem; font-weight: 500; letter-spacing: 0.01em; }

p  { margin: 0 0 1.1em; color: var(--ink); }
p.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1.25em;
  display: inline-block;
}

.muted { color: var(--muted); }

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: var(--section-y) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }

.hairline {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Header (navy) ---------- */
/* Navy ground (#0c2745) carries the WHITE lockup variant
   (brand/peninsula-lockup-white.svg). Blue hairline beneath. */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-on-navy);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

/* Brand lockup — header uses the white SVG; footer uses text wordmark. */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}

.brand__logo {
  display: block;
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* Text wordmark — only rendered in the footer. */
.brand__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand__name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--white);
}
.brand__sub {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--blue);
}

/* Primary nav (on navy header) */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--white);
  opacity: 0.82;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: opacity .2s ease, border-color .2s ease;
}
.nav a:hover { opacity: 1; border-bottom-color: var(--blue); }
.nav a.is-current { opacity: 1; border-bottom-color: var(--blue); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-on-navy);
  color: var(--white);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--cream);
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 110px);
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.hero h1 { margin-bottom: 0.3em; }
.hero__meta {
  border-left: 1px solid var(--line);
  padding-left: clamp(20px, 2.5vw, 32px);
}
.hero__meta p { color: var(--muted); margin-bottom: 0.5em; }
.hero__meta strong { color: var(--ink); font-weight: 500; }

/* ---------- Homepage hero coverage panel (scrolling type) ---------- */
/* Navy block in the right column of the homepage hero.
   The track holds the 9 coverage areas listed twice and translates from
   translateY(0) to translateY(-50%) over 30s — because the list is doubled,
   half a track length equals one full cycle, so the loop is seamless.
   Top and bottom gradient masks create the visible "spotlight zone". */

.hero--home .hero__grid { align-items: center; }

.hero-art {
  position: relative;
  background: var(--navy);
  border-radius: 3px;
  height: 520px;
  overflow: hidden;
  align-self: stretch;
}

/* Fade masks — solid navy at the panel edges, transparent toward the middle.
   Rendered above the scrolling track (z-index 2) without intercepting events. */
.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 180px;
  z-index: 2;
  pointer-events: none;
}
.hero-art::before {
  top: 0;
  background: linear-gradient(
    to bottom,
    rgba(12, 39, 69, 1) 0%,
    rgba(12, 39, 69, 0) 100%
  );
}
.hero-art::after {
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(12, 39, 69, 1) 0%,
    rgba(12, 39, 69, 0) 100%
  );
}

.hero-art__viewport {
  position: absolute;
  inset: 0;
  padding: 0 clamp(24px, 4vw, 40px);
  overflow: hidden;
}

.hero-art__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--cream);
  animation: hero-art-scroll 30s linear infinite;
  will-change: transform;
}
.hero-art__track li { white-space: nowrap; }
.hero-art__track .is-italic {
  font-style: italic;
  color: var(--blue);
}

@keyframes hero-art-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* Reduced motion: stop animating, hold a steady middle frame. */
@media (prefers-reduced-motion: reduce) {
  .hero-art__track {
    animation: none;
    transform: translateY(-25%);
  }
}

@media (max-width: 768px) {
  .hero-art { height: 380px; }
  .hero-art::before,
  .hero-art::after { height: 120px; }
  .hero-art__track {
    font-size: 28px;
    gap: 20px;
  }
}

/* Screen-reader-only utility (used for the coverage-area description). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Homepage front-door panels ---------- */
/* Short, declarative panels between the hero and the footer.
   No card grid, no images — just heading, body, and a single inline link. */
.home-panel {
  max-width: 720px;
}
.home-panel h2 {
  margin-bottom: 0.5em;
  max-width: 22ch;
}
.home-panel .lead {
  margin-bottom: 1.5em;
  max-width: 60ch;
}
.home-panel__link {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.home-panel__link a {
  color: var(--ink);
  border-bottom: 1px solid var(--blue);
  padding-bottom: 2px;
  transition: color .2s ease;
}
.home-panel__link a:hover { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

.btn--ghost {
  background: transparent;
  color: var(--navy);
}
.btn--ghost:hover { background: var(--navy); color: var(--white); }

.btn--on-navy {
  background: transparent;
  border-color: var(--blue);
  color: var(--white);
}
.btn--on-navy:hover { background: var(--blue); color: var(--navy); border-color: var(--blue); }

.arrow::after { content: "→"; margin-left: 4px; }

/* ---------- Generic grids ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 48px);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 2.5vw, 36px);
}

/* ---------- Pillar / topic cards ---------- */
.pillar {
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.pillar h3 {
  margin-top: 4px;
  margin-bottom: 12px;
}
.pillar__num {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--blue);
  letter-spacing: 0.04em;
}
.pillar p { color: var(--muted); margin-bottom: 0; }

/* ---------- Feature blocks ---------- */
.feature {
  background: var(--white);
  padding: clamp(36px, 4vw, 56px);
  border: 1px solid var(--line);
}
.feature .eyebrow { margin-bottom: 1em; }
.feature h2 { margin-bottom: 0.5em; }

/* ---------- Two-column prose ---------- */
.prose {
  max-width: 68ch;
}
.prose p + p { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; color: var(--ink); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.split__aside {
  position: sticky;
  top: 110px;
}
.split__aside .eyebrow { margin-bottom: 0.6em; }
.split__aside h2 { margin-bottom: 0.4em; }

/* ---------- Standards list (trust page) ---------- */
.standards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.standards li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.standards li:last-child { border-bottom: 1px solid var(--line); }
.standards__num {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--blue);
}
.standards h3 { margin: 0 0 6px; }
.standards p  { margin: 0; color: var(--muted); }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--navy);
  color: var(--white);
}
.cta-strip .container {
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.cta-strip h2 { color: var(--white); margin: 0; }
.cta-strip p  { color: rgba(255,255,255,0.78); margin: 12px 0 0; }
.cta-strip .actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 22px;
  max-width: 640px;
}
.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 14px 16px;
  outline: none;
  border-radius: 0;
  transition: border-color .2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy);
}
.field textarea { min-height: 160px; resize: vertical; }

/* ---------- Footer (navy) ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.78);
  padding: clamp(56px, 7vw, 96px) 0 32px;
  font-size: 0.92rem;
}
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--blue); }

/* Paragraphs in the footer must override the global `p { color: var(--ink) }`
   rule, otherwise they render in navy ink on the navy ground (invisible). */
.site-footer p { color: rgba(255,255,255,0.78); }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-on-navy);
}

/* Footer brand lockup — same SVG as header, slightly larger so it reads
   as the anchor of the brand column. */
.footer-brand__logo {
  display: block;
  height: 52px;
  width: auto;
  object-fit: contain;
}
.footer-grid h4 {
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 18px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid .brand__name { color: var(--white); font-size: 1.4rem; }
.footer-grid .brand__sub  { font-size: 0.66rem; }

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 28px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* ---------- Utilities ---------- */
.center  { text-align: center; }
.mt-0    { margin-top: 0; }
.mb-0    { margin-bottom: 0; }
.mt-3    { margin-top: 24px; }
.mt-4    { margin-top: 36px; }
.mt-5    { margin-top: 56px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid,
  .split,
  .cta-strip .container,
  .footer-grid { grid-template-columns: 1fr; }
  .split__aside { position: static; }
  .cta-strip .actions { justify-content: flex-start; }
  .hero__meta { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 16px var(--gutter) 28px;
    gap: 0;
    border-bottom: 1px solid var(--line-on-navy);
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line-on-navy);
    opacity: 1;
  }
  .nav a:last-child { border-bottom: 0; }

  .site-header__inner { position: relative; }

  .form__row { grid-template-columns: 1fr; }
  .standards li { grid-template-columns: 48px 1fr; gap: 16px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Legal document layout (privacy.html, terms.html)
   Narrow column, comfortable line-height, light page ground.
   ============================================================ */

.legal-page { background: var(--cream); }

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 9vw, 128px);
}

.legal__header {
  padding-bottom: clamp(28px, 3vw, 40px);
  margin-bottom: clamp(36px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.legal__subtitle {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  margin-bottom: 18px;
}
.legal h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  margin: 0 0 0.5em;
}
.legal__date {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

/* Contents (TOC) */
.legal__toc {
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px) clamp(28px, 3vw, 40px);
  margin-bottom: clamp(40px, 5vw, 64px);
}
.legal__toc-title {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  margin: 0 0 16px;
}
.legal__toc ol {
  margin: 0;
  padding-left: 1.5em;
  font-size: 0.95rem;
  line-height: 1.85;
  columns: 1;
}
@media (min-width: 720px) {
  .legal__toc ol { columns: 2; column-gap: 36px; }
}
.legal__toc li { break-inside: avoid; }
.legal__toc a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.legal__toc a:hover { border-bottom-color: var(--blue); }

/* Document body */
.legal__body {
  font-size: 1.02rem;
  line-height: 1.75;
}
.legal__body h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  font-weight: 500;
  margin: 2.4em 0 0.6em;
  scroll-margin-top: 110px;     /* offset sticky header on anchor jump */
}
.legal__body h2:first-of-type { margin-top: 0.4em; }
.legal__body p { margin: 0 0 1.15em; }
.legal__body ul, .legal__body ol {
  margin: 0 0 1.3em;
  padding-left: 1.4em;
}
.legal__body li { margin-bottom: 0.55em; }
.legal__body a {
  color: var(--ink);
  border-bottom: 1px solid var(--blue);
}
.legal__body a:hover { color: var(--blue); }
.legal__body address {
  font-style: normal;
  margin: 0.6em 0 1.2em;
}

/* Inline uppercase paragraph (e.g. arbitration class-action waiver) */
.legal__uppercase {
  letter-spacing: 0.01em;
  font-weight: 500;
}

/* ---------- Floating back-to-top ---------- */
.back-to-top {
  position: fixed;
  right: clamp(20px, 4vw, 40px);
  bottom: clamp(20px, 4vw, 40px);
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid var(--line-on-navy);
  cursor: pointer;
  z-index: 60;
  transition: background .2s ease;
}
.back-to-top:hover { background: var(--navy-deep); }
.back-to-top.is-visible { display: inline-flex; }

/* ============================================================
   Print stylesheet (legal pages especially)
   Clean black-on-white, no chrome.
   ============================================================ */
@media print {
  /* Hide site chrome */
  .site-header,
  .site-footer,
  .nav-toggle,
  .back-to-top,
  .cta-strip,
  .hero__meta { display: none !important; }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.55;
  }

  a { color: #000; text-decoration: underline; }

  h1, h2, h3, h4 {
    color: #000;
    page-break-after: avoid;
  }

  p, li { orphans: 3; widows: 3; }

  .container,
  .legal {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .legal__toc {
    border: 1px solid #000;
    background: #fff;
    padding: 12pt 16pt;
    margin-bottom: 18pt;
  }
  .legal__toc-title,
  .legal__subtitle { color: #000 !important; }
  .legal__toc a { text-decoration: none; }

  .legal__header {
    border-bottom: 1px solid #000;
    padding-bottom: 12pt;
    margin-bottom: 18pt;
  }

  .hairline { border-color: #000; }
}

