/* ============================================================
   freymi — Base Styles
   Variables · Reset · Fonts · Typography · Utilities · Buttons
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Unbounded:wght@700;800;900&display=swap');

/* ── Gilroy (local) ── */
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Heavy.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ── CSS Variables ── */
:root {
  /* Colors */
  --bg-dark:    #0F0F0E;
  --bg-light:   #F2F1EC;
  --accent:     #C8FF47;
  --accent-dim: rgba(200, 255, 71, 0.12);
  --text-white: #FFFFFF;
  --text-dark:  #111110;
  --text-muted-dark: rgba(255, 255, 255, 0.45);
  --text-muted-light: rgba(17, 17, 16, 0.45);
  --border-dark:  rgba(255, 255, 255, 0.08);
  --border-light: rgba(17, 17, 16, 0.08);

  /* Typography */
  --font-display: 'Gilroy', sans-serif;
  --font-hero:    'Unbounded', 'Arial Black', var(--font-display), sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --gap:    clamp(1.25rem, 4vw, 5rem);
  --gap-sm: clamp(0.75rem, 2vw, 2rem);

  /* Layout */
  --max-w: 1320px;
  --radius: 12px;
  --radius-lg: 20px;

  /* Transitions */
  --ease: cubic-bezier(0.85, 0, 0.15, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-white);
  overflow-x: hidden;
}

body.overflow-hidden {
  overflow: hidden;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

/* ── Typography scale ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.8rem, 8vw, 9rem); }
h2 { font-size: clamp(2.2rem, 5vw, 6rem); }
h3 { font-size: clamp(1.5rem, 3vw, 3rem); }
h4 { font-size: clamp(1.2rem, 2vw, 2rem); }

p {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.1vw, 1.1rem);
  line-height: 1.7;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Layout utilities ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}

.section-dark  { background-color: var(--bg-dark);  color: var(--text-white); }
.section-light { background-color: var(--bg-light); color: var(--text-dark); }

/* ── Section tag (маленький лейбл над заголовком) ── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.section-tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

/* На светлом фоне лаймовый текст почти невидим —
   текст становится тёмным, акцентная линия остаётся */
.section-light .section-tag {
  color: var(--text-dark);
}

/* ── Buttons ── */

/* Shared button base */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 16px 32px;
  border-radius: 100px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary: тёмный фон + лаймовый текст */
.btn-primary {
  background-color: var(--accent);
  color: var(--text-dark);
  box-shadow: 0 0 0 0 rgba(200, 255, 71, 0);
  transition: box-shadow 0.3s ease, transform 0.2s var(--ease-out);
}

.btn-primary:hover {
  box-shadow: 0 0 32px rgba(200, 255, 71, 0.35);
}

/* Secondary: прозрачный с белой обводкой */
.btn-secondary {
  background-color: transparent;
  color: var(--text-white);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.3s ease, transform 0.2s var(--ease-out);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

/* Secondary on light background */
.section-light .btn-secondary {
  color: var(--text-dark);
  border-color: rgba(17, 17, 16, 0.2);
}

.section-light .btn-secondary:hover {
  border-color: rgba(17, 17, 16, 0.6);
}

/* ── SplitText char wrappers ── */
.charParent {
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
}

.charChild {
  display: inline-block;
  will-change: transform;
}

/* ── Status dot (пульсирующая точка) ── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 255, 71, 0.5); }
  50%       { box-shadow: 0 0 0 8px rgba(200, 255, 71, 0); }
}

/* ── Line hover (используется в Process и About) ── */
.hover-line {
  position: relative;
}

.hover-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.hover-line:hover::after {
  transform: scaleX(1);
}

/* ── Language switch ── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-btn {
  padding: 4px 8px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: color 0.25s ease;
  background: none;
  border: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--text-white);
}

.lang-divider {
  color: rgba(255, 255, 255, 0.15);
  font-weight: 300;
}

/* ── Social icons ── */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-dark);
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Visually hidden ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
