:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --accent: #c2410c;
  --accent-soft: #ffedd5;
  --line: #e7e5e4;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.06);
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #ffedd5 0%, transparent 55%),
    radial-gradient(900px 300px at 100% 0%, #e0f2fe 0%, transparent 50%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(247, 244, 239, 0.85);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

/* ===== #logo: black Lab + iridescent shimmer («переливается») ===== */
.logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 4px 14px rgba(0,0,0,0.25);
}

.logo-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* SVG-like silhouette fallback until /assets/logo.png is uploaded */
.logo-silhouette {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%230a0a0a' d='M8 40c2-8 8-14 16-16 2-6 8-10 14-8 3 1 5 3 6 6 4 0 8 3 9 7 1 1 2 3 2 5v4c0 6-4 10-10 10H22c-6 0-12-4-14-10v-0z'/%3E%3Ccircle fill='%230a0a0a' cx='46' cy='22' r='5'/%3E%3Ccircle fill='%23111111' cx='48' cy='21' r='1.2'/%3E%3Cpath fill='%23111111' d='M12 36c4 2 8 3 12 2'/%3E%3C/svg%3E")
    center / 85% no-repeat;
}

.logo.logo-fallback .logo-silhouette {
  display: block;
}

/* Moving iridescent gloss over the black coat */
.logo-shimmer {
  position: absolute;
  inset: -40%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.05) 42%,
    rgba(180, 220, 255, 0.35) 46%,
    rgba(255, 200, 255, 0.28) 50%,
    rgba(180, 255, 230, 0.32) 54%,
    rgba(255, 255, 255, 0.08) 58%,
    transparent 62%,
    transparent 100%
  );
  mix-blend-mode: screen;
  animation: logo-iridesce 3.8s ease-in-out infinite;
  transform: translateX(-30%) rotate(8deg);
}

@keyframes logo-iridesce {
  0%   { transform: translateX(-55%) rotate(8deg); opacity: 0.55; }
  40%  { opacity: 1; }
  55%  { transform: translateX(55%) rotate(8deg); opacity: 0.9; }
  100% { transform: translateX(70%) rotate(8deg); opacity: 0.4; }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.slogan {
  font-size: 0.85rem;
  color: var(--muted);
}

.lang {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.lang-active {
  background: var(--ink);
  color: #fff;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.lang-soon {
  color: var(--muted);
  padding: 0.25rem 0.55rem;
  border: 1px dashed var(--line);
  border-radius: 999px;
}

.hero { padding: 3.5rem 0 2rem; }

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 40rem;
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.sections { padding: 1rem 0 2.5rem; }

.sections h2,
.cta h2 {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.grid li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.grid .icon {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.grid strong { display: block; margin-bottom: 0.25rem; }

.grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.cta { padding: 0 0 3rem; }

.cta .container {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}

.cta p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

.muted { color: var(--muted); }

@media (max-width: 560px) {
  .hero { padding-top: 2.25rem; }
  .footer-inner { flex-direction: column; }
  .logo { width: 2.85rem; height: 2.85rem; }
}


/* auth nav pills on landing */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.nav-pill {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.nav-pill-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  font-weight: 600;
}

/* Linked section tiles */
.grid > li > a {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}
.grid > li > a:hover strong { color: var(--accent); }
