/* ==========================================================================
   Fluvanna Opposes Valley Link — Landing Page Stylesheet
   Typography: Cabinet Grotesk (display) + General Sans (body/UI) via Fontshare
   Palette: locked to the Fluvanna school colors supplied in the brief
   Theme: single locked dark-navy treatment over a fixed photographic backdrop
   ========================================================================== */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* Brand colors — exact hex values from the brief, not substituted */
  --navy: #002060;
  --navy-mid: #1d2a44;
  --navy-deep: #0a1730;
  --gold: #ffc000;
  --gold-light: #ffd700;

  /* Neutrals — warm off-white / soft ink, never pure black or pure white */
  --paper: #f4f1e8;
  --paper-dim: #d9d6ca;
  --ink: #10182a;
  --ink-soft: #33405c;

  /* Surfaces */
  --frost-bg: rgb(10 23 48 / 0.62);
  --frost-border: rgb(255 255 255 / 0.14);
  --frost-bg-solid: rgb(11 24 51 / 0.96);
  --field-bg: rgb(244 241 232 / 0.96);
  --field-border: rgb(16 24 42 / 0.18);

  /* Type */
  --font-display: "Cabinet Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "General Sans", "Segoe UI", system-ui, sans-serif;

  --step-0: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.55vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.9vw, 2.75rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.2vw, 4.2rem);

  /* Shape — one radius system, applied by role */
  --radius-field: 8px;
  --radius-panel: 10px;
  --radius-pill: 999px;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max-text: 62ch;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-reveal: 500ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--paper);
  background: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  color: var(--paper);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--gold-light);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---- Skip link ------------------------------------------------------ */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 0.75em 1.25em;
  border-radius: var(--radius-field);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---- Screen-reader-only utility -------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Fixed photographic backdrop -------------------------------------
   The photo (and its gradient fallback) stay pinned behind everything;
   every section scrolls on top of it. If hero-test.jpg is not yet in
   /assets, the radial gradient underneath still reads as intentional. */
.fixed-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    url("../assets/hero-test.jpg") center 40% / cover no-repeat,
    radial-gradient(ellipse at 75% 20%, var(--navy-mid), var(--navy-deep) 65%);
  will-change: transform;
}

.fixed-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(10 23 48 / 0.35), rgb(10 23 48 / 0.72) 70%);
}

/* ---- Shared section scaffolding --------------------------------------- */
.panel {
  position: relative;
  z-index: 1;
  min-height: 80dvh;
  display: flex;
  align-items: center;
  padding: clamp(4rem, 8vw, 6rem) var(--gutter);
}

.panel__frost {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  background: var(--frost-bg);
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.08),
    0 24px 60px rgb(0 0 0 / 0.35);
  padding: clamp(1.75rem, 4vw, 3.5rem);
}

@media (prefers-reduced-transparency: reduce) {
  .panel__frost {
    background: var(--frost-bg-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Scroll-reveal: fade + rise, gated behind prefers-reduced-motion */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--dur-reveal) var(--ease-out),
      transform var(--dur-reveal) var(--ease-out);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 80dvh;
  display: flex;
  align-items: center;
  padding: clamp(1.5rem, 5vw, 3rem) var(--gutter);
}

.hero__inner {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.hero__text {
  text-align: right;
}

.hero__text h1 {
  font-size: var(--step-4);
  letter-spacing: -0.01em;
}

.hero__text h2 {
  font-size: var(--step-3);
  color: var(--gold);
  letter-spacing: -0.01em;
}

.hero__sub {
  margin-top: 1.1rem;
  font-size: var(--step-2);
  color: var(--paper);
  max-width: 34ch;
  margin-left: auto;
}

.hero__asset {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero__tower {
  height: min(62dvh, 520px);
  width: auto;
  filter: drop-shadow(0 18px 34px rgb(0 0 0 / 0.4));
}

@media (max-width: 760px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__text {
    text-align: center;
    order: 1;
  }

  .hero__sub {
    margin-inline: auto;
  }

  .hero__asset {
    order: 2;
    justify-content: center;
  }

  .hero__tower {
    height: min(38dvh, 300px);
  }
}

/* ---- Marquee ------------------------------------------------------------
   One marquee, directly under the hero, per the brief. Pure CSS loop,
   paused on hover/focus and collapsed to a static line under reduced
   motion. */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--navy);
  border-block: 1px solid rgb(255 192 0 / 0.35);
  padding-block: 0.85em;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 34s linear infinite;
}

.marquee__group {
  display: flex;
  flex: none;
}

.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  white-space: nowrap;
  padding-inline: 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  color: var(--gold-light);
}

.marquee__dot {
  width: 0.7em;
  height: 0.7em;
  flex: none;
  color: var(--gold);
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    overflow-x: auto;
  }

  .marquee__track {
    animation: none;
  }
}

/* ---- Lead statement (section 1) ---------------------------------------- */
.panel--lead .panel__frost {
  text-align: center;
}

.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.35;
  max-width: var(--max-text);
  margin-inline: auto;
}

/* ---- Split panels (sections 2 & 3) -------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

.split__text {
  max-width: var(--max-text);
}

.split__text h2 {
  font-size: var(--step-2);
  margin-bottom: 0.75em;
}

.panel--split-media-right .split__media {
  order: 2;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }

  .panel--split-media-right .split__media {
    order: -1;
  }
}

/* Labeled placeholder — used only where the brief has not supplied a
   real photo yet (hero-test.jpg and the two content images). Honest
   and swappable rather than a stand-in stock photo. */
.placeholder-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-panel);
  border: 1px dashed rgb(255 255 255 / 0.35);
  background:
    linear-gradient(150deg, rgb(255 192 0 / 0.14), transparent 60%),
    var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--paper-dim);
}

.placeholder-media svg {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--gold);
}

.placeholder-media span {
  font-size: 0.9rem;
}

/* ---- Contact form (section 4) ------------------------------------------ */
.form-panel h2 {
  font-size: var(--step-2);
}

.form-intro {
  font-size: var(--step-1);
  max-width: var(--max-text);
}

.form-note {
  max-width: var(--max-text);
  color: var(--paper-dim);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 2.25rem 0 0;
}

fieldset legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  padding: 0 0 0.35em;
  color: var(--paper);
}

.fieldset-instruction {
  margin: -0.25em 0 1em;
  color: var(--paper-dim);
  font-size: 0.92rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.choice-group > legend.choice-legend {
  font-weight: 600;
  font-size: 0.95rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-field);
  padding: 0.75em 0.9em;
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 6.5em;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.choice input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--paper-dim);
}

.field-error {
  font-size: 0.85rem;
  color: var(--gold-light);
  display: none;
}

.field.has-error .field-error {
  display: block;
}

.field.has-error input,
.field.has-error select {
  outline: 2px solid var(--gold-light);
}

.choice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem 1.5rem;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.choice input[type="checkbox"],
.choice input[type="radio"] {
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.2em;
  flex: none;
  accent-color: var(--gold);
}

.choice label {
  font-size: 0.97rem;
}

.reminder {
  background: rgb(255 192 0 / 0.12);
  border: 1px solid rgb(255 192 0 / 0.4);
  border-radius: var(--radius-field);
  padding: 0.85em 1.1em;
  font-size: 0.92rem;
  margin: 1rem 0;
}

.privacy {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgb(255 255 255 / 0.16);
  font-size: 0.92rem;
  color: var(--paper-dim);
  max-width: var(--max-text);
}

.privacy h3 {
  font-size: 1rem;
  color: var(--paper);
  margin-bottom: 0.5em;
}

/* Honeypot — off-screen, not display:none, so bots that skip
   hidden-field checks still fill it in. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-row {
  margin-top: 2.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.85em 2em;
  cursor: pointer;
  background: var(--gold);
  color: var(--ink);
  transition: transform 150ms var(--ease-out), background 150ms var(--ease-out);
}

.btn:hover {
  background: var(--gold-light);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-status {
  font-size: 0.95rem;
}

.form-status[data-state="success"] {
  color: var(--gold-light);
}

.form-status[data-state="error"] {
  color: #ffb4a8;
}

/* ---- Footer -------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  background: rgb(6 14 32 / 0.85);
  border-top: 1px solid rgb(255 192 0 / 0.25);
}

.footer__inner {
  max-width: 78rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}

.footer__text {
  text-align: right;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-2);
  margin: 0;
}

.footer__tower {
  height: min(14dvh, 120px);
  width: auto;
}

@media (max-width: 640px) {
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__text {
    text-align: center;
  }

  .footer__tower {
    margin-inline: auto;
  }
}
