/* Page-specific layout on top of the LinkYourSkill design tokens. */

.cosmic-glow { position: fixed; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-pad-x);
  background: var(--nav-bg);
  backdrop-filter: var(--blur-nav);
  -webkit-backdrop-filter: var(--blur-nav);
  border-bottom: 1px solid var(--card-border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.nav-actions { display: inline-flex; align-items: center; gap: 12px; }
.theme-toggle {
  appearance: none;
  cursor: pointer;
  padding: 7px 14px;
  border: 1px solid var(--btn-secondary-border);
  border-radius: var(--radius-full);
  background: var(--btn-secondary-hover-bg);
  color: var(--btn-secondary-color);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.theme-toggle:hover { border-color: var(--accent-1); }

/* ===== SECTIONS ===== */
.section { padding: clamp(56px, 9vw, 100px) var(--section-pad-x); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(36px, 6vw, 56px); }
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.section-lead { margin: 18px auto 0; color: var(--muted); font-size: var(--text-lead); line-height: var(--leading-relaxed); }

/* ===== HERO ===== */
.hero { text-align: center; padding-top: clamp(40px, 8vw, 88px); padding-bottom: 56px; }
.hero h1 { max-width: 22ch; margin: 18px auto 20px; text-wrap: balance; }
/* The claim is two sentences — give the second one its own line instead of letting the
   line box break it mid-phrase. Inline-block keeps each sentence whole when it has to wrap. */
.hero h1 .gradient-text { display: block; }
.section-head h2, .section-head .section-lead { text-wrap: balance; }
.lead {
  max-width: 62ch;
  margin: 0 auto 40px;
  color: var(--muted);
  font-size: var(--text-lead);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
}
.lead strong { color: var(--text); }

.hero .eyebrow {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-full);
  background: rgba(168, 85, 247, 0.08);
}

.hero-cta { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-cta-note { max-width: 46ch; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-relaxed); }
.hero-question { margin: 0; font-size: var(--text-lead); font-weight: 600; line-height: var(--leading-snug); text-wrap: balance; }
.lead-secondary { margin-top: -18px; font-size: var(--text-body); }
.nav-vision { color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.nav-vision:hover { color: var(--accent-light); }
.finale-note { margin: 16px 0 0; color: var(--muted); font-size: var(--text-sm); }
.finale-note a { color: var(--accent-light); }

.trust-pills { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill {
  padding: 8px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  background: var(--card-bg);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* ===== BENEFIT GRID ===== */
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-card); }
.benefit { text-align: left; }
.benefit h3 { margin-bottom: 10px; }
.benefit p { color: var(--muted); font-size: var(--text-body); line-height: var(--leading-relaxed); }

/* ===== STEPS ===== */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.step { text-align: center; position: relative; padding: 28px 18px; }
.step-num {
  position: absolute; top: 14px; right: 16px;
  font-size: var(--text-xs); font-weight: 700; color: var(--accent-light); opacity: 0.6;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-relaxed); }

/* ===== PERKS ===== */
.perk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-card); }
.perk { display: flex; gap: 16px; align-items: flex-start; text-align: left; }
.perk h3 { margin-bottom: 6px; }
.perk p { color: var(--muted); font-size: var(--text-body); line-height: var(--leading-relaxed); }

/* ===== SIGNUP ===== */
.signup { padding: 24px 0 80px; display: flex; justify-content: center; }
.signup-card { width: 100%; max-width: 680px; }
.signup-card h2 { margin: 10px 0 12px; }
.signup-sub { color: var(--muted); line-height: var(--leading-relaxed); margin-bottom: 28px; }
.signup-sub strong { color: var(--accent-light); }

form { display: flex; flex-direction: column; }
.form-step { display: flex; flex-direction: column; gap: 18px; }
.is-hidden { display: none !important; }
.step-progress { margin: 0; font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); color: var(--accent-light); }
.step-title { margin: 2px 0 0; font-size: 22px; }
.back-btn { align-self: center; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field legend { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.field legend small, .field > span small { font-weight: 400; color: var(--muted); }
.req-label { display: flex; align-items: baseline; gap: 8px; }
.req-label em { font-style: normal; font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-light); }

.input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input-lg { padding: 16px 18px; font-size: 16px; }
.input::placeholder { color: var(--muted); opacity: 0.8; }
.input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2); }
textarea.input { resize: vertical; line-height: var(--leading-snug); }

/* RT-035: visible keyboard focus for all interactive controls (buttons, links, toggle, personas). */
a:focus-visible, button:focus-visible, .theme-toggle:focus-visible, .persona:focus-within, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Required block (top, prominent) ---- */
.required-block {
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-lg);
  background: rgba(168, 85, 247, 0.05);
}
.block-btn { width: 100%; margin-top: 4px; }

/* ---- Optional block (clearly skippable) ---- */


.personas { border: none; padding: 0; margin: 0; }
.personas-intro { color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-relaxed); margin: 8px 0 4px; }
.persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.persona {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-lg);
  background: var(--input-bg);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.persona:hover { border-color: rgba(168, 85, 247, 0.4); }
.persona:has(input:checked) { border-color: rgba(168, 85, 247, 0.7); background: rgba(168, 85, 247, 0.08); }
.persona input { margin-top: 3px; accent-color: var(--accent-1); width: 16px; height: 16px; flex-shrink: 0; }
.persona .p-body { display: flex; flex-direction: column; gap: 4px; }
.persona .p-title { font-weight: 600; font-size: var(--text-sm); }
.persona .p-desc { color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }

/* ALTCHA widget — match the dark cosmic theme via its CSS custom props. */
altcha-widget {
  --altcha-border-width: 1px;
  --altcha-border-radius: var(--radius-md);
  --altcha-color-base: var(--input-bg);
  --altcha-color-border: var(--input-border);
  --altcha-color-text: var(--text);
  --altcha-color-border-focus: var(--accent-1);
  --altcha-color-checkbox-checked: var(--accent-1);
  --altcha-max-width: 100%;
  display: block;
}

.form-msg { font-size: var(--text-sm); margin: 6px 0 0; min-height: 1.2em; }
.form-msg.error { color: var(--danger-text-dark); }
.form-msg.success { color: var(--success-on-dark); }
.legal { color: var(--muted); font-size: var(--text-xs); line-height: 1.6; margin: 22px 0 0; }

/* ===== CLOSING CTA ===== */
.faq-cta { text-align: center; margin-top: 40px; }

/* ===== FOOTER ===== */
.footer {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding: 40px var(--section-pad-x);
  color: var(--muted); font-size: var(--text-xs);
  border-top: 1px solid var(--card-border);
}
.footer .dot { opacity: 0.5; }
.footer a { color: var(--accent-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .benefit-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .perk-grid, .persona-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 479px) {
  .required-block { padding: 18px; }
}

/* ===== NAV on small screens: keep the CTA compact so it never wraps / outgrows the bar ===== */
@media (max-width: 600px) {
  .nav { padding: 0 14px; gap: 10px; }
  .brand { font-size: 15px; gap: 8px; min-width: 0; }
  .brand img { width: 26px; height: 26px; }
  .brand .gradient-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-actions { gap: 8px; flex-shrink: 0; }
  .theme-toggle { padding: 6px 11px; }
  .nav-actions .btn-primary { padding: 8px 14px; font-size: 13px; white-space: nowrap; box-shadow: none; }
  .nav-actions .btn-primary.small { padding: 8px 14px; }
}
@media (max-width: 600px) {
  /* The nav bar is a CTA and an exit — the Vision link lives in the footer on phones. */
  .nav-actions .nav-vision { display: none; }
}
@media (max-width: 380px) {
  /* On the narrowest phones the theme toggle is the least important nav affordance. */
  .nav-actions .theme-toggle { display: none; }
}

/* ===== LARGE DISPLAYS — use the real estate ===== */
@media (min-width: 1500px) {
  :root { --section-max: 1520px; }
  .hero { padding-top: clamp(64px, 6vw, 112px); }
  .hero h1 { font-size: clamp(56px, 5.2vw, 84px); max-width: 20ch; }
  .lead { font-size: clamp(19px, 1.5vw, 24px); max-width: 66ch; }
  .section-lead { font-size: clamp(18px, 1.4vw, 22px); max-width: 820px; }
}
@media (min-width: 2000px) {
  :root { --section-max: 1760px; }
  .benefit-grid, .perk-grid { gap: 40px; }
}

/* ===== MOBILE PERF — the blurred glows are an expensive paint ===== */
@media (max-width: 768px) {
  .cosmic-glow-1 { filter: blur(80px); opacity: 0.7; }
  .cosmic-glow-2 { display: none; }
}
