/* ============================================================================
   ICG Onboarding Form — light editorial web system (THE-BRAIN/BRAND.md §6)
   Canonical for icarusgrowthsystems.com pages.

   The role swap that matters: lime is a BUTTON, never type. Highlight text is
   green #15803D, editorial accent is deep purple #8E009E. Ground is #F8F8F8.

   Box budget ([[Boxes Are A Scarce Resource]]): two boxed objects per view.
   Spent on (1) the form card and (2) the radio-card group. Everything else is
   type, 1px rules and whitespace. Inputs keep borders — that is an affordance,
   not a container claim.
   ========================================================================= */

:root {
  --bg: #F8F8F8;
  --panel: #FFFFFF;
  --panel2: #F3F3F5;
  --ink: #14151C;
  --ink-2: #3A3B42;
  --mute: #5F6068;
  --mute2: #8A8B93;
  --line: #E2E2E6;
  --hl: #15803D;
  --accent: #8E009E;
  --orange: #D93F00;
  --tint-hl: rgba(21, 128, 61, .07);
  --line-hl: rgba(21, 128, 61, .34);
  --tint-accent: rgba(142, 0, 158, .035);
  --line-accent: rgba(142, 0, 158, .30);
  --line-orange: rgba(217, 63, 0, .34);
  --glow1: rgba(142, 0, 158, .06);
  --glow2: rgba(21, 128, 61, .045);
  --shadow: 0 8px 24px rgba(20, 21, 28, .10);
  --shadow-h: 0 10px 30px rgba(20, 21, 28, .16);

  /* theme-independent — the button survives the swap */
  --btn-bg: #E0F014;
  --btn-fg: #14151C;
  --btn-bg-h: #EAFF2E;

  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;              /* ICG light web system: body >= 19px */
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* two ambient washes so the off-white does not read as a blank document */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 88% -8%, var(--glow1), transparent 60%),
    radial-gradient(52rem 36rem at 6% -6%, var(--glow2), transparent 62%);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

/* ---------- masthead ---------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 38px;
}
/* Masthead is type only. IcG_Logo.png is a detailed monogram on an opaque white
   square; at 30px the mark is illegible and the square needs a blend to disappear.
   The portal this layout is ripped from set its masthead as type for the same
   reason. The image lockup still runs in the footer, per BRAND.md §7. */
.masthead .wordmark {
  font-family: var(--mono);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- progress rail (ripped from the Funnel Brief Portal) ---------- */

.rail {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.rail-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  width: 104px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: default;
}
.rail-step[data-clickable="1"] { cursor: pointer; }
.rail-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: .9rem;
  font-weight: 700;
  background: var(--panel2);
  color: var(--mute2);
  border: 1.5px solid var(--line);
  transition: background .18s, color .18s, border-color .18s;
}
.rail-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--mute2);
  text-align: center;
  line-height: 1.3;
}
.rail-step[data-state="active"] .rail-dot {
  background: var(--hl);
  border-color: var(--hl);
  color: #fff;
}
.rail-step[data-state="active"] .rail-label { color: var(--ink); font-weight: 700; }
.rail-step[data-state="done"] .rail-dot {
  background: var(--tint-hl);
  border-color: var(--line-hl);
  color: var(--hl);
}
.rail-step[data-state="done"] .rail-label { color: var(--mute); }
.rail-line {
  flex: 1 1 auto;
  height: 1.5px;
  background: var(--line);
  margin-top: 18px;
  min-width: 16px;
}
.rail-line[data-state="done"] { background: var(--line-hl); }

/* ---------- the card — BOXED OBJECT 1 of 2 ------------------------------ */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 46px 44px 40px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
h1 {
  font-size: 2.1rem;
  line-height: 1.14;
  letter-spacing: -.021em;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--ink);
}
.blurb {
  color: var(--ink-2);
  margin: 0 0 12px;
  font-size: 1.02rem;
}

/* the "save as you go" note — a 2px rule, not a box */
.note {
  border-left: 2px solid var(--line-hl);
  padding: 2px 0 2px 16px;
  margin: 22px 0 34px;
  color: var(--ink-2);
  font-size: .93rem;
  line-height: 1.55;
}
.note strong { color: var(--ink); }

/* ---------- field stack: label / help / control / error ----------------- */

.field { margin-bottom: 34px; }
.field:last-of-type { margin-bottom: 8px; }

.field-label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 5px;
}
.req { color: var(--orange); margin-left: 3px; }
.opt {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute2);
  margin-left: 8px;
  font-weight: 500;
}
.field-help {
  color: var(--mute);
  font-size: .88rem;
  line-height: 1.55;
  margin: 0 0 11px;
}
.field-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 12px;
}
.field-links a {
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--hl);
  text-decoration: none;
  border-bottom: 1px solid var(--line-hl);
  padding-bottom: 1px;
}
.field-links a:hover { border-bottom-color: var(--hl); }

input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 13px 15px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 92px; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--hl);
  box-shadow: 0 0 0 3px var(--tint-hl);
}
input::placeholder, textarea::placeholder { color: var(--mute2); }

.field[data-invalid="1"] input,
.field[data-invalid="1"] textarea { border-color: var(--orange); }
.field-error {
  display: none;
  color: var(--orange);
  font-size: .84rem;
  margin-top: 7px;
  font-weight: 500;
}
.field[data-invalid="1"] .field-error { display: block; }

/* info trigger — the "Funnel descriptions" pattern */
.info-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 11px;
}
.info-btn:hover { text-decoration: underline; }

/* starter chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip {
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: .72rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover {
  border-color: var(--line-hl);
  color: var(--hl);
  background: var(--tint-hl);
}

/* ---------- radio cards — BOXED OBJECT 2 of 2 --------------------------- */

.cards { display: flex; flex-direction: column; gap: 9px; }
.opt-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 9px;
  border: 2px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt-card:hover { border-color: var(--mute2); }
.opt-card[data-selected="1"] {
  border-color: var(--accent);
  background: var(--tint-accent);
}
.opt-card input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.opt-card .t { font-weight: 700; font-size: .95rem; color: var(--ink); display: block; }
.opt-card .d { font-size: .85rem; color: var(--mute); line-height: 1.5; margin-top: 2px; display: block; }

/* ---------- review step -------------------------------------------------- */

.review-group { margin-bottom: 34px; }
.review-group h2 {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 4px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.edit-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--hl);
}
.edit-link:hover { text-decoration: underline; }
.review-row { padding: 15px 0; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: none; }
.review-q { font-size: .85rem; color: var(--mute); margin: 0 0 5px; line-height: 1.45; }
.review-a {
  font-size: .98rem;
  color: var(--ink);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: 500;
}
.review-a.empty { color: var(--mute2); font-style: italic; font-weight: 400; }
.review-a.yes { color: var(--hl); font-weight: 700; }
.review-a.no { color: var(--orange); font-weight: 700; }
.review-a.masked { font-family: var(--mono); font-size: .88rem; letter-spacing: .04em; }

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.btn {
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 700;
  border-radius: 9px;
  padding: 13px 30px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, box-shadow .15s, border-color .15s, opacity .15s;
}
/* ONE filled lime element per view — the thing you click */
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-h); box-shadow: var(--shadow-h); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: none; color: var(--mute); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--mute2); }
.nav-spacer { flex: 1; }

.save-hint {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .05em;
  color: var(--mute2);
  text-align: center;
  margin-top: 16px;
}
.save-hint b { color: var(--hl); font-weight: 700; }

/* ---------- modal -------------------------------------------------------- */

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 28, .42);
  display: none;
  place-items: center;
  padding: 24px;
  z-index: 50;
}
.modal-back[data-open="1"] { display: grid; }
.modal {
  background: var(--panel);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-h);
  max-width: 620px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 34px 34px 30px;
}
.modal h3 { margin: 0 0 16px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.modal ul { margin: 0; padding-left: 20px; }
.modal li { margin-bottom: 9px; font-size: .93rem; color: var(--ink-2); line-height: 1.55; }

/* ---------- states ------------------------------------------------------- */

.centred { text-align: center; padding: 30px 0 14px; }
.centred h1 { font-size: 1.9rem; }
.centred .blurb { max-width: 46ch; margin-inline: auto; }
.tick { font-size: 2.6rem; line-height: 1; margin-bottom: 18px; }
.resume-box {
  border-left: 2px solid var(--line-hl);
  padding: 4px 0 4px 16px;
  margin: 26px 0 0;
  text-align: left;
}
.resume-box .k {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute2);
  display: block;
  margin-bottom: 5px;
}
.resume-box input {
  font-family: var(--mono);
  font-size: .78rem;
  padding: 10px 12px;
}
.banner {
  border-left: 2px solid var(--line-orange);
  padding: 3px 0 3px 16px;
  margin-bottom: 26px;
  color: var(--orange);
  font-size: .9rem;
  font-weight: 500;
  display: none;
}
.banner[data-show="1"] { display: block; }

/* ---------- footer ------------------------------------------------------- */

.brandfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding: 0 4px;
}
.brandfoot .brand { display: flex; align-items: center; gap: 9px; }
.brandfoot img { height: 19px; mix-blend-mode: multiply; opacity: .7; }
.brandfoot .name, .brandfoot .url {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .07em;
  color: var(--mute2);
}

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 640px) {
  body { font-size: 18px; }
  .wrap { padding: 30px 15px 54px; }
  .card { padding: 30px 21px 28px; border-radius: 12px; }
  h1 { font-size: 1.65rem; }
  .rail-step { width: 74px; }
  .rail-dot { width: 33px; height: 33px; font-size: .8rem; }
  .rail-label { font-size: .58rem; }
  .nav { flex-direction: column-reverse; align-items: stretch; }
  .nav .btn { width: 100%; }
  .nav-spacer { display: none; }
}

/* ---------------------------------------------------------------------------
   Embeds — the Make-connections Loom on Connections, and the Calendly booking
   widget on the confirmation screen.

   Deliberately BORDERLESS. The page's box budget is already spent on the form
   card and the radio-card group ([[Boxes Are A Scarce Resource]] — two boxed
   objects per view). A video and a calendar are each self-evidently their own
   object; wrapping them in a panel adds a third container and buys nothing.
   A hairline rule above and generous margin do the separating instead.
   --------------------------------------------------------------------------- */

.embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 16px 0 10px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel2);
  box-shadow: var(--shadow);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* aspect-ratio fallback for older Safari */
@supports not (aspect-ratio: 16 / 9) {
  .embed { height: 0; padding-bottom: 56.25%; }
}

.embed-alt { margin: 0 0 4px; }
.embed-alt a { color: var(--hl); text-decoration: none; border-bottom: 1px solid var(--line-hl); }
.embed-alt a:hover { border-bottom-color: var(--hl); }

.book-head {
  margin: 40px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.book-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
}

.calendly {
  width: 100%;
  height: 760px;
  margin: 6px 0 10px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.calendly iframe { width: 100%; height: 100%; border: 0; }

@media (max-width: 600px) {
  .calendly { height: 1000px; }
}

/* ---------- confirmation screen blocks ----------------------------------- */
/* The number and the community link. Borderless under a hairline rule — the
   page's box budget is already spent on the card and the Calendly embed
   ([[Boxes Are A Scarce Resource]]: two boxed objects per view). */

.done-block {
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.done-block h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
}
.done-body {
  margin: 0 auto 14px;
  max-width: 46ch;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.done-number {
  margin: 0 0 18px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.done-number a {
  color: var(--hl);
  text-decoration: none;
  border-bottom: 2px solid var(--line-hl);
}
.done-number a:hover { border-bottom-color: var(--hl); }
.done-cta { display: inline-block; text-decoration: none; }
.done-link {
  font-weight: 700;
  color: var(--hl);
  text-decoration: none;
  border-bottom: 1px solid var(--line-hl);
}
.done-link:hover { border-bottom-color: var(--hl); }

@media (max-width: 560px) {
  .done-number { font-size: 1.3rem; }
  .done-cta { width: 100%; }
}
