/* ===========================================================================
   BRAND TOKENS — the only block you need to edit to match reachstream.com/brand
   Replace the hex values and font names with the ones from the brand kit.
   Everything else in this file reads from these variables.
   =========================================================================== */
:root {
  /* Sampled directly from the ReachStream logo (logo + favicon mark). */
  --brand:        #077A84;   /* buttons, links, focus — darkened from the logo's #08C0CB
                                 to clear 4.5:1 contrast on white (raw logo teal is 2.2:1) */
  --brand-deep:   #093D54;   /* the logo's navy — hover / pressed, and the "each" text color */
  --brand-tint:   #E6F6F7;   /* pale wash behind the hero, derived from the brand teal */
  --accent:       #08C0CB;   /* the logo's actual bright cyan — decorative use only
                                 (large hero accents, the wordmark image), never for text */

  --ink:          #093D54;   /* headings — the logo's navy */
  --body:         #3B5768;   /* body copy — navy, lightened for paragraph text */
  --muted:        #72889A;   /* hints, counts */

  --surface:      #FFFFFF;
  --canvas:       #F3F8F9;
  --line:         #DCE8EB;

  --danger:       #B3261E;
  --success:      #0F6B4F;

  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius:       10px;
  --radius-lg:    16px;
  --shell:        1120px;

  color-scheme: light;
}

/* =========================================================================== */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-deep); }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.shell { width: min(100% - 2.5rem, var(--shell)); 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;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: .75rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .7rem 1.4rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-solid { background: var(--brand); color: #fff; }
.btn-solid:hover { background: var(--brand-deep); color: #fff; }
.btn-solid:disabled { background: var(--muted); cursor: not-allowed; }
.btn-quiet { color: var(--ink); border-color: var(--line); background: var(--surface); }
.btn-quiet:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; padding-block: .9rem; font-size: 1rem; }

/* ---------- Masthead ----------------------------------------------------- */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.masthead-inner {
  display: flex; align-items: center; gap: 2rem;
  min-height: 72px;
}

.wordmark {
  display: inline-flex; align-items: center; gap: .65rem;
  text-decoration: none; white-space: nowrap;
}
.wordmark-logo { height: 26px; width: auto; display: block; }
.wordmark-sub {
  font-family: var(--font-display); font-weight: 500; font-size: .95rem; color: var(--muted);
  border-left: 1px solid var(--line); padding-left: .65rem;
}
/* The footer background is the same navy as half the logo mark, so the image
   would partly disappear there. The footer uses a plain-text wordmark instead. */
.wordmark-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: #fff; letter-spacing: -.01em;
}
.wordmark-text span { color: var(--accent); }

.nav { display: flex; gap: 1.75rem; margin-right: auto; }
.nav a {
  font-size: .95rem; font-weight: 500; color: var(--body); text-decoration: none;
  padding-block: .25rem; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--brand); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-bars, .nav-bars::before, .nav-bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); content: '';
}
.nav-bars::before { transform: translateY(-7px); }
.nav-bars::after  { transform: translateY(5px); }

.nav-drawer { display: none; flex-direction: column; border-top: 1px solid var(--line); }
.nav-drawer a {
  padding: .9rem 1.25rem; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 500;
}

/* ---------- Hero --------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--brand-tint), var(--surface));
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); letter-spacing: -.02em; }
.hero-sub {
  max-width: 56ch; margin: 1rem auto 0; color: var(--body); font-size: 1.05rem;
}

.search {
  display: flex; gap: .5rem; max-width: 640px; margin: 2rem auto 0;
  background: var(--surface); padding: .4rem; border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px -18px rgba(14, 27, 46, .45);
}
.search input {
  flex: 1; border: 0; background: none; padding: .75rem .9rem;
  font: inherit; color: var(--ink); min-width: 0;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--brand); }

.hero-aside { margin-top: 1.25rem; font-size: .92rem; color: var(--muted); }
.hero-aside a { margin-inline: .15rem; }

/* ---------- Categories --------------------------------------------------- */

.categories { padding: 4rem 0; }
.categories h2 { font-size: 1.5rem; margin-bottom: 1.75rem; }

.cat-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cat-grid a {
  display: block; height: 100%; padding: 1.5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); text-decoration: none;
  transition: border-color .15s ease;
}
.cat-grid a:hover { border-color: var(--brand); }
.cat-grid h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.cat-grid p { margin: 0; font-size: .93rem; color: var(--body); }
.cat-count { display: block; margin-top: .9rem; font-size: .82rem; color: var(--muted); }

/* ---------- Submit a ticket ---------------------------------------------- */

.submit { background: var(--canvas); border-top: 1px solid var(--line); padding: 4rem 0 5rem; }
.submit-shell {
  display: grid; gap: 3rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
}
.submit-intro { position: sticky; top: 104px; }
.submit-intro h2 { font-size: 1.75rem; letter-spacing: -.01em; }
.submit-intro > p { margin: .9rem 0 0; max-width: 46ch; }

.facts { margin: 2rem 0 0; display: grid; gap: 1.1rem; }
.facts div { border-left: 2px solid var(--brand); padding-left: .9rem; }
.facts dt { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: .9rem; }
.facts dd { margin: .15rem 0 0; font-size: .92rem; color: var(--body); }

.ticket-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: 0 24px 50px -40px rgba(14, 27, 46, .55);
}

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

.field { margin-bottom: 1.35rem; }
.field-row { display: grid; gap: 1.35rem; grid-template-columns: 1fr 1fr; }

.field label {
  display: block; margin-bottom: .4rem;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--ink);
}
.req { color: var(--danger); }

.field input[type="email"],
.field input[type="text"],
.field select,
.field textarea {
  width: 100%; padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color .15s ease;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.field select { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--muted) 50%),
  linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 2.5rem; cursor: pointer;
}
.field :is(input, select, textarea):hover { border-color: var(--muted); }
.field :is(input, select, textarea):focus { border-color: var(--brand); outline-offset: 1px; }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); }

.field input[type="file"] {
  width: 100%; font: inherit; font-size: .9rem; color: var(--body);
  padding: .65rem; border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--canvas);
}
.field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: .8rem;
  padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}

.hint {
  margin: .4rem 0 0; font-size: .84rem; color: var(--muted);
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
.counter { white-space: nowrap; font-variant-numeric: tabular-nums; }

.error { margin: .4rem 0 0; font-size: .85rem; color: var(--danger); font-weight: 500; }

.form-note { margin: .9rem 0 0; font-size: .84rem; color: var(--muted); text-align: center; }

.result { margin-top: 1.25rem; padding: 1rem 1.15rem; border-radius: var(--radius); font-size: .93rem; }
.result h3 { font-size: 1rem; margin-bottom: .3rem; }
.result p { margin: 0; }
.result.is-success { background: #E7F4EF; border: 1px solid #B7DFCE; color: var(--success); }
.result.is-success h3 { color: var(--success); }
.result.is-error { background: #FBEBEA; border: 1px solid #F0C4C1; color: var(--danger); }
.result.is-error h3 { color: var(--danger); }
.result code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(14, 27, 46, .07); padding: .1rem .35rem; border-radius: 4px;
}

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

.footer { background: var(--ink); color: #AFBACB; padding: 3.5rem 0 1.5rem; }
.footer-inner {
  display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  padding-bottom: 2.5rem;
}
.footer-brand p { margin: .9rem 0 0; font-size: .9rem; max-width: 34ch; }
.footer-cols { display: grid; gap: 2rem; grid-template-columns: repeat(4, 1fr); }
.footer-cols h3 { color: #fff; font-size: .9rem; margin-bottom: .85rem; }
.footer-cols a { display: block; color: #AFBACB; text-decoration: none; font-size: .9rem; padding-block: .3rem; }
.footer-cols a:hover { color: #fff; }

.footer-base {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.5rem;
  font-size: .84rem;
}
.footer-base p { margin: 0; }

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 960px) {
  .submit-shell { grid-template-columns: 1fr; gap: 2rem; }
  .submit-intro { position: static; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav, .masthead .btn-quiet { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-drawer[data-open="true"] { display: flex; }
  .hero { padding: 3rem 0 2.5rem; }
  .search { flex-direction: column; }
  .search .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .ticket-form { padding: 1.5rem 1.25rem; }
  .categories { padding: 3rem 0; }
}
