/* ==========================================================================
   lp8 — „Taurė“ — pilno ekrano hero nuotrauka + apatinis pilno pločio sheet
   ========================================================================== */

:root {
  --lp8-wine: #7F1D1D;
  --lp8-wine-soft: rgba(127, 29, 29, 0.16);
  --lp8-amber: #F59E0B;
  --lp8-amber-ink: #2A1602;
  --lp8-card-bg: #1C1210;
  --lp8-card-bg-2: rgba(28, 18, 16, 0.92);
  --lp8-card-border: rgba(253, 244, 231, 0.10);
  --lp8-text: #FDF4E7;
  --lp8-text-muted: rgba(253, 244, 231, 0.70);
  --lp8-text-faint: rgba(253, 244, 231, 0.55);
  --lp8-danger: #FCA5A5;
  --lp8-font-brand: "Playfair Display", Georgia, "Times New Roman", serif;
  --lp8-font-body: "Karla", "Segoe UI", Arial, sans-serif;
  --lp8-radius: 26px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--lp8-card-bg);
  color: var(--lp8-text);
  font-family: var(--lp8-font-body);
  height: 100%;
}

.lp8-body {
  min-height: 100dvh;
  overflow: hidden;
}

img, svg { display: block; }

a { color: inherit; }

.lp8-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;
}

/* ---------- Puslapio karkasas ---------- */

.lp8-page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.lp8-hero {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(12, 8, 7, 0.10) 0%, rgba(12, 8, 7, 0.30) 100%),
    url("hero-portrait.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 44%;
  background-color: var(--lp8-card-bg);
}

.lp8-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(70% 45% at 50% 100%, rgba(245, 158, 11, 0.10) 0%, rgba(12, 8, 7, 0) 60%),
    linear-gradient(0deg, rgba(10, 6, 5, 0.78) 0%, rgba(10, 6, 5, 0.30) 30%, rgba(10, 6, 5, 0.02) 50%);
  pointer-events: none;
}

/* ---------- Pagrindinis stage: sheet apačioje, per visą plotį ---------- */

.lp8-stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  min-height: 0;
}

.lp8-sheet {
  width: 100%;
  max-width: 680px;
  background: var(--lp8-card-bg);
  border: 1px solid var(--lp8-card-border);
  border-bottom: none;
  border-radius: var(--lp8-radius) var(--lp8-radius) 0 0;
  padding: 14px clamp(20px, 4vw, 34px) clamp(14px, 2.4vh, 20px);
  box-shadow:
    0 -20px 60px rgba(0, 0, 0, 0.45),
    0 -2px 12px rgba(0, 0, 0, 0.3);
  max-height: 92dvh;
  overflow-y: auto;
}

.lp8-sheet-handle {
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 3px;
  background: rgba(253, 244, 231, 0.22);
  margin: 0 auto clamp(10px, 1.6vh, 14px);
}

/* ---------- Prekės ženklas ---------- */

.lp8-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: clamp(8px, 1.4vh, 14px);
  flex-wrap: wrap;
}

.lp8-brand-name {
  font-family: var(--lp8-font-brand);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--lp8-amber);
}

.lp8-brand-tag {
  font-size: 12px;
  color: var(--lp8-text-faint);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lp8-headline {
  font-family: var(--lp8-font-brand);
  font-weight: 600;
  font-size: clamp(19px, 3vw, 24px);
  line-height: 1.18;
  margin: 0 0 6px;
  color: var(--lp8-text);
}

.lp8-sub {
  margin: 0 0 clamp(12px, 2vh, 18px);
  font-size: 13px;
  line-height: 1.5;
  color: var(--lp8-text-muted);
}

/* ---------- Forma ---------- */

.lp8-form[hidden] { display: none; }

.lp8-fieldset {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
}

.lp8-legend {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lp8-text-faint);
  margin-bottom: 7px;
  padding: 0;
}

.lp8-radio-row {
  display: flex;
  gap: 10px;
}

.lp8-radio {
  flex: 1 1 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 10px;
  border: 1px solid rgba(253, 244, 231, 0.18);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--lp8-text);
  cursor: pointer;
  background: rgba(253, 244, 231, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lp8-radio input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}

.lp8-radio:has(input:checked) {
  border-color: var(--lp8-wine);
  background: var(--lp8-wine-soft);
}

.lp8-radio:has(input:focus-visible) {
  outline: 2px solid var(--lp8-amber);
  outline-offset: 2px;
}

.lp8-date-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 8px;
}

.lp8-select-wrap select {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(253, 244, 231, 0.18);
  background-color: rgba(253, 244, 231, 0.03);
  color: var(--lp8-text);
  font-family: var(--lp8-font-body);
  font-size: 14px;
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FDF4E7' stroke-width='1.8'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 28px;
}

.lp8-select-wrap select:focus-visible,
.lp8-cta:focus-visible,
.lp8-legal-nav a:focus-visible {
  outline: 2px solid var(--lp8-amber);
  outline-offset: 2px;
}

.lp8-select-wrap select option { color: #111; }

.lp8-cta {
  width: 100%;
  margin-top: 2px;
  padding: 13px 16px;
  border: none;
  border-radius: 11px;
  background: var(--lp8-amber);
  color: var(--lp8-amber-ink);
  font-family: var(--lp8-font-body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.lp8-cta:hover { filter: brightness(1.06); }
.lp8-cta:active { transform: translateY(1px); }

.lp8-consent {
  margin: 9px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--lp8-text-faint);
}

.lp8-consent a { text-decoration: underline; color: var(--lp8-text-muted); }

.lp8-error {
  margin: 9px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lp8-danger);
}

/* ---------- Sėkmės būsena ---------- */

.lp8-success[hidden] { display: none; }

.lp8-success {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border-radius: 12px;
  background: var(--lp8-wine-soft);
  border: 1px solid rgba(127, 29, 29, 0.45);
  margin-bottom: 4px;
}

.lp8-success-icon {
  width: 20px; height: 20px;
  flex: none;
  color: var(--lp8-amber);
  margin-top: 1px;
}

.lp8-success p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--lp8-text);
}

/* ---------- Pasitikėjimo ženkliukai ---------- */

.lp8-badges {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: clamp(12px, 2vh, 18px) 0 clamp(8px, 1.4vh, 12px);
  padding: 0;
}

.lp8-badge {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 10.2px;
  line-height: 1.28;
  color: var(--lp8-text-muted);
  font-weight: 600;
}

.lp8-badge svg {
  width: 19px; height: 19px;
  color: var(--lp8-amber);
}

.lp8-social-proof {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--lp8-text-faint);
}

.lp8-social-proof::before {
  content: "● ";
  color: #4ADE80;
}

/* ---------- Teisinė juosta (sheet viduje) ---------- */

.lp8-legal {
  margin-top: clamp(10px, 1.8vh, 14px);
  padding-top: clamp(10px, 1.8vh, 14px);
  border-top: 1px solid rgba(253, 244, 231, 0.10);
}

.lp8-legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 14px;
  font-size: 11px;
}

.lp8-legal-nav a {
  text-decoration: none;
  color: var(--lp8-text-faint);
}

.lp8-legal-nav a:hover { color: var(--lp8-text-muted); }

.lp8-legal-age {
  color: var(--lp8-text-faint);
  font-weight: 700;
  border: 1px solid rgba(253, 244, 231, 0.25);
  border-radius: 4px;
  padding: 0 5px;
}

/* ---------- Responsive: sheet dydis ---------- */

@media (min-width: 641px) {
  .lp8-stage { padding: 0 clamp(16px, 4vw, 48px) clamp(18px, 3vh, 32px); }
  .lp8-sheet { border-bottom: 1px solid var(--lp8-card-border); border-radius: var(--lp8-radius); }
}

@media (max-width: 640px) {
  .lp8-sheet { border-radius: 22px 22px 0 0; }
}

@media (max-width: 399px) {
  .lp8-body { overflow-y: auto; height: auto; }
  .lp8-page { min-height: 100dvh; }
  .lp8-sheet { max-height: none; }
  .lp8-hero { position: fixed; }
  .lp8-scrim { position: fixed; }
}

/* ---------- Hero nuotraukos pozicija pagal ekrano proporcijas ----------
   Nuotrauka portretinė (848x1264), veidas viršutiniame trečdalyje.
   `cover` mastelis plačiuose/žemuose languose priklauso nuo pločio, todėl
   matoma vertikali juosta yra maža procentinė viso vaizdo dalis — pozicija
   parinkta empiriškai (Playwright screenshot'ais) kiekvienam blokui,
   kad veidas visada liktų virš sheet'o viršutinio krašto. */

/* Mobili portretinė (pvz. 375x812): scale-by-height, visas aukštis matomas
   be vertikalaus apkirpimo — Y pozicija nesvarbi, svarbu horizontali centr. */
@media (max-width: 480px) {
  .lp8-hero { background-position: 48% center; }
  .lp8-sheet { max-height: 58dvh; }
}

/* Planšetinė portretinė (pvz. 768x1024) */
@media (min-width: 481px) and (max-width: 900px) {
  .lp8-hero { background-position: center 37%; }
}

/* Itin žemas/platus desktop (pvz. 901x550, iki pat 400px aukščio) — SVARBIAUSIAS testas.
   Realaus vartotojo naršyklės languose šis aukštis gali nusileisti gerokai žemiau 620px
   (patikrinta iki ~400px) — kortelė sutankinta maksimaliai, kad liktų kuo daugiau vietos
   nuotraukai virš jos, o veidas (akys + šypsena) liktų matomas, ne tik plaukai/kakta. */
@media (min-width: 901px) and (max-height: 620px) {
  .lp8-hero { background-position: center 30%; }
  .lp8-sheet { max-height: 62dvh; padding: 6px 18px 8px; }
  .lp8-sheet-handle { margin-bottom: 4px; }
  .lp8-brand { margin-bottom: 4px; }
  .lp8-brand-name { font-size: 18px; }
  .lp8-brand-tag { display: none; }
  .lp8-headline { font-size: 15px; line-height: 1.1; margin-bottom: 3px; }
  .lp8-sub { display: none; }
  .lp8-legend { display: none; }
  .lp8-fieldset { margin-bottom: 5px; }
  .lp8-radio { padding: 6px 8px; font-size: 13px; }
  .lp8-date-row { gap: 5px; }
  .lp8-select-wrap select { padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
  .lp8-cta { padding: 8px 14px; font-size: 13px; margin-top: 2px; }
  .lp8-badges { display: none; }
  .lp8-consent { display: none; }
  .lp8-legal { margin-top: 4px; padding-top: 4px; }
}

/* Vidutiniškai žemas desktop (pvz. 1024x768, 1280x800, 1394x677) */
@media (min-width: 901px) and (min-height: 621px) and (max-height: 820px) {
  .lp8-hero { background-position: center 56%; }
  .lp8-sheet { max-height: 60dvh; padding-top: 10px; }
  .lp8-sheet-handle { margin-bottom: 8px; }
  .lp8-brand-tag { display: none; }
  .lp8-fieldset { margin-bottom: 9px; }
  .lp8-badges { margin: 10px 0 7px; }
  .lp8-consent { font-size: 10px; margin-top: 6px; }
  .lp8-legal { margin-top: 7px; padding-top: 7px; }
}

/* Įprastas desktop (pvz. 1440x900) */
@media (min-width: 901px) and (min-height: 821px) and (max-height: 960px) {
  .lp8-hero { background-position: center 50%; }
}

/* Didelis desktop (pvz. 1920x1080, 2560x1080) — bazinė 44% reikšmė tinka */
@media (min-width: 901px) and (min-height: 961px) {
  .lp8-hero { background-position: center 44%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
