/* knitlab.pro's home page (/): the ASCII cloth of fabric.js behind the name and the motto, the way in as one quiet
 * pill, in the KnitLab landing's own lavender palette, light only (app.js and design/boot.js show / in the light theme).
 * Every rule is under body.home, which app.js sets on / alone (the palette block also under :root[data-home]). The palette's colours are the custom properties of the
 * first block, and nowhere else. No text is under 13 px (the member pages' layout gate). */
/* :root[data-home] is set by design/boot.js before the first paint of /, so the ground is lavender from the start. */
:root[data-home] body, body.home {
  --home-paper: #f3f2fe;
  --home-muted: #4f4c67;
  --home-line: #d3cdf2;
  --home-accent: #5b4ecd;
  --home-accent-hover: #4a3db7;
  --home-accent-soft: #edebff;
  --home-on-accent: #ffffff;
  --home-pill: #ffffffd9;
  --home-glow: #5b4ecd0a;
  --home-wash-0: #f3f2fef5;
  --home-wash-1: #f3f2fed9;
  --home-wash-1-phone: #f3f2fec9;
  --home-wash-2: #f3f2fe20;
  --fabric-shade-1: #d3cdf2;
  --fabric-shade-2: #b5a3e5;
  --fabric-shade-3: #8e80cf;
  --fabric-shade-4: #5b4ecd;
  --home-font: Inter, Arial, Helvetica, sans-serif;
  background: var(--home-paper);
}

/* The top bar lies over the cloth: the name, small and muted, and the language (a member's menus too), on a faint
 * wash of the ground so its words keep 4.5:1 over the darkest glyph. */
body.home .topbar { position: absolute; inset: 0 0 auto; z-index: 3; min-height: 90px; padding-inline: 5%; background: var(--home-wash-1); border: 0; }
body.home .topbar .brand { font-family: var(--home-font); font-size: 21px; font-weight: 650; letter-spacing: -1.4px; color: var(--home-muted); gap: 10px; }
body.home .topbar .brand__plate { min-height: 0; padding: 4px 5px; border: 1px solid currentColor; border-radius: 3px; background: none; color: inherit; font-size: 13px; font-weight: 600; letter-spacing: 1px; }

body.home .landing { isolation: isolate; position: relative; display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100svh; overflow: hidden; background: var(--home-paper); }
body.home .ascii-fabric { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: -2; pointer-events: none; }
body.home .landing::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 31% 34% at 50% 49%, var(--home-wash-0) 0%, var(--home-wash-1) 42%, var(--home-wash-2) 100%); pointer-events: none; }
body.home .landing-content { text-align: center; padding: 100px 24px 120px; max-width: 760px; width: 100%; }
body.home .landing-content h1 { font-family: var(--home-font); color: var(--home-accent); font-size: clamp(64px, 8.4vw, 112px); letter-spacing: -7px; line-height: 1; font-weight: 500; margin: 0; display: flex; align-items: flex-start; justify-content: center; gap: 13px; }
body.home .landing-content h1 span { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; font-weight: 500; padding-top: 12px; }
body.home .landing-motto { font-family: var(--home-font); font-size: 13px; letter-spacing: 2px; color: var(--home-muted); margin: 27px 0 36px; }

/* The way in: Request access and Log in, or Open the lab, in one frosted pill. */
body.home .landing-controls { display: inline-flex; align-items: center; justify-content: center; padding: 7px; background: var(--home-pill); border: 1px solid var(--home-line); border-radius: 40px; box-shadow: 0 6px 32px var(--home-glow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.home .landing-controls a { font-family: var(--home-font); font-size: 13px; display: flex; align-items: center; gap: 24px; min-height: 44px; padding: 10px 23px; color: var(--home-accent); text-decoration: none; white-space: nowrap; border-radius: 28px; transition: background .2s, color .2s; }
body.home .landing-controls a:first-child { background: var(--home-accent); color: var(--home-on-accent); }
body.home .landing-controls a:first-child:hover { background: var(--home-accent-hover); }
body.home .landing-controls a:hover { background: var(--home-accent-soft); }
body.home .landing-controls a:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 3px; }
body.home .landing-controls .arrow { display: inline-block; }
:root[dir="rtl"] body.home .landing-controls .arrow { transform: scaleX(-1); }

/* Farsi: the site's Vazirmatn, without letter spacing (it would break the joined letters); the name stays Latin. */
:root[lang="fa"] body.home .landing-motto, :root[lang="fa"] body.home .landing-controls a { font-family: var(--kl-font); letter-spacing: 0; }

/* Site maintenance: the notice in the same frosted panel, in place of the pill. */
body.home .landing-maintenance { display: inline-flex; max-width: 520px; padding: 18px 26px; text-align: start; color: var(--home-muted); background: var(--home-pill); border: 1px solid var(--home-line); border-radius: 22px; box-shadow: 0 6px 32px var(--home-glow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

@media (max-width: 650px) {
  body.home .topbar { min-height: 78px; padding-inline: 22px; }
  body.home .landing-content { padding: 110px 20px 130px; }
  body.home .landing-content h1 { font-size: 76px; letter-spacing: -5px; gap: 9px; }
  body.home .landing-content h1 span { padding-top: 8px; }
  body.home .landing-controls a { gap: 15px; padding: 10px 19px; }
  body.home .landing::before { background: radial-gradient(ellipse 60% 28% at 50% 49%, var(--home-wash-0) 0%, var(--home-wash-1-phone) 45%, var(--home-wash-2) 100%); }
}
@media (max-width: 359px) {
  body.home .topbar { padding-inline: 12px; }
  body.home .topbar .brand { font-size: 19px; gap: 6px; }
  body.home .landing-content { padding-inline: 12px; }
  body.home .landing-controls a { gap: 10px; padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) { body.home .landing-controls a { transition: none; } }
