/*
  Rising Recruits
  ----------------
  Navy is the brand background: #001232 (the same navy behind the logo).
  Gold was sampled from images/rr-logo-transparent.png.
  The most common gold pixel in that file is rgb(245, 168, 0) = #F5A800.

  Anton is for headlines. Oswald is for everything you read.
  Both load from Google Fonts in index.html.

  Mobile styles come first. Wider layouts sit in the min-width blocks.
*/

:root {
  --navy: #001232;
  --navy-deep: #000c24;
  --panel: #041433;
  --gold: #f5a800;
  --gold-hot: #ffc233;
  --white: #ffffff;
  --danger: #ffb4b4;
  --line: rgba(245, 168, 0, 0.4);
  --font-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --font-body: "Oswald", "Arial Narrow", sans-serif;
}

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

/* Author display rules must not bring back elements marked hidden. */
[hidden] {
  display: none !important;
}

html {
  height: 100%;
  overflow: hidden;
  background: var(--navy);
  scroll-behavior: smooth;
}

/*
  The preview frame does not scroll the browser window.
  Lock the window, and let the page itself move inside the frame.
*/
body {
  height: 100%;
  margin: 0;
  overflow-x: clip;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.45;
  color-scheme: dark;
  scrollbar-color: var(--gold) var(--navy);
  scrollbar-width: auto;
}

body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-track {
  background: var(--navy);
}

body::-webkit-scrollbar-thumb {
  background: var(--gold);
}

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

::selection {
  background: var(--gold);
  color: var(--navy);
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

h1,
h2,
.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.9;
}

h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(3.4rem, 16vw, 7.4rem);
  text-wrap: balance;
}

h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 6px;
  margin-top: 1rem;
  background: var(--gold);
}

h2 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
}

h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

p {
  margin: 0;
}

a {
  color: var(--gold);
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  max-width: 40rem;
  margin: 1rem 0 0;
  font-size: 1.25rem;
  line-height: 1.4;
}

.motto {
  display: block;
  margin-top: 0.35rem;
}

/* Buttons. Gold with navy type clears contrast, and the hit area stays big. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 56px;
  padding: 0.85rem 1.35rem;
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.btn:hover {
  background: var(--gold-hot);
  border-color: var(--gold-hot);
  color: var(--navy);
}

.btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: rgba(0, 18, 50, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--white);
  text-decoration: none;
}

.brand img {
  width: 46px;
  height: 46px;
}

.wordmark {
  display: none;
  font-size: 1.35rem;
  line-height: 1;
}

.header-cta {
  width: auto;
  min-height: 48px;
  padding: 0 0.95rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  padding: 2.25rem 0 3.25rem;
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(245, 168, 0, 0.16), transparent 70%),
    var(--navy);
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero-logo {
  order: -1;
  width: 148px;
  height: auto;
}

.hero .btn {
  margin-top: 1.5rem;
  width: 100%;
}

/* How it works */
.how {
  padding: 3.25rem 0;
  background: var(--navy-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  margin: 1.5rem 0 0;
  padding: 0;
}

.steps li {
  padding: 1.2rem 1.1rem 1.35rem;
  background: var(--panel);
  border-top: 4px solid var(--gold);
}

.num {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
}

.steps p {
  color: var(--white);
  font-size: 1.05rem;
}

/* Form */
.spotlight {
  padding: 3.25rem 0;
  scroll-margin-top: 5.25rem;
}

.panel {
  margin-top: 1.5rem;
  padding: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

.required-note {
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fields {
  display: grid;
  gap: 1.05rem;
}

.field {
  min-width: 0;
}

.split {
  display: grid;
  gap: 1.05rem;
  min-width: 0;
}

.split.tight {
  grid-template-columns: 1fr 1fr;
}

label,
legend {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.req {
  color: var(--gold);
}

.optional {
  margin-left: 0.35rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  letter-spacing: 0.06em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.85rem;
  border: 2px solid transparent;
  border-radius: 0;
  background: var(--white);
  color: var(--navy);
  color-scheme: light;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 500;
}

input::placeholder {
  color: #5c6578;
}

select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' stroke='%23001232' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
}

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

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  outline: 3px solid #ff5c5c;
  outline-offset: 1px;
}

.error {
  margin-top: 0.35rem;
  color: var(--danger);
  font-size: 0.98rem;
}

.choice-set {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choices {
  display: grid;
  gap: 0.6rem;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--line);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.choice:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
}

.check {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border: 2px solid var(--line);
  cursor: pointer;
}

.check span {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.check input {
  width: 1.4rem;
  height: 1.4rem;
  min-height: 1.4rem;
  margin-top: 0.15rem;
  flex: none;
  accent-color: var(--gold);
}

.check:has(input[aria-invalid="true"]) {
  border-color: #ff8d8d;
}

.form-status {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 2px solid #ff8d8d;
  color: var(--white);
  background: rgba(255, 80, 80, 0.12);
}

.btn-submit {
  width: 100%;
  min-height: 60px;
  font-size: 1.25rem;
}

.success {
  padding: 0.4rem 0.1rem 0.2rem;
}

.success p {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  line-height: 1.25;
}

.success a {
  color: var(--gold);
}

/* Guide. Hidden until SHOW_GUIDE is true. Styled so it is ready when you flip it. */
.guide {
  padding: 3.25rem 0;
  background: var(--navy-deep);
  border-top: 1px solid var(--line);
}

.placeholder-flag {
  display: inline-block;
  margin: 0.2rem 0 0.9rem;
  padding: 0.2rem 0.5rem;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.guide-list li + li {
  margin-top: 0.4rem;
}

/* Follow */
.follow {
  padding: 3.5rem 0 4rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(245, 168, 0, 0.1), transparent 42%),
    var(--navy-deep);
  border-top: 1px solid var(--line);
}

.follow .lede {
  margin-inline: auto;
}

.btn-follow {
  width: min(100%, 28rem);
  min-height: 64px;
  margin: 1.5rem auto 0;
  font-size: 1.25rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2.75rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.contact {
  max-width: 36rem;
  margin: 0 auto 2.25rem;
  text-align: left;
}

.contact h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  text-align: center;
}

.contact-intro {
  margin: 0 0 1.25rem;
  text-align: center;
}

.contact textarea {
  min-height: 140px;
  resize: vertical;
}

.contact .btn-submit {
  width: 100%;
}

.site-footer p + p {
  margin-top: 0.45rem;
}

.site-footer a {
  color: var(--gold);
}

.disclaimer {
  max-width: 36rem;
  margin-inline: auto;
}

/* Spam field. Off-screen on purpose. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 480px) {
  .wordmark {
    display: inline;
  }
}

@media (min-width: 640px) {
  .hero .btn,
  .spotlight .btn-submit {
    width: auto;
  }

  .btn-submit {
    min-width: 16rem;
  }

  .split {
    grid-template-columns: 1fr 1fr;
  }

  .choices {
    grid-template-columns: repeat(3, 1fr);
  }

  .panel {
    padding: 1.75rem;
  }
}

@media (min-width: 800px) {
  .hero {
    padding: 4rem 0 5rem;
  }

  .hero-grid {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 2rem;
  }

  .hero-logo {
    order: 0;
    width: min(340px, 100%);
    justify-self: end;
  }

  .how,
  .spotlight,
  .guide {
    padding: 5rem 0;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }

  .steps li {
    min-height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:active {
    transform: none;
  }
}
