/* ==========================================================================
   grigo.lt — stiliai
   Spalvos: tik --ink, --paper, --accent. Gradientų nėra.
   ========================================================================== */

/* Šriftai: savame serveryje (latin + latin-ext — lietuviškoms raidėms). Geist, Geist Mono, Instrument Serif: SIL Open Font License. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/geist-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/geist-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+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-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+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-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+FEFF, U+FFFD;
}

:root {
  --ink: #121411;
  --paper: #F3F1EA;
  --accent: #1F4FFF;
  --accent-hover: #1A42DB;
  /* Puslapio paviršius: keičiasi pagal temą. --ink/--paper/--accent lieka pastovūs. */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #565851;            /* 6.3:1 ant --paper */
  --line: rgb(18 20 17 / .14);
  --fg-dim: rgb(18 20 17 / .25);
  --accent-text: var(--accent); /* mažos etiketės; tamsioje temoje akcentas tekstui per tamsus */
  --panel-edge: transparent;
  --panel-raise: var(--ink);
  color-scheme: light;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Spyruoklė (mygtukai): tikra slopinama spyruoklė per linear() (ζ .42, ω 15, 0.9 s; --spring-soft: ζ .6, ω 13, 0.8 s).
     Naršyklėse be linear() lieka panaši cubic-bezier kreivė su peršokimu. */
  --spring: cubic-bezier(.3, 1.8, .4, 1);
  --spring-soft: cubic-bezier(.3, 1.4, .4, 1);

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --panel-inset: clamp(8px, 1.2vw, 14px);
  --radius-panel: clamp(20px, 2.4vw, 32px);
  --section-y: clamp(88px, 11vw, 160px);
}

/* Tamsi tema: „Pagal sistemą“ = be data-theme atributo */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --fg: var(--paper);
    --muted: #A3A29B;            /* 7.2:1 ant --ink */
    --line: rgb(243 241 234 / .14);
    --fg-dim: rgb(243 241 234 / .28);
    --accent-text: var(--paper);
    --panel-edge: rgb(243 241 234 / .12);
    --panel-raise: #1B1D1A;      /* --ink, šiek tiek pašviesintas: tamsūs paneliai neišnyksta tamsiame fone */
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: #A3A29B;            /* 7.2:1 ant --ink */
  --line: rgb(243 241 234 / .14);
  --fg-dim: rgb(243 241 234 / .28);
  --accent-text: var(--paper);
  --panel-edge: rgb(243 241 234 / .12);
  --panel-raise: #1B1D1A;      /* --ink, šiek tiek pašviesintas: tamsūs paneliai neišnyksta tamsiame fone */
  color-scheme: dark;
}

/* --- Bazė ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 104px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
@media (min-width: 900px) {
  body { font-size: 1.0625rem; }
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Vidinių nuorodų taikiniai (fokusą perkelia JS): kontūro aplink visą sekciją nereikia */
[tabindex="-1"]:focus-visible { outline: none; border-radius: 0; }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 8px;
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Tipografija ---------------------------------------------------------- */

h1, h2, h3 {
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 1.35rem + 4.6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 500;
}
h1 em, h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.01em;
  line-height: 0.9;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  max-width: 34em;
}
.muted { color: var(--muted); }

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  color: var(--muted);
}
.label .px {
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex: none;
}
.label-light { color: rgb(243 241 234 / .72); }

.num {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.063, 0.22, 0.428, 0.648, 0.851, 1.016, 1.135, 1.206, 1.233, 1.225, 1.192, 1.145, 1.094, 1.045, 1.004, 0.974,
      0.955, 0.946, 0.946, 0.953, 0.963, 0.975, 0.987, 0.997, 1.005, 1.01, 1.012, 1.013, 1.011, 1.009, 1.006, 1.004, 1.001, 0.999, 0.998, 1);
    --spring-soft: linear(0, 0.078, 0.258, 0.471, 0.675, 0.842, 0.965, 1.043, 1.083, 1.095, 1.088, 1.072, 1.051, 1.032, 1.016, 1.004,
      0.996, 0.992, 0.991, 0.992, 0.993, 0.995, 0.997, 0.998, 1);
  }
}

/* --- Mygtukai ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }

.btn-accent { background: var(--accent); color: var(--paper); }
.btn-accent:hover { background: var(--accent-hover); }

/* Akcentinis mygtukas su rodykle (2026-11-28): rodyklė be apskritimo (apskritimas savininkui atrodė keistai), bet savame
   „lange“ (.btn-arr, overflow: hidden): paspaudus ji pralekia kiaurai: išlekia dešinėn ir spyruokliškai grįžta iš kairės (motion.css). */
.btn-arrow { min-height: 54px; padding: 0 20px 0 26px; gap: 10px; }
.btn-arr {
  display: block;
  position: relative;
  width: 28px;
  height: 20px;
  flex: none;
  overflow: hidden;
}
.btn-arr .ico { display: block; width: 20px; height: 20px; }

/* --- Liquid glass (statinis) ----------------------------------------------
   Pagrindas kaip Hostinger: permatomas fonas + 1px kraštas + vidinis švytėjimas.
   Veikia visur. Blur — tik papildymas (.glass-blur).
   -------------------------------------------------------------------------- */

.glass {
  background: rgb(255 255 255 / .06);
  border: 1px solid rgb(255 255 255 / .22);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .16),
    inset 0 0 14px rgb(255 255 255 / .08),
    0 2px 6px rgb(0 0 0 / .12);
}
.glass-blur {
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

/* Tamsus stiklas — navigacija ir naršyklės kortelė */
.glass-dark {
  background: rgb(18 20 17 / .58);
  border-color: rgb(255 255 255 / .16);
}

/* Šviesus stiklas — kortelė ant akcentinio fono */
.glass-light {
  background: rgb(255 255 255 / .34);
  border-color: rgb(255 255 255 / .6);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .7),
    inset 0 0 18px rgb(255 255 255 / .28),
    0 10px 30px rgb(18 20 17 / .12);
}

/* Stiklinis mygtukas ant tamsaus fono: tas pats liquid glass kaip navigacijoje (briaunos atspindžiai, šiltas ir šaltas apvadas,
   storio žiedas), bet šiek tiek matinis (blur 5px, savininko prašymu 2026-11-28: „šiek tiek frosted, bet ne daug“).
   Chromium naršyklėse krašte dar lūžis (glass-lens.js, .is-lens). Šviesūs atšvaitai krašte: .glass-btn::after (motion.css). */
.glass.glass-btn {
  --lens-band: 12px;
  color: var(--paper);
  background: rgb(255 255 255 / .08);
  border-color: rgb(255 255 255 / .16);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .34),
    inset 0 2px 1px -1px rgb(255 120 90 / .18),
    inset 0 -1px 0 rgb(255 255 255 / .1),
    inset 0 -2px 1px -1px rgb(90 150 255 / .18),
    inset 0 0 0 1.5px rgb(255 255 255 / .05),
    inset 9px 0 12px -8px rgb(255 255 255 / .18),
    inset -9px 0 12px -8px rgb(255 255 255 / .12),
    0 2px 8px rgb(0 0 0 / .18);
  -webkit-backdrop-filter: blur(5px) saturate(170%) brightness(1.08);
  backdrop-filter: blur(5px) saturate(170%) brightness(1.08);
}
.glass.glass-btn:hover { background: rgb(255 255 255 / .12); }
.glass.glass-btn.is-lens {
  -webkit-backdrop-filter: blur(5px) var(--lens-url) saturate(170%) brightness(1.08);
  backdrop-filter: blur(5px) var(--lens-url) saturate(170%) brightness(1.08);
}

/* Be backdrop-filter — nepermatomas fonas, kad tekstas liktų įskaitomas */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-dark.glass-blur, .nav-rim, .browser-rim { background: rgb(18 20 17 / .94); }
  .glass-light.glass-blur { background: rgb(236 240 255 / .92); }
  .glass.glass-btn { background: rgb(255 255 255 / .1); }
}

/* --- Formos (iš logotipo kalbos) ---------------------------------------- */

.shape { position: absolute; display: block; pointer-events: none; }

/* --- Paneliai ------------------------------------------------------------- */

.panel {
  position: relative;
  margin-inline: var(--panel-inset);
  border-radius: var(--radius-panel);
  overflow: hidden;
  overflow: clip; /* clip, ne hidden: hidden sukuria slinkimo konteinerį ir sugadina animacijas pagal slinkimą */
  isolation: isolate;
}
.panel-ink { background: var(--panel-raise); color: var(--paper); box-shadow: inset 0 0 0 1px var(--panel-edge); }
.panel-accent { background: var(--accent); color: var(--paper); }

