/*
 * HiFy Claude Skills — install page styles
 *
 * Brand canon: dark-dominant marketing surface (per brand-visual.md).
 * Italic uppercase display headline (Host Grotesk Italic stands in for the
 * canonical HiFy Rounded Italic — to be upgraded to the real face in v1.1
 * once the WOFF2 is bundleable; tracked in BIZ-1154).
 * Brand gradient is rare and earned — used once, on the CTA.
 * Asymmetric left-aligned layout. Confetti graphics deliberately omitted —
 * a utility page doesn't need them.
 *
 * Sizing/spacing/font: rem and clamp(), per shared/references/code-rules.md.
 * Only px usage is borders, hairlines, and pattern-internal hairlines.
 */

:root {
  /* HiFy brand canon colors (per shared/canon/brand-rules.md + brand-visual.md) */
  --orange: #ff6250;
  --pink: #ee3d8a;
  --yellow: #fede2f;
  --gold: #fcaf51;

  /* Cool-neutral grey ramp — mirrors web/v2.1.1/app/styles/tokens.css. */
  --grey-50:  #f9fafb;
  --grey-200: #dee2e8;
  --grey-450: #627184;
  --grey-550: #414b58;
  --grey-650: #2b323b;
  --grey-700: #353b45;
  --grey-850: #16191d;
  --grey-950: #0d0f12;
  --white:    #ffffff;

  /* Surfaces */
  --bg: var(--grey-950);
  --bg-secondary: var(--grey-850);
  --surface: var(--grey-650);
  --text: var(--grey-50);
  --text-muted: var(--grey-450);
  --text-dim: var(--grey-550);
  --border: rgba(249, 250, 251, 0.08);
  --border-stronger: rgba(249, 250, 251, 0.18);
  --surface-tint: rgba(249, 250, 251, 0.04);   /* faint neutral wash for chips, inline code bg */

  /* Brand gradient (orange→pink at 242deg) — used ONCE, on the CTA */
  --gradient-cta: linear-gradient(242deg, var(--orange) 0%, var(--pink) 100%);

  /* Type */
  --font-body: 'Host Grotesk', system-ui, -apple-system, sans-serif;
  --font-display: 'Host Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Layout — rem (root = 16px), clamp for fluidity */
  --container-max: 45rem;                       /* utility page width — tighter than the marketing 87.5rem */
  --section-y: clamp(3rem, 8vw, 6rem);
  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --radius-lg: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Avoid single-word orphans on paragraph wraps. Per shared/references/typography.md. */
  text-wrap: pretty;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 3rem);
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  margin-bottom: var(--section-y);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-size: clamp(3.375rem, 11vw, 7rem);
  color: var(--text);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  /* Auto-balance lines to avoid widows/orphans on display headlines. */
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.45;
  color: var(--grey-200);
  max-width: 56ch;
}

/* ─── Sections ─────────────────────────────────────────────────────────── */

section {
  margin-bottom: var(--section-y);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--border);
}

.section-head {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.caption {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ─── What you get ─────────────────────────────────────────────────────── */

.bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bullets li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--grey-200);
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5625rem;
  height: 0.5625rem;
  background: var(--gradient-cta);   /* brand orange→pink — earned: small, intentional accent */
  border-radius: 2px;
  transform: rotate(45deg);
}

.bullets strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Request access form ──────────────────────────────────────────────── */

.label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

input[type="email"] {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;                    /* ≥16px / 1rem to avoid iOS zoom-on-focus */
  line-height: 1.4;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 120ms ease;
}

input[type="email"]::placeholder {
  color: var(--text-muted);
}

input[type="email"]:hover {
  border-color: var(--border-stronger);
}

input[type="email"]:focus {
  border-color: var(--pink);
  border-width: 2px;
  padding: 0.8125rem 0.9375rem;       /* compensate for +1px border so layout doesn't shift */
}

input[type="email"]:invalid:not(:placeholder-shown) {
  border-color: var(--pink);
}

/* Honeypot — off-screen positioning, raw px is intentional (hairline / outside viewport) */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cta {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--white);
  background: var(--gradient-cta);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.cta:hover:not(:disabled) {
  transform: translateY(-1px);
}

.cta:active:not(:disabled) {
  transform: translateY(0);
}

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

.cta:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.result {
  margin-top: 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  min-height: 1.375rem;
}

.result-success {
  color: var(--yellow);
}

.result-error {
  color: var(--pink);
}

/* ─── What happens next ────────────────────────────────────────────────── */

.numbered {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.numbered li {
  counter-increment: step;
  padding-left: 3rem;
  position: relative;
  color: var(--grey-200);
}

.numbered li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
  /* Quiet neutral chip — brand color isn't earned here, the italic
     display numeral does the personality work on its own. */
  color: var(--text-muted);
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  line-height: 1;
}

.numbered strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Code (inline) ────────────────────────────────────────────────────── */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.125rem 0.5rem;
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--gold);
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem clamp(1.5rem, 6vw, 3rem);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.muted {
  color: var(--text-dim);
  margin-left: 0.75rem;
}

/* ─── Responsive tweaks ────────────────────────────────────────────────── */

@media (max-width: 30rem) {
  main {
    padding: clamp(2rem, 8vw, 4rem) 1.25rem;
  }

  .lede {
    font-size: 1.0625rem;
  }

  .numbered li {
    padding-left: 2.625rem;
  }
}

/* ─── Reduced motion ───────────────────────────────────────────────────── */

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