/* The Generals — dragon boat racing team
   Palette: sponsor red + green, dragon gold, ink, harbour water. Flat colour only;
   the footer is the one place a gradient is allowed. */
:root {
  --paper: #ffffff;
  --ink: #0f1412;
  --ink-soft: #4a524e;
  --red: #d91f26;
  --green: #046b36;
  --gold: #deb01f;
  --water: #0f1a17;
  --mist: #b9c4be;
  --rule: #e4e7e5;

  --display: "Ultra", "Rockwell Extra Bold", Georgia, serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;          /* Ultra ships one weight; never let the browser fake bold */
  font-synthesis: none;
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Team stripes, in the order of the wordmark: green, black, red */
.stripes { display: grid; }
.stripes span { height: 5px; }
.stripes span:nth-child(1) { background: var(--green); }
.stripes span:nth-child(2) { background: var(--ink); }
.stripes span:nth-child(3) { background: var(--red); }

.eyebrow {
  font-family: var(--label);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.eyebrow--gold { color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 22px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-family: var(--label);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--green); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

[hidden] { display: none !important; }

/* Hero */
.hero { padding: clamp(28px, 5vw, 72px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; gap: 20px 64px; align-items: center; }
.hero-logo {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin-inline: auto;
  mix-blend-mode: multiply;   /* the logo's white background melts into the page */
}
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); }
.hero h1 .accent { color: var(--red); }
.lede { margin-top: 20px; font-size: 1.15rem; color: var(--ink-soft); max-width: 34rem; }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .hero-logo { max-width: 500px; }
}

/* Sponsor + federation */
.ties { border-block: 1px solid var(--rule); }
.ties-row { display: grid; }
.tie { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 0; text-align: center; }
.tie + .tie { border-top: 1px solid var(--rule); }
.tie-label {
  font-family: var(--label);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tie-sponsor { width: clamp(200px, 24vw, 260px); height: auto; mix-blend-mode: multiply; }
.tie-fed { color: var(--ink); text-decoration: none; }
.tie-fed-body { display: flex; align-items: center; gap: 14px; text-align: left; }
.tie-fed-body img { width: 88px; height: 88px; flex: none; }
.tie-fed-name {
  display: block;
  max-width: 15ch;
  font-family: var(--label);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tie-fed-handle { display: block; margin-top: 4px; color: var(--green); font-weight: 500; }
.tie-fed:hover .tie-fed-handle { text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 760px) {
  .ties-row { grid-template-columns: 1fr 1fr; }
  .tie { flex-direction: row; justify-content: center; gap: 28px; padding: 32px 24px; }
  .tie + .tie { border-top: 0; border-left: 1px solid var(--rule); }
}

/* Boat band */
.boat-band { background: var(--water); color: #fff; padding: clamp(56px, 8vw, 104px) 0; overflow: hidden; }
.boat-band h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 16ch; }
.intro-text { margin-top: 18px; color: var(--mist); max-width: 56ch; font-size: 1.1rem; }

.boat {
  width: min(1160px, 100% - 2 * var(--gutter));
  height: auto;
  margin: clamp(28px, 5vw, 56px) auto clamp(24px, 4vw, 40px);
}

/* Every paddle shares one animation with no delay: the crew strokes in unison.
   Positive rotation swings the blade toward the bow (catch), negative is the exit. */
.paddle { transform: rotate(28deg); animation: stroke 0.9s cubic-bezier(0.45, 0, 0.35, 1) infinite; }
@keyframes stroke {
  0%, 100% { transform: rotate(28deg); }
  55% { transform: rotate(-24deg); }
}
.buoys { animation: drift 1.6s linear infinite; }
@keyframes drift { to { transform: translateX(-80px); } }
.beat { transform-box: fill-box; transform-origin: center; opacity: 0; animation: beat 0.9s ease-out infinite; }
@keyframes beat {
  0% { transform: scale(1); opacity: 0.9; }
  70%, 100% { transform: scale(2.2); opacity: 0; }
}
.boat-band.is-offscreen .paddle,
.boat-band.is-offscreen .buoys,
.boat-band.is-offscreen .beat { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .paddle, .buoys, .beat { animation: none; }
}

.roles { display: grid; gap: 24px; }
.roles h3 {
  font-family: var(--label);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.roles h3 span { color: var(--mist); font-weight: 600; margin-left: 8px; }
.roles p { margin-top: 6px; color: var(--mist); max-width: 32ch; font-size: 1rem; }

@media (min-width: 760px) {
  .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  /* columns sit under their place in the boat: stern, benches, bow */
  .roles > :nth-child(2) { text-align: center; }
  .roles > :nth-child(2) p { margin-inline: auto; }
  .roles > :nth-child(3) { text-align: right; }
  .roles > :nth-child(3) p { margin-left: auto; }
}

/* Join + sign-up form */
.join { padding: clamp(64px, 9vw, 120px) 0; }
.join-grid { display: grid; gap: 40px 64px; align-items: start; }
.join h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.join-text { margin-top: 18px; font-size: 1.15rem; color: var(--ink-soft); max-width: 34rem; }
.join-text a, .join-alt a { color: var(--green); font-weight: 500; text-underline-offset: 3px; }
.join-alt { margin-top: 14px; color: var(--ink-soft); }

@media (min-width: 900px) {
  .join-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

.signup { display: grid; gap: 22px 20px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field { display: block; }
.field label,
.field legend {
  padding: 0;
  font-family: var(--label);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.field legend { margin-bottom: 10px; }
.optional { margin-left: 6px; font-weight: 600; color: var(--ink-soft); }

.signup input[type="text"],
.signup input[type="email"],
.signup input[type="tel"],
.signup select {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  font: inherit;
  font-size: 1rem;           /* 16px keeps iOS from zooming on focus */
  color: var(--ink);
  background-color: #fff;
  border: 1.5px solid #c3cac6;
  border-radius: 6px;
  -webkit-appearance: none;
  appearance: none;
}
.signup select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230f1412' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.signup input::placeholder { color: #8b938f; }
.signup input:focus,
.signup select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(222, 176, 31, 0.5); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1.5px solid #c3cac6;
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid .choice span { border-color: var(--red); }
.field-error { margin-top: 6px; color: var(--red); font-size: 0.92rem; font-weight: 500; }

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

.signup-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.signup-foot .btn { margin-top: 0; }
.btn--submit[disabled] { opacity: 0.6; cursor: progress; }
.signup-note { font-size: 0.92rem; color: var(--ink-soft); max-width: 32ch; }
.signup-status {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  background: #fdf0f0;
  color: var(--ink);
}

.signup-done { border-top: 5px solid var(--green); padding-top: 24px; outline: none; }
.signup-done-title { font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.1; }

@media (min-width: 640px) {
  .signup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--full { grid-column: 1 / -1; }
}

/* Footer */
.site-footer { background: linear-gradient(to bottom, #18181b, #09090b); color: #d4d4d8; }
.footer-main { display: grid; gap: 20px; padding: 40px 0 28px; }
.footer-name { font-family: var(--display); font-size: 1.6rem; line-height: 1.2; color: #fff; }
.footer-link {
  font-family: var(--label);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-underline-offset: 4px;
}
.footer-link:hover { color: var(--gold); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 0 28px;
  border-top: 1px solid #27272a;
  font-size: 0.875rem;
  color: #a1a1aa;
}

@media (min-width: 760px) {
  .footer-main { grid-template-columns: 1fr auto; align-items: end; }
}

.footer-base a { color: #d4d4d8; text-underline-offset: 3px; }
.footer-base a:hover { color: var(--gold); }

.join-photo { width: 100%; height: auto; margin-top: 28px; border-radius: 6px; }
