/* AfroSoc Omaha — shared styles
   Palette drawn from the caucus flyer: black ground, pan-African tricolor. */

:root {
  --ink: #100d0a;
  --ink-2: #1a1611;
  --bone: #f2ead8;
  --bone-dim: #c9c0ac;
  --green: #1e7a3c;
  --gold: #e8b92e;
  --red: #c0271d;
  --rule: #2c261e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  overflow-x: hidden;
  background: var(--ink);
  color: var(--bone);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Masthead (echoes the flyer header) ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
}

.masthead .org {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--bone);
  text-decoration: none;
}

.masthead .tag {
  font-size: 0.85rem;
  color: var(--bone-dim);
  letter-spacing: 0.02em;
}

/* Masthead utility buttons — outbound links, deliberately quieter than
   the page's own signup CTA. Colour lives on the border only: bone text
   on ink stays legible in every state, where tricolor-on-ink text would
   not (green on ink is 3.6:1). */
.masthead-links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn {
  --btn-color: var(--gold);
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--btn-color);
  color: var(--bone);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background-color 120ms ease;
}
.btn:hover { background: rgba(242, 234, 216, 0.09); }

.btn--national { --btn-color: var(--green); }
.btn--dsa { --btn-color: var(--gold); }

/* Tricolor rule — the flyer band, compressed to a line */
.tricolor {
  height: 6px;
  background: linear-gradient(90deg,
    var(--green) 0 33.4%,
    var(--gold) 33.4% 66.7%,
    var(--red) 66.7% 100%);
}

/* ---------- Diagonal painted band (signature) ---------- */

.band-wrap { position: relative; overflow: hidden; }

.band {
  position: absolute;
  inset: -20% -30%;
  background: linear-gradient(115deg,
    transparent 0 8%,
    var(--green) 8% 22%,
    var(--gold) 22% 36%,
    var(--red) 36% 50%,
    transparent 50%);
  opacity: 0.14;
  pointer-events: none;
}

/* ---------- Type ---------- */

.display {
  font-family: "Anton", "Archivo Black", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero { padding: 5rem 0 3.5rem; position: relative; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.2rem); color: var(--bone); }
/* /omaha headline: scales so the longer line reaches the full content
   width, reading across both columns of the body rather than sitting
   inside the first one. The divisor is measured, not guessed — in Anton
   "starts with you." renders 6.76x the font size, so 6.9 leaves slack for
   scrollbar width. Ceiling 8.55rem is where the 62rem wrap tops out. */
.hero h1.h1-poster {
  font-size: clamp(2.6rem, calc((100vw - 3rem) / 6.9), 8.55rem);
}

.hero p.lede {
  max-width: 34rem;
  margin-top: 1.4rem;
  font-size: 1.15rem;
  color: var(--bone-dim);
}

section { padding: 3rem 0; border-top: 1px solid var(--rule); }
section h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 1.2rem; color: var(--bone); }

/* ---------- Two doors (root page) ---------- */

.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 0 0 4.5rem;
}
@media (max-width: 44rem) { .doors { grid-template-columns: 1fr; } }

.door {
  display: block;
  text-decoration: none;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--door-color, var(--gold));
  padding: 2rem 1.75rem 2.25rem;
  color: var(--bone);
  transition: transform 120ms ease, border-color 120ms ease;
}
.door:hover { transform: translateY(-3px); border-color: var(--door-color); }

.door .display { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 0.6rem; }
.door p { color: var(--bone-dim); font-size: 0.98rem; max-width: 26rem; }
.door .go {
  display: inline-block;
  margin-top: 1.3rem;
  color: var(--door-color);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.door--national { --door-color: var(--green); }
.door--omaha { --door-color: var(--red); }

/* ---------- Two-column body (/omaha) ----------
   Mirrors the form's own page on Action Network: explainer in a wide left
   column, the signup card narrow on the right. Below the breakpoint it all
   collapses to one column in source order — signup first. */

.columns > * { min-width: 0; }
.col-info p + p { margin-top: 1rem; }

@media (min-width: 62rem) {
  .columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 25rem;
    column-gap: 3.5rem;
    align-items: start;
    border-top: 1px solid var(--rule);
    padding-top: 3rem;
  }

  /* Placement, not source order — see the comment in omaha/index.html. */
  .col-info { grid-column: 1; grid-row: 1; }
  .col-form { grid-column: 2; grid-row: 1; }

  /* The single rule above the grid replaces the per-section rules. */
  .columns section { border-top: none; padding-top: 0; }
  .col-info section + section {
    border-top: 1px solid var(--rule);
    padding-top: 3rem;
  }
}

/* ---------- Principles ---------- */

.principles { list-style: none; display: grid; gap: 1.1rem; max-width: 40rem; }
.principles li { padding-left: 1.4rem; position: relative; }
.principles li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.55rem; height: 0.55rem;
  background: var(--gold);
}
.principles strong { color: var(--bone); }
.principles span { color: var(--bone-dim); }

/* ---------- Action Network embed ---------- */

.an-embed {
  max-width: 100%;
  background: var(--ink-2);
  color: var(--bone);
  color-scheme: dark;      /* dark native radios, checkboxes, scrollbars */
  padding: 1.5rem;
  border-top: 6px solid var(--red);
  margin-bottom: 1.5rem;
}
.an-embed a { color: var(--gold); }

/* --- Dark treatment for the Action Network embed ---------------------
   AN ships a light theme and defends it with ID-scoped !important rules,
   so every override below is deliberately over-specific. The escalation
   is not stylistic: .an-embed alone loses, .an-embed #can_embed_form
   loses on inputs, and only the #new_answer chain wins on backgrounds.
   Each level here was measured against the deployed page.

   Contrast after the repaint (against --ink-2): headings 15.0:1,
   question labels 10.0:1, field text 16.2:1, links 9.8:1, submit 4.9:1.
   The .iti__flag country sprite is left alone on purpose — it's a flag. */

.an-embed #can_embed_form,
.an-embed #can_embed_form #can_embed_form_inner,
.an-embed #can_embed_form #logo_wrap,
.an-embed #can_embed_form #action_info,
.an-embed #can_embed_form .action_owner {
  background: transparent !important;
  border-color: var(--rule) !important;
}

.an-embed #can_embed_form h1, .an-embed #can_embed_form h2,
.an-embed #can_embed_form h3, .an-embed #can_embed_form h4,
.an-embed #can_embed_form h5, .an-embed #can_embed_form p,
.an-embed #can_embed_form li, .an-embed #can_embed_form span,
.an-embed #can_embed_form strong, .an-embed #can_embed_form div {
  color: var(--bone) !important;
}

.an-embed #can_embed_form label { color: var(--bone-dim) !important; }

/* The answer text beside each radio and checkbox — "Yes", "Black / African"
   and the rest. AN gives these .radio / .checkbox and styles them apart
   from other labels, so the generic label rule above never reaches them.
   Left alone they compute to 1.08:1: not dim, invisible. */
.an-embed #can_embed_form #can_embed_form_inner #new_answer label.radio,
.an-embed #can_embed_form #can_embed_form_inner #new_answer label.checkbox,
.an-embed #can_embed_form #can_embed_form_inner #new_answer .check_radio_field label {
  color: var(--bone) !important;
}

.an-embed #can_embed_form #can_embed_form_inner #new_answer label.control-label,
.an-embed #can_embed_form #can_embed_form_inner #new_answer label.check_radio_label {
  color: var(--bone-dim) !important;
}

/* Containers whose own text nodes AN colours directly. <ul> matters most:
   the "Opt in to email updates" line lives as text inside one, so without
   this it stays near-black on the dark panel. */
.an-embed #can_embed_form ul, .an-embed #can_embed_form ol,
.an-embed #can_embed_form form, .an-embed #can_embed_form fieldset,
.an-embed #can_embed_form legend, .an-embed #can_embed_form small,
.an-embed #can_embed_form em, .an-embed #can_embed_form b,
.an-embed #can_embed_form i, .an-embed #can_embed_form td,
.an-embed #can_embed_form th {
  color: var(--bone) !important;
}

/* Dropdown choices — the country list and any select-based question. */
.an-embed #can_embed_form #can_embed_form_inner option {
  color: var(--bone) !important;
  background-color: var(--ink) !important;
}

/* Float labels (the small caption that rises above a filled field). AN
   defends these harder than the rest: the wrapper plus both state classes
   are needed to win. Losing here leaves them at #666 — 3.1:1. */
.an-embed #can_embed_form #can_embed_form_inner #new_answer .floatlabel-wrapper label.floatlabel-label,
.an-embed #can_embed_form #can_embed_form_inner #new_answer .floatlabel-wrapper label.floatlabel-label-inactive,
.an-embed #can_embed_form #can_embed_form_inner #new_answer .floatlabel-wrapper label.floatlabel-label-active {
  color: var(--bone-dim) !important;
}

.an-embed #can_embed_form #can_embed_form_inner #action_info,
.an-embed #can_embed_form #can_embed_form_inner .action_info_user,
.an-embed #can_embed_form #can_embed_form_inner .action_owner {
  color: var(--bone-dim) !important;
}

/* Backgrounds only yield to the full #new_answer chain. */
.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="text"],
.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="email"],
.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="tel"],
.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="number"],
.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="date"],
.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="url"],
.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="search"],
.an-embed #can_embed_form #can_embed_form_inner #new_answer textarea,
.an-embed #can_embed_form #can_embed_form_inner #new_answer select {
  background-color: var(--ink) !important;
  color: var(--bone) !important;
  border: 1px solid #4a4238 !important;
}

.an-embed #can_embed_form #can_embed_form_inner #new_answer input[type="submit"] {
  background-color: var(--red) !important;
  color: var(--bone) !important;
  border: none !important;
}

.an-embed #can_embed_form ::placeholder {
  color: var(--bone-dim) !important;
  opacity: 1;
}

.an-embed #can_embed_form #can_embed_form_inner #new_answer a,
.an-embed #can_embed_form #can_embed_form_inner #action_info a,
.an-embed #can_embed_form #can_embed_form_inner #logo_wrap a {
  color: var(--gold) !important;
}

.an-embed #can_embed_form input[type="radio"],
.an-embed #can_embed_form input[type="checkbox"] { accent-color: var(--gold); }

.an-embed #can_embed_form #d_sharing { border-color: var(--rule) !important; }

/* The AN wordmark is inline SVG, so it recolours rather than sitting on a
   light chip. It is their mark — swap this for a light plate if national
   would rather it stayed in brand colour. */
.an-embed #can_embed_form #logo_wrap svg path,
.an-embed #can_embed_form #logo_wrap svg polygon {
  fill: var(--bone-dim) !important;
}

/* Action Network splits the form into two floated columns (#form_col1 =
   fields, #form_col2 = submit) whenever its widget adds .can_float. That
   puts "Add Your Name" top-right, above the questions it submits. Undo the
   float so the button lands after the fields.

   The .can_float in the selector is load-bearing: AN's own rule is
   qualified by it and flagged !important, so a less specific override
   silently loses the cascade. Verified on the deployed page. */
.an-embed #can_embed_form.can_float #form_col1,
.an-embed #can_embed_form.can_float #form_col2 {
  float: none !important;
  width: 100% !important;
}

.privacy {
  font-size: 0.85rem;
  color: var(--bone-dim);
  max-width: 40rem;
  border-left: 3px solid var(--green);
  padding-left: 0.9rem;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: var(--bone-dim);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; padding: 0; }

