/* ==========================================================================
   eSheep affiliate program — page-specific components.
   Builds on assets/css/styles.css (tokens, header, hero, forms, FAQ, footer).
   The job of this file is banding: each section reads as its own block
   instead of one long purple page.
   ========================================================================== */

/* ------------------------------------------------------------------- nav -- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-inline-start: auto;
  gap: clamp(12px, 2.4vw, 22px);
}

.btn { text-decoration: none; }

/* plain links only — the Apply button keeps its own colour and size */
.site-nav a:not(.btn) {
  display: none;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:not(.btn):hover { color: #fff; }

@media (min-width: 640px) {
  .site-nav a:not(.btn) { display: inline; }
}

.site-nav a.btn {
  flex: 0 0 auto;
  min-height: 40px;
  height: 40px;
  padding: 0 18px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.btn--sm { padding: 9px 16px; font-size: 0.86rem; }

/* ----------------------------------------------------------------- bands -- */

.band {
  position: relative;
  isolation: isolate;
}

.band + .band { border-top: 1px solid rgba(255, 255, 255, 0.055); }

.band--hero {
  background:
    radial-gradient(85% 90% at 50% -12%, rgba(201, 164, 255, 0.26), transparent 62%),
    radial-gradient(55% 55% at 88% 6%, rgba(255, 166, 213, 0.16), transparent 62%),
    #120727;
}

/* header + hero + stats wrapper; <main> follows it, so draw the divider here */
.band--top { border-bottom: 1px solid rgba(255, 255, 255, 0.055); }

.band--ink { background: #050309; }

.band--black {
  background:
    radial-gradient(80% 90% at 50% 0%, rgba(255, 166, 213, 0.1), transparent 62%),
    #030208;
}

/* each band gets its own hue so sections read as separate blocks */
.band--indigo {
  background:
    radial-gradient(90% 75% at 8% 0%, rgba(120, 108, 255, 0.18), transparent 60%),
    #0e0b2c;
}

.band--slate {
  background:
    radial-gradient(90% 75% at 88% 0%, rgba(86, 156, 214, 0.16), transparent 62%),
    #091420;
}

.band--wine {
  background:
    radial-gradient(95% 80% at 14% 0%, rgba(255, 122, 181, 0.2), transparent 60%),
    #260a1d;
}

.band--rose {
  background:
    radial-gradient(115% 100% at 12% 0%, rgba(255, 166, 213, 0.15), transparent 58%),
    #18092a;
}

.band--apply {
  padding-block: clamp(56px, 8vw, 104px);
  background:
    radial-gradient(75% 130% at 50% 0%, rgba(201, 164, 255, 0.3), transparent 62%),
    linear-gradient(180deg, #1e0e35 0%, #130726 100%);
}

/* cards and eyebrow rules pick up a hint of their band's hue */
.band--wine .benefit,
.band--wine .step {
  border-color: rgba(255, 166, 213, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014));
}

.band--slate .benefit,
.band--slate .step { border-color: rgba(140, 190, 255, 0.18); }

.band--indigo .benefit,
.band--indigo .step { border-color: rgba(162, 146, 255, 0.22); }

.band--wine .eyebrow::before { background: linear-gradient(90deg, #ff8fc4, var(--accent-2)); }
.band--slate .eyebrow::before { background: linear-gradient(90deg, #7fb2e8, var(--accent)); }

/* --------------------------------------------------------------- eyebrow -- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.band .section__title {
  font-size: clamp(1.55rem, 4.4vw, 2.1rem);
  line-height: 1.14;
}

.hero__actions { margin: clamp(20px, 4vw, 26px) 0 0; }

.grad {
  background: linear-gradient(100deg, var(--accent) 8%, var(--accent-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----------------------------------------------------------------- stats -- */

.stats { padding-block: clamp(18px, 3.4vw, 30px); }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 760px) {
  .stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}

.stat {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 15px 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.9;
}

.stat__value {
  font-size: clamp(1.2rem, 3.6vw, 1.5rem);
  font-weight: 690;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  font-size: 0.78rem;
  color: var(--muted-soft);
  line-height: 1.35;
}

/* ------------------------------------------------------------ calculator -- */

.calc {
  margin-top: clamp(20px, 4vw, 28px);
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid rgba(201, 164, 255, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(201, 164, 255, 0.13), rgba(255, 255, 255, 0.015) 46%),
    #150a26;
  box-shadow: 0 30px 70px -46px rgba(201, 164, 255, 0.8);
}

.calc__control { display: grid; gap: 10px; }

.calc__row { display: flex; align-items: center; gap: 14px; }

.calc__range {
  flex: 1;
  min-width: 0;
  height: 22px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.calc__range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  opacity: 0.6;
}

.calc__range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.calc__range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  opacity: 0.6;
}

.calc__range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.calc__range:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 999px;
}

.calc__value {
  min-width: 46px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  color: #fff;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.calc__out {
  display: grid;
  gap: 2px;
  margin: clamp(18px, 3.5vw, 24px) 0 0;
}

@media (min-width: 720px) {
  .calc__out { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

.calc__cell {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

@media (min-width: 720px) {
  .calc__cell {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    padding: 0 0 0 16px;
  }
  .calc__cell:first-child { border-left: 0; padding-left: 0; }
}

.calc__cell dt {
  font-size: 0.79rem;
  color: var(--muted-soft);
  line-height: 1.35;
}

.calc__cell dd {
  margin: 0;
  font-size: clamp(1.25rem, 3.6vw, 1.55rem);
  font-weight: 690;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.calc__cell--static dd {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.calc .hint { margin-top: clamp(16px, 3vw, 20px); }

/* ----------------------------------------------------------------- steps -- */

.steps { gap: 14px; }

.step {
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}

.step__num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.step__text h3,
.benefit__title {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 660;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------- benefits -- */

/* four cards: 2×2 on tablets, four across only when there is room */
.benefits { gap: 14px; }

@media (min-width: 768px) {
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.benefit {
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.benefit:hover {
  border-color: rgba(201, 164, 255, 0.42);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .benefit:hover { transform: none; }
}

.benefit__body { margin: 0; }

/* --------------------------------------------------------------- samples -- */

.samples__grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
  margin-inline: auto;
}

.samples__grid--single .sample__media {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 40px 90px -50px rgba(255, 166, 213, 0.85);
  overflow: hidden;
}

.samples__grid--single .sample__caption {
  margin-top: 12px;
  text-align: center;
  color: var(--muted-soft);
  font-size: 0.86rem;
}

/* ----------------------------------------------------------------- terms -- */

.section__subtitle {
  margin: clamp(28px, 5vw, 38px) 0 10px;
  font-size: 1.04rem;
  font-weight: 660;
  letter-spacing: -0.01em;
}

.terms-card {
  margin-top: clamp(18px, 3.5vw, 26px);
  padding: 2px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.terms {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.terms tr { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.terms tr:first-child { border-top: 0; }
.terms tr:last-child { border-bottom: 0; }

.terms th,
.terms td {
  padding: 12px 4px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.terms th {
  width: 46%;
  padding-right: 16px;
  font-weight: 520;
  color: var(--muted);
}

.terms td {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .terms th { width: 50%; }
  .terms-card { padding: 2px 13px; }
}

/* ---------------------------------------------------------------- rules -- */

.rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rules li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.rules strong { color: #fff; font-weight: 600; }

/* ---------------------------------------------------------- application -- */

.apply__inner {
  max-width: calc(600px + var(--pad) + var(--pad));
}

.band--apply .section__title {
  font-size: clamp(1.8rem, 4.4vw, 2.4rem);
}

.band--apply .form-slot {
  margin-top: 32px;
}

.band--apply [data-apply-note] {
  max-width: none;
  margin: 18px 0 0;
}

.band--apply .btn {
  box-shadow: 0 18px 40px -18px rgba(201, 164, 255, 0.85);
}

/* -------------------------------------------------------- select control -- */

.input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23a48fc4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 2l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  cursor: pointer;
}

.input--select option {
  background: #1b0d33;
  color: #fff;
}

.field__optional {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-soft);
  background: rgba(255, 255, 255, 0.07);
}

/* -------------------------------------------------------------- utilities -- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------ form rhythm -- */

.beta-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.beta-form .field__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
}

.beta-form .field__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  text-align: left;
}

.beta-form .field__optional { margin-left: 0; }
.beta-form .input { min-width: 0; }
.beta-form .field__row .hint { margin: 0; }
.beta-form .form-status { margin: 0; }
.beta-form .form-status:empty { display: none; }
.beta-form [data-submit] { justify-self: stretch; }
