/* Quorizon theme layer: dark (default) + light mode, toggle button, email chooser */
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
html.theme-anim body, html.theme-anim .site-header, html.theme-anim .site-footer, html.theme-anim .form-card, html.theme-anim section {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
html.qz-lock { overflow: hidden; }

/* ---------- toggle button ---------- */
.theme-toggle { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:38px; height:38px; margin-left:14px;
  border-radius:50%; border:1px solid rgba(232,196,106,.55); background:rgba(255,255,255,.08); color:var(--white); cursor:pointer; padding:0;
  transition:background .25s, border-color .25s, transform .25s; -webkit-tap-highlight-color:transparent; }
.theme-toggle:hover { background:rgba(194,142,65,.28); border-color:var(--gold-light); transform:rotate(14deg); }
.theme-toggle:focus-visible { outline:2px solid var(--gold-light); outline-offset:2px; }
.theme-toggle svg { width:18px; height:18px; display:block; }
@media (max-width:860px) { .theme-toggle { margin-left:auto; margin-right:12px; width:36px; height:36px; } }

/* ---------- email chooser popup ---------- */
.qz-pop { position:fixed; inset:0; z-index:99990; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(8,6,3,.66); backdrop-filter:blur(3px); }
.qz-pop[hidden] { display:none; }
.qz-pop-card { position:relative; width:100%; max-width:380px; padding:34px 28px 26px; text-align:center; color:#2b1d0e; border-radius:3px;
  background:linear-gradient(rgba(244,231,205,.97),rgba(240,225,196,.97)), url('../images/about/script.jpg') center/420px;
  box-shadow:0 28px 60px rgba(0,0,0,.6), inset 0 0 60px rgba(120,80,30,.22); animation:qzIn .28s ease; }
@keyframes qzIn { from { opacity:0; transform:translateY(14px) scale(.97); } to { opacity:1; transform:none; } }
.qz-pop-card::before { content:""; position:absolute; top:-13px; left:50%; width:96px; height:26px; transform:translateX(-50%) rotate(-3deg); background:rgba(232,196,106,.65); box-shadow:0 2px 6px rgba(0,0,0,.25); }
.qz-pop-x { position:absolute; top:8px; right:12px; background:none; border:0; font-size:28px; line-height:1; color:#5a4630; cursor:pointer; padding:4px 8px; }
.qz-pop-x:hover { color:#9a5a1c; }
.qz-pop-kicker { display:block; font-family:'Caveat',cursive; font-size:23px; color:#9a5a1c; line-height:1; }
.qz-pop-card h2 { font-family:var(--font-display); font-size:30px; color:#3b2410; margin:2px 0 6px; }
.qz-pop-addr { font-size:14.5px; color:#2b1d0e; word-break:break-all; margin-bottom:18px; font-weight:600; }
.qz-act { display:block; width:100%; margin-top:10px; padding:12px 16px; border-radius:6px; border:1.5px solid #9a5a1c; background:transparent; color:#5a3410 !important;
  font:600 14.5px var(--font-body); text-align:center; text-decoration:none; cursor:pointer; transition:background .2s, color .2s; }
.qz-act:hover { background:rgba(154,90,28,.14); }
.qz-act.qz-primary { background:#9a5a1c; color:#fff !important; }
.qz-act.qz-primary:hover { background:#7a4a18; }

/* ================= LIGHT MODE ================= */
html[data-theme="light"] {
  --black:#f5eddb; --surface:#ece1c8; --card:rgba(255,251,240,.9); --glass:rgba(90,60,25,.06); --border:rgba(90,60,25,.2);
  --text:#2b1d0e; --muted:#5a4630; --white:#2b1d0e; --gold:#8f5f1f; --gold-light:#6f4614; --gold-dark:#6f4614;
}
/* surfaces that stay dark / sit on photos keep the original palette */
html[data-theme="light"] :is(.hero-carousel,.tiled-hero,.tour-overlay,.tap-hint,.tour-book-btn,.mobile-nav,.split-caption,.vt-hero,#preloader,.site-header:not(.scrolled)),
html[data-theme="light"].menu-open .site-header {
  --black:#0a0a0a; --surface:#111; --text:#efe8df; --muted:#a89b8c; --white:#fff; --gold:#c28e41; --gold-light:#e8c46a; --gold-dark:#a06f2e;
}
@media (max-width:860px) { html[data-theme="light"] .qb-text { --white:#fff; --text:#efe8df; --muted:#a89b8c; --gold:#c28e41; --gold-light:#e8c46a; } }

html[data-theme="light"] body { background:linear-gradient(rgba(245,237,219,.9),rgba(245,237,219,.94)), url('../images/about/script.jpg') center/520px #f5eddb; }
html[data-theme="light"] .vt { background:linear-gradient(rgba(245,237,219,.9),rgba(245,237,219,.94)), url('../images/about/script.jpg') center/520px; }

/* header + nav */
html[data-theme="light"] .site-header.scrolled { background:rgba(248,241,226,.95); box-shadow:0 2px 18px rgba(70,45,15,.22); }
html[data-theme="light"] .site-header.scrolled .main-nav a { color:#2b1d0e; }
html[data-theme="light"] .site-header.scrolled .main-nav a:hover,
html[data-theme="light"] .site-header.scrolled .main-nav a.active { color:var(--gold); }
html[data-theme="light"] .site-header.scrolled .btn-outline { border-color:rgba(43,29,14,.55); }
html[data-theme="light"] .site-header.scrolled .hamburger span { background:#2b1d0e; }
html[data-theme="light"].menu-open .site-header .hamburger span { background:#fff; }
html[data-theme="light"].menu-open .site-header .hamburger.open span { background:#e8c46a; }

/* buttons: white text on the deeper gold (dark containers keep dark text on bright gold) */
html[data-theme="light"] .btn-primary, html[data-theme="light"] .book-btn { color:#fff !important; }
html[data-theme="light"] :is(.hero-carousel,.mobile-nav,.tiled-hero,.tour-overlay) .btn-primary,
html[data-theme="light"] :is(.hero-carousel,.mobile-nav) .book-btn { color:#000 !important; }

/* forms */
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]), html[data-theme="light"] select, html[data-theme="light"] textarea {
  background:rgba(255,255,255,.66); border-color:rgba(90,60,25,.38); color:#2b1d0e; }
html[data-theme="light"] ::placeholder { color:rgba(60,40,15,.5); }
html[data-theme="light"] .form-card {
  background:linear-gradient(rgba(250,243,226,.95),rgba(246,237,215,.97)), url('../images/about/script.jpg') center/460px;
  border-color:rgba(143,95,31,.5);
  box-shadow:0 18px 40px rgba(70,45,15,.28), inset 0 0 0 6px rgba(250,243,226,.9), inset 0 0 0 7px rgba(143,95,31,.4); }
html[data-theme="light"] .form-errors { color:#8c1d18; background:rgba(180,40,30,.09); border-color:rgba(180,40,30,.35); }
html[data-theme="light"] .field-hint.error { color:#b3261e; }
html[data-theme="light"] .field-hint.ok { color:#1f6b36; }
html[data-theme="light"] .form-card [role="alert"][style] { color:#1f6b36 !important; background:rgba(60,150,90,.12) !important; border-color:rgba(60,150,90,.4) !important; }

/* footer */
html[data-theme="light"] .site-footer { background:linear-gradient(rgba(236,225,200,.95),rgba(230,217,188,.97)), url('../images/about/script.jpg') center/460px; }

/* about page dark panel */
html[data-theme="light"] .vt-promise { background:rgba(252,246,230,.93); box-shadow:inset 0 0 0 6px rgba(248,241,222,.95), inset 0 0 0 7px rgba(143,95,31,.4); }
html[data-theme="light"] .vt-promise p { color:#2b1d0e; }

/* softer shadows for paper on a light page */
html[data-theme="light"] :is(.vt-sheet,.vt-step,.vt-letter,.features-strip .feature-item,.booking-aside,.contact-info,.success-card,.qb-text) { box-shadow:0 14px 30px rgba(70,45,15,.3), inset 0 0 50px rgba(120,80,30,.16); }
html[data-theme="light"] :is(.vt-pol,.vt-photo,.tour-card,.intro-split .split-img,.vt-postcard) { box-shadow:0 12px 26px rgba(70,45,15,.34); }
html[data-theme="light"] .tour-card:hover { box-shadow:0 24px 46px rgba(70,45,15,.42); }
html[data-theme="light"] .tour-card, html[data-theme="light"] .vt-pol, html[data-theme="light"] .intro-split .split-img { outline:1px solid rgba(90,60,25,.18); }
html[data-theme="light"] .site-footer::after, html[data-theme="light"] .intro-split::after { filter:drop-shadow(0 5px 6px rgba(70,45,15,.5)); }
html[data-theme="light"] .section-title { text-shadow:none; }
html[data-theme="light"] .tiled-hero h1, html[data-theme="light"] .hero-carousel h1, html[data-theme="light"] .hero-carousel h2 { text-shadow:0 2px 14px rgba(0,0,0,.55); }
html[data-theme="light"].menu-open .site-header, html[data-theme="light"].menu-open .site-header.scrolled { background:#080808; box-shadow:none; }

/* preloader looks identical in both themes (airplane stays visible) */
#preloader { background:#0a0a0a; color:#efe8df; }
.pre-plane { color:#efe8df; }

/* lighter paint cost while scrolling */
.site-header.scrolled { -webkit-backdrop-filter:none; backdrop-filter:none; background:rgba(8,8,8,.97); }
html[data-theme="light"] .site-header.scrolled { background:rgba(248,241,226,.97); }
.form-card, .pad, .why-card { -webkit-backdrop-filter:none; backdrop-filter:none; }

/* ---------- parallax (compositor-only 'translate', skipped for reduced motion) ---------- */
@media (prefers-reduced-motion:no-preference) {
  [data-px="self"] { translate:0 calc(var(--p,0) * var(--px,0px)); will-change:translate; }
  .vt-strips { translate:0 var(--hy,0px); }
  @media (max-width:860px) { .hero-carousel .slide-bg { translate:0 var(--hy,0px); } }
  .tiled-hero::before { content:""; position:absolute; inset:0; background:inherit; translate:0 var(--hy,0px); will-change:translate; pointer-events:none; }
  .intro-split::after, .success-card::after { translate:0 calc(var(--p,0) * -24px); }
  .site-footer::after { translate:0 calc(var(--p,0) * 14px); }
}

/* typewriter heading: slim text cursor that sits right after the last letter and is taller than the letters */
.tw-rest { visibility: hidden; }
.tw-caret { display: inline-block; width: .055em; height: 1.1em; margin: 0 -.085em 0 .04em; vertical-align: -.2em; border-radius: 1px;
  background: currentColor; animation: twBlink .9s steps(1) infinite; }
.tw-caret.typing { animation: none; }
.tw-caret.done { animation: none; opacity: 0; transition: opacity .7s; }
@keyframes twBlink { 50% { opacity: 0; } }

/* sound toggle sits next to the theme toggle */
.sound-toggle { margin-left: 14px; }
.sound-toggle + .theme-toggle { margin-left: 8px; }
@media (max-width: 860px) {
  .sound-toggle { margin-left: auto; margin-right: 8px; width: 36px; height: 36px; }
  .sound-toggle + .theme-toggle { margin-left: 0; margin-right: 12px; }
}
