

:root{
  --cream:#f1e9da;
  --muted:#d8d0c2;
  --red:#d65a4c;
  --shadow:rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{
  margin:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:#000;
  color:var(--cream);
}
body{font-family:Inter,system-ui,sans-serif}
button{font:inherit}

.page{
  position:relative;
  width:100vw;
  height:100svh;
  background:#000;
  overflow:hidden;
}

.hero,
.spotlight-screen,
.final-screen{
  position:absolute;
  inset:0;
}

/* HERO */
.hero{
  z-index:5;
  opacity:1;
  transition:opacity .8s ease;
}
.hero-photo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:62% 58%;
  filter:brightness(1.08) saturate(1.03);
  transform:scale(1.03);
  transition:filter 1.4s ease, transform 9s ease;
}
.hero-gradient{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.84) 0%, rgba(0,0,0,.62) 25%, rgba(0,0,0,.18) 52%, rgba(0,0,0,.02) 72%),
    linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.18) 100%);
  transition:background 1.4s ease;
}

.topbar{
  position:absolute;
  top:26px;
  left:34px;
  right:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:4;
}
.brand{display:flex;align-items:center;gap:14px}
.brand-mark{
  width:54px;
  height:54px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
  display:grid;
  place-items:center;
  position:relative;
  text-shadow:0 2px 8px rgba(0,0,0,.35);
}
.brand-mark .house{position:absolute;top:7px;font-size:24px;line-height:1}
.brand-mark .waves{position:absolute;bottom:6px;font-size:18px;line-height:1}
.brand-name{
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:clamp(30px,2.1vw,38px);
  font-weight:600;
  letter-spacing:.08em;
  text-shadow:0 6px 22px rgba(0,0,0,.35);
}
.hamburger{display:grid;gap:6px}
.hamburger span{display:block;width:28px;height:2px;background:rgba(255,255,255,.88)}

.hero-copy{
  position:absolute;
  left:clamp(26px,4vw,54px);
  top:clamp(100px,12vh,122px);
  width:min(540px, calc(100vw - 52px));
  z-index:4;
}
.hero-copy h1{
  margin:0;
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:clamp(48px,5.3vw,84px);
  line-height:.93;
  font-weight:600;
  letter-spacing:-.04em;
  text-shadow:0 10px 30px rgba(0,0,0,.35);
}
.tagline{
  margin:22px 0 14px;
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:clamp(26px,2vw,32px);
  line-height:1.08;
  color:var(--cream);
}
.divider{
  width:72px;
  height:2px;
  background:rgba(255,255,255,.86);
  margin:18px 0 22px;
}
.features{
  list-style:none;
  padding:0;
  margin:0 0 28px;
  display:grid;
  gap:18px;
  width:min(390px, 100%);
}
.features li{
  display:grid;
  grid-template-columns:36px 1fr;
  gap:14px;
  align-items:start;
  font-size:clamp(18px,1.35vw,22px);
  color:rgba(255,255,255,.96);
}
.features .icon{
  font-size:28px;
  line-height:1;
  opacity:.98;
  font-family:"Cormorant Garamond", Georgia, serif;
}

.register-btn{
  border:1px solid rgba(224,84,71,.92);
  background:rgba(44,15,14,.24);
  color:var(--cream);
  border-radius:10px;
  min-width:306px;
  padding:16px 28px;
  cursor:pointer;
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:clamp(26px,1.9vw,38px);
  box-shadow:0 12px 28px rgba(0,0,0,.25), inset 0 0 18px rgba(255,70,50,.14);
  transition:transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.register-btn:hover{
  transform:translateY(-1px);
  background:rgba(60,18,16,.36);
  box-shadow:0 14px 32px rgba(0,0,0,.3), inset 0 0 22px rgba(255,70,50,.18);
}
.late-warning{
  margin:16px 4px 0;
  color:var(--red);
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:clamp(28px,2vw,36px);
  opacity:0;
  transform:translateY(10px);
  transition:opacity .35s ease, transform .35s ease;
  text-shadow:0 0 10px rgba(205,52,39,.22);
}
.late-warning.show{opacity:1;transform:translateY(0)}

.page.darkening .hero-photo{
  filter:brightness(.22) saturate(.65);
  transform:scale(1.05);
}
.page.darkening .hero-gradient{
  background:rgba(0,0,0,.85);
}
.page.hide-hero .hero{opacity:0;pointer-events:none}

/* SPOTLIGHT */
.spotlight-screen{
  z-index:20;
  background:#000;
  display:grid;
  place-items:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .45s ease;
}
.page.show-spotlight .spotlight-screen{opacity:1;pointer-events:auto}
.spotlight-image{
  width:min(1200px, 96vw);
  height:auto;
  max-height:92svh;
  object-fit:contain;
  filter:drop-shadow(0 18px 50px rgba(0,0,0,.5));
}

/* FINAL */
.final-screen{
  z-index:30;
  background:#000;
  display:grid;
  place-items:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .85s ease;
}
.page.show-final .final-screen{opacity:1;pointer-events:auto}
.final-poster{
  width:auto;
  height:100%;
  max-width:100%;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 24px 70px rgba(0,0,0,.42));
}

.replay-btn{
  position:absolute;
  right:18px;
  bottom:18px;
  z-index:50;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(10,10,10,.65);
  color:var(--cream);
  border-radius:999px;
  padding:12px 18px;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transition:opacity .35s ease;
}
.page.show-final .replay-btn{opacity:1;pointer-events:auto}

@media (max-width: 820px){
  .topbar{top:14px;left:14px;right:14px}
  .brand-mark{width:42px;height:42px}
  .brand-mark .house{font-size:20px;top:5px}
  .brand-mark .waves{font-size:14px;bottom:5px}
  .brand-name{font-size:21px}
  .hero-copy{left:14px;top:76px;width:calc(100vw - 28px)}
  .hero-copy h1{font-size:clamp(38px,11vw,56px)}
  .tagline{font-size:20px;margin-top:14px}
  .features{gap:13px;margin-bottom:20px}
  .features li{font-size:15px;grid-template-columns:30px 1fr;gap:10px}
  .features .icon{font-size:22px}
  .register-btn{width:100%;min-width:0;font-size:22px;padding:14px 20px}
  .late-warning{font-size:22px}
  .hero-photo{object-position:58% 56%}
  .spotlight-image{width:100vw;max-height:none}
  .replay-btn{left:14px;right:14px;width:calc(100% - 28px)}
}

/* v20: typewriter typography and immediate scene changes */
body,button,.brand-name,.hero-copy h1,.tagline,.features .icon,.register-btn{font-family:"Courier New",Courier,monospace;letter-spacing:-.035em}
.hero-copy h1{font-size:clamp(38px,4.2vw,65px);line-height:1.08;letter-spacing:-.055em}
.tagline{font-size:clamp(20px,1.6vw,26px)}
.register-btn{font-size:clamp(18px,1.55vw,24px)}
.hero-photo{object-position:50% 50%}
.warning-screen{position:absolute;inset:0;z-index:25;background:#000;display:flex;align-items:center;justify-content:center;text-align:center;padding:20px;opacity:0;visibility:hidden;pointer-events:none}
.warning-screen p{color:#f0e9dc;font-family:"Courier New",Courier,monospace;font-size:clamp(25px,4vw,58px);font-weight:bold;line-height:1.35}
.page.show-warning .warning-screen{opacity:1;visibility:visible}
.page.show-warning .hero{visibility:hidden}
.spotlight-screen{transition:none;z-index:20}
.page.show-spotlight .hero{visibility:hidden}
.page.show-spotlight .spotlight-screen{opacity:1;visibility:visible}
.spotlight-image{width:100vw;height:100svh;max-height:100svh;object-fit:contain}
.book-promo{position:absolute;z-index:40;left:clamp(15px,3vw,52px);bottom:clamp(15px,4vh,45px);display:flex;align-items:end;gap:20px;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .45s ease}
.page.show-book .book-promo{opacity:1;visibility:visible;pointer-events:auto}
.book-cover{height:clamp(155px,30vh,305px);width:auto;object-fit:contain}
.book-button{padding:14px 20px;border:1px solid #ddc884;color:#f7eabc;background:rgba(0,0,0,.88);border-radius:5px;cursor:pointer;font-size:clamp(14px,1.5vw,22px);margin-bottom:12px}
.book-button:hover{background:#292315}
.page.show-book .replay-btn{opacity:1;pointer-events:auto}
@media(max-width:820px){.hero-copy h1{font-size:clamp(29px,9vw,46px)}.tagline{font-size:18px}.book-promo{bottom:75px;gap:9px}.book-cover{height:clamp(120px,23vh,210px)}.book-button{padding:10px;font-size:13px}.spotlight-image{width:100vw;height:100svh;object-fit:contain}}

/* v21: visos svetaines tipografija ir knygos reklama */
html, body, body *, button, a, input {font-family:"American Typewriter", "AmericanTypewriter", "Courier New", Courier, monospace !important;}
.warning-screen p {color:#cc1c24 !important; font-weight:700; letter-spacing:.025em; white-space:pre-wrap; max-width:94vw;}
.book-promo {top:clamp(10px,2vh,24px) !important; bottom:auto !important; left:clamp(10px,2vw,36px) !important; align-items:center !important; gap:clamp(8px,1.5vw,24px) !important; max-width:calc(100vw - 20px);}
.book-cover {height:min(120vh,1220px) !important; max-height:80svh; width:auto !important; flex-shrink:1; min-width:0; object-fit:contain;}
.book-button {display:inline-flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;flex-shrink:0; margin:0 !important; max-width:40vw;}
@media(max-width:650px) {.book-cover{height:min(92svh,840px) !important;max-height:75svh;} .book-promo{gap:4px !important;left:4px !important;} .book-button{max-width:37vw;font-size:clamp(11px,2.7vw,16px);padding:9px 7px;}}

/* v22: new villa, eight-second hero and coordinated book CTA */
.warning-screen p {
  font-weight:400 !important;
  font-size:clamp(12.5px,2vw,29px) !important;
}
.book-promo {
  gap:clamp(4px,.6vw,10px) !important;
}
.book-cover {
  height:min(62.4svh,640px) !important;
  max-height:62.4svh !important;
}
.book-button {
  border:1px solid rgba(224,84,71,.92) !important;
  background:rgba(44,15,14,.45) !important;
  color:var(--cream) !important;
  border-radius:10px !important;
  padding:16px 28px !important;
  box-shadow:0 12px 28px rgba(0,0,0,.25),inset 0 0 18px rgba(255,70,50,.14) !important;
  font-size:clamp(18px,1.55vw,24px) !important;
  transition:transform .18s ease,background .18s ease,box-shadow .18s ease !important;
}
.book-button:hover {
  transform:translateY(-1px);
  background:rgba(60,18,16,.65) !important;
  box-shadow:0 14px 32px rgba(0,0,0,.3),inset 0 0 22px rgba(255,70,50,.18) !important;
}
@media(max-width:650px) {
  .book-cover {height:min(56svh,520px) !important;max-height:56svh !important;}
  .book-promo {gap:4px !important;}
  .book-button {padding:12px 10px !important;font-size:clamp(11px,2.7vw,16px) !important;}
}

/* v24: 10% smaller book; promo inset farther from the left edge */
.book-promo { left:clamp(30px,5vw,90px) !important; }
.book-cover { height:min(56.16svh,576px) !important; max-height:56.16svh !important; }
@media (max-width:650px) {
  .book-promo { left:clamp(18px,4vw,34px) !important; max-width:calc(100vw - 36px) !important; }
  .book-cover { height:min(50.4svh,468px) !important; max-height:50.4svh !important; }
}

/* v25: gently move the book and its adjacent button right and down */
.book-promo {
  left:clamp(45px,6.5vw,115px) !important;
  top:clamp(25px,5vh,65px) !important;
}
@media (max-width:650px) {
  .book-promo {
    left:clamp(26px,6vw,48px) !important;
    top:clamp(24px,4vh,46px) !important;
    max-width:calc(100vw - 42px) !important;
  }
}

/* v26 — phones: intact image proportions and a dedicated vertical layout.
   Desktop styling remains unchanged. */
@media (max-width: 650px) {
  .hero {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    background: #090b0b;
  }
  .hero-photo {
    inset: 0 0 auto 0;
    width: 100%;
    height: min(35svh, 310px);
    object-fit: contain;
    object-position: center top;
    transform: none;
    filter: brightness(.86) saturate(1.04);
  }
  .hero-gradient {
    inset: 0 0 auto 0;
    height: min(38svh, 340px);
    background: linear-gradient(to bottom, rgba(0,0,0,.40), rgba(0,0,0,.08) 50%, #090b0b 100%);
  }
  .topbar { top: 12px; left: 16px; right: 16px; }
  .brand-name { font-size: clamp(18px, 5vw, 22px); }
  .hero-copy {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin: 0 20px;
    padding: min(34svh, 295px) 0 28px;
  }
  .hero-copy h1 { font-size: clamp(26px, 7.5vw, 36px); line-height: 1.13; }
  .tagline { font-size: clamp(15px, 4.3vw, 18px); line-height: 1.3; }
  .divider { margin: 13px 0 16px; }
  .features { gap: 11px; margin-bottom: 19px; }
  .features li { font-size: clamp(13px, 3.7vw, 16px); grid-template-columns: 24px 1fr; gap: 8px; }
  .features .icon { font-size: 21px; }
  .register-btn { width: 100%; font-size: clamp(15px, 4.2vw, 19px); padding: 13px 12px; }

  /* Keep the flashlight scene fully visible at the image's natural ratio. */
  .spotlight-screen { overflow: hidden; }
  .spotlight-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100svh;
    object-fit: contain;
    object-position: center center;
  }
  .warning-screen p { max-width: 94vw; padding: 0 8px; }

  /* Promo is stacked instead of squeezing the cover and CTA horizontally. */
  .book-promo {
    left: 50% !important;
    top: clamp(30px, 7svh, 76px) !important;
    bottom: auto !important;
    transform: translateX(-50%);
    width: min(92vw, 420px);
    max-width: 92vw !important;
    display: flex;
    flex-direction: column;
    align-items: center !important;
    gap: 10px !important;
  }
  .book-cover {
    width: auto !important;
    height: auto !important;
    max-width: min(72vw, 310px) !important;
    max-height: 46svh !important;
    object-fit: contain;
  }
  .book-button {
    max-width: 90vw !important;
    font-size: clamp(13px, 3.9vw, 18px) !important;
    padding: 12px 15px !important;
  }
  .replay-btn { bottom: max(12px, env(safe-area-inset-bottom)); }
}

/* v27: Center the entire book + button group in the mobile viewport. */
@media (max-width: 650px) {
  .book-promo {
    position: absolute;
    left: 50% !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%);
    width: min(92vw, 420px);
    max-height: calc(100svh - 28px);
    justify-content: center;
    align-items: center !important;
  }
  .book-cover {
    max-height: min(46svh, 400px) !important;
  }
}

/* v28: on phones, keep the promo vertically centered but left-align
   both the book and its button at 10% of the viewport width. */
@media (max-width: 650px) {
  .book-promo {
    left: 10vw !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: 80vw;
    max-width: 80vw !important;
    align-items: flex-start !important;
  }
}

/* v29: Mobile promo aligned to the right, with a 10vw inset. */
@media (max-width: 650px) {
  .book-promo {
    left: auto !important;
    right: 10vw !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: 80vw;
    max-width: 80vw !important;
    align-items: flex-end !important;
  }
}
