/* ============================================================
   collective.next — stylesheet
   Ported from the design prototype
   (design/website/collective.next Site - Final.dc.html).
   Values (colors, clamps, timings) are reproduced verbatim.
   ============================================================ */

:root {
  /* Surfaces */
  --plum-black: #12080a;   /* page background, dark sections, button text */
  --deep-plum: #1c0d0e;    /* alternating dark sections */
  --image-well: #0d0608;   /* backing behind the split image */

  /* Text on dark */
  --ink: #fbeee8;          /* headlines / body */
  --muted: #ddbcae;        /* body copy */
  --dim: #b0897c;          /* secondary / labels */
  --dimmer: #a1806f;       /* footer, fine print */
  --dimmest: #8a6a5c;      /* placeholders */
  --footer-mark: #f5d9cd;  /* footer wordmark */

  /* Accents */
  --accent: #ff7a4d;       /* coral */
  --accent-2: #ffb26b;     /* amber */
  --emphasis: #ffd8b0;     /* italic emphasis in headlines */
  --error: #ff9fb0;        /* validation messages */

  /* Paper ("how it works") */
  --paper: #efe9dd;
  --paper-ink: #26140f;
  --paper-body: #6a5b52;
  --paper-accent: #cf5a2f;

  /* Hairlines */
  --hairline: rgba(255, 255, 255, .14);
  --hairline-soft: rgba(255, 255, 255, .1);
  --hairline-faint: rgba(255, 255, 255, .08);
  --hairline-paper: rgba(0, 0, 0, .16);
  --hairline-paper-strong: rgba(0, 0, 0, .3);

  /* Form fields */
  --field-bg: rgba(255, 255, 255, .04);
  --field-border: rgba(255, 255, 255, .16);
  --field-focus-bg: rgba(255, 122, 77, .08);
  --toggle-on-bg: rgba(255, 122, 77, .14);

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Gradients */
  --cta-gradient: linear-gradient(120deg, #ff7a4d, #ffb26b, #ff7a4d);
  --cta-gradient-flat: linear-gradient(120deg, #ff7a4d, #ffb26b);
}

/* ---------- Reset ---------- */

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

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

body {
  background: var(--plum-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

input,
textarea,
button,
select {
  font-family: var(--font-ui);
}

input::placeholder,
textarea::placeholder {
  color: var(--dimmest);
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* Screen-reader-only live region for validation announcements. */
.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Root shell ----------
   container-type:inline-size makes every cqi unit below (including the
   ones inside the blob keyframes) resolve against the page width, matching
   the prototype's fluid scaling exactly. */

.shell {
  container-type: inline-size;
  min-height: 100vh;
  background: var(--plum-black);
  color: var(--ink);
  font-family: var(--font-ui);
}

[hidden] {
  display: none !important;
}

/* ---------- Animations ---------- */

@keyframes blobA {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6cqi, 5cqi) scale(1.12); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes blobB {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-7cqi, -4cqi) scale(1.15); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes blobC {
  0%   { transform: translate(0, 0) scale(1); opacity: .8; }
  50%  { transform: translate(4cqi, -5cqi) scale(1.2); opacity: 1; }
  100% { transform: translate(0, 0) scale(1); opacity: .8; }
}

@keyframes btnShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Ambient blurred circles behind the hero, closing CTA and apply page. */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.blob--hero-a {
  width: 70cqi;
  height: 70cqi;
  left: -6cqi;
  top: -20cqi;
  background: radial-gradient(circle, rgba(255, 122, 77, .42), transparent 62%);
  animation: blobA 16s ease-in-out infinite;
}

.blob--hero-b {
  width: 64cqi;
  height: 64cqi;
  right: -14cqi;
  bottom: -24cqi;
  background: radial-gradient(circle, rgba(255, 178, 107, .38), transparent 62%);
  animation: blobB 20s ease-in-out infinite;
}

.blob--closing {
  width: 76cqi;
  height: 76cqi;
  left: 12cqi;
  top: -30cqi;
  background: radial-gradient(circle, rgba(255, 150, 90, .3), transparent 62%);
  animation: blobC 15s ease-in-out infinite;
}

.blob--apply-a {
  width: 70cqi;
  height: 70cqi;
  left: -14cqi;
  top: -18cqi;
  background: radial-gradient(circle, rgba(255, 122, 77, .34), transparent 62%);
  animation: blobA 18s ease-in-out infinite;
}

.blob--apply-b {
  width: 60cqi;
  height: 60cqi;
  right: -16cqi;
  bottom: -20cqi;
  background: radial-gradient(circle, rgba(255, 178, 107, .32), transparent 62%);
  filter: blur(68px);
  animation: blobB 20s ease-in-out infinite;
}

/* ---------- Shared pieces ---------- */

.wordmark {
  font: 500 clamp(20px, 2.2cqi, 24px) var(--font-ui);
  letter-spacing: -.01em;
  color: var(--ink);
}

.wordmark__next {
  color: var(--accent);
}

.kicker {
  font: 600 clamp(12px, 1.4cqi, 15px) var(--font-ui);
  letter-spacing: .3em;
  color: var(--accent);
}

.kicker--hero {
  font-size: clamp(13px, 1.5cqi, 17px);
  letter-spacing: .4em;
}

.kicker--paper {
  color: var(--paper-accent);
}

.emphasis {
  font-style: italic;
  color: var(--emphasis);
}

/* Buttons ------------------------------------------------- */

.btn {
  display: inline-block;
  color: var(--plum-black);
  background: var(--cta-gradient-flat);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  color: var(--plum-black);
}

.btn--nav {
  font: 600 clamp(14px, 1.7cqi, 16px) var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 24px;
}

/* Animated sheen — hero CTA and the form's submit button only. */
.btn--hero {
  font: 600 clamp(15px, 1.9cqi, 20px) var(--font-ui);
  padding: 18px 44px;
  margin-top: 8px;
  background: var(--cta-gradient);
  background-size: 220% 100%;
  animation: btnShift 6s ease-in-out infinite;
}

.btn--closing {
  font: 600 clamp(15px, 1.9cqi, 20px) var(--font-ui);
  padding: 18px 44px;
}

.btn--submit {
  font: 600 clamp(15px, 1.9cqi, 18px) var(--font-ui);
  padding: 16px;
  margin-top: 6px;
  background: var(--cta-gradient);
  background-size: 220% 100%;
  animation: btnShift 6s ease-in-out infinite;
}

/* ============================================================
   HOME
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(20px, 5cqi, 72px);
  background: rgba(18, 8, 10, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Hero ---------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(24px, 3cqi, 40px);
  padding: clamp(56px, 9cqi, 130px) clamp(20px, 5cqi, 72px);
}

.hero > *:not(.blob):not(.hero__bg) {
  position: relative;
}

/* Photographic wash behind the hero. Scrimmed hard so the headline keeps
   its contrast — the photo is atmosphere, the type is still the hero. */
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.06);
  transform-origin: 50% 50%;
  opacity: .66;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 52% at 50% 46%, rgba(18, 8, 10, .55), transparent 74%),
    linear-gradient(180deg, rgba(18, 8, 10, .78) 0%, rgba(18, 8, 10, .3) 28%, rgba(18, 8, 10, .42) 68%, var(--plum-black) 100%);
}

.hero__title {
  font: 400 clamp(44px, 9cqi, 132px)/1 var(--font-display);
  letter-spacing: -.02em;
  max-width: 1000px;
  text-wrap: balance;
}

.hero__sub {
  font: 400 clamp(16px, 2cqi, 24px)/1.55 var(--font-ui);
  color: var(--muted);
  max-width: 660px;
  text-wrap: pretty;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font: 400 clamp(13px, 1.5cqi, 16px) var(--font-ui);
  color: var(--dim);
  margin-top: 6px;
}

.hero__meta-dot {
  opacity: .5;
}

/* Who's at the table -------------------------------------- */

.table-section {
  background: var(--deep-plum);
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: stretch;
}

.table-image {
  min-height: clamp(320px, 52cqi, 640px);
  background: var(--image-well);
}

.table-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 3cqi, 40px);
  padding: clamp(48px, 7cqi, 110px) clamp(24px, 5cqi, 80px);
}

.section-title {
  font: 400 clamp(34px, 5.4cqi, 72px)/1.02 var(--font-display);
  letter-spacing: -.02em;
  text-wrap: balance;
}

.section-body {
  font: 400 clamp(16px, 1.8cqi, 21px)/1.6 var(--font-ui);
  color: var(--muted);
  max-width: 560px;
  text-wrap: pretty;
}

/* What to expect ------------------------------------------ */

.expect {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6cqi, 80px);
  padding: clamp(56px, 9cqi, 130px) clamp(20px, 5cqi, 72px);
}

/* One column by default, three when there's room. Never two — a 2-up wrap
   orphans the third pillar and breaks the parallel reading. */
.expect__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.expect__cell {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6cqi, 20px);
  padding: clamp(28px, 3.4cqi, 44px) 0;
  border-top: 1px solid var(--hairline);
}

@container (min-width: 860px) {
  .expect__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .expect__cell {
    padding: clamp(32px, 4cqi, 56px) clamp(24px, 3cqi, 44px) clamp(40px, 5cqi, 72px);
  }

  .expect__cell:first-child {
    padding-left: 0;
  }

  .expect__cell:last-child {
    padding-right: 0;
  }
}

.expect__num {
  font: 400 clamp(28px, 3cqi, 40px) var(--font-display);
  color: var(--accent);
}

.expect__title {
  font: 400 clamp(28px, 3.6cqi, 48px) var(--font-display);
}

.expect__body {
  font: 400 clamp(16px, 1.6cqi, 18px)/1.6 var(--font-ui);
  color: var(--muted);
  text-wrap: pretty;
}

.expect__note {
  font: 400 clamp(15px, 1.7cqi, 19px)/1.6 var(--font-ui);
  font-style: italic;
  color: var(--dim);
}

/* How it works (paper) ------------------------------------ */

.steps {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6cqi, 72px);
  padding: clamp(56px, 9cqi, 130px) clamp(20px, 5cqi, 72px);
  background: var(--paper);
  color: var(--paper-ink);
}

.steps__head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 3cqi, 48px);
  align-items: baseline;
}

.steps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--hairline-paper);
}

.steps__cell {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3cqi, 40px);
  padding: clamp(28px, 3.4cqi, 44px) 0;
  border-top: 1px solid var(--hairline-paper);
}

.steps__cell:first-child {
  border-top: none;
}

@container (min-width: 860px) {
  .steps__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps__cell {
    padding: clamp(28px, 3.4cqi, 48px) clamp(20px, 2.6cqi, 36px);
    border-top: none;
    border-left: 1px solid var(--hairline-paper);
  }

  .steps__cell:first-child {
    padding-left: 0;
    border-left: none;
  }

  .steps__cell:last-child {
    padding-right: 0;
  }
}

.steps__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline-paper-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 16px var(--font-display);
  flex: none;
}

.steps__title {
  font: 400 clamp(24px, 3cqi, 36px) var(--font-display);
}

.steps__body {
  font: 400 clamp(16px, 1.6cqi, 18px)/1.55 var(--font-ui);
  color: var(--paper-body);
  text-wrap: pretty;
}

/* Closing CTA --------------------------------------------- */

.closing {
  position: relative;
  overflow: hidden;
  min-height: 64vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(24px, 3cqi, 40px);
  padding: clamp(56px, 9cqi, 130px) clamp(20px, 5cqi, 72px);
  background: var(--deep-plum);
}

.closing > *:not(.blob) {
  position: relative;
}

.closing__title {
  font: 400 clamp(34px, 6.4cqi, 88px)/1 var(--font-display);
  letter-spacing: -.02em;
  max-width: 900px;
  text-wrap: balance;
}

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

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: clamp(32px, 5cqi, 56px) clamp(20px, 5cqi, 72px);
  border-top: 1px solid var(--hairline-faint);
  color: var(--dimmer);
}

.footer__mark {
  font: 500 18px var(--font-ui);
  color: var(--footer-mark);
}

.footer__legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font: 400 13px var(--font-ui);
}

.footer__contact {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  font: 400 13px var(--font-ui);
}

.footer__contact-label {
  color: var(--dimmer);
}

.footer__link {
  color: var(--footer-mark);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-faint);
  transition: opacity 160ms ease, border-color 160ms ease;
}

.footer__link:hover,
.footer__link:focus-visible {
  opacity: 0.72;
  border-bottom-color: currentColor;
}

/* ============================================================
   APPLY
   ============================================================ */

.apply {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.apply__nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(20px, 5cqi, 72px);
}

.apply__back {
  font: 500 clamp(14px, 1.6cqi, 16px) var(--font-ui);
  color: var(--dim);
}

.apply__back:hover {
  color: var(--accent-2);
}

.apply__body {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: clamp(32px, 5cqi, 72px) clamp(20px, 5cqi, 56px) clamp(56px, 8cqi, 120px);
}

.panel {
  width: 100%;
  max-width: 580px;
  padding: clamp(28px, 4cqi, 56px);
  border-radius: 26px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.apply__title {
  font: 400 clamp(30px, 4.6cqi, 52px)/1.05 var(--font-display);
  letter-spacing: -.01em;
  margin: 14px 0 10px;
}

.apply__sub {
  font: 400 clamp(14px, 1.7cqi, 18px)/1.55 var(--font-ui);
  color: var(--muted);
  margin-bottom: clamp(24px, 3cqi, 36px);
}

.apply__duration {
  color: var(--accent);
}

/* Form ---------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2cqi, 22px);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(14px, 1.8cqi, 20px);
}

/* Netlify honeypot — must exist in the DOM, must never be seen. */
.hidden-field {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font: 500 13px var(--font-ui);
  color: var(--dim);
}

.field__optional {
  opacity: .6;
}

.field__error {
  font: 400 12px var(--font-ui);
  color: var(--error);
}

.input,
.textarea {
  font: 500 16px var(--font-ui);
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  width: 100%;
}

.textarea {
  font: 500 16px/1.5 var(--font-ui);
  resize: vertical;
}

.input:focus,
.textarea:focus {
  border-color: var(--accent);
  background: var(--field-focus-bg);
}

/* Multi-select chips -------------------------------------- */

.checkgroup {
  border: 0;
  margin: 0;
  padding: 0;
}

.checkgroup__hint {
  font: 400 12px var(--font-ui);
  color: var(--dimmer);
}

.checkgroup__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.chip__box {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip__text {
  font: 500 15px var(--font-ui);
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  color: var(--dim);
}

.chip__box:checked + .chip__text {
  border-color: var(--accent);
  background: var(--toggle-on-bg);
  color: var(--ink);
}

.chip__box:focus-visible + .chip__text {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Consent ------------------------------------------------- */

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent__box {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}

.consent__text {
  font: 400 14px/1.45 var(--font-ui);
  color: var(--muted);
}

.fine-print {
  font: 400 12px/1.5 var(--font-ui);
  color: var(--dimmer);
}

/* Cookie banner ------------------------------------------- */

.cookie {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 3vw, 24px);
  transform: translateX(-50%);
  z-index: 100;
  width: min(680px, calc(100vw - 24px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: var(--deep-plum);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

/* .cookie sets display:flex, which would otherwise defeat the hidden attribute. */
.cookie[hidden] {
  display: none;
}

.cookie__text {
  flex: 1 1 260px;
  font: 400 14px/1.5 var(--font-ui);
  color: var(--muted);
}

.cookie__actions {
  display: flex;
  gap: 10px;
}

.btn--cookie {
  font: 600 14px var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
}

.btn--cookie-ghost {
  background: none;
  border: 1px solid var(--field-border);
  color: var(--dim);
}

.btn--cookie-ghost:hover {
  color: var(--ink);
}

/* Phones: the floating card eats too much of a short viewport, so it becomes
   a compact bottom sheet clear of the home indicator. */
@media (max-width: 600px) {
  .cookie {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    gap: 12px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-width: 1px 0 0;
  }

  .cookie__text {
    flex: 1 1 100%;
    font-size: 13px;
  }

  .cookie__actions {
    flex: 1 1 100%;
  }

  .btn--cookie {
    flex: 1 1 0;
    padding: 11px 16px;
  }
}

/* Success state ------------------------------------------- */

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: clamp(24px, 4cqi, 56px) 0;
}

.success__check {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 40px var(--font-display);
  color: var(--accent);
}

.success__title {
  font: 400 clamp(30px, 4.6cqi, 52px)/1.05 var(--font-display);
  letter-spacing: -.01em;
}

.success__title:focus {
  outline: none;
}

.success__body {
  font: 400 clamp(15px, 1.8cqi, 19px)/1.6 var(--font-ui);
  color: var(--muted);
  max-width: 400px;
}

.success__email {
  color: var(--accent);
}

.success__back {
  font: 500 15px var(--font-ui);
  color: var(--dim);
  padding-top: 8px;
}

.success__back:hover {
  color: var(--accent-2);
}

/* ---------- Reduced motion ---------- */

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

  .blob,
  .btn--hero,
  .btn--submit {
    animation: none;
  }
}
