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

:root {
  /* Dark blue & lighter blues palette */
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #60a5fa;
  --accent-subtle: rgba(59, 130, 246, 0.15);
  --border: #334155;
  --focus: #3b82f6;
  --error: #ef4444;
  --success: #22c55e;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.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;
}

/* --- Header & counter --- */
.header {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: var(--bg-card);
}

.counter {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.counter-number {
  font-weight: 700;
  color: var(--accent-light);
}

.header-nav {
  margin: 0;
  text-align: center;
}

.header-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}

.header-link:hover {
  text-decoration: underline;
}

/* --- Hero --- */
.hero {
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
  text-align: center;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
}

.hero-title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text);
}

.hero-subtitle {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--accent-light);
}

/* --- Image + petition side by side --- */
.petition-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  max-width: 56rem;
  margin: 0 auto var(--space-2xl);
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .petition-with-image {
    grid-template-columns: 1fr;
  }
}

/* --- Alleyway image --- */
.alley-image-wrap {
  margin: 0;
  min-width: 0;
}

.alley-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.alley-image-caption {
  margin: var(--space-sm) 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Petition text (light blue-grey panel, readable) --- */
.petition-content {
  margin: 0;
  min-width: 0;
  padding: var(--space-xl) var(--space-lg);
  background: #e2e8f0;
  color: #1e293b;
  line-height: 1.6;
  border-radius: var(--radius-lg);
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
}

.petition-title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.petition-content .subtitle {
  margin: 0 0 var(--space-xl);
  font-size: 1.125rem;
  font-weight: 600;
  color: #334155;
}

.petition-content h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e40af;
}

.petition-content h3:first-of-type {
  margin-top: 0;
}

.petition-content p {
  margin: 0 0 1.5rem;
  color: #334155;
}

.petition-content p:last-child {
  margin-bottom: 0;
}

.petition-content .callout {
  margin: 1rem 0 1.5rem;
  padding: var(--space-lg);
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.petition-content .callout p {
  margin: 0;
}

.petition-content .callout p + p {
  margin-top: 1rem;
}

.petition-content strong {
  font-weight: 700;
  color: #1e293b;
}

.petition-failures {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
  list-style: none;
}

.petition-failures li {
  position: relative;
  margin-bottom: 0.75rem;
  padding-left: 1.75rem;
}

.petition-failures li::before {
  content: "❌";
  position: absolute;
  left: 0;
}

.petition-failures li:last-child {
  margin-bottom: 0;
}

/* --- Privacy / Policy page content (same panel styling as petition) --- */
.policy-content {
  max-width: 42rem;
  margin: var(--space-xl) auto var(--space-2xl);
  padding: var(--space-xl) var(--space-lg);
  background: #e2e8f0;
  color: #1e293b;
  line-height: 1.6;
  border-radius: var(--radius-lg);
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
}

.policy-title {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.policy-content h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e40af;
}

.policy-content h2:first-of-type {
  margin-top: 0;
}

.policy-content p {
  margin: 0 0 1rem;
  color: #334155;
}

.policy-content p:last-child {
  margin-bottom: 0;
}

.policy-content ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.5rem;
  color: #334155;
}

.policy-content ul li {
  margin-bottom: 0.35rem;
}

.policy-content a {
  color: #1e40af;
  text-decoration: underline;
}

.policy-content a:hover {
  color: #1e3a8a;
}

.policy-intro-list {
  margin-bottom: 1.5rem;
}

/* --- Form section --- */
.form-section {
  max-width: 56rem;
  margin: 0 auto var(--space-2xl);
  padding: 0 var(--space-lg);
}

.petition-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.form-statement {
  margin: 0 0 var(--space-lg);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.form-row:last-of-type {
  margin-bottom: 0;
}

.form-row--split {
  flex-direction: row;
}

.form-row--split .form-group {
  flex: 1 1 12rem;
}

.form-row--address {
  flex-direction: row;
}

.form-row--address .form-group {
  flex: 1 1 10rem;
}

.form-group {
  flex: 1 1 100%;
  min-width: 0;
}

.form-group--full {
  flex: 1 1 100%;
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.required {
  color: var(--accent-light);
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.form-input:hover {
  border-color: var(--bg-elevated);
}

.form-input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--error);
}

.address-group {
  margin: 0 0 var(--space-lg);
  padding: 0;
  border: 0;
}

.address-group .form-row {
  margin-bottom: var(--space-lg);
}

.address-group .form-row:last-child {
  margin-bottom: 0;
}

/* --- Message --- */
.form-message {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.form-message.success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.form-row--policy {
  margin-top: var(--space-lg);
  margin-bottom: 0;
}

.policy-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.policy-checkbox {
  flex-shrink: 0;
  margin-top: 0.2rem;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
}

.policy-text {
  flex: 1;
  min-width: 0;
}

.policy-link {
  color: var(--accent-light);
  text-decoration: underline;
}

.policy-link:hover {
  color: var(--accent);
}

.form-row--optin {
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) 0;
}

.optin-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.4;
  min-height: 2.5rem;
  padding: 0.25rem 0;
}

.optin-checkbox {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.optin-text {
  flex: 1;
  min-width: 0;
}

.form-row--altcha {
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) 0;
}

/* --- Button --- */
.btn {
  display: inline-block;
  width: 100%;
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform 0.1s ease;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

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

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* --- Success state & share buttons --- */
.success {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.success-title {
  margin: 0 0 var(--space-sm);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.success-text {
  margin: 0 0 var(--space-lg);
  color: var(--text-muted);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity var(--transition), transform 0.1s ease;
}

.share-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

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

.share-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.share-btn--x {
  background: #000;
  color: #fff;
}

.share-btn--x:hover {
  background: #1a1a1a;
}

.share-btn--facebook {
  background: #1877f2;
  color: #fff;
}

.share-btn--facebook:hover {
  background: #166fe5;
}

.share-btn--email {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.share-btn--email:hover {
  background: var(--border);
}

/* --- Footer --- */
.site-footer {
  margin-top: var(--space-2xl);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
}

.footer-text {
  margin: 0;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-muted);
}

.footer-links {
  margin: var(--space-sm) 0 0;
  font-size: 0.8125rem;
}

.footer-link {
  color: var(--accent-light);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-copyright {
  margin: var(--space-sm) 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --- Responsive: stack address on small screens --- */
@media (max-width: 520px) {
  .form-row--split .form-group,
  .form-row--address .form-group {
    flex: 1 1 100%;
  }

  .petition-form {
    padding: var(--space-lg);
  }
}
