/* ============================================
   TVYAL.COM — DESIGN SYSTEM
   Shared foundation for ALL pages.
   Fonts, tokens, resets, nav, buttons,
   section headers, shared components.

   Load this on every page BEFORE any
   page-specific stylesheet.
   ============================================ */

/* ============================================
   0. FONTS — self-hosted
   Files in website_v4/fonts/ :
     GHEAMariamReg.otf
     GHEAMariamBld.otf
     GHEAMariamRIt.otf
     GHEAMariamBlit.otf
     NotoSansArmenian-Regular.ttf
     NotoSansArmenian-Medium.ttf
     NotoSansArmenian-SemiBold.ttf
     NotoSansArmenian-Bold.ttf
     arnamu_mono.ttf
   ============================================ */

/* GHEA Mariam — display serif (headings only) */
@font-face {
  font-family: 'GHEAMariam';
  src: url('../fonts/GHEAMariamReg.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GHEAMariam';
  src: url('../fonts/GHEAMariamBld.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GHEAMariam';
  src: url('../fonts/GHEAMariamRIt.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GHEAMariam';
  src: url('../fonts/GHEAMariamBlit.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Noto Sans Armenian — self-hosted (HY script) */
@font-face {
  font-family: 'NotoSansArm';
  src: url('../fonts/NotoSansArmenian-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NotoSansArm';
  src: url('../fonts/NotoSansArmenian-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NotoSansArm';
  src: url('../fonts/NotoSansArmenian-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NotoSansArm';
  src: url('../fonts/NotoSansArmenian-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* DejaVu Sans Mono — trilingual monospace (includes Armenian) */
@font-face {
  font-family: 'DejaVuSansMono';
  src: url('../fonts/DejaVuSansMono.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DejaVuSansMono';
  src: url('../fonts/DejaVuSansMono-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DejaVuSansMono';
  src: url('../fonts/DejaVuSansMono-Oblique.ttf') format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'DejaVuSansMono';
  src: url('../fonts/DejaVuSansMono-BoldOblique.ttf') format('truetype');
  font-weight: 700; font-style: italic; font-display: swap;
}

/* ============================================
   1. CSS CUSTOM PROPERTIES
   ============================================ */

:root {
  /* ── Brand palette (from tvyal newsletter) ── */
  --brand-navy:    #003f5c;
  --brand-blue:    #2f4b7c;
  --brand-purple:  #665191;
  --brand-violet:  #a05195;
  --brand-coral:   #d45087;
  --brand-pink:    #f95d6a;
  --brand-orange:  #ff7c43;
  --brand-gold:    #ffa600;
  --brand-cream:   #fffcf5;

  /* ── Dark mode tokens (dark navy — easier on screens) ── */
  --bg:              #0c1a2c;
  --bg-secondary:    #0f2035;
  --surface:         #152640;
  --surface-elevated:#1a2e4a;
  --border:          rgba(255,124,67,0.14);
  --border-subtle:   rgba(255,255,255,0.07);

  --text-primary:    #fffcf5;
  --text-secondary:  rgba(255,252,245,0.55);
  --text-tertiary:   rgba(255,252,245,0.25);

  --accent:          #ff7c43;
  --accent-hover:    #f95d6a;
  --accent-subtle:   rgba(255,124,67,0.08);

  /* ── Typography ── */
  --font-serif: 'GHEAMariam', 'Georgia', serif;
  --font-sans:  'NotoSansArm', 'Noto Sans', system-ui, sans-serif;
  --font-mono:  'DejaVuSansMono', 'Courier New', monospace;

  /* ── Scale ── */
  --text-xs:   12px;  /* was 11px — too small/thin in dark mode */
  --text-sm:   14px;  /* was 13px */
  --text-base: 15px;
  --text-lg:   17px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-4xl:  48px;
  --text-5xl:  64px;
  --text-hero: clamp(3.2rem, 6vw, 6.5rem);

  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --leading-tight:  1.05;
  --leading-snug:   1.2;
  --leading-normal: 1.6;
  --leading-loose:  1.85;

  /* ── Spacing ── */
  --space-1:  4px;  --space-2:  8px;   --space-3:  12px;
  --space-4:  16px; --space-5:  24px;  --space-6:  32px;
  --space-7:  48px; --space-8:  64px;  --space-9:  96px;
  --space-10: 128px;

  /* Legacy spacing aliases */
  --space-xs: 0.5rem; --space-sm: 1rem;
  --space-md: 2rem;   --space-lg: 4rem; --space-xl: 6rem;

  /* ── Layout ── */
  --container-max:       1200px;
  --container-max-width: 1200px;
  --container-pad:       clamp(24px, 5vw, 80px);
  --container-padding:   clamp(24px, 5vw, 80px);

  /* ── Radius ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 999px;

  /* ── Legacy aliases (backward compat with existing JS) ── */
  --color-main:       #003f5c;
  --color-main-rgb:   0, 63, 92;
  --color-second:     #ff7c43;
  --color-second-n2:  #f95d6a;
  --color-dark:       #0c1a2c;
  --color-light:      #fffcf5;
  --color-gray:       #152640;
  --transition-speed: 300ms;

  /* Legacy theme aliases */
  --heading-color:      var(--text-primary);
  --text-color:         var(--text-secondary);
  --card-bg-color:      var(--surface);
  --body-bg-color:      var(--bg);
  --border-color:       var(--border);
  --link-color:         var(--accent);
  --link-hover-color:   var(--accent-hover);
  --hero-overlay-color: rgba(0,0,0,0.35);
  --popup-overlay-bg:   rgba(0,0,0,0.85);
}

/* ── Light mode (warm off-white Attio) ── */
body:not(.dark-mode),
body.light-mode {
  --bg:              #f8f7f4;
  --bg-secondary:    #f0ede8;
  --surface:         #ffffff;
  --surface-elevated:#faf9f7;
  --border:          #e2ddd6;
  --border-subtle:   #ede9e3;

  --text-primary:    #1a1a1a;
  --text-secondary:  #5a5a5a;
  --text-tertiary:   #9a9a9a;

  --accent-subtle:   rgba(255,124,67,0.08);

  --heading-color:      var(--text-primary);
  --text-color:         var(--text-secondary);
  --card-bg-color:      var(--surface);
  --body-bg-color:      var(--bg);
  --border-color:       var(--border);
  --hero-overlay-color: rgba(0,0,0,0.45);
}

/* ── Explicit dark-mode class (set by global-ui.js) ── */
body.dark-mode {
  --bg:              #0c1a2c;
  --bg-secondary:    #0f2035;
  --surface:         #152640;
  --surface-elevated:#1a2e4a;
  --border:          rgba(255,124,67,0.14);
  --border-subtle:   rgba(255,255,255,0.07);
  --text-primary:    #fffcf5;
  --text-secondary:  rgba(255,252,245,0.65);
  --text-tertiary:   rgba(255,252,245,0.30);
  --accent-subtle:   rgba(255,124,67,0.12);
  --heading-color:      #fffcf5;
  --text-color:         rgba(255,252,245,0.65);
  --card-bg-color:      #152640;
  --body-bg-color:      #0c1a2c;
  --border-color:       rgba(255,124,67,0.14);
  --hero-overlay-color: rgba(0,0,0,0.25);
  --popup-overlay-bg:   rgba(0,0,0,0.95);
}

/* ============================================
   2. GLOBAL RESETS & BASE
   ============================================ */

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

html {
  /* NOTE: snap-scroll is homepage-specific — page stylesheets that need
     plain scroll override this with: html { scroll-snap-type: none; } */
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 56px;
}

body {
  background-color: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease,
              color var(--transition-speed) ease;
  padding-top: 56px;
  padding-bottom: 0;
}

/* Serif for all headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  transition: color var(--transition-speed) ease;
}

h1 { font-weight: 700; margin-bottom: var(--space-5); }
h2 { font-weight: 700; margin-bottom: var(--space-5); }
h3 { font-weight: 700; margin-bottom: var(--space-4); }

p {
  font-family: var(--font-sans);
  line-height: var(--leading-loose);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}
a:hover { color: var(--accent-hover); }

/* ============================================
   3. SHARED LAYOUT HELPERS
   ============================================ */

/* Generic max-width container — used across pages */
.section-container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
}

/* ============================================
   4. SECTION HEADER PATTERN (Armenian Stone)
   e.g. "01 — What We Do ────────"
   Used on: index, services, rate, wages, about, newsletter
   ============================================ */

.section-eyebrow {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.section-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent);
  opacity: 0.9;
  white-space: nowrap;
}

.section-eyebrow h1,
.section-eyebrow h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  line-height: var(--leading-snug);
  margin-bottom: 0;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: var(--space-4);
  align-self: center;
}

/* ============================================
   5. TOP NAV
   ============================================ */

#top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 var(--container-pad);
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-speed) ease,
              border-color var(--transition-speed) ease;
}

body:not(.dark-mode) #top-nav,
body.light-mode #top-nav {
  background: rgba(248,247,244,0.88);
  border-bottom-color: var(--border);
}

#top-nav .nav-logo {
  height: 26px;
  display: block;
  flex-shrink: 0;
  margin-right: var(--space-5);
  transition: opacity 200ms ease, filter 300ms ease;
}
#top-nav .nav-logo:hover { opacity: 0.7; }

#top-nav .nav-links {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

#top-nav .nav-spacer { flex: 1; }

#top-nav .nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

#top-nav .nav-links a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: color 200ms ease;
  text-decoration: none;
}
#top-nav .nav-links a:hover { color: var(--accent); }
#top-nav .nav-links a.active { color: var(--text-secondary); }

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  opacity: 0.8;
  flex-shrink: 0;
}

/* ── Theme toggle ── */
#theme-toggle {
  width: 52px;
  height: 26px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: all var(--transition-speed) ease;
}
#theme-toggle .slider {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  left: 3px;
  transition: transform var(--transition-speed) ease;
  z-index: 0;
}
#theme-toggle.active .slider { transform: translateX(26px); }

.theme-label {
  width: 50%;
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  z-index: 1;
  line-height: 26px;
  transition: opacity 0.3s ease;
  user-select: none;
}
#theme-toggle .theme-label:first-child  { opacity: 1; }
#theme-toggle .theme-label:last-child   { opacity: 0.3; }
#theme-toggle.active .theme-label:first-child { opacity: 0.3; }
#theme-toggle.active .theme-label:last-child  { opacity: 1; }

/* ── Language selector ── */
#lang-selector {
  display: flex;
  height: 26px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex-shrink: 0;
}

.lang-option {
  padding: 0 9px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 200ms ease;
  line-height: 24px;
  user-select: none;
}
.lang-option:not(:last-child) { border-right: 1px solid var(--border-subtle); }
.lang-option.active { background: var(--accent); color: #fff; }
.lang-option:hover:not(.active) { color: var(--accent); }

/* Legacy bubble elements — hidden (controls moved to nav) */
#theme-bubble, #language-bubble { display: none; }
#ui-controls-footer { display: none; }

@media (max-width: 640px) {
  .nav-divider { display: none; }
  #top-nav .nav-links a { padding: 4px 6px; font-size: 10px; }
}

/* ============================================
   6. BUTTONS
   ============================================ */

/* Ghost / outline */
/* TODO: rename to .btn-ghost or .btn-outline — "primary" is misleading since
   the filled orange (demo-btn) is visually more prominent */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(255,252,245,0.25);
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}
.btn-primary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body:not(.dark-mode) .btn-primary,
body.light-mode .btn-primary {
  border-color: rgba(0,0,0,0.2);
  color: var(--text-primary);
}
body:not(.dark-mode) .btn-primary:hover,
body.light-mode .btn-primary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  background: transparent;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}
.btn-secondary:hover { color: var(--accent); border-color: var(--accent); }

/* Primary CTA — orange fill */
.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--accent);
  color: #000;
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}
.demo-btn:hover {
  background: var(--accent-hover);
  color: #000;
  transform: translateY(-2px);
}

.btn-icon { font-size: 1em; }

/* ============================================
   7. PAGE-LEVEL CONTEXTUAL CTAs (/rate, /wages)
   ============================================ */

/* Inline block — placed below main chart/calculator */
.page-inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-7);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
}

.page-inline-cta-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
  margin: 0;
  flex: 1;
}

.page-inline-cta .demo-btn {
  flex-shrink: 0;
  align-self: center;
}

/* Sticky bottom-right button */
.sticky-cta-wrap {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 900;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .page-inline-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .sticky-cta-wrap {
    bottom: var(--space-4);
    right: var(--space-4);
  }
}

/* ============================================
   8. FOOTER
   ============================================ */

#site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: var(--space-8) var(--container-pad);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px repeat(3, 1fr);
  align-items: start;
  gap: var(--space-7);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-logo {
  height: 64px;
  width: auto;
  opacity: 0.7;
  transition: opacity 200ms ease, filter 300ms ease;
}
.footer-logo:hover { opacity: 1; }

/* Light mode: invert off-white logo to navy */
body:not(.dark-mode) .footer-logo,
body:not(.dark-mode) .nav-logo {
  filter: invert(1) sepia(1) saturate(3) hue-rotate(175deg) brightness(0.3);
}

.footer-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-founder {
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-email a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}
.footer-email a:hover { opacity: 0.8; }

/* Social icon row */
.footer-social {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-1);
}

.footer-social a {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 200ms ease, transform 200ms ease;
}

.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col-heading {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-2);
}

.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 200ms ease;
  line-height: 1.4;
}
.footer-col a:hover { color: var(--accent); }

.footer-col a.footer-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  padding-left: var(--space-3);
}
.footer-col a.footer-sub:hover { color: var(--accent); }

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   9. MODAL
   ============================================ */

#demo-modal-overlay,
#consultation-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
}
#demo-modal-overlay.active,
#consultation-modal-overlay.active { opacity: 1; pointer-events: auto; }

#demo-modal-window,
#consultation-modal-window {
  position: relative;
  width: 90%;
  max-width: 1200px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0,0,0,0.8);
}
#demo-modal-window { height: 80vh; }
#demo-modal-window.modal-window-fullheight { height: 100% !important; }
#consultation-modal-window { max-width: 600px; padding: var(--space-8); }

#modal-close-btn,
#consultation-close-btn {
  position: absolute;
  top: var(--space-4); right: var(--space-4);
  width: 34px; height: 34px;
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-close-btn:hover,
#consultation-close-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }
#modal-close-btn.hidden,
#consultation-close-btn.hidden { display: none; }

#modal-iframe { width: 100%; height: 100%; border: none; opacity: 0; transition: opacity var(--transition-speed) ease; }
#modal-content-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }

.spinner {
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 40px; height: 40px;
  animation: spin 0.9s linear infinite;
  margin: 0 auto var(--space-4);
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-window-fullheight {
  width: 100vw !important; height: 100vh !important;
  max-width: 100vw !important; max-height: 100vh !important;
  margin: 0 !important; border-radius: 0 !important;
}
.modal-window-fullheight #modal-close-btn { display: none; }
.modal-window-fullheight #modal-iframe { width: 100%; height: 100%; border: none; }

#demo-modal-overlay.active { display: flex; align-items: center; justify-content: center; }

/* Consultation form inside modal */
.consultation-content h2 { margin-bottom: var(--space-4); }
#consultation-form { margin-top: var(--space-6); }
.form-group { margin-bottom: var(--space-4); }
.form-group label { display: block; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--space-2); color: var(--text-secondary); }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  transition: border-color var(--transition-speed) ease;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
#consultation-form button[type="submit"] { width: 100%; margin-top: var(--space-4); }

.consult-contact-info {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

@media (max-width: 768px) {
  #demo-modal-window { width: 95%; height: 70vh; }
  #consultation-modal-window { width: 95%; padding: var(--space-6); }
  #demo-modal-window.modal-window-fullheight { width: 100% !important; height: 100% !important; }
}

/* ============================================
   10. MOBILE NAV — hamburger + dropdown
   ============================================ */

#nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: var(--space-3);
}
#nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
}
#nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-hamburger.open span:nth-child(2) { opacity: 0; }
#nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#nav-mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  background: rgba(12, 26, 44, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 199;
  flex-direction: column;
  padding: var(--space-4) var(--container-pad);
  gap: 0;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 250ms ease, opacity 250ms ease;
}
body:not(.dark-mode) #nav-mobile-menu {
  background: rgba(248, 247, 244, 0.98);
}
#nav-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#nav-mobile-menu a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: color 200ms ease;
}
#nav-mobile-menu a:last-child { border-bottom: none; }
#nav-mobile-menu a:hover { color: var(--accent); }

@media (max-width: 768px) {
  #nav-hamburger { display: flex; }
  #top-nav .nav-links { display: none; }
  #nav-mobile-menu { display: flex; }
}

/* ============================================
   11. NAV DROPDOWN (Data Tools — full-width mega menu)
   ============================================ */

.nav-dropdown {
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  line-height: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 200ms ease, background 200ms ease;
}
.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 9px;
  transition: transform 200ms ease;
}
.nav-dropdown-toggle:hover { color: var(--accent); }
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.is-open .nav-dropdown-toggle { color: var(--text-secondary); }
.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown.is-open .nav-dropdown-toggle::after { transform: rotate(180deg); }
.nav-dropdown.active .nav-dropdown-toggle { color: var(--text-secondary); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 150;
  padding: var(--space-5) var(--container-pad);
  padding-top: calc(var(--space-5) + 8px);
  margin-top: -8px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }

.nav-dropdown-menu-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
  row-gap: var(--space-4);
}

.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-5);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background 150ms ease;
  min-width: 200px;
}
a.nav-dropdown-item:hover { background: var(--bg-secondary); }

.nav-dropdown-item-name {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.nav-dropdown-item-desc {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 3px;
  letter-spacing: 0;
  text-transform: none;
}

.nav-dropdown-item.active .nav-dropdown-item-name { color: var(--accent); }

.nav-dropdown-item--dim { cursor: default; opacity: 0.6; }
.nav-dropdown-item--dim .nav-dropdown-item-name,
.nav-dropdown-item--dim .nav-dropdown-item-desc { color: var(--text-tertiary); }

.nav-dropdown-soon-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2);
  border-left: 1px solid var(--border-subtle);
  margin-left: var(--space-2);
  padding-left: var(--space-4);
}

.nav-dropdown-soon-label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  opacity: 0.7;
  padding: 0 var(--space-2) var(--space-1);
}

@media (max-width: 640px) {
  .nav-dropdown-toggle { padding: 4px 6px; font-size: 10px; }
}

/* ============================================
   12. PAGE SUB-NAV (wages / trends tabs)
   ============================================ */

#page-subnav {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 var(--container-pad);
  gap: var(--space-4);
  z-index: 99;
}

.subnav-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.subnav-tabs {
  display: flex;
  gap: var(--space-1);
}

.subnav-tab {
  padding: 3px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 150ms ease, color 150ms ease;
}
.subnav-tab:hover { background: var(--bg); color: var(--text-secondary); }
.subnav-tab.active { background: var(--accent); color: #fff; }

body.has-subnav {
  padding-top: 96px;
  scroll-padding-top: 96px;
}

/* ============================================
   13. LANGUAGE ADJUSTMENTS (Armenian)
   ============================================ */

/* Scale all CSS font-size tokens to 90% when lang-hy is active.
   Components built on var(--text-*) scale automatically.
   Only hardcoded 10px/11px sizes need explicit overrides below. */
body.lang-hy {
  --text-xs:   10.8px;
  --text-sm:   12.6px;
  --text-base: 13.5px;
  --text-lg:   15.3px;
  --text-xl:   19.8px;
  --text-2xl:  25.2px;
  --text-3xl:  32.4px;
  --text-4xl:  43.2px;
  --text-5xl:  57.6px;
  --text-hero: clamp(1.8rem, 5.5vw, 4.8rem);
}

/* Russian: same hero clamp floor as Armenian — long words overflow at 320px otherwise */
body.lang-ru {
  --text-hero: clamp(2.0rem, 7.5vw, 5.85rem);
}

/* Hardcoded sizes that bypass the token system */
body.lang-hy .theme-label,
body.lang-hy .hero-coords,
body.lang-hy .fx-stat-label,
body.lang-hy .fx-coming-soon,
body.lang-hy .fx-time-btn,
body.lang-hy .service-tag,
body.lang-hy .indicator-btn,
body.lang-hy .chart-toggle-btn,
body.lang-hy .caption,
body.lang-hy .case-tag,
body.lang-hy .case-metric-label,
body.lang-hy .stat-label { font-size: 9px; }

body.lang-hy .case-study-card::after { font-size: 7.2rem; }

/* Armenian has wider glyphs — reduce tracking on eyebrow */
body.lang-hy .hero-eyebrow { letter-spacing: 0.04em; }

/* Dark mode: tiny labels need weight boost — thin white dissolves on dark bg */
body.dark-mode .fx-stat-label,
body.dark-mode .fx-time-btn,
body.dark-mode .fx-tab,
body.dark-mode .section-eyebrow,
body.dark-mode .case-tag,
body.dark-mode .case-metric-label,
body.dark-mode .stat-label,
body.dark-mode .caption {
  font-weight: 500;
  opacity: 0.85;
}

/* ============================================
   14. UTILITIES
   ============================================ */

.text-center  { text-align: center; }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-tertiary); }

/* Legacy spacing helpers */
.mt-0 { margin-top: 0; }       .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: var(--space-xs); }  .mb-1 { margin-bottom: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }  .mb-2 { margin-bottom: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }  .mb-3 { margin-bottom: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }  .mb-4 { margin-bottom: var(--space-lg); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease forwards; }

/* ============================================
   15. ACCESSIBILITY
   ============================================ */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   16. PRINT
   ============================================ */

@media print {
  #top-nav, #site-footer, #demo-modal-overlay,
  #consultation-modal-overlay, #factory-animation-container { display: none !important; }
  .snap-section { page-break-inside: avoid; }
}
