/* ==========================================================================
   EWARN — Emergency Warning and Response Network
   Shared stylesheet. Every page links this file so the whole site stays
   consistent — edit colors and layout here, not in individual pages.
   ========================================================================== */

:root {
  /* Color scheme drawn from the EWARN logo */
  --bg: #0a0a0c;            /* near-black storm sky */
  --bg-panel: #141418;      /* card background */
  --bg-panel-2: #1c1c22;    /* inset / input background */
  --border: #2e2e36;
  --text: #f2f2f4;
  --text-dim: #a9a9b3;
  --red: #d22b2b;           /* logo ring red */
  --red-bright: #ef3b3b;    /* hover / emphasis red */
  --yellow: #ffd400;        /* lightning-bolt yellow */
  --yellow-dim: #e6be00;
  --storm-gray: #5a6472;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--yellow); }
a:hover { color: var(--yellow-dim); }

/* Hazard stripe across the very top of every page */
.hazard-stripe {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0 16px,
    #111 16px 32px
  );
}

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */
header {
  background: radial-gradient(ellipse at 50% -20%, #26262e 0%, var(--bg) 70%);
  border-bottom: 2px solid var(--red);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}
.logo-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(210, 43, 43, 0.35);
}
.logo-text {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-top: 0.75rem;
}
.tagline {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  font-size: 1.15rem;
}
.since {
  color: var(--yellow);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}
.badge {
  background: var(--bg-panel-2);
  border: 1px solid var(--storm-gray);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

nav {
  background: var(--red);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 1rem;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
}
nav a:hover { background: rgba(0, 0, 0, 0.25); color: var(--yellow); }
nav a.active { background: rgba(0, 0, 0, 0.35); color: var(--yellow); }

/* --------------------------------------------------------------------------
   Main content
   -------------------------------------------------------------------------- */
main {
  width: 75%;
  max-width: 1400px;   /* keeps line length sane on ultrawide displays */
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}
/* 75% would leave far too little room on phones — go near full width there. */
@media (max-width: 768px) {
  main { width: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
}
section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 1.75rem;
  margin-top: 1.75rem;
}
h1 { font-size: 1.7rem; margin: 1.5rem 0 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
h2::before { content: "⚡ "; }
p + p { margin-top: 0.75rem; }
.dim { color: var(--text-dim); }

/* Numbered steps */
.steps { list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 0.9rem;
  margin-top: 1rem;
}
.steps li::before {
  content: counter(step);
  flex: 0 0 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.95rem;
  align-self: flex-start;
  margin-top: 0.2rem;
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--storm-gray);
  background: var(--bg-panel-2);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111;
}
.btn-primary:hover { background: var(--yellow-dim); border-color: var(--yellow-dim); color: #111; }

/* "Note:" aside — set off from body copy with the alarm red of the logo. */
.note {
  color: var(--text-dim);
  font-size: 0.95rem;
  border-left: 3px solid var(--red);
  padding-left: 0.85rem;
  margin-top: 0.9rem;
}
.note strong { color: var(--red-bright); }

/* App store badges.
   Google's badge ships with clear space baked in; it is cropped off here, so
   the gap below supplies the clear space both vendors' guidelines ask for. */
.store-lead { margin-top: 1.25rem; text-align: center; }
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 0.85rem;
}
.store-badges a {
  display: inline-flex;
  border-radius: 8px;
  transition: transform 0.15s;
}
.store-badges a:hover { transform: translateY(-2px); }
.store-badges a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.store-badges img { display: block; height: 48px; width: auto; }

/* Subscribe dropdown */
.get-app { margin-bottom: 1rem; font-size: 0.95rem; }

label[for="channel"] {
  display: block;
  font-weight: 700;
  margin-top: 1.5rem;      /* one blank line below the intro paragraph */
  margin-bottom: 0.5rem;
  text-align: center;
}
select {
  /* Half the page width, not half the column. Capped at 100% so it can never
     spill past the column on ultrawide screens, and floored at the width the
     longest channel name needs so it is never truncated. */
  width: min(50vw, 100%);
  min-width: min(100%, 34rem);
  display: block;
  margin-inline: auto;
  /* text-align-last centers only the value shown in the closed box. Using plain
     text-align: center here would be overridden by the option rule below, which
     keeps the dropdown list itself left-aligned. */
  text-align: start;
  text-align-last: center;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--storm-gray);
  background: var(--bg-panel-2);
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffd400' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}
select option { text-align: left; }
select:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
/* Half width crowds the channel names on a phone — use the full column there. */
@media (max-width: 768px) {
  select,
  #subscribe-result { width: 100%; }
}

#subscribe-result {
  /* Match the dropdown above it. */
  width: min(50vw, 100%);
  min-width: min(100%, 34rem);
  margin: 1.25rem auto 0;
  text-align: center;
  padding: 1.25rem;
  border-radius: 10px;
  border: 1px dashed var(--storm-gray);
  background: var(--bg-panel-2);
  display: none;
}
#subscribe-result.active { display: block; }
#subscribe-result h3 { margin-bottom: 0.35rem; font-size: 1.1rem; color: var(--yellow); }
#subscribe-result p { color: var(--text-dim); font-size: 0.95rem; }
#subscribe-link { margin-top: 0.9rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 2rem 1.5rem 3rem;
  border-top: 2px solid var(--red);
}
.disclaimer {
  color: var(--red-bright);
  font-weight: 600;
  margin-top: 0.6rem;
}
