/* Home page sections. Shapes and textures live inside blocks, never across the page. */
.home-section { padding-top: var(--space-section); }
.home-section h2 { font-size: var(--font-size-headline); }
.home-lede { color: var(--color-text-muted); font-size: 1.125rem; line-height: 1.6; max-width: 52ch; }

/* Heading on the left, supporting line on the right — wraps under on narrow screens. */
.home-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-6); margin-bottom: var(--space-12); }
.home-head h2 { max-width: 16ch; }
.home-head p { max-width: 40ch; font-size: 1.0625rem; line-height: 1.55; color: var(--color-text-muted); }

/* Proof: copy beside a muted tray of real-format results. */
.home-proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: var(--space-12) 56px; align-items: center; }
.home-proof__copy { display: flex; flex-direction: column; gap: var(--space-5); }
.home-ticks { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.home-ticks li { display: flex; align-items: flex-start; gap: var(--space-3); font-weight: var(--font-weight-medium); }
.home-ticks svg { flex-shrink: 0; color: var(--color-accent); }
.home-proof__tray { border-radius: var(--radius-2xl); background: var(--color-surface-muted); padding: clamp(16px, 2.5vw, 28px); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }

.sample-result__score { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--elevation-1); }
.sample-result__bars { margin-top: var(--space-6); }
.sample-result__fix { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--elevation-1); min-width: 0; }
.sample-result__fix p.tag { font-family: var(--font-family-mono); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-accent-text); }
.sample-result__fix h3 { font-size: var(--font-size-lg); letter-spacing: -0.02em; margin-top: var(--space-2); }
.sample-result__fix pre { margin: var(--space-4) 0 0; background: var(--color-surface-muted); padding: var(--space-4); border-radius: var(--radius-md); overflow-x: auto; white-space: pre-wrap; word-break: break-word; font-family: var(--font-family-mono); font-size: var(--font-size-xs); }
.sample-result__fix mark, .sample-result__caption mark { background: var(--color-apricot-soft); color: var(--color-apricot-soft-text); padding: 0 4px; border-radius: 4px; }
.sample-result__caption { color: var(--color-text-muted); font-size: var(--font-size-sm); padding: var(--space-1) var(--space-2) 0; }

/* Steps: three tall flat-colour blocks, each with one motif from the texture set. */
.home-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--space-5); }
.home-step { position: relative; overflow: hidden; min-height: 420px; border-radius: var(--radius-2xl); padding: var(--space-10) 36px 36px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-10); color: var(--color-text); }
.home-step__num { position: relative; font-family: var(--font-family-mono); font-size: var(--font-size-sm); }
.home-step__body { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.home-step h3 { font-size: clamp(1.75rem, 2.4vw, 2.25rem); font-weight: var(--font-weight-heavy); letter-spacing: -0.035em; line-height: 1.02; }
.home-step p { font-size: 1.0625rem; line-height: 1.5; }
.home-step__motif { position: absolute; pointer-events: none; }

.home-step--violet { background: var(--color-accent); color: var(--color-accent-contrast); }
.home-step--violet .home-step__motif { right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background-image: radial-gradient(rgba(255, 255, 255, 0.35) 2px, transparent 2.6px); background-size: 20px 20px; }

/* Crossbar: the e's −24° slash, repeated. */
.home-step--coral { background-color: var(--color-coral); background-image: repeating-linear-gradient(-24deg, transparent 0 22px, rgba(36, 27, 53, 0.08) 22px 28px); }
.home-step--coral .home-step__motif { right: 36px; top: 36px; width: 120px; height: 60px; border-radius: 0 0 60px 60px; background: var(--color-surface); }

/* Ripple: reach spreading from one improvement, with the Spark at its centre. */
.home-step--apricot { background: var(--color-apricot); }
.home-step--apricot .home-step__motif { right: -150px; top: -150px; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle at center, var(--color-text) 0 12px, transparent 12.5px), repeating-radial-gradient(circle at center, transparent 0 24px, rgba(36, 27, 53, 0.14) 24px 25.5px); }

/* What we check: hairline cards led by a coloured squircle carrying the weight. */
.home-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--space-5); }
.home-check { border: 1px solid var(--color-border); border-radius: var(--radius-2xl); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); box-shadow: var(--elevation-2); }
.home-check h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.home-check p { font-size: var(--font-size-base); line-height: 1.6; color: var(--color-text-muted); }
.home-check__weight { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 20px; font-family: var(--font-family-mono); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text); }
.home-check__weight--violet { background: var(--color-accent); color: var(--color-accent-contrast); }
.home-check__weight--coral { background: var(--color-coral); }
.home-check__weight--apricot { background: var(--color-apricot); }
.home-check__weight--lavender { background: var(--color-lavender); }

/* The page's one dark band: aubergine, a violet circle, the Spark and grain. */
.home-band { position: relative; overflow: hidden; border-radius: 44px; background: var(--color-ink-bg); color: var(--color-ink-text); padding: clamp(40px, 7vw, 96px); }
.home-band__circle { position: absolute; right: -80px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: var(--color-accent); }
.home-band__spark { position: absolute; right: 300px; top: 64px; width: 40px; height: 40px; border-radius: 50%; background: var(--color-apricot); }
.home-band__grain { position: absolute; inset: 0; mix-blend-mode: overlay; opacity: 0.5; pointer-events: none; }
.home-band__copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-6); max-width: 720px; }
.home-band__eyebrow { font-family: var(--font-family-mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-lavender); }
.home-band h2 { color: var(--color-ink-text); }
.home-band p:not(.home-band__eyebrow) { font-size: 1.125rem; line-height: 1.6; color: var(--color-ink-text-muted); max-width: 52ch; }
.home-band .nav__cta { margin-top: var(--space-2); }

.home-closing { max-width: 1280px; margin: 0 auto; padding: var(--space-section) clamp(20px, 4vw, 48px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-6); }
.home-closing h2 { font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: -0.045em; }
.home-closing p { max-width: 520px; font-size: 1.125rem; line-height: 1.55; color: var(--color-text-muted); }

/* Stagger the entrance only (opacity, transform, filter); hover properties never wait. */
.home-steps .reveal:nth-child(2), .home-checks .reveal:nth-child(2) { transition-delay: 90ms, 90ms, 90ms, 0ms, 0ms; }
.home-steps .reveal:nth-child(3), .home-checks .reveal:nth-child(3) { transition-delay: 180ms, 180ms, 180ms, 0ms, 0ms; }
.home-checks .reveal:nth-child(4) { transition-delay: 270ms, 270ms, 270ms, 0ms, 0ms; }

@media (max-width: 640px) {
  .home-step { min-height: 340px; padding: var(--space-8) var(--space-6) var(--space-6); }
  .home-band__spark { right: var(--space-8); top: var(--space-8); }
  .home-band__circle { width: 260px; height: 260px; right: -100px; bottom: -120px; }
}

/* Clay illustrations. Decorative only (empty alt). They are JPEG, not WebP or SVG, because workplace web filters block those; their backgrounds come out 252 to 254, so a 2% lift makes them
   match the 255 page exactly and no box shows. */
.home-hero { position: relative; overflow-x: clip; }
.home-hero #checker-root { position: relative; z-index: 1; }
.home-hero__flank { display: none; position: absolute; top: clamp(360px, 30vw, 440px); width: clamp(220px, 20vw, 320px); height: auto; filter: brightness(1.02); pointer-events: none; }
.home-hero__flank--left { left: max(8px, calc(50% - 700px)); }
.home-hero__flank--right { right: max(8px, calc(50% - 700px)); }
@media (min-width: 1200px) { .home-hero__flank { display: block; } }
.home-illus img { display: block; width: 100%; height: auto; margin: 0 auto; filter: brightness(1.02); }
.home-illus--answer { margin-top: var(--space-12); }
.home-illus--answer img { max-width: 1100px; }
.home-illus--map { margin-bottom: var(--space-8); }
.home-illus--map img { max-width: 1000px; }

/* Who it's for (Prompt 3) */
.home-fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: var(--space-5); }
.home-fit__col { border: 1px solid var(--color-border); border-radius: var(--radius-2xl); padding: var(--space-8); box-shadow: var(--elevation-2); }
.home-fit__col h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: var(--space-5); }
.home-fit__col .home-ticks li { font-weight: var(--font-weight-regular, 400); line-height: 1.55; }
.home-fit__col--not .home-ticks svg { color: var(--color-text-muted); }

/* Proof figures (Prompt 3) */
.home-figure__site { font-size: var(--font-size-sm, 0.875rem); font-weight: var(--font-weight-medium); letter-spacing: 0.02em; color: var(--color-accent); }
.home-figure p.home-figure__method { font-size: var(--font-size-sm, 0.875rem); margin-top: auto; }
.home-figure__footer { margin-top: var(--space-8); max-width: 70ch; color: var(--color-text-muted); }

/* Motion and calls to action. One signature moment (the light tracing the checker bar on
   load), then instant feedback everywhere else. No endless loops; all of it switches off
   under reduced motion. */
@property --beam-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Checker bar: a short run of light around the pill draws the eye to where you type,
   then it rests. Focus takes over from it. */
.home-hero .url-input-bar { position: relative; }
.home-hero .url-input-bar::before {
  content: ""; position: absolute; inset: -2px; padding: 2px; border-radius: inherit; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--beam-angle), transparent 0 62%, var(--color-lavender) 74%, var(--color-accent) 86%, var(--color-coral) 94%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.home-hero .url-input-bar:focus-within::before { animation: none; opacity: 0; transition: opacity var(--duration-quick) var(--ease-out-quart); }
.home-hero .url-input-bar.is-called::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; animation: home-called 0.8s var(--ease-out-quart) both; }

/* Shine: a soft band of light crosses "Check now", once on load and again on hover. It is the
   only button that shines, so it stays the obvious next step. */
.home-hero .url-input-bar .button { position: relative; overflow: hidden; isolation: isolate; }
.home-hero .url-input-bar .button::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transform: translateX(-130%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
}
.mk-btn { transition: background-color var(--duration-quick) var(--ease-out-quart), border-color var(--duration-quick) var(--ease-out-quart), transform var(--duration-press) var(--ease-out-quart); }
.mk-btn:active, .home-band .nav__cta:active { transform: scale(0.97); }

/* Step actions: each step ends in the thing it describes. */
.home-step__action {
  display: inline-flex; align-items: center; gap: var(--space-2); align-self: flex-start; min-height: 44px; margin-top: var(--space-3); padding: 0 var(--space-5);
  border-radius: var(--radius-full); font-weight: var(--font-weight-semibold); font-size: var(--font-size-base); text-decoration: none;
  background: var(--color-ink-bg); color: var(--color-ink-text);
  transition: background-color var(--duration-quick) var(--ease-out-quart), transform var(--duration-press) var(--ease-out-quart);
}
.home-step--violet .home-step__action { background: var(--color-surface); color: var(--color-accent-text); }
.home-step__action:hover { color: var(--color-ink-text); background: #000; }
.home-step--violet .home-step__action:hover { color: var(--color-accent-text); background: var(--color-accent-soft); }
/* Press feedback goes on the card, not the link: scaling the link would shrink the card-sized hit area mid-click. */
.home-step:active { scale: 0.985; }
.home-step__action:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.home-step__action::before { content: ""; position: absolute; inset: 0; }
/* The card is the link's hit area, so the body must not be its positioned parent. The motif
   moves behind the text instead (isolated card, negative z-index). */
.home-step { cursor: pointer; isolation: isolate; }
.home-step .home-step__body { position: static; }
.home-step .home-step__motif { z-index: -1; }
.home-step__action svg, .home-nudge .mk-btn svg { transition: transform var(--duration-quick) var(--ease-out-quart); }
.home-step__motif { transition: transform var(--duration-entrance) var(--ease-out-expo); }

/* Nudge after "who it's for": the moment a visitor recognises themselves. */
.home-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-4) var(--space-6); margin-top: var(--space-10); text-align: center; }
.home-nudge p { font-size: 1.125rem; font-weight: var(--font-weight-semibold); }

/* Ticks and crosses draw in, one line after another, as their list arrives. */
.home-ticks svg path { stroke-dasharray: 1; stroke-dashoffset: 0; }
html.js-reveal .reveal:not(.is-visible) .home-ticks svg path { stroke-dashoffset: 1; }
.reveal.is-visible .home-ticks svg path { transition: stroke-dashoffset 0.45s var(--ease-out-quart) calc(250ms + var(--i, 0) * 90ms); }

/* Spotlight: a soft violet light follows the pointer across the proof figures. They don't lift,
   because only things you can click lift on this page. */
.home-spot { position: relative; isolation: isolate; }
.home-step.reveal { transition: opacity var(--duration-entrance) var(--ease-out-expo), transform var(--duration-entrance) var(--ease-out-expo), filter var(--duration-entrance) var(--ease-out-expo), translate var(--duration-state) var(--ease-out-quart), box-shadow var(--duration-state) var(--ease-out-quart), scale var(--duration-press) var(--ease-out-quart); }
.home-spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--duration-quick) var(--ease-out-quart);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--color-accent) 11%, transparent), transparent 70%);
}

@media (hover: hover) and (pointer: fine) {
  .home-spot:hover::before { opacity: 1; }
  .home-step:hover { translate: 0 -6px; box-shadow: var(--elevation-3); }
  .home-step--violet:hover .home-step__motif { transform: rotate(18deg) scale(1.06); }
  .home-step--coral:hover .home-step__motif { transform: translateY(10px); }
  .home-step--apricot:hover .home-step__motif { transform: scale(1.08); }
  .home-step__action:hover svg, .home-nudge .mk-btn:hover svg { transform: translateX(4px); }
  .home-hero .url-input-bar .button:hover::after { animation: home-shine-hover 0.8s var(--ease-out-quart); }
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero .url-input-bar::before { animation: home-beam-spin 2.2s linear 0.5s 3, home-beam-life 6.6s ease 0.5s both; }
  .home-hero .url-input-bar .button::after { animation: home-shine 1s var(--ease-out-quart) 7s both; }
}

@keyframes home-beam-spin { to { --beam-angle: 360deg; } }
@keyframes home-beam-life { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes home-shine { from { transform: translateX(-130%) skewX(-20deg); } to { transform: translateX(130%) skewX(-20deg); } }
@keyframes home-shine-hover { from { transform: translateX(-130%) skewX(-20deg); } to { transform: translateX(130%) skewX(-20deg); } }
@keyframes home-called { from { box-shadow: 0 0 0 0 rgba(98, 70, 234, 0.45); } to { box-shadow: 0 0 0 16px rgba(98, 70, 234, 0); } }

@media (prefers-reduced-motion: reduce) {
  .home-hero .url-input-bar::before, .home-hero .url-input-bar.is-called::after { animation: none; display: none; }
  .home-hero .url-input-bar .button::after { display: none; }
  .home-spot, .home-step, .home-step__motif, .home-step__action, .home-step__action svg, .home-nudge .mk-btn svg { translate: none !important; transition-property: opacity, box-shadow, background-color; }
  .home-step__motif { transform: none !important; }
  html.js-reveal .reveal:not(.is-visible) .home-ticks svg path { stroke-dashoffset: 0; }
  .reveal.is-visible .home-ticks svg path { transition: none; }
  .mk-btn:active, .home-band .nav__cta:active { transform: none; }
  .home-step:active { scale: none; }
}

/* 2. The sample fix writes itself: each line types out (one step per character, it is
   monospace), then its TODO_CONFIRM lights up. Lines stay visible without JS. */
.typed-fix__line { display: inline-block; white-space: pre; }
.sample-result__fix .typed-fix mark { padding: 0; border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal .reveal:not(.is-visible) .typed-fix__line { clip-path: inset(0 100% 0 0); }
  html.js-reveal .reveal:not(.is-visible) .typed-fix mark { background-color: transparent; }
  .reveal.is-visible .typed-fix__line { animation: home-type calc(120ms + var(--n) * 14ms) steps(var(--n), jump-none) calc(400ms + var(--i) * 150ms) both; }
  .reveal.is-visible .typed-fix mark { animation: home-mark 0.9s var(--ease-out-quart) calc(520ms + var(--i) * 150ms + var(--n) * 14ms) both; }
}
/* Narrow screens: long lines must wrap, and a wrapped line can't be typed by clipping, so each
   line fades in instead. */
@media (max-width: 600px) {
  .typed-fix__line { display: inline; white-space: pre-wrap; }
  html.js-reveal .reveal:not(.is-visible) .typed-fix__line { clip-path: none; opacity: 0; }
  .reveal.is-visible .typed-fix__line { animation: home-line-in 0.4s var(--ease-out-quart) calc(300ms + var(--i) * 110ms) both; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .typed-fix__line { opacity: 1 !important; animation: none !important; }
}
@keyframes home-line-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes home-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes home-mark { 0% { background-color: transparent; } 35% { background-color: var(--color-apricot); } 100% { background-color: var(--color-apricot-soft); } }

/* 3. Illustrations follow the scroll (CSS scroll-driven animation, no JS). The site-to-answer
   strip is drawn left to right along its path; the answer map spreads out from its chat
   bubble; the hero flanks drift up as you leave. Browsers without support show them still. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .home-scroll-wipe img { animation: home-wipe linear both; animation-timeline: view(); animation-range: entry 15% cover 50%; }
    .home-scroll-spread img { animation: home-spread linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
    .home-hero__flank { animation: home-drift linear both; animation-timeline: scroll(root); animation-range: 0 900px; }
  }
}
@keyframes home-wipe { from { clip-path: inset(0 100% 0 0); opacity: 0.4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes home-spread { from { clip-path: circle(8% at 50% 22%); opacity: 0.4; } to { clip-path: circle(110% at 50% 22%); opacity: 1; } }
@keyframes home-drift { to { translate: 0 -60px; } }

/* Depth: the hero's raised and floating surfaces use the shared elevation scale (one light
   source). The URL box is raised and touchable; the panel under it floats. */
.home-hero .url-input-bar { box-shadow: var(--elevation-3); }
.home-hero .url-input-bar:focus-within { box-shadow: var(--elevation-3), 0 0 0 4px var(--color-focus-halo); }
.home-hero .checker-widget__panel { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, var(--elevation-4); }

/* Frosted surfaces turn solid for people who ask for less transparency. */
@media (prefers-reduced-transparency: reduce) {
  .home-hero .checker-widget__panel { background: var(--color-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
