:root {
  --bg: #05060a;
  --bg-elev: #0b0d14;
  --border: #1a1d27;
  --border-strong: #272b3a;
  --text: #e8eaf2;
  --text-dim: #8a8fa3;
  --text-faint: #4c5164;
  --accent: #6ea8fe;
  --accent-soft: rgba(110, 168, 254, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --max: 1120px;
  --gutter: clamp(20px, 4vw, 48px);
  --font: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
}

body {
  min-height: 100vh;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}

/* Ambient noise + veil */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
}
.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at top, rgba(110, 168, 254, 0.08), transparent 60%);
  z-index: 1;
}

/* Nav */
.nav {
  position: relative;
  z-index: 10;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: clamp(18px, 1.6vw, 24px);
  display: inline-flex;
  align-items: baseline;
  padding: 8px 4px;
  margin: -8px -4px;
  color: var(--text);
}
.wordmark__cloak {
  color: var(--text);
}
.wordmark__ley {
  color: var(--text);
  opacity: 0.55;
  margin-left: 2px;
}

.nav__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-dim);
}
.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  transition: color 0.25s var(--ease-out-quart);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 10px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out-expo);
}
.nav__links a:hover::after {
  transform: scaleX(1);
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-right: -8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s var(--ease-out-quart),
    opacity 0.2s var(--ease-out-quart);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  visibility: hidden;
}
.nav-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
.nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out-quart);
}
.nav-drawer.is-open .nav-drawer__backdrop {
  opacity: 1;
}
.nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  padding: clamp(24px, 6vw, 40px);
  padding-top: max(env(safe-area-inset-top), 24px);
  padding-right: max(env(safe-area-inset-right), clamp(24px, 6vw, 40px));
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out-expo);
}
.nav-drawer.is-open .nav-drawer__panel {
  transform: translateX(0);
}
.nav-drawer__panel a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  padding: 14px 4px;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: color 0.25s var(--ease-out-quart);
}
.nav-drawer__panel a:last-of-type {
  border-bottom: 0;
}
.nav-drawer__panel a:hover {
  color: var(--accent);
}
.nav-drawer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s var(--ease-out-quart);
}
.nav-drawer__close:hover {
  color: var(--text);
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }
}

/* Hero */
.hero {
  position: relative;
  z-index: 5;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 140px) var(--gutter) clamp(72px, 10vw, 120px);
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    padding-block: clamp(32px, 6vh, 56px);
  }
  .hero__headline {
    margin-bottom: 20px;
  }
  .hero__meta {
    margin-bottom: 20px;
  }
}

.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  margin-bottom: 36px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(110, 168, 254, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(110, 168, 254, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(110, 168, 254, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(110, 168, 254, 0);
  }
}

.hero__headline {
  font-size: clamp(44px, 9vw, 120px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.hero__headline .line {
  display: block;
}
.hero__headline .line--outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-dim);
}

.hero__sub {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-dim);
  max-width: 560px;
}

/* Sections */
.section {
  position: relative;
  z-index: 5;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 100px) var(--gutter);
  border-top: 1px solid var(--border);
}
.section--compact {
  padding-block: clamp(50px, 7vw, 80px);
}

.section__title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.section__body {
  font-size: 16px;
  color: var(--text-dim);
}
.section__body a {
  color: var(--accent);
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 520px;
}
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.contact-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.contact-list__label {
  color: var(--text-dim);
  flex-basis: 180px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.contact-list a {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  word-break: break-word;
}

@media (max-width: 520px) {
  .contact-list li {
    flex-direction: column;
    gap: 4px;
  }
  .contact-list__label {
    flex-basis: auto;
  }
}

/* Grid */
.grid {
  display: grid;
  gap: 20px;
}
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Cards */
.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition:
    border-color 0.3s var(--ease-out-quart),
    transform 0.35s var(--ease-out-quart),
    box-shadow 0.35s var(--ease-out-quart);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -12px rgba(110, 168, 254, 0.18);
}
.card__icon {
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 18px;
  line-height: 1;
  display: inline-block;
  transition:
    transform 0.4s var(--ease-out-expo),
    color 0.3s var(--ease-out-quart);
}
.card:hover .card__icon {
  transform: scale(1.15);
  color: #9cc4ff;
}
.card__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.card__body {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Product block */
.product {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  margin-bottom: 20px;
}
.product--muted {
  background: transparent;
  border-style: dashed;
}
.product__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
}
.product__name {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.product__alias {
  font-size: 13px;
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}
.product__alias strong {
  color: var(--text);
  font-weight: 600;
}
.product__tagline {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 500;
}
.product__body {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 20px;
  line-height: 1.65;
}
.product__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 479px) {
  .product__links {
    flex-direction: column;
    align-items: stretch;
  }
  .product__links .btn {
    width: 100%;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-out-quart),
    color 0.25s var(--ease-out-quart),
    border-color 0.25s var(--ease-out-quart),
    transform 0.18s var(--ease-out-quart);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}
.btn__arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease-out-expo);
}
.btn:hover .btn__arrow {
  transform: translateX(4px);
}
.btn--primary {
  background: var(--text);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
.footer {
  position: relative;
  z-index: 5;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__tag {
  font-style: italic;
}
@media (max-width: 520px) {
  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Entrance: hero stagger */
.hero__meta,
.hero__headline .line,
.hero__sub {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s var(--ease-out-quart),
    transform 0.7s var(--ease-out-quart);
}
.is-loaded .hero__meta {
  opacity: 1;
  transform: none;
  transition-delay: 60ms;
}
.is-loaded .hero__headline .line {
  opacity: 1;
  transform: none;
}
.is-loaded .hero__headline .line:nth-child(1) {
  transition-delay: 180ms;
}
.is-loaded .hero__headline .line:nth-child(2) {
  transition-delay: 280ms;
}
.is-loaded .hero__sub {
  opacity: 1;
  transform: none;
  transition-delay: 440ms;
}

/* Entrance: scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease-out-quart),
    transform 0.7s var(--ease-out-quart);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s var(--ease-out-quart),
    transform 0.6s var(--ease-out-quart);
}
[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger].is-visible > *:nth-child(1) {
  transition-delay: 0ms;
}
[data-reveal-stagger].is-visible > *:nth-child(2) {
  transition-delay: 90ms;
}
[data-reveal-stagger].is-visible > *:nth-child(3) {
  transition-delay: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__meta,
  .hero__headline .line,
  .hero__sub,
  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafbfc;
    --bg-elev: #ffffff;
    --border: #e5e7ef;
    --border-strong: #cfd4e0;
    --text: #0d1020;
    --text-dim: #5b6073;
    --text-faint: #9096a8;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.08);
  }
  .grain {
    opacity: 0.025;
  }
  .veil {
    background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.06), transparent 60%);
  }
  .btn--primary {
    background: var(--text);
    color: #ffffff;
  }
  .btn--primary:hover {
    background: var(--accent);
    color: #ffffff;
  }
  .card:hover {
    box-shadow: 0 10px 30px -12px rgba(37, 99, 235, 0.2);
  }
}

@media print {
  .grain,
  .veil,
  .nav__toggle,
  .nav-drawer,
  [data-reveal],
  [data-reveal-stagger] > * {
    display: none !important;
  }
  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  a {
    color: #000000 !important;
    text-decoration: underline;
  }
  a[href^="http"]::after,
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #444;
  }
  .nav,
  .hero,
  .section,
  .footer {
    max-width: 100%;
    padding-inline: 0;
    page-break-inside: avoid;
  }
  .hero__headline {
    font-size: 36pt;
  }
  .section__title {
    font-size: 20pt;
  }
  .card,
  .product {
    background: #ffffff !important;
    border-color: #cccccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .hero__meta,
  .hero__headline .line,
  .hero__sub,
  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
  .section {
    border-top: 1px solid #cccccc;
  }
}
