/* ---- Brand tokens: builtby.shack. Dark charcoal, denim accent, linen text ---- */
:root {
  color-scheme: dark;
  --bg: #16140f;            /* charcoal */
  --surface: #211e19;
  --surface-2: #2c2923;
  --text: #f4efe6;          /* linen */
  --muted: rgba(244, 239, 230, 0.64);
  --line: rgba(244, 239, 230, 0.12);
  --line-2: rgba(244, 239, 230, 0.2);
  --denim: #4a6b8a;         /* the accent: fills */
  --denim-deep: #2f4a66;
  --denim-lite: #9fb6cd;    /* accent text on dark */
  --denim-wash: #e3e9ef;
  --denim-tint: rgba(74, 107, 138, 0.24);
  --denim-hover: color-mix(in srgb, #4a6b8a 82%, #9fb6cd);
  --danger: #d08a80;
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-head: "Inter Tight", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

[hidden] { display: none !important; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

/* Soft denim glow + faint grid that fades out */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 600px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(74, 107, 138, 0.38), transparent 70%),
    linear-gradient(rgba(244, 239, 230, 0.05) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(244, 239, 230, 0.05) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(#000 20%, transparent);
  mask-image: linear-gradient(#000 20%, transparent);
}

a { color: var(--denim-lite); }

h1, h2 { font-family: var(--font-head); letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }

.hl { color: var(--denim-lite); }

.wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 48px 16px 40px;
}

.wrap--form { max-width: 560px; padding-top: 28px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 11.5px/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--denim-lite);
}

.eyebrow::before { content: ""; width: 20px; height: 1.5px; background: currentColor; }

/* ---- Profile ---- */
.profile { text-align: center; margin-bottom: 28px; }

.avatar {
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(140deg, var(--denim-lite), var(--denim));
  box-shadow: 0 0 40px -6px rgba(74, 107, 138, 0.6);
}

.avatar img,
.avatar span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg);
  object-fit: cover;
  background: var(--surface);
  color: var(--denim-lite);
  font: 700 34px/1 var(--font-head);
  letter-spacing: -0.03em;
}

.name { margin: 0; font-size: 32px; font-weight: 700; }

.handle { margin: 8px 0 0; font-weight: 600; font-size: 15px; }
.handle a { text-decoration: none; }

.tagline {
  max-width: 24ch;
  margin: 18px auto 0;
  font: 600 21px/1.2 var(--font-head);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.subline { max-width: 34ch; margin: 10px auto 0; color: var(--muted); font-size: 15px; }

/* ---- Link cards ---- */
.links { display: grid; gap: 12px; }

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

a.card:hover, button.card:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--surface-2); }
.card:active { transform: translateY(0); }
.card:focus-visible { outline: 2px solid var(--denim-lite); outline-offset: 3px; }

.card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--denim-tint);
  color: var(--denim-lite);
}

.card__body { flex: 1; min-width: 0; }

.card__title {
  display: block;
  font: 700 18px/1.2 var(--font-head);
  letter-spacing: -0.02em;
}

.card__sub { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); }

.card__arrow { flex: none; color: var(--muted); }

/* The money link */
.card--primary {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  border: none;
  background: var(--denim);
  box-shadow: 0 24px 50px -24px rgba(74, 107, 138, 0.85);
}

.card--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 120% at 100% 0%, rgba(159, 182, 205, 0.22), transparent 60%);
  pointer-events: none;
}

.card--primary > * { position: relative; }
a.card--primary:hover { background: var(--denim-hover); }
.card--primary .card__title { font-size: 23px; letter-spacing: -0.03em; }
.card--primary .card__sub { color: var(--text); font-size: 14.5px; }
.card--primary .eyebrow { margin-bottom: 10px; color: var(--text); }

.card--primary .card__arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  transition: transform 0.25s var(--ease);
}

.card--primary:hover .card__arrow { transform: translateX(3px); }

/* Cards with a row of pill buttons (podcast platforms, freebie links) */
.card--split { flex-wrap: wrap; cursor: default; }
.platforms { display: flex; gap: 8px; }
.card--split .platforms { flex-basis: 100%; }

.platform {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--denim-wash);
  color: var(--denim-deep);
  font: 600 14.5px/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.platform:hover { background: var(--denim); color: var(--text); }
.platform:focus-visible { outline: 2px solid var(--denim-lite); outline-offset: 2px; }

/* Freebie: inline email capture */
.card[aria-expanded="true"] { border-radius: var(--radius) var(--radius) 0 0; border-bottom-color: transparent; transform: none; }
.card[aria-expanded] .card__arrow { transition: transform 0.25s var(--ease); }
.card[aria-expanded="true"] .card__arrow { transform: rotate(180deg); }

.capture {
  padding: 4px 18px 18px;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}

.capture .row { display: grid; gap: 10px; }
.capture__done p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }

/* ---- Footer ---- */
.socials { display: flex; justify-content: center; gap: 10px; margin-top: 32px; }

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(244, 239, 230, 0.04);
  color: var(--muted);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.socials a:hover { background: var(--surface-2); color: var(--text); border-color: rgba(244, 239, 230, 0.32); }

.foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---- Forms ---- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.back:hover { color: var(--text); }

.form-head .eyebrow { margin-bottom: 14px; }
.form-head h1 { margin: 0; font-size: 36px; font-weight: 700; }
.form-head p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

.progress { margin: 28px 0 24px; }

.progress__label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font: 600 11.5px/1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.progress__label span:first-child { color: var(--denim-lite); }

.progress__bar { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progress__fill { height: 100%; width: 33.33%; border-radius: 4px; background: var(--denim-lite); transition: width 0.4s var(--ease); }

.step { display: grid; gap: 24px; }

.field { display: grid; gap: 8px; border: none; margin: 0; padding: 0; min-width: 0; }

.field > label,
.field > legend { padding: 0; font-size: 15px; font-weight: 600; }

.field .hint { font-weight: 400; color: var(--muted); }

.input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* stops iOS zoom on focus */
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder { color: var(--muted); opacity: 0.8; }
.input:focus { outline: none; border-color: var(--denim-lite); box-shadow: 0 0 0 4px var(--denim-tint); }
textarea.input { min-height: 108px; resize: vertical; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choices--tight { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }

.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.choice span:hover { border-color: rgba(244, 239, 230, 0.32); }
.choice input:checked + span { border-color: var(--denim-lite); background: var(--denim-tint); color: var(--text); font-weight: 600; }
.choice input:focus-visible + span { outline: 2px solid var(--denim-lite); outline-offset: 2px; }

.field.is-invalid .input,
.field.is-invalid .choice span { border-color: var(--danger); }

.error { display: none; color: var(--danger); font-size: 14px; }
.field.is-invalid .error { display: block; }

.actions { display: flex; gap: 10px; margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 16px/1 var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, opacity 0.2s;
}

.btn--primary { flex: 1; background: var(--denim); color: var(--text); box-shadow: 0 12px 28px -14px rgba(74, 107, 138, 0.9); }
.btn--primary:hover:not(:disabled) { background: var(--denim-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); border-color: rgba(244, 239, 230, 0.32); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn:focus-visible { outline: 2px solid var(--denim-lite); outline-offset: 3px; }

.notice {
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

.form-error { color: var(--danger); font-size: 14px; margin: 0; }

/* Marketing consent checkbox */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
}

.consent input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.consent input::after {
  content: "";
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: translateY(-1px) rotate(-45deg);
  opacity: 0;
}

.consent input:checked { background: var(--denim); border-color: var(--denim-lite); }
.consent input:checked::after { opacity: 1; }
.consent input:focus-visible { outline: 2px solid var(--denim-lite); outline-offset: 2px; }

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

/* Thank-you state */
.done { text-align: center; padding: 40px 0 8px; }

.done__check {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--denim);
  color: var(--text);
  box-shadow: 0 0 40px -4px rgba(74, 107, 138, 0.7);
}

.done h1 { margin: 0; font-size: 32px; font-weight: 700; }
.done p { max-width: 38ch; margin: 12px auto 0; color: var(--muted); }
.done p strong { color: var(--text); }
.done .card { margin-top: 28px; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
