/* Save Masonboro — Petition site styles */

:root {
  --color-navy: #1a2f4a;
  --color-navy-dark: #0f1c2e;
  --color-red: #b83232;
  --color-red-hover: #962828;
  --color-cream: #f7f4ef;
  --color-white: #ffffff;
  --color-text: #2c2c2c;
  --color-muted: #5c6470;
  --color-border: #d8d2c8;
  --color-success: #1f6b3a;
  --color-error: #b83232;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(26, 47, 74, 0.08);
  --shadow-md: 0 8px 24px rgba(26, 47, 74, 0.12);
  --radius: 8px;
  --max-width: 1100px;

  /* Site images — use root-relative or full https:// URLs (Safari iOS breaks on ../ in CSS vars) */
  /* Social preview: https://savemasonboro.com/og-image.jpg — set in index.html */
  --hero-overlay-strength: 0.82;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-cream);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-red);
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  background: var(--color-navy);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-header nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.site-header nav a:hover {
  color: var(--color-white);
}

.nav-cta {
  background: var(--color-red);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

.nav-cta:hover {
  background: var(--color-red-hover);
  color: var(--color-white) !important;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-red-hover);
  color: var(--color-white);
}

.btn-full {
  width: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Hero — real <img> for background (reliable on Safari iOS; pseudo-element bg often fails) */
.hero {
  position: relative;
  color: var(--color-white);
  padding: 3.5rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    160deg,
    rgba(15, 28, 46, var(--hero-overlay-strength)) 0%,
    rgba(26, 47, 74, calc(var(--hero-overlay-strength) * 0.95)) 55%,
    rgba(36, 61, 92, calc(var(--hero-overlay-strength) * 0.9)) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
  font-weight: 700;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem;
  max-width: 38rem;
}

.hero-stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(4px);
}

.stat-card.accent {
  background: rgba(184, 50, 50, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.stat-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--color-navy);
  margin: 0 0 2rem;
  text-align: center;
}

/* Why cards */
.cards {
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-family: var(--font-serif);
  color: var(--color-navy);
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  color: var(--color-muted);
}

/* Petition */
.petition-section {
  background: var(--color-white);
  border-top: 4px solid var(--color-red);
}

.petition-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.petition-intro h2 {
  text-align: left;
  margin-bottom: 1rem;
}

.petition-intro p {
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

.petition-image {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.petition-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  min-height: 12rem;
}

.petition-form {
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.petition-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.form-row {
  display: grid;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--color-navy);
}

.form-group label span {
  color: var(--color-red);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgba(26, 47, 74, 0.15);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
}

.form-note {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.form-message {
  margin: 1rem 0 0;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-message.success {
  background: #e8f5ec;
  color: var(--color-success);
  border: 1px solid #b8dfc4;
}

.form-message.error {
  background: #fdecec;
  color: var(--color-error);
  border: 1px solid #f0b8b8;
}

/* Footer */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0;
}

.footer-inner p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
}

.footer-paid {
  font-weight: 600;
}

.footer-disclaimer {
  font-size: 0.8125rem !important;
  color: rgba(255, 255, 255, 0.55);
  max-width: 42rem;
  margin-bottom: 0 !important;
}

/* Responsive */
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
  }

  .petition-layout {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

  .petition-form {
    padding: 1.5rem;
  }
}
