/* ============================================================================
   Ubytovňa ROOS — light, modern layer on top of the VERSI design tokens.
   Loaded AFTER colors_and_type.css. Flips the dark semantic vars to a light
   canvas while keeping the brand gradient accent, type ladder, radii & motion.
   The accent gradient (--g1/--g2/--g3 -> --grad) is overridden at runtime by
   the Tweaks panel on the #app root.
   ============================================================================ */

:root {
  /* ---- light surface system (override the DS dark defaults) ------------- */
  --bg:            #ffffff;
  --bg-alt:        #f5f5f7;
  --bg-deep:       #0e0e12;     /* footer / dark feature panels */
  --surface:       #ffffff;
  --surface-soft:  #f7f7f9;
  --fg:            #16161a;
  --fg-muted:      #56565f;
  --fg-faint:      #8a8a93;
  --border:        rgba(15, 15, 20, 0.10);
  --border-soft:   rgba(15, 15, 20, 0.07);
  --border-strong: rgba(15, 15, 20, 0.18);

  /* default accent gradient (Indigo) — Tweaks overrides these on #app */
  --g1: #3f5bff;
  --g2: #7c3aed;
  --g3: #e0218a;
  --grad: linear-gradient(100deg, var(--g1) 0%, var(--g2) 52%, var(--g3) 100%);
  --grad-soft: linear-gradient(100deg, var(--g1), var(--g2));
  --accent: var(--g2);
  --glow: color-mix(in srgb, var(--g2) 45%, transparent);

  /* shadows for the light theme (no DS drop-shadows on dark) */
  --sh-sm: 0 1px 2px rgba(16,16,24,0.05), 0 1px 1px rgba(16,16,24,0.04);
  --sh-md: 0 10px 30px -12px rgba(16,16,24,0.18);
  --sh-lg: 0 24px 60px -22px rgba(16,16,24,0.28);
  --sh-glow: 0 22px 60px -26px var(--glow);

  --radius: 20px;            /* tweakable card radius */
  --maxw: 1180px;
  --nav-h: 68px;
  --safe-top: 0px;           /* status-bar / notch inset (set in phone frame) */
}

/* inside the phone-frame preview: keep the fixed nav clear of the notch, let the
   hero gradient run all the way to the top edge, and hide the scrollbar */
html.in-phone { --safe-top: 46px; }
html.in-phone header { padding-top: 2px; }
html.in-phone #top { padding-top: calc(var(--safe-top) + var(--nav-h) + 20px) !important; }
html.in-phone, html.in-phone body { scrollbar-width: none; -ms-overflow-style: none; }
html.in-phone::-webkit-scrollbar, html.in-phone body::-webkit-scrollbar { width: 0; height: 0; display: none; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  letter-spacing: var(--body-ls);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app { min-height: 100vh; }

img { display: block; max-width: 100%; }
button { font-family: inherit; }
a { color: inherit; }

::selection { background: color-mix(in srgb, var(--g2) 26%, transparent); }

/* ---- shared layout helpers ------------------------------------------------ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(64px, 9vw, 104px) 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--fg-muted);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad);
}
.text-grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* gradient pill button (overrides DS .btn-pill to use runtime --grad) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-text); font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em; line-height: 1;
  border: none; border-radius: var(--r-pill); cursor: pointer;
  padding: 14px 26px; color: #fff; background: var(--grad);
  box-shadow: var(--sh-glow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur) var(--ease);
}
.btn:hover { box-shadow: 0 16px 44px -16px var(--glow); filter: saturate(1.05); }
.btn:active { transform: scale(var(--press-scale)); }
.btn:focus-visible { outline: 2px solid var(--g2); outline-offset: 3px; }

.btn--ghost {
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); box-shadow: var(--sh-sm);
}
.btn--ghost:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); filter: none; }

.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--lg { padding: 16px 30px; font-size: 16px; }

.btn--block { width: 100%; }

/* glass card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
}

/* ---- scroll reveal (progressive enhancement: only hides once a paint
   actually happens — see the rAF gate in the HTML head) -------------------- */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-anim .reveal { opacity: 0; transform: translateY(22px); }
.js-anim .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* image with gradient fallback (shown when <img> fails / while loading) */
.ph {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--g1) 22%, #e9e9ee), color-mix(in srgb, var(--g3) 18%, #f3f3f6));
  position: relative; overflow: hidden;
}
.ph > img { width: 100%; height: 100%; object-fit: cover; }

/* ---- keyframes ------------------------------------------------------------ */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---- range sliders (calculator) ------------------------------------------ */
.rng { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px;
  background: var(--border); outline: none; }
.rng::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px;
  border-radius: 50%; background: var(--grad); cursor: pointer; box-shadow: var(--sh-glow); border: 3px solid #fff; }
.rng::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--g2);
  cursor: pointer; border: 3px solid #fff; box-shadow: var(--sh-glow); }

/* date / select native control tint */
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.55; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2356565f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px !important; }

input:focus, textarea:focus, select:focus { border-color: color-mix(in srgb, var(--g2) 55%, transparent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--g2) 16%, transparent); }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 1180px) {
  .booking-widget { grid-template-columns: 1fr 1fr 1fr !important; }
  .booking-widget > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1080px) {
  .booking-widget { grid-template-columns: 1fr 1fr !important; }
  .booking-widget > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 940px) {
  .nav-links { display: none !important; }
  .rooms-grid, .amen-grid, .rev-grid { grid-template-columns: 1fr 1fr !important; }
  .price-grid, .hm-grid, .contact-grid, .modal-grid { grid-template-columns: 1fr !important; }
  .hero-split { grid-template-columns: 1fr !important; }
  .modal-aside { min-height: 150px !important; }
}
@media (max-width: 760px) {
  .nav-phone { display: none !important; }
  .booking-widget { grid-template-columns: 1fr !important; }
  .rooms-grid, .amen-grid, .rev-grid { grid-template-columns: 1fr !important; }
  .cf-row { grid-template-columns: 1fr !important; }
  .foot-cta { flex-direction: column; align-items: flex-start !important; }
  .section { padding: 56px 0; }
}

/* ---- phone (≤520px): tighten gutters, kill sideways scroll ---------------- */
@media (max-width: 520px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .wrap { padding: 0 18px; }
  .section { padding: 48px 0; }
  /* hero: pull the floating price chip inside the frame */
  .hero-price-card { left: 12px !important; bottom: 12px !important; padding: 11px 14px !important; }
  /* room cards: features one per line so labels never clip */
  .room-card ul { grid-template-columns: 1fr !important; }
  /* cards & panels: less inner padding so text keeps its measure */
  .card { border-radius: 16px; }
  .amen-card { padding: 20px !important; }
  /* lightbox: smaller controls, no overlap with the photo */
  .lb-btn { width: 38px !important; height: 38px !important; }
}
@media (max-width: 400px) {
  .wrap { padding: 0 15px; }
}
