/* ============================================================
   byGarami — base.css
   Design tokens, fonts, reset, typography, utilities
   ============================================================ */

/* --- Self-hosted Inter (variable) --------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+2218, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens -------------------------------------------------- */
:root {
  /* color */
  --bg: #05070c;
  --bg-soft: #090d16;
  --surface: #0d1220;
  --surface-2: #121829;
  --border: rgba(150, 166, 199, 0.14);
  --border-strong: rgba(150, 166, 199, 0.26);
  --text: #f2f5fa;
  --muted: #99a4b9;
  --faint: #667189;
  --accent: #4d86ff;
  --accent-bright: #7aa8ff;
  --accent-deep: #2f63d8;
  --accent-glow: rgba(77, 134, 255, 0.32);
  --success: #3ddc97;
  --danger: #ff6b6b;

  /* type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  /* spacing / radius */
  --container: 1180px;
  --radius-s: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 72px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

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

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

/* --- Typography ---------------------------------------------- */
h1,
h2,
h3,
h4 {
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

h3 {
  font-size: 1.19rem;
  letter-spacing: -0.015em;
}

p {
  max-width: 65ch;
}

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  color: var(--muted);
  max-width: 60ch;
}

/* --- Layout primitives --------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
  position: relative;
}

.section-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}

/* --- Section heading ------------------------------------------ */
.section-head {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head .lead {
  margin-top: 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.7;
}

.section-head.center .eyebrow::after {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.7;
}

/* --- Utilities ------------------------------------------------ */
.text-accent {
  color: var(--accent-bright);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}
/* Language selector is injected by translation.js. */
.language-switcher { position: fixed !important; left: 1rem !important; right: auto !important; top: auto !important; bottom: 1rem !important; z-index: 2147483000 !important; width: 2.8rem; height: 2.8rem; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.language-switcher-button { position: absolute; inset: 0; width: 100%; height: 100%; color: inherit; background: var(--surface, #101722); border: 1px solid rgba(255,255,255,.35); border-radius: 50%; padding: 0; text-align: center; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.language-switcher select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
body.chat-is-open .language-switcher { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.translation-loader { position:fixed; inset:0; z-index:2147483646; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.1rem; padding:2rem; background:rgba(3,5,9,.94); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); color:var(--text,#f4f7ff); text-align:center; opacity:0; visibility:hidden; transition:opacity .18s,visibility .18s; }
.translation-loader.is-visible { opacity:1; visibility:visible; }
.translation-loader strong { max-width:32rem; font-size:clamp(1rem,3vw,1.3rem); line-height:1.45; }
.translation-loader-spinner { width:3rem; height:3rem; border:3px solid rgba(77,134,255,.2); border-top-color:var(--accent-bright,#76a3ff); border-radius:50%; animation:translation-loader-spin .75s linear infinite; }
@keyframes translation-loader-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .translation-loader-spinner { animation-duration:1.8s; } }
@media (max-width: 700px) {
  .mobile-nav .language-switcher { position:relative !important; inset:auto !important; display:block !important; width:3rem; height:3rem; margin-top:1rem; flex:0 0 auto; }
}
