/*
  Tengri · Landing — base styles
  --------------------------------
  Notes:
  • Display font TT Lakes Neue is bundled locally via @font-face.
    Body grotesque can be replaced later if needed.
*/

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-extralight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-demibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-extrabold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Lakes Neue';
  src: url('fonts/tt-lakes-neue/tt-lakes-neue-condensed-black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Core palette — paper / ink / stone */
  --paper:        #F1ECE3;
  --paper-soft:   #E6DFD2;
  --paper-deeper: #DCD2BF;
  --sand-deep:    #DCD3C1;
  --white-bright: #FBF8F2;

  --ink:          #181512;
  --ink-deep:     #100E0C;
  --ink-soft:     #4A4640;

  --stone:        #807A70;
  --stone-light:  #B8B1A4;

  --ochre:        #B47A2E;
  --ochre-deep:   #8E5E1E;
  --dusk:         #3D4E5C;

  /* Dark surfaces (Avtodom + similar) */
  --night:        #0B0A08;
  --night-soft:   #14120F;
  --night-rule:   #2A2723;
  --bone:         #ECE6DA;
  --bone-soft:    #C9C2B3;
  --bone-dim:     #8E8978;

  /* Pine (Экипаж) */
  --pine:         #1E2A23;
  --pine-soft:    #243128;
  --pine-line:    #38473C;

  /* On-dark (Форматы) */
  --on-dark:              #F1ECE3;
  --on-dark-soft:         #B8B1A4;
  --on-dark-mute:         #807A70;
  --on-dark-rule:         rgba(241, 236, 227, 0.14);
  --on-dark-rule-strong:  rgba(241, 236, 227, 0.28);

  /* Fonts */
  --font-display: 'TT Lakes Neue', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 72px);
  --nav-h:  64px;

  /* Editorial column widths — referenced by individual sections.
     Originally each section file declared its own; consolidated here so
     none of the scoped `.wrap` / `.idea-wrap` / `.column` blocks fall back
     to `max-width: none` and stretch full-bleed on wide viewports. */
  --maxw:    1440px;
  --col-gap: clamp(40px, 5vw, 96px);
  --colw:    800px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Anchor offset so sticky nav doesn't cover section starts */
  scroll-padding-top: var(--nav-h);
}
html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

::selection { background: var(--ochre); color: var(--white-bright); }

/* ─────────── Section wrappers ─────────── */
.sec { position: relative; }

/* Section background fallbacks — each scoped CSS controls its own internal
   surfaces, but the wrapper itself needs a sensible fallback colour so
   there's no flash of unstyled paper behind the dark sections. */
.s-hero    { background: #0a0907;          color: var(--white-bright); }
.s-idea    { background: var(--paper);     color: var(--ink); }
.s-avtodom { background: var(--night);     color: var(--bone); }
.s-built   { background: var(--paper);     color: var(--ink); }
.s-crew    { background: var(--paper);     color: var(--ink); }
.s-opyt    { background: var(--paper);     color: var(--ink); }
.s-fmt     { background: var(--ink-deep);  color: var(--on-dark); }
.s-dst     { background: var(--paper);     color: var(--ink); }
.s-already { background: var(--paper-soft); color: var(--ink); }
.s-why     { background: var(--paper);     color: var(--ink); }
.s-faq     { background: var(--paper);     color: var(--ink); }
.s-inquiry { background: #0b0e12;          color: var(--white-bright); }

/* The hero section's grid layout needs the body grid behaviour we dropped */
.s-hero {
  display: block;
}

/* ─────────── Global sticky navigation ─────────── */
.g-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: transparent;
  color: var(--white-bright);
  border-bottom: 1px solid transparent;
  transition:
    background 380ms cubic-bezier(.2,.7,.2,1),
    color      300ms ease,
    border-color 300ms ease,
    backdrop-filter 380ms ease,
    box-shadow 380ms ease;
}
.g-nav.is-solid {
  background: rgba(241, 236, 227, 0.92);
  color: var(--ink);
  border-bottom-color: var(--stone-light);
  backdrop-filter: saturate(1.05) blur(10px);
  -webkit-backdrop-filter: saturate(1.05) blur(10px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.g-nav .g-brand {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.30em;
  font-size: 17px;
  color: currentColor;
  text-decoration: none;
  white-space: nowrap;
}

.g-nav .g-right {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
}

.g-nav .g-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(16px, 2.2vw, 30px);
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.g-nav .g-links a {
  color: currentColor;
  opacity: 0.78;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: opacity 200ms ease, border-color 200ms ease, color 200ms ease;
  white-space: nowrap;
}
.g-nav .g-links a:hover {
  opacity: 1;
  border-bottom-color: var(--ochre);
}

.g-nav .g-cta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: currentColor;
  text-decoration: none;
  padding: 9px 16px;
  border: 1px solid currentColor;
  opacity: 0.85;
  transition: background 200ms ease, color 200ms ease, opacity 200ms ease, border-color 200ms ease;
  white-space: nowrap;
}
.g-nav .g-cta:hover { opacity: 1; }
.g-nav.is-solid .g-cta:hover {
  background: var(--ink);
  color: var(--white-bright);
  border-color: var(--ink);
}
.g-nav:not(.is-solid) .g-cta:hover {
  background: var(--white-bright);
  color: var(--ink);
  border-color: var(--white-bright);
}

.g-nav .g-lang {
  appearance: none;
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: currentColor;
  opacity: 0.6;
  text-transform: uppercase;
  padding-left: clamp(12px, 1.6vw, 20px);
  border-left: 1px solid currentColor;
  border-left-color: rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  cursor: pointer;
}
.g-nav.is-solid .g-lang {
  border-left-color: var(--stone-light);
  opacity: 0.75;
}
.g-nav .g-lang .ru,
.g-nav .g-lang .en {
  font-weight: 500;
  opacity: 0.5;
  transition: opacity 180ms ease;
}
.g-nav .g-lang[data-lang="ru"] .ru,
.g-nav .g-lang[data-lang="en"] .en {
  opacity: 1;
}
.g-nav .g-lang .sep { opacity: 0.4; }

/* Mobile-first navigation behaviour */
@media (max-width: 820px) {
  .g-nav .g-links { display: none; }
}
@media (max-width: 560px) {
  .g-nav { padding: 0 16px; }
  .g-nav .g-brand { font-size: 15px; letter-spacing: 0.24em; }
  .g-nav .g-cta {
    padding: 8px 12px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }
  .g-nav .g-lang { display: none; }
}
@media (max-width: 380px) {
  .g-nav .g-cta { padding: 7px 10px; font-size: 10.5px; }
}

/* Push hero up under the transparent nav (it intentionally bleeds beneath) */
.s-hero { padding-top: 0; }

/* Make hero's bottom rail layout still flow ok now that the inline nav is gone */
.s-hero .hero {
  grid-template-rows: 1fr auto;
}

/* Generic prefers-reduced-motion override */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
