/* RallyLoud site system. Coral, ink, warm paper, sparing lime. Shared by every page. */

@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/fonts/CabinetGrotesk-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/fonts/CabinetGrotesk-Extrabold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/fonts/CabinetGrotesk-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

:root {
  --coral: #ff573d;
  --coral-text: #b8341e; /* coral for small text on paper, 4.9:1 */
  --ink: #15151b;
  --ink-2: #202028;
  --paper: #f4f0e8;
  --paper-2: #ebe5d9;
  --lime: #d9f66f;
  --muted: #4e4d52; /* on paper, 7.4:1 */
  --muted-dark: #c4c0b8; /* on ink, 10:1 */
  --display: 'Cabinet Grotesk', 'Arial Black', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 78rem;
  --measure: 66ch;
  --section: clamp(4.5rem, 9vw, 8rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.1875rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--ink); }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.wrap {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- focus: visible on every surface ---------- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}
.dark a:focus-visible,
.dark button:focus-visible,
footer a:focus-visible {
  outline-color: var(--lime);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(21, 21, 27, 0.08);
}
.nav__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.brand svg { width: 1.5rem; height: 1.5rem; flex: none; fill: var(--coral); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 1rem;
}
.nav__links a:not(.btn) {
  text-decoration: none;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 3px;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav__links a:not(.btn):hover {
  background: var(--ink);
  color: var(--paper);
}
.nav__links a[aria-current='page'] {
  color: var(--ink);
  font-weight: 800;
}
.nav__links .btn { margin-left: 0.75rem; }
@media (max-width: 860px) {
  .nav__links a:not(.btn) { display: none; }
  .nav__links .btn { margin-left: 0; }
}

/* ---------- buttons: one action, colour shift only ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.4rem 0.95rem 1.5rem;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.btn svg { width: 0.8em; height: 0.8em; flex: none; transition: transform 0.25s ease; }
.btn:hover { background: var(--coral); color: var(--ink); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn:active { background: var(--coral-text); color: var(--paper); }
.btn--sm { padding: 0.6rem 1rem; font-size: 1rem; }
.on-coral .btn:hover { background: var(--paper); color: var(--ink); }
.dark .btn { background: var(--coral); color: var(--ink); }
.dark .btn:hover { background: var(--lime); color: var(--ink); }

.text-link {
  color: var(--coral-text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}
.text-link:hover { color: var(--ink); }

/* ---------- hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 4.5rem);
  display: flex;
  align-items: center;
  padding: clamp(3rem, 8vh, 6rem) 0;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.8rem, 5.6vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--coral-text); }
.hero__sub {
  margin-top: clamp(1.4rem, 3vh, 2rem);
  max-width: 44ch;
  font-size: clamp(1.15rem, 0.6vw + 1rem, 1.4rem);
  line-height: 1.5;
  color: var(--muted);
}
.hero__cta { margin-top: clamp(1.8rem, 4vh, 2.6rem); }
.hero__flag {
  justify-self: end;
  width: min(100%, 24rem);
  aspect-ratio: 1;
  fill: var(--coral);
  transform-origin: 0 100%;
  animation: wave 6s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.5deg); }
}
@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__flag { order: -1; justify-self: start; width: 5.5rem; animation: none; }
}

/* ---------- sections ---------- */
.section { padding: var(--section) 0; position: relative; }
.dark { background: var(--ink); color: var(--paper); }
.on-coral { background: var(--coral); color: var(--ink); }
.tint { background: var(--paper-2); }

.lead-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.lead-in h2 { font-size: clamp(2.2rem, 4.2vw, 4rem); }
.lead-in p { max-width: var(--measure); color: var(--muted); }
.dark .lead-in p { color: var(--muted-dark); }
.dark h2 em { font-style: normal; color: var(--coral); }
@media (max-width: 860px) { .lead-in { grid-template-columns: minmax(0, 1fr); } }

/* problem: a typographic list, no cards */
.gaps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3rem) clamp(2rem, 6vw, 6rem);
}
.gaps h3 { font-size: clamp(1.35rem, 1.6vw, 1.6rem); font-weight: 800; margin-bottom: 0.5rem; }
.gaps h3 span { color: var(--coral); margin-right: 0.4rem; }
.gaps p { color: var(--muted-dark); max-width: 52ch; }
@media (max-width: 760px) { .gaps { grid-template-columns: minmax(0, 1fr); } }

/* how it works: chevron rail, the bespoke silhouette */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.flow li {
  --notch: 1.6rem;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(1.8rem, 3vw, 2.6rem) calc(var(--notch) + 1.6rem) clamp(2rem, 3vw, 2.8rem) calc(var(--notch) + 1.6rem);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%, var(--notch) 50%);
}
.flow li:first-child {
  padding-left: 1.8rem;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%);
}
.flow li:last-child { background: var(--coral); color: var(--ink); }
.flow b {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
  margin-bottom: 0.9rem;
}
.flow p { font-size: 1rem; line-height: 1.6; color: var(--muted-dark); }
.flow li:last-child p { color: var(--ink); }
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li, .flow li:first-child {
    padding: 1.8rem 1.6rem 2.6rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 1rem), 50% 100%, 0 calc(100% - 1rem));
  }
  .flow li:last-child { clip-path: none; padding-bottom: 1.8rem; }
}
.flow-note { margin-top: 2rem; max-width: var(--measure); color: var(--muted); }

/* audiences */
.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.duo > div { background: var(--paper); padding: clamp(1.8rem, 3vw, 2.8rem); border-radius: 3px; }
.duo h3 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); margin-bottom: 1.2rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.ticks li { position: relative; padding-left: 1.6rem; color: var(--muted); }
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--coral);
  clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%);
}
.ticks strong { color: var(--ink); }
@media (max-width: 760px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* trust */
.trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem);
}
.trust h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.6rem; color: var(--lime); }
.trust p { font-size: 1rem; color: var(--muted-dark); }
.fine { margin-top: clamp(2.5rem, 5vw, 3.5rem); max-width: 80ch; font-size: 0.95rem; color: var(--muted-dark); }
@media (max-width: 1024px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trust { grid-template-columns: minmax(0, 1fr); } }

/* closing */
.close { position: relative; overflow: hidden; padding: var(--section) 0; }
.close h2 { font-size: clamp(3rem, 7.5vw, 7rem); line-height: 0.95; letter-spacing: -0.02em; }
.close h2 span { display: block; }
.close h2 span:last-child { padding-left: clamp(1.5rem, 8vw, 9rem); }
.close__row {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
}
.close__row p { max-width: 46ch; font-size: 1.15rem; font-weight: 600; }
.close__mark {
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  width: clamp(10rem, 22vw, 20rem);
  aspect-ratio: 1;
  fill: var(--ink);
  opacity: 0.12;
  pointer-events: none;
}

/* ---------- inner pages ---------- */
.page-head { padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 4.5rem); }
.page-head .crumb { font-weight: 700; color: var(--coral-text); margin-bottom: 1rem; display: block; }
.page-head h1 { font-size: clamp(2.6rem, 5.4vw, 5rem); max-width: 18ch; }
.page-head h1 em { font-style: normal; color: var(--coral-text); }
.page-head .lede { margin-top: 1.4rem; max-width: 56ch; font-size: clamp(1.15rem, 0.5vw + 1rem, 1.35rem); color: var(--muted); }

.block { padding: clamp(3rem, 6vw, 5rem) 0; }
.block + .block { padding-top: 0; }
.block h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); margin-bottom: 1.2rem; }
.prose p { max-width: var(--measure); color: var(--muted); }
.prose p + p { margin-top: 1.1rem; }
.prose strong { color: var(--ink); }
.prose .btn { margin-top: 1.8rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}
.tile { background: var(--paper-2); padding: 1.8rem 1.6rem 2rem; border-radius: 3px; }
.tile .num { display: block; font-family: var(--display); font-weight: 900; font-size: 1rem; color: var(--coral-text); margin-bottom: 1.4rem; }
.tile h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.6rem; }
.tile p { font-size: 1rem; color: var(--muted); }
.lines { margin-top: 1rem; display: grid; gap: 0.6rem; }
.lines p { color: var(--muted); }
.lines strong { color: var(--ink); display: inline-block; min-width: 10rem; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: var(--muted-dark); overflow: hidden; }
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: end;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.foot__tag { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 2rem); color: var(--paper); line-height: 1.1; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-weight: 600; font-size: 1rem; }
.foot__links a { text-decoration: none; transition: color 0.18s ease; }
.foot__links a:hover { color: var(--lime); }
.foot__copy { grid-column: 1 / -1; font-size: 0.95rem; }
.foot__word {
  display: block;
  text-align: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(4rem, 17vw, 17rem);
  line-height: 0.75;
  letter-spacing: -0.01em;
  color: var(--coral);
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 0.1em;
  transform: translateY(0.08em);
  user-select: none;
}
@media (max-width: 760px) { .foot { grid-template-columns: minmax(0, 1fr); } }

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