/* ==========================================================================
   The L House — main stylesheet
   Deep black canvas, editorial typography, hairline detail, one restrained
   accent. Designed to read as premium, not neon.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg:            #000000;
  --bg-raise:      #050506;
  --bg-panel:      #08080a;

  --ink:           #f4f6fa;
  --ink-soft:      #b9c0cf;
  --ink-mute:      #7b8496;
  --ink-faint:     #565e6d;

  --accent:        #8b7bff;
  --accent-soft:   #b9b0ff;
  --accent-wash:   rgba(139, 123, 255, 0.12);

  --hair:          rgba(255, 255, 255, 0.08);
  --hair-soft:     rgba(255, 255, 255, 0.05);
  --hair-strong:   rgba(255, 255, 255, 0.16);

  --surface:       rgba(255, 255, 255, 0.022);
  --surface-hi:    rgba(255, 255, 255, 0.045);

  --maxw:          1200px;
  --measure:       68ch;
  --radius:        16px;
  --radius-sm:     10px;

  --ease:          cubic-bezier(0.22, 0.68, 0.32, 1);
  --shadow:        0 30px 80px -50px rgba(0, 0, 0, 1);

  --font-sans:     "Inter", "Noto Sans Arabic", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic",
                   "Meiryo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif:    "Instrument Serif", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif",
                   Georgia, "Times New Roman", serif;
  --font-mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-soft); }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0 0 1.05em; padding-inline-start: 1.15em; }
li { margin-bottom: 0.4em; }
em { font-style: italic; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(139, 123, 255, 0.28); color: #fff; }

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 999;
  background: var(--ink);
  color: #000;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; color: #000; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Backdrop — a single quiet room, a soft light, a fine grain
   -------------------------------------------------------------------------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.backdrop__room {
  position: absolute;
  inset: -8%;
  background-image: url("../img/bg-room-blur.webp");
  background-size: cover;
  background-position: center 38%;
  opacity: 0.16;
  filter: grayscale(0.45) brightness(0.8) contrast(1.05);
}

.backdrop__light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(255, 255, 255, 0.055), transparent 60%),
    radial-gradient(80% 60% at 12% 100%,  rgba(139, 123, 255, 0.07), transparent 62%),
    radial-gradient(140% 120% at 50% 40%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.55) 78%, #000 100%);
}

.backdrop__grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------------- */
.shell {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(84px, 10vw, 152px);
}

.section--tight { padding-block: clamp(56px, 7vw, 96px); }

.section__head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 68px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.section__title {
  font-size: clamp(1.9rem, 3.9vw, 3.05rem);
  margin-bottom: 18px;
  letter-spacing: -0.04em;
}

.section__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--accent-soft);
}

.section__sub {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  max-width: var(--measure);
}

/* --------------------------------------------------------------------------
   5. Buttons & chips
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--ink);
}
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #05060a;
  font-weight: 600;
}
.btn--primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #05060a;
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink-soft);
}
.btn--ghost:hover {
  background: var(--surface-hi);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--ink);
}

.btn--quiet {
  border-color: transparent;
  color: var(--ink-mute);
  padding-inline: 12px;
}
.btn--quiet:hover { color: var(--ink); border-color: var(--hair); }

.btn[disabled], .btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn[disabled]:hover, .btn.is-disabled:hover { transform: none; }

.btn__dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.chip:hover {
  border-color: var(--hair-strong);
  background: var(--surface-hi);
  color: var(--ink);
}
.chip__key {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 90;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.topbar.is-stuck {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border-bottom-color: var(--hair);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 600;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.95;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.brand:hover .brand__mark { transform: translateY(-1px); opacity: 1; }
.brand__text {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand__text em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: auto;
}
.nav__link {
  position: relative;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.89rem;
  font-weight: 500;
  color: var(--ink-mute);
  transition: color 0.22s var(--ease), background 0.22s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline: 14px;
  height: 1px;
  background: var(--accent);
}

.nav__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: 10px;
}

.lang { position: relative; }
.lang__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.84rem;
  cursor: pointer;
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.lang__toggle:hover { border-color: var(--hair-strong); color: var(--ink); }
.lang__globe { width: 15px; height: 15px; flex: none; }
.lang__caret { width: 9px; height: 9px; transition: transform 0.25s var(--ease); }
.lang.is-open .lang__caret { transform: rotate(180deg); }

.lang__menu {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: rgba(8, 8, 10, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 10;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.89rem;
  text-align: start;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.lang__item:hover { background: var(--surface-hi); color: var(--ink); }
.lang__item[aria-current="true"] { color: var(--ink); }
.lang__item[aria-current="true"]::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.burger span {
  display: block;
  width: 17px; height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: background 0.2s var(--ease);
}
.burger span::before, .burger span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 17px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.28s var(--ease);
}
.burger span::before { top: -5.5px; }
.burger span::after  { top: 5.5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-5.5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(132px, 19vh, 210px) clamp(72px, 9vw, 120px);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero__grid--solo {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}
.hero__grid--solo .hero__copy { max-width: 940px; }
.hero__grid--solo .hero__lede { margin-inline: auto; }
.hero__grid--solo .hero__cta { justify-content: center; }
.hero__grid--solo .hero__stats { justify-content: center; }
.hero__grid--solo .eyebrow { justify-content: center; }

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3.1rem, 9vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin-bottom: 26px;
}
.hero__title em {
  font-style: italic;
  color: var(--accent-soft);
  letter-spacing: -0.03em;
}

.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-bottom: 34px;
}
.hero__lede em {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.12em;
  color: var(--ink);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--hair);
  padding-top: 26px;
}
.stat {
  flex: 1 1 170px;
  padding-inline: 26px;
  border-inline-start: 1px solid var(--hair);
}
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat__value {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.1rem;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 4px;
}
.stat__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   8. Stack strip (replaces the old scrolling marquee)
   -------------------------------------------------------------------------- */
.stackstrip {
  border-block: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.012);
}
.stackstrip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-block: 20px;
}
.stackstrip__item {
  padding-inline: clamp(18px, 3vw, 38px);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-inline-start: 1px solid var(--hair);
  white-space: nowrap;
}
.stackstrip__item:first-child { border-inline-start: 0; }
.stackstrip__item--accent { color: var(--accent-soft); }

/* --------------------------------------------------------------------------
   9. Software grid
   -------------------------------------------------------------------------- */
.apps__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}
.apps__search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}
.apps__search input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}
[dir="rtl"] .apps__search input { padding: 11px 40px 11px 16px; }
.apps__search input::placeholder { color: var(--ink-faint); }
.apps__search input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--surface-hi);
}
.apps__search svg {
  position: absolute;
  inset-inline-start: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--ink-faint);
  pointer-events: none;
}
.apps__count {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 34px 30px 30px;
  background: var(--bg);
  transition: background 0.35s var(--ease);
}
.app::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.app:hover { background: var(--bg-raise); }
.app:hover::before { opacity: 0.7; }
.app.is-hidden { display: none; }

.app__head {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.app__icon {
  width: 46px; height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.3s var(--ease);
}
.app:hover .app__icon { border-color: var(--hair-strong); }
.app__icon img { width: 100%; height: 100%; opacity: 0.85; }
.app__name {
  font-size: 1.2rem;
  margin: 0 0 5px;
  letter-spacing: -0.02em;
}
.app__cat {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.app__desc {
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin: 0;
}
.app__note {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.app__note svg { flex: none; margin-top: 3px; color: var(--accent-soft); }

.app__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.app__tag {
  padding: 5px 10px;
  border: 1px solid var(--hair-soft);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.app__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.app__links .btn { padding: 9px 15px; font-size: 0.82rem; }

/* --------------------------------------------------------------------------
   10. Spotlight (KernelSpy)
   -------------------------------------------------------------------------- */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.window {
  position: relative;
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
  background: #060607;
  box-shadow: var(--shadow);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.022);
  border-bottom: 1px solid var(--hair);
}
.window__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.window__title {
  margin-inline-start: 10px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.window picture { display: block; }
.window img {
  width: 100%;
  display: block;
  filter: grayscale(0.18) contrast(1.05) brightness(1.02);
}

.spotlight__list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}
.spotlight__list li {
  position: relative;
  padding-inline-start: 26px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.spotlight__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.68em;
  width: 10px; height: 1px;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   11. Stack
   -------------------------------------------------------------------------- */
.stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 26px;
}
.stack__col {
  padding: 32px 30px;
  background: var(--bg);
}
.stack__col h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.stack__col h3::before {
  content: "";
  width: 14px; height: 1px;
  background: var(--accent);
}
.stack__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.notice {
  display: flex;
  gap: 18px;
  padding: 26px 28px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--surface);
}
.notice__icon {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 10px;
  color: var(--accent-soft);
}
.notice h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 9px;
}
.notice p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   12. About / philosophy
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
}
.about__body p {
  color: var(--ink-soft);
  font-size: 1.01rem;
  max-width: var(--measure);
}
.about__body p:first-of-type {
  color: var(--ink);
  font-size: 1.14rem;
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.55;
  letter-spacing: 0.002em;
}
.about__cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------------------
   13. Blog
   -------------------------------------------------------------------------- */
.blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}
.empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 18px;
  text-align: center;
  padding: clamp(52px, 8vw, 96px) 28px;
  background: var(--bg);
}
.empty__icon {
  width: 60px; height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 14px;
  color: var(--ink-mute);
  background: var(--surface);
}
.empty h3 { margin: 0; font-size: 1.2rem; }
.empty p { color: var(--ink-mute); max-width: 50ch; margin: 0; }

/* --------------------------------------------------------------------------
   14. CTA band
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  padding: clamp(40px, 6vw, 72px);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 150% at 8% 0%, rgba(139, 123, 255, 0.1), transparent 58%),
    var(--bg-raise);
  overflow: hidden;
}
.cta h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); margin-bottom: 14px; }
.cta p { color: var(--ink-soft); max-width: 58ch; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  margin-top: 48px;
  padding-block: clamp(56px, 7vw, 92px) 30px;
  border-top: 1px solid var(--hair);
  background: rgba(0, 0, 0, 0.6);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-bottom: 52px;
}
.footer__about p {
  color: var(--ink-mute);
  font-size: 0.9rem;
  max-width: 36ch;
  margin-bottom: 18px;
}
.footer__powered {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.footer__powered svg { height: 11px; width: auto; opacity: 0.6; }

.footer h3 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: 10px; }
.footer__list a {
  color: var(--ink-soft);
  font-size: 0.89rem;
  transition: color 0.2s var(--ease);
}
.footer__list a:hover { color: var(--ink); }

.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.83rem;
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease), background 0.22s var(--ease);
}
.social:hover {
  border-color: var(--hair-strong);
  background: var(--surface);
  color: var(--ink);
}
.social svg { width: 14px; height: 14px; flex: none; opacity: 0.8; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  border-top: 1px solid var(--hair);
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.footer__nodata { display: inline-flex; align-items: center; gap: 9px; }
.footer__nodata::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   16. Cookie banner & floating UI
   -------------------------------------------------------------------------- */
.cookie {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-start: 24px;
  z-index: 120;
  width: min(400px, calc(100vw - 48px));
  padding: 26px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: rgba(8, 8, 10, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.55s var(--ease), opacity 0.55s var(--ease);
}
.cookie.is-visible { transform: translateY(0); opacity: 1; }
.cookie__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.cookie__title svg { width: 17px; height: 17px; color: var(--accent-soft); flex: none; }
.cookie p {
  color: var(--ink-soft);
  font-size: 0.87rem;
  margin-bottom: 18px;
}
.cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cookie__actions .btn { padding: 9px 18px; font-size: 0.83rem; }
.cookie__more {
  font-size: 0.79rem;
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie__more:hover { color: var(--ink-soft); }

.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 1px;
  width: 0;
  z-index: 130;
  background: rgba(255, 255, 255, 0.45);
}

.totop {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-end: 24px;
  z-index: 110;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: rgba(8, 8, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-soft);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s,
              border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.totop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { border-color: var(--hair-strong); color: var(--ink); }
.totop svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   17. Legal pages
   -------------------------------------------------------------------------- */
.legal {
  padding-block: clamp(120px, 15vh, 170px) clamp(56px, 7vw, 96px);
}
.legal__head { max-width: 760px; margin-bottom: 46px; }
.legal__meta {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 16px;
}
.legal__body { max-width: 76ch; }
.legal__body section {
  padding-block: 30px;
  border-top: 1px solid var(--hair);
}
.legal__body section:first-child { border-top: 0; padding-top: 0; }
.legal__body h2 {
  font-size: 1.12rem;
  margin-bottom: 13px;
  letter-spacing: -0.02em;
}
.legal__body p { color: var(--ink-soft); font-size: 0.99rem; }
.legal__body ul { color: var(--ink-soft); }
.legal__body li::marker { color: var(--ink-faint); }
.legal__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid var(--hair);
}

/* --------------------------------------------------------------------------
   18. 404
   -------------------------------------------------------------------------- */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
}
.notfound__code {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 16vw, 9rem);
  line-height: 1;
  color: var(--ink);
  opacity: 0.14;
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   19. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.07s; }
.reveal[data-delay="2"] { transition-delay: 0.14s; }
.reveal[data-delay="3"] { transition-delay: 0.21s; }
.reveal[data-delay="4"] { transition-delay: 0.28s; }

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; }
  .spotlight { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 76px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 20px;
    background: rgba(5, 5, 7, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--hair);
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__link { padding: 13px 14px; font-size: 1rem; }
  .burger { display: inline-flex; margin-inline-start: auto; }
  .nav__tools { margin-inline-start: 0; order: 3; }
  .lang { order: 2; }
  .topbar__inner { gap: 10px; }
  .stat { padding-inline: 18px; }
}

@media (max-width: 640px) {
  body { font-size: 15.8px; }
  .shell { width: calc(100% - 36px); }
  .app { padding: 26px 22px 24px; }
  .stack__col { padding: 26px 22px; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 20px 0; }
  .stat { flex: 1 1 100%; border-inline-start: 0; padding-inline: 0; text-align: center; }
  .stackstrip__item { padding-inline: 16px; font-size: 0.7rem; }
  .cookie {
    inset-inline: 14px;
    inset-block-end: 14px;
    width: auto;
  }
  .totop { inset-block-end: 16px; inset-inline-end: 16px; }
}

/* --------------------------------------------------------------------------
   21. Motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .topbar, .backdrop, .cookie, .totop, .progress { display: none !important; }
  body { background: #fff; color: #000; }
}
