/* The Builder's Code — stylesheet
   Tokens, fonts, reset, and the full page system. Includes JS-dependent
   rules for sticky-header (.is-stuck) and form-success behaviour. */

:root {
  --anchor-black:    #14120F;
  --tidewater-green: #1E2A26;
  --weathered-brass: #C0A06A;
  --bone:            #EDE7DA;
  --blueprint-line:  #6E8CA0;
  --brass-deep:      #8A6E42;
  --ash:             #6B665D;

  /* Non-mandated helpers derived from the palette above. --blueprint-dim is
     Blueprint Line dimmed for use as hairline borders (never as text, per
     brand rule). --muted is Bone blended down for secondary copy — chosen
     over --ash for body-sized text because Ash on both grounds falls under
     WCAG AA (3.28:1 / 2.60:1); --muted clears 4.5:1 on both. --error is a
     brand-adjacent rust used only for form validation text (Task 7 writes
     into it), verified at 6.12:1 / 4.86:1 on Anchor Black / Tidewater Green. */
  --blueprint-dim: rgba(110, 140, 160, 0.35);
  --muted: rgba(237, 231, 218, 0.62);
  --error: #D97A57;

  --fs-hero:    clamp(3rem, 8vw, 5.5rem);
  --fs-section: clamp(2rem, 5vw, 3.25rem);
  --fs-subhead: clamp(1.25rem, 2.5vw, 1.5rem);
  --fs-body:    clamp(1rem, 1.5vw, 1.125rem);
  --fs-eyebrow: 0.75rem;

  --measure: 68ch;
  --gutter:  clamp(1.25rem, 5vw, 4rem);
}

/* ---------------------------------------------------------------- fonts */

@font-face {
  font-family: 'Oswald';
  src: url('assets/fonts/oswald-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--anchor-black);
  color: var(--bone);
  font: 400 var(--fs-body)/1.65 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
ul, ol { padding: 0; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  font-family: Oswald, Impact, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  margin: 0;
}
.eyebrow {
  font: 600 var(--fs-eyebrow)/1.2 Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--weathered-brass);
  margin: 0;
}
/* Blueprint hairline under every eyebrow — the graphic layer is CSS, not
   images. (Adapted from a `.section > .eyebrow` selector to a plain one so
   it still fires when the eyebrow sits inside a width-constrained `.wrap`.) */
.eyebrow::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--blueprint-line);
  opacity: 0.5;
  margin-top: 0.75rem;
}
.hero .eyebrow::after { margin-inline: auto; max-width: 8rem; }

:focus-visible {
  outline: 2px solid var(--weathered-brass);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------- utility */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--weathered-brass);
  color: var(--anchor-black);
  padding: 0.85rem 1.5rem;
  font: 600 1rem/1 Inter, sans-serif;
  text-decoration: none;
}
.skip:focus {
  left: var(--gutter);
  top: var(--gutter);
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--prose { max-width: calc(var(--measure) + var(--gutter) * 2); }
.wrap--prose > * { max-width: var(--measure); margin-inline: auto; }
.wrap--narrow { max-width: calc(640px + var(--gutter) * 2); }
.wrap--narrow > * { max-width: 640px; margin-inline: auto; }

.hp { position: absolute; left: -9999px; }

/* --------------------------------------------------------------- button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.85rem;
  font: 600 1rem/1 Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn--primary {
  background: var(--weathered-brass);
  color: var(--anchor-black);
  border-color: var(--weathered-brass);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: var(--bone);
}
.btn--secondary {
  background: transparent;
  color: var(--weathered-brass);
  border-color: var(--weathered-brass);
}
.btn--secondary:hover, .btn--secondary:focus-visible {
  background: var(--weathered-brass);
  color: var(--anchor-black);
}

/* --------------------------------------------------------------- header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  background: var(--anchor-black);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.site-header.is-stuck {
  background: rgba(20, 18, 15, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--blueprint-line);
}
.site-header .brand {
  display: inline-flex;
  color: var(--bone);
}
.site-header .brand svg {
  height: 32px;
  width: auto;
  display: block;
}
.site-header .btn {
  padding: 0.65rem 1.35rem;
  flex-shrink: 0;
}

/* ----------------------------------------------------------------- hero */

.hero {
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
  text-align: center;
  background: var(--anchor-black);
}
.hero-lockup {
  display: block;
  width: min(320px, 78vw);
  height: auto;
  margin: 0 auto 2rem;
  color: var(--weathered-brass);
}
.hero .eyebrow { display: block; }
.hero h1 {
  font-size: var(--fs-hero);
  color: var(--bone);
  max-width: 16ch;
  margin: 1rem auto 0;
}
.hero .subhead {
  font: 400 var(--fs-subhead)/1.6 Inter, sans-serif;
  text-transform: none;
  color: var(--bone);
  max-width: 56ch;
  margin: 1.5rem auto 0;
}
.hero .cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

/* -------------------------------------------------------------- section */

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--black { background: var(--anchor-black); color: var(--bone); }
.section--green { background: var(--tidewater-green); color: var(--bone); }

.section--ticked { position: relative; }
.section--ticked::before,
.section--ticked::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--blueprint-line);
  opacity: 0.6;
}
.section--ticked::before { top: var(--gutter); left: var(--gutter); border-right: 0; border-bottom: 0; }
.section--ticked::after  { top: var(--gutter); right: var(--gutter); border-left: 0; border-bottom: 0; }

.section h2 { font-size: var(--fs-section); margin-top: 0.75rem; }
.section .cta-row,
.section > .wrap > .btn { margin-top: 2.5rem; }

.pull-quote {
  font: 700 var(--fs-subhead)/1.3 Oswald, sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--weathered-brass);
  border-left: 2px solid var(--blueprint-line);
  padding-left: 1.5rem;
  margin: 2rem auto 0;
}

/* ------------------------------------------------------------ card grids */

.requirements, .happenings, .founders-grid, .tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2.5rem;
}
@media (min-width: 640px) {
  .happenings { grid-template-columns: repeat(2, 1fr); }
  .founders-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .requirements { grid-template-columns: repeat(3, 1fr); }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .happenings { grid-template-columns: repeat(4, 1fr); }
}

.requirement, .happening {
  padding: 1.75rem;
  border: 1px solid var(--blueprint-dim);
}
.requirement h3, .happening h3 {
  font-size: 1.35rem;
  color: var(--weathered-brass);
  margin-bottom: 0.75rem;
}

/* -------------------------------------------------------------- the code */

.code-list {
  list-style: none;
  counter-reset: rule;
  margin-top: 2.5rem;
}
.code-rule {
  counter-increment: rule;
  position: relative;
  padding: 1.75rem 0 1.75rem 4.5rem;
  border-top: 1px solid var(--blueprint-dim);
}
.code-rule:first-child { border-top: none; padding-top: 0; }
.code-rule::before {
  content: counter(rule);
  position: absolute;
  left: 0;
  top: 1.75rem;
  font: 700 2.25rem/1 Oswald, sans-serif;
  color: var(--weathered-brass);
}
.code-rule:first-child::before { top: 0; }
.rule-head {
  font-size: 1.4rem;
  color: var(--bone);
  margin-bottom: 0.5rem;
}
.rule-body { color: var(--bone); }

/* ------------------------------------------------------------ membership */

.scarcity {
  font: 600 1rem/1.3 Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--weathered-brass);
  margin-top: 1.5rem;
}
.tier {
  padding: 2rem;
  border: 1px solid var(--blueprint-dim);
}
.tier--founding {
  border: 2px solid var(--weathered-brass);
  background: rgba(192, 160, 106, 0.06);
}
.tier h3 { font-size: 1.75rem; margin-top: 0.5rem; }
.tier-eyebrow { margin-bottom: 0; }
.tier-price { margin-top: 1rem; }
.price {
  font: 700 2.5rem/1 Oswald, sans-serif;
  color: var(--weathered-brass);
}
.price-period {
  font: 400 1rem/1 Inter, sans-serif;
  color: var(--muted);
  margin-left: 0.25rem;
}
.tier-kicker {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.tier-includes {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.tier-includes li {
  padding-left: 1.25rem;
  position: relative;
}
.tier-includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 1px;
  background: var(--weathered-brass);
}

/* -------------------------------------------------------------- founders */

.founder-photo {
  aspect-ratio: 1 / 1;
  background: var(--tidewater-green);
  border: 1px solid var(--blueprint-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.founder-photo__watermark {
  width: 42%;
  height: 42%;
  color: var(--blueprint-line);
  opacity: 0.55;
}
.founder h3 { font-size: 1.5rem; }
.founder-business {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.founder-bio { margin-top: 0.75rem; }
.founders-trust {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--blueprint-dim);
  color: var(--bone);
}

/* ------------------------------------------------------------------ faq */

.faq-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--blueprint-dim);
}
.faq-item { border-bottom: 1px solid var(--blueprint-dim); }
.faq-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--bone);
  font: 600 1.05rem/1.4 Inter, sans-serif;
  padding: 1.25rem 2.5rem 1.25rem 0;
  position: relative;
  cursor: pointer;
}
.faq-trigger::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--weathered-brass);
  font: 700 1.5rem/1 Oswald, sans-serif;
}
.faq-trigger[aria-expanded="true"]::after { content: "\2013"; }
.faq-panel { padding: 0 0 1.5rem; }
.faq-panel p { color: var(--bone); }

/* ---------------------------------------------------------------- apply */

.apply-intro {
  font-size: var(--fs-subhead);
  margin-top: 1.5rem;
}
.apply-form {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font: 600 1rem/1.3 Inter, sans-serif;
  color: var(--bone);
}
.field input, .field textarea {
  font: 400 1rem/1.5 Inter, sans-serif;
  color: var(--bone);
  background: rgba(237, 231, 218, 0.06);
  border: 1px solid var(--blueprint-dim);
  border-radius: 2px;
  padding: 0.8rem 1rem;
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field .hint {
  font-size: 1rem;
  color: var(--muted);
}
.field .field-error {
  font-size: 1rem;
  color: var(--error);
  min-height: 1.4em;
}
.field--checkbox {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem 0.75rem;
}
.field--checkbox input { margin-top: 0.3rem; width: 1.15rem; height: 1.15rem; }
.field--checkbox label { flex: 1 1 auto; font-weight: 400; }
.field--checkbox .hint,
.field--checkbox .field-error { flex-basis: 100%; }
.apply-form > .btn { align-self: flex-start; }

.form-success {
  margin-top: 2.5rem;
  padding: 2rem;
  border: 1px solid var(--weathered-brass);
}
.form-success h3 { font-size: 1.75rem; margin-bottom: 0.75rem; }

/* --------------------------------------------------------------- footer */

.site-footer {
  background: var(--anchor-black);
  color: var(--bone);
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 2rem;
  border-top: 1px solid var(--blueprint-dim);
  text-align: center;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.site-footer a {
  color: var(--weathered-brass);
  text-decoration: underline;
}
.site-footer a:hover, .site-footer a:focus-visible { color: var(--bone); }
.site-footer .legal { font-size: 1rem; color: var(--muted); }

.fg-credit { margin-top: 1rem; }
.fg-credit a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.fg-credit a:hover, .fg-credit a:focus-visible { color: var(--bone); }
.fg-credit img { height: 20px; width: auto; display: block; }

/* ---------------------------------------------------------- breakpoints */

@media (max-width: 639px) {
  .site-header .brand svg { height: 24px; }
}
