/* Pagrindas: be klasės .gl puslapis lieka paprastas ir viskas matoma. Animacijos būsenos rašomos tik po .gl. */

@font-face {
  font-family: "Anybody";
  src: url(fonts/anybody-latin-ext.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Anybody";
  src: url(fonts/anybody-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
  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: #07070a;
  --bone: #f3ecdc;
  --paper: #ece5d3;
  --blue: #3f63ff;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --spring: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: "Anybody", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.45;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Viršutinė juosta */
.top {
  position: fixed; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; justify-content: flex-end; align-items: center;
  padding: max(1rem, env(safe-area-inset-top)) var(--gutter) 1rem;
  transition: opacity .8s;
  pointer-events: none;
}
.top a { pointer-events: auto; text-decoration: none; }
.top__cta {
  position: relative; overflow: hidden;
  padding: .55rem 1.05rem;
  border: 1px solid currentColor; border-radius: 99px;
  font-size: .9rem; font-weight: 600; font-stretch: 110%;
  transition: font-stretch .5s var(--spring), letter-spacing .5s var(--spring);
}
.top__cta:hover { font-stretch: 135%; }

/* Scenos */
.scene { position: relative; min-height: 100svh; }
.scene__inner {
  position: relative;
  min-height: 100svh;
  padding: 6rem var(--gutter) 3rem;
  display: flex; flex-direction: column; justify-content: center; gap: 1.5rem;
}

.big {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(2.8rem, 4.9vw, 6.4rem);
  line-height: .98;
  letter-spacing: -.02em;
}
.line { display: block; }

.hero__word { font-weight: 900; font-stretch: 112%; font-size: clamp(4rem, 19vw, 18rem); line-height: 1; letter-spacing: -.02em; }
.hero__arrow { display: none; }

/* Forma */
.scene--contact { display: flex; flex-direction: column; }
.contact {
  position: relative; flex: 1;
  display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding: 7rem var(--gutter) 3rem;
}
@media (min-width: 960px) {
  .contact { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}
.contact__lead p { margin-top: 1.4rem; max-width: 30rem; font-size: clamp(1.1rem, 1.7vw, 1.5rem); }
.contact__lead a { font-weight: 800; text-underline-offset: .2em; }
.gl .contact__lead, .gl .foot { text-shadow: 0 0 1.1rem var(--ink), 0 0 .3rem var(--ink); }

.form {
  display: grid; gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  background: rgba(7, 7, 10, .74);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(243, 236, 220, .2);
  border-radius: 6px;
}
.field { display: grid; gap: .35rem; }
.field label { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; font-weight: 700; font-stretch: 112%; }
.field small { font-weight: 400; font-stretch: 100%; font-size: .85rem; }
.field label small { opacity: .75; }
.field__box { position: relative; }
.field__box::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--spring);
}
.field__box:focus-within::after { transform: scaleX(1); }
.field input, .field textarea {
  display: block; width: 100%;
  padding: .5rem 0 .6rem;
  background: none; color: inherit;
  border: 0; border-bottom: 1px solid rgba(243, 236, 220, .45); border-radius: 0;
  font: inherit; font-size: 1.15rem;
  outline: none; resize: vertical;
}
.field__err { color: #ffb38a; }
.field.is-bad input, .field.is-bad textarea { border-bottom-color: #ffb38a; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__end { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.form__note { flex: 1 1 14rem; font-size: .85rem; }
.form__fail { color: #ffb38a; font-size: .95rem; }

.send, .again {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 1rem 1.7rem;
  background: var(--bone); color: var(--ink);
  border: 0; border-radius: 99px;
  font: inherit; font-weight: 800; font-stretch: 115%; font-size: 1.05rem;
  cursor: pointer;
  transition: color .35s, font-stretch .5s var(--spring), transform .35s var(--spring);
}
.send::before, .again::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue);
  transform: translateY(101%);
  transition: transform .5s var(--spring);
}
.send:hover, .again:hover { color: var(--bone); font-stretch: 135%; }
.send:hover::before, .again:hover::before { transform: none; }
.send[disabled] { opacity: .6; cursor: progress; }

.thanks { display: grid; justify-items: center; gap: .7rem; text-align: center; grid-column: 1 / -1; }
.thanks[hidden] { display: none; }
.thanks__title { font-weight: 900; font-stretch: 125%; font-size: clamp(1.6rem, 3vw, 2.6rem); }
.again { margin-top: .9rem; font-size: .95rem; padding: .8rem 1.3rem; }

.foot {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem;
  padding: 1.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  font-size: .9rem;
}
.foot a { text-underline-offset: .2em; }
.foot__by { font-weight: 800; font-stretch: 118%; transition: font-stretch .5s var(--spring), color .3s; }
.foot__by:hover { font-stretch: 145%; color: #ffb066; }

/* Įvadas ir drobė rodomi tik veikiant animacijai */
#intro, #scena { display: none; }

/* ---------- Veikia animacija ---------- */

.gl #scena { display: block; position: fixed; z-index: 0; inset: 0 0 auto 0; width: 100%; height: 100lvh; }
.gl main { position: relative; z-index: 1; }
.gl .scene { background: none; }
.gl .scene--hero { height: 200svh; }
.gl .scene__inner { position: sticky; top: 0; height: 100svh; min-height: 0; padding-top: 0; padding-bottom: 0; }

/* Įvadas */
.gl #intro {
  position: fixed; z-index: 4; inset: 0;
  display: flex; justify-content: flex-end; align-items: flex-end;
  padding: var(--gutter);
  pointer-events: none;
  transition: opacity .55s, transform 1s var(--spring);
}
.intro__count { font-weight: 900; font-size: clamp(3.5rem, 13vw, 12rem); line-height: .85; font-variant-numeric: tabular-nums; }
.gl.intro-done #intro { opacity: 0; transform: translateY(-3rem); }
.gl:not(.intro-done) .top { opacity: 0; }

/* Užrašų įėjimas ir išėjimas: raidės plečiasi iš siaurų į plačias */
.w { display: inline-block; padding: .2em .03em .24em; margin: -.2em -.03em -.24em; overflow: hidden; white-space: nowrap; vertical-align: top; }
.gl .c {
  display: inline-block;
  transform: translateY(125%);
  font-stretch: 50%;
  transition: transform .4s cubic-bezier(.5, 0, .9, .4), font-stretch .4s;
}
.gl .is-active .c {
  transform: none;
  font-stretch: inherit;
  transition: transform 1.1s var(--spring), font-stretch 1.3s var(--spring);
  transition-delay: calc(var(--i) * 24ms + .05s);
}

.gl [data-reveal] {
  opacity: 0;
  transform: translateY(1.6rem);
  transition: opacity .3s, transform .4s;
}
.gl .is-active [data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--d, .35s), transform 1.1s var(--spring) var(--d, .35s);
}

/* Pradžia: pavadinimas lieka tik skaitytuvams ir paieškai, matosi tik rodyklė žemyn */
.gl .hero__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.gl .hero__hint { position: absolute; left: 0; right: 0; bottom: max(1.8rem, env(safe-area-inset-bottom)); }
.gl .hero__arrow { display: block; width: 1px; height: 3rem; margin: 0 auto; background: currentColor; transform-origin: top; animation: lasas 2.2s var(--spring) infinite; }
@keyframes lasas {
  0% { transform: scaleY(0); }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 759px) {
  .big { font-size: clamp(1.9rem, 9vw, 4.2rem); }
  .form__note { flex-basis: 100%; }
  .foot { flex-direction: column; }
}

/* Išsiųsta: forma pasitraukia, dalelės sudeda padėką */
.gl .contact__lead, .gl .form { transition: opacity .6s, transform .9s var(--spring), visibility .6s; }
.is-sent .contact__lead, .is-sent .form { opacity: 0 !important; transform: scale(.96) !important; visibility: hidden; pointer-events: none; }
.is-sent .thanks { position: absolute; left: 0; right: 0; top: 56svh; padding: 0 var(--gutter); }
.gl .thanks { animation: pasirodo 1.1s var(--spring) .9s backwards; }
.thanks:focus { outline: none; }
@keyframes pasirodo { from { opacity: 0; transform: translateY(1.5rem); } }

/* Atsakymo puslapis naršyklei be JavaScript */
.page { background: var(--paper); color: var(--ink); }
html:has(.page) { background: var(--paper); }
.page__body { max-width: 44rem; padding: 3rem var(--gutter); margin: 0 auto; }
.page__body h1 { font-weight: 900; font-stretch: 125%; font-size: clamp(2.6rem, 9vw, 5.5rem); line-height: 1; letter-spacing: -.02em; margin-bottom: 1rem; }
.page__lead { font-size: 1.25rem; font-weight: 500; margin-bottom: 2.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
