/* ApprenticeshipWatch.org - Editorial Manifesto Design System
 * Unified serif typography, luminous paper canvas, cinematic opening-crawl cadence.
 */

:root {
  --paper: #faf7f0;
  --paper-warm: #f3ede0;
  --paper-card: rgba(255, 253, 248, 0.78);
  --ink: #16211c;
  --ink-body: #2c3a33;
  --ink-muted: #66756d;
  --forest: #1b543c;
  --forest-dark: #123b2a;
  --forest-soft: rgba(27, 84, 60, 0.08);
  --gold: #c88320;
  --gold-wash: rgba(200, 131, 32, 0.16);
  --rule: rgba(22, 33, 28, 0.11);
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

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

html {
  background-color: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Luminous atmospheric wash behind the paper */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 68% 42% at 15% 6%, rgba(200, 131, 32, 0.11), transparent 68%),
    radial-gradient(ellipse 58% 45% at 86% 18%, rgba(27, 84, 60, 0.09), transparent 70%),
    radial-gradient(ellipse 75% 40% at 50% 96%, rgba(200, 131, 32, 0.07), transparent 72%);
}

/* Quiet Top Masthead */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--rule);
  background: rgba(250, 247, 240, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.masthead-inner {
  width: min(860px, calc(100% - 3rem));
  margin-inline: auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark-org {
  color: var(--forest);
  font-style: italic;
  font-weight: 600;
}

.masthead-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.region-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--forest);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--forest-soft);
  border: 1px solid rgba(27, 84, 60, 0.15);
}

.masthead-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #faf7f0;
  background: var(--forest);
  padding: 0.44rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.masthead-cta:hover {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 131, 32, 0.22);
}

/* Main Editorial Column */
.page {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 7vw, 6.25rem) 0 clamp(4.5rem, 9vw, 7rem);
}

.manifesto {
  width: min(740px, calc(100% - 3rem));
  margin-inline: auto;
}

/* Opening Prologue */
.prologue {
  margin: 0 0 1.65rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.06rem, 1.8vw, 1.24rem);
  letter-spacing: 0.01em;
  color: var(--forest);
}

/* Monumental Headline */
.headline {
  margin: 0 0 2.5rem;
  font-family: var(--serif);
  font-size: clamp(2.55rem, 5.5vw, 4.1rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.headline em {
  font-style: italic;
  font-weight: 500;
  color: var(--forest);
  background: linear-gradient(180deg, transparent 64%, var(--gold-wash) 64%);
  padding: 0 0.08em;
}

/* Manifesto Prose */
.prose p {
  margin: 0 0 1.65rem;
  font-size: clamp(1.14rem, 1.85vw, 1.32rem);
  line-height: 1.82;
  color: var(--ink-body);
}

.lead-paragraph {
  font-size: clamp(1.22rem, 2.05vw, 1.44rem) !important;
  line-height: 1.76 !important;
  color: var(--ink) !important;
}

.prose em {
  font-style: italic;
  color: var(--forest);
}

/* Minimalist Editorial Ornament Divider */
.ornament {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 2.85rem 0;
}

.ornament::before,
.ornament::after {
  content: '';
  height: 1px;
  background: var(--rule);
  flex: 1;
}

.ornament::before {
  max-width: 44px;
  background: rgba(27, 84, 60, 0.32);
}

.ornament span {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--gold);
  opacity: 0.85;
}

/* Mission Statements */
.commitments {
  margin: 3.25rem 0 0;
}

.section-kicker {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.statement {
  margin: 0 0 1.85rem;
  font-size: clamp(1.12rem, 1.8vw, 1.3rem);
  line-height: 1.82;
  color: var(--ink-body);
}

.statement em {
  font-style: italic;
  font-weight: 600;
  color: var(--forest);
}

/* Founder Pull Quote */
.founder-note {
  margin: 0 0 2.75rem;
  padding: 0.35rem 0 0.35rem 1.75rem;
  border-left: 2.5px solid var(--forest);
}

.founder-note p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.32rem, 2.3vw, 1.68rem);
  line-height: 1.56;
  color: var(--forest);
}

/* Closing Regional Note */
.closing-prose p {
  margin: 0 0 1.5rem;
  font-size: clamp(1.12rem, 1.8vw, 1.28rem);
  line-height: 1.82;
  color: var(--ink-body);
}

.closing-signoff {
  margin-top: 2rem !important;
  font-size: clamp(1.18rem, 2vw, 1.38rem) !important;
  color: var(--ink) !important;
}

.closing-signoff em {
  font-style: italic;
  color: var(--forest);
  background: linear-gradient(180deg, transparent 64%, var(--gold-wash) 64%);
  padding: 0 0.08em;
}

/* Founding Donors & Partners Editorial Section */
.support-section {
  scroll-margin-top: 96px;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: 0 12px 36px rgba(22, 33, 28, 0.045);
}

.support-heading {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.support-heading em {
  font-style: italic;
  color: var(--forest);
  background: linear-gradient(180deg, transparent 64%, var(--gold-wash) 64%);
  padding: 0 0.06em;
}

.support-intro {
  margin: 0 0 1.5rem;
  font-size: 1.06rem;
  line-height: 1.74;
  color: var(--ink-body);
}

.prototype-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.85rem;
  border-radius: 12px;
  background: var(--forest-soft);
  border: 1px solid rgba(27, 84, 60, 0.16);
}

.prototype-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--forest);
}

.prototype-link {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 84, 60, 0.35);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.prototype-link:hover {
  color: var(--forest-dark);
  border-bottom-color: var(--forest-dark);
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

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

.field label {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.field label .optional {
  font-weight: 400;
  color: var(--ink-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.96rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(22, 33, 28, 0.18);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(27, 84, 60, 0.12);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding-top: 0.25rem;
}

.btn-submit {
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 600;
  color: #faf7f0;
  background: var(--forest);
  border: none;
  border-radius: 999px;
  padding: 0.78rem 1.6rem;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.btn-submit:hover:not(:disabled) {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.privacy-note {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.form-feedback {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.85rem 1rem;
  border-radius: 10px;
}

.form-feedback.is-success {
  background: rgba(27, 84, 60, 0.1);
  border: 1px solid rgba(27, 84, 60, 0.25);
  color: var(--forest-dark);
}

.form-feedback.is-error {
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.24);
  color: #991b1b;
}

/* Quiet Colophon Footer */
.colophon {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  padding: 2rem 0 2.75rem;
}

.colophon-inner {
  width: min(740px, calc(100% - 3rem));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.colophon-email {
  color: var(--forest);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 84, 60, 0.25);
  transition: border-color 0.15s ease;
}

.colophon-email:hover {
  border-bottom-color: var(--forest);
}

/* Subtle Cinematic Unfolding Entrance */
@keyframes manifestoRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  animation: manifestoRise 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.r-1 { animation-delay: 0.08s; }
.r-2 { animation-delay: 0.22s; }
.r-3 { animation-delay: 0.4s; }
.r-4 { animation-delay: 0.58s; }
.r-5 { animation-delay: 0.76s; }
.r-6 { animation-delay: 0.92s; }

/* Mobile */
@media (max-width: 640px) {
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.85rem 0;
    gap: 0.55rem;
  }

  .masthead-right {
    width: 100%;
    justify-content: space-between;
  }

  .region-tag {
    font-size: 0.8rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .founder-note {
    padding-left: 1.2rem;
  }
}

/* Respect Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    animation: none;
    transform: none;
  }
}
