/* Downbeat — Launch 1. Values come from design/README.md. */

:root {
  --paper: #101720;
  --card: #161F29;
  --ink: #F2F4F3;
  --soft: #96A3AF;
  --line: rgba(242, 244, 243, 0.16);
  --grn-deep: #006802;
  --grn: #2FA233;
  --grn-ink: #003801;
  --mag: #FD00DA;
  --pur: #C48AE8;
  --pur-deep: #480062;

  --gutter: clamp(18px, 4vw, 32px);
  --display: "Archivo Black", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Work Sans", system-ui, sans-serif;
}

img { display: block; max-width: 100%; }

a { color: var(--mag); text-decoration: none; }
a:hover { color: var(--grn); }

::selection { background: var(--mag); color: #fff; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.mag { color: var(--mag); }

/* ---------- Buttons & labels ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-primary,
.btn-primary:hover {
  background: var(--grn-deep);
  color: #fff;
  border: none;
  padding: 14px 26px;
}

.btn-secondary {
  border: 1.5px solid var(--line);
  color: var(--ink);
  padding: 12.5px 26px;
}
.btn-secondary:hover { border-color: var(--mag); color: var(--mag); }

.eyebrow {
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-row {
  padding-block: 14px;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
}

.header-logo { flex-shrink: 0; }
.header-logo img { height: 80px; width: auto; }

.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 28px);
}

.header-nav a:not(.btn) {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
}
.header-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--mag);
}
.header-nav .btn { margin-left: 8px; }

.menu-button {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
}

.mobile-menu {
  border-top: 1px solid var(--line);
  padding: 8px var(--gutter) 18px;
  display: flex;
  flex-direction: column;
}
.mobile-menu[hidden] { display: none; }

.mobile-menu a:not(.btn) {
  font-size: 16px;
  font-weight: 500;
  min-height: 48px;
  padding: 15px 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
}
.mobile-menu a[aria-current="page"] { color: var(--ink); }
.mobile-menu .btn {
  align-self: flex-start;
  margin-top: 18px;
  min-height: 48px;
}

.progress { border-top: 1px solid var(--line); }
.progress summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 14px;
  row-gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px var(--gutter);
  min-height: 44px;
  cursor: pointer;
}
.progress summary::-webkit-details-marker { display: none; }

.progress-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
}
.progress-bars { display: flex; gap: 4px; }
.progress-bars span {
  display: block;
  width: 18px;
  height: 5px;
  border-radius: 2px;
  background: var(--line);
}
.progress-bars .is-done { background: var(--grn); }
.progress-bars .is-now { background: var(--mag); }
.progress-current { font-size: 14px; font-weight: 600; }
.progress-toggle {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--mag);
}
.progress .when-open,
.progress[open] .when-closed { display: none; }
.progress[open] .when-open { display: inline; }

.progress-panel {
  border-top: 1px solid var(--line);
  background: var(--card);
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
.progress-steps {
  list-style: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px var(--gutter) 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px 28px;
}
.step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-content: start;
  gap: 4px 14px;
  padding: 14px 0;
  border-top: 3px solid var(--line);
}
.step-num {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 14px;
  color: var(--soft);
  border: 1.5px solid var(--line);
}
.step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.step-name {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--soft);
}
.step-status {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}
.step-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--soft);
  text-wrap: pretty;
}

.step.is-done { border-top-color: var(--grn); }
.step.is-done .step-num { background: var(--grn); border-color: var(--grn); color: var(--paper); }
.step.is-done .step-name { color: var(--ink); }
.step.is-done .step-status { color: var(--grn); }

.step.is-now { border-top-color: var(--mag); }
.step.is-now .step-num { border-color: var(--mag); color: var(--mag); }
.step.is-now .step-name { color: var(--ink); }
.step.is-now .step-status { color: var(--mag); }

@media (max-width: 939.98px) {
  .header-nav { display: none; }
  .menu-button { display: flex; }
}
@media (min-width: 940px) {
  .mobile-menu { display: none !important; }
}

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

.site-footer {
  margin-top: clamp(64px, 10vw, 110px);
  border-top: 1px solid var(--line);
  background: var(--card);
}

.footer-row {
  padding-block: clamp(40px, 6vw, 56px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}
.footer-row img { height: 48px; width: auto; }
.footer-row p {
  font-size: 14px;
  color: var(--soft);
  margin: 12px 0 0;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  margin: -10px 0;
}
.footer-nav a {
  font-size: 14px;
  line-height: 1.45;
  white-space: nowrap;
  color: var(--soft);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--mag); }

.footer-row .footer-note { margin: 0; max-width: 22em; }
.footer-row .footer-location { margin-top: 4px; }

.footer-signup { flex: 0 1 320px; min-width: 0; }
.footer-row .footer-signup-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer-row .footer-signup-body {
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ---------- Home ---------- */

.hero {
  padding-block: clamp(56px, 8vw, 110px) clamp(56px, 7vw, 90px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-text { flex: 1 1 340px; min-width: 0; }

.badge {
  display: inline-block;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mag);
  border: 1px solid var(--mag);
  border-radius: 3px;
  padding: 7px 12px;
  margin: 0;
}

.badge-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 28px;
}

.location {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

.hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 10vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0;
}

.hero-lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.55;
  color: var(--soft);
  max-width: 30em;
  margin: 32px 0 0;
  text-wrap: pretty;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.hero-logo { flex: 1.35 1 340px; min-width: 0; width: 100%; }

.band {
  border-top: 1px solid var(--line);
  background: var(--card);
}
.services { padding-block: clamp(56px, 7vw, 80px); }

.section-label {
  font-family: var(--display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 44px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 28px;
}

.service-card,
.service-card:hover {
  display: block;
  padding: 34px 30px 30px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  color: var(--ink);
}
.service-card:hover { background: var(--paper); }

.service-card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.service-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--soft);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.service-cta {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.quote-band { border-top: 1px solid var(--line); }
.quote {
  max-width: 900px;
  padding-block: clamp(64px, 9vw, 96px);
  text-align: center;
}
.quote p {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.45;
  margin: 0;
  text-wrap: pretty;
}

.underline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 2px solid var(--mag);
  padding-bottom: 2px;
}

.signup-band { border-top: 1px solid var(--line); }
.signup {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 96px) var(--gutter);
}
.signup-note {
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.55;
  max-width: 32em;
  margin: 0 0 14px;
  text-wrap: pretty;
}
.signup-sig {
  font-size: 14px;
  color: var(--soft);
  letter-spacing: 0.02em;
  margin: 0 0 36px;
}

/* Home: inline row */
.signup-form--home {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  max-width: 680px;
}
.signup-form--home .field:nth-of-type(1) { flex: 1 1 160px; min-width: 0; }
.signup-form--home .field:nth-of-type(2) { flex: 1.4 1 220px; min-width: 0; }
.signup-form--home input { min-height: 48px; width: 100%; }
.signup-form--home input::placeholder { color: transparent; }
.signup-form--home .btn { min-height: 48px; cursor: pointer; }

/* Footer: stacked, labels visually hidden */
.signup-form--footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.signup-form--footer .field > span {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.signup-form--footer input {
  background: var(--paper);
  padding: 12px 14px;
  min-height: 46px;
  width: 100%;
}
.signup-form--footer input:-webkit-autofill { box-shadow: 0 0 0 1000px var(--paper) inset; }
.signup-form--footer input:autofill { box-shadow: 0 0 0 1000px var(--paper) inset; }
.signup-form--footer .btn {
  align-self: flex-start;
  padding: 12px 22px;
  min-height: 46px;
  cursor: pointer;
}

.signup-success { font-size: 18px; margin: 0; }
.signup-error { margin: 14px 0 0; }
/* Beat the generic `.footer-row p` rule, which would turn these grey. */
.footer-row .signup-success { font-size: 16px; margin: 0; color: var(--grn); }
.footer-row .signup-error { font-size: 14px; margin-top: 12px; color: var(--mag); }

/* ---------- Our Story ---------- */

.story {
  max-width: 964px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) var(--gutter) 40px;
}

.story-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 0 52px;
}

.story-photo {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 34%;
  border-radius: 8px;
  margin: 0 0 20px;
}

.story-caption,
.story-sidebar p {
  font-size: 14px;
  color: var(--soft);
  letter-spacing: 0.02em;
}
.story-caption { margin: 0 0 72px; }

.story-row {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  column-gap: clamp(24px, 4vw, 48px);
  row-gap: 32px;
  padding-bottom: 16px;
}

.story-sidebar { flex: 0 1 260px; min-width: 240px; }
.story-sidebar img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 6px;
}
.story-sidebar p { margin: 14px 0 0; }

@media (min-width: 845px) {
  /* Sit ~40px below the sticky header. --header-h tracks its live height (site.js),
     so the photo stays visible when the progress panel or menu is open. */
  .story-sidebar { position: sticky; top: calc(var(--header-h, 153px) + 41px); }
}

.story-text {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 34em;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.72;
}
.story-text p { margin: 0 0 1.5em; }
.story-text p:nth-last-child(2) { margin-bottom: 1em; }

.story-text .story-signoff {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--mag);
  margin: 0;
}

/* ---------- Contact ---------- */

.contact {
  padding-block: clamp(48px, 7vw, 80px) 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(36px, 5vw, 72px);
}

.contact-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
}

.contact-lede {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--soft);
  margin: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Label spacing uses a margin, not `gap`: password managers (LastPass etc.) inject
   zero-height elements next to inputs, and `gap` would add space around them and
   knock the field out of line with its neighbours. */
.field {
  display: flex;
  flex-direction: column;
}
.field > span {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
}
.field textarea { resize: vertical; }

/* Keep browser autofill from painting fields light blue. Separate rules so a browser
   that doesn't know one pseudo-class still applies the other. */
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--card) inset;
}
.field input:autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--card) inset;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.form-actions .btn { padding: 15px 30px; cursor: pointer; }
.form-actions .btn:disabled { cursor: default; }

.form-status {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.form-success { color: var(--grn); }
.form-error { color: var(--mag); }

[hidden] { display: none !important; }
