/* Izletište Pilipović: "Svjetlo nad mahovinom". Night-moss base, one live LED colour (--led) the visitor controls. */

:root {
  --noc: #0b0f0c;
  --noc-2: #121813;
  --noc-3: #1b231d;
  --ink: #edf1e6;
  --ink-2: #c3cbbd;
  --muted: #8d988a;
  --line: rgba(237, 241, 230, 0.14);
  --moss: #a8c64a;

  --led: #ffbf47;
  --led-ink: #0b0f0c;
  --led-soft: color-mix(in oklab, var(--led) 28%, transparent);
  --led-glow: 0 0 0.5em color-mix(in oklab, var(--led) 65%, transparent), 0 0 2em color-mix(in oklab, var(--led) 30%, transparent);

  --dan: #e8eadf;
  --dan-2: #dcdfd1;
  --dan-ink: #111510;
  --dan-muted: #586253;
  --dan-line: rgba(17, 21, 16, 0.16);

  --f: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  --pad: clamp(1rem, 4vw, 3.5rem);
  --nav-h: 64px;
  --r: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);
  --t-led: 0.8s;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--noc);
  color: var(--ink);
  font-family: var(--f);
  font-optical-sizing: auto;
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--led); color: var(--led-ink); }

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 0.6em 1em; background: var(--led); color: var(--led-ink); border-radius: 8px; transform: translateY(-160%); transition: transform 0.2s; }
.skip:focus { transform: none; }
main:focus { outline: none; }

/* ---------- Type ---------- */
.label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
[data-theme="dan"] .label { color: var(--dan-muted); }
.display, h1, h2 {
  font-family: var(--f);
  font-stretch: 78%;
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
[data-led-text] { color: var(--led); transition: color var(--t-led), text-shadow var(--t-led); }

.link { display: inline-flex; align-items: center; gap: 0.45em; background: none; border: 0; padding: 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color 0.25s, border-color 0.25s; }
.link:hover { color: var(--led); }
[data-theme="dan"] .link:hover { color: var(--dan-ink); border-color: var(--dan-ink); }
.link--big { font-size: 1.15rem; }
.arrow { transition: transform 0.35s var(--ease); flex: none; }
a:hover > .arrow, button:hover > .arrow, a:hover .arrow { transform: translateX(4px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0.8em 1.35em;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.98rem; letter-spacing: -0.005em; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-led), box-shadow 0.35s, transform 0.35s var(--ease), border-color 0.25s, color 0.25s;
}
.btn--led { background: var(--led); color: var(--led-ink); }
.btn--led:hover { box-shadow: var(--led-glow); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); background: transparent; }
.btn--ghost:hover { border-color: var(--led); color: var(--led); }
.btn--dark { background: var(--dan-ink); color: var(--dan); }
.btn--dark:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.btn--sm { min-height: 38px; padding: 0.5em 1em; font-size: 0.88rem; }
.btn--big { min-height: 58px; padding: 1em 1.7em; font-size: 1.06rem; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

.round {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: transparent;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s;
}
.round:hover { border-color: var(--led); color: var(--led); }

/* ---------- LED swatches (home + sale) ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch {
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.5em 0.95em 0.5em 0.55em; min-height: 40px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 15, 12, 0.35);
  font-size: 0.86rem; font-weight: 500;
  transition: border-color 0.25s, background-color 0.25s;
}
.swatch span { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.swatch:hover { border-color: var(--c, var(--led)); }
.swatch[aria-pressed="true"] { border-color: var(--c, var(--led)); background: color-mix(in oklab, var(--c, var(--led)) 18%, rgba(11, 15, 12, 0.6)); }
.swatch--auto span { background: conic-gradient(#ff5050, #ffbf47, #9be15d, #4f8cff, #ad7bff, #ff6aa0, #ff5050); box-shadow: none; }
.swatches--sm .swatch { min-height: 36px; font-size: 0.8rem; }

/* ---------- Form fields (rezervacija + admin) ---------- */
.polje { display: grid; gap: 0.35rem; }
.polje__label { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.polje__input {
  width: 100%; min-height: 50px; padding: 0.7em 0.9em;
  background: rgba(237, 241, 230, 0.04); border: 1px solid var(--line); border-radius: 12px;
  font-size: 1.05rem; transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.polje__input:hover { border-color: rgba(237, 241, 230, 0.28); }
.polje__input:focus { outline: none; border-color: var(--led); box-shadow: 0 0 0 3px var(--led-soft); background: rgba(237, 241, 230, 0.06); }
.polje__input[aria-invalid="true"] { border-color: #ff6b6b; }
select.polje__input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(-45deg, transparent 50%, currentColor 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.4em; }
select.polje__input option { background: var(--noc-2); color: var(--ink); }
textarea.polje__input { min-height: 96px; resize: vertical; }

/* ---------- Nav: floating dark capsule, readable over sky and night ---------- */
.nav {
  position: fixed; z-index: 50; top: 12px; left: var(--pad); right: var(--pad);
  height: var(--nav-h); padding: 0 10px 0 12px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  background: rgba(11, 15, 12, 0.62); border: 1px solid var(--line); border-radius: 20px;
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  transition: transform 0.5s var(--ease), background-color 0.3s;
}
.nav::after { /* the LED strip under the capsule */
  content: ''; position: absolute; left: 22px; right: 22px; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--led), transparent);
  opacity: 0.85; transition: background var(--t-led);
}
.nav.is-hidden:not(:focus-within) { transform: translateY(calc(-100% - 20px)); }
.nav__brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; justify-self: start; }
.nav__logo { width: 40px; height: 40px; border-radius: 50%; }
.nav__name { display: grid; font-weight: 700; font-stretch: 85%; font-size: 1.12rem; letter-spacing: -0.02em; line-height: 1.05; }
.nav__name small { font-family: var(--f-mono); font-size: 0.6rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nav__list { display: flex; gap: 0.25rem; }
.nav__link { position: relative; display: block; padding: 0.55em 0.9em; border-radius: 999px; text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--ink-2); transition: color 0.25s, background-color 0.25s; }
.nav__link:hover { color: var(--ink); background: rgba(237, 241, 230, 0.07); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--led); box-shadow: 0 0 8px var(--led); }
.nav__actions { display: flex; align-items: center; gap: 0.5rem; justify-self: end; }
.nav__led { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; }
.nav__led span { width: 12px; height: 12px; border-radius: 50%; background: var(--led); box-shadow: 0 0 6px var(--led), 0 0 16px var(--led); transition: background-color var(--t-led), box-shadow var(--t-led); }
.nav__led:hover { border-color: var(--led); }
.nav__cta { min-height: 42px; padding: 0.6em 1.15em; font-size: 0.92rem; }
.nav__burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; position: relative; }
.nav__burger-line { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform 0.35s var(--ease); }
.nav__burger-line:first-child { top: 18px; }
.nav__burger-line:nth-child(2) { top: 25px; }
.menu-open .nav__burger-line:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .nav__burger-line:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--noc);
  padding: calc(var(--nav-h) + 40px) var(--pad) 32px;
  opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0s 0.35s;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity 0.35s; }
.menu__inner { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.menu__link { display: block; padding: 0.12em 0; text-decoration: none; font-size: clamp(2.6rem, 11vw, 4.2rem); font-weight: 720; font-stretch: 78%; letter-spacing: -0.035em; line-height: 1.02; opacity: 0; transform: translateY(18px); transition: opacity 0.4s, transform 0.5s var(--ease), color 0.2s; transition-delay: calc((var(--i) + 1) * 45ms); }
.menu-open .menu__link { opacity: 1; transform: none; }
.menu__link.is-active, .menu__link:hover { color: var(--led); }
.menu__foot { display: grid; gap: 0.8rem; justify-items: start; }
.menu__tel { font-size: 1.6rem; font-weight: 650; text-decoration: none; }

@media (max-width: 960px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__menu { display: none; }
  .nav__burger { display: block; }
}
@media (max-width: 520px) {
  :root { --nav-h: 58px; }
  .nav { top: 8px; left: 8px; right: 8px; border-radius: 18px; }
  .nav__cta { display: none; }
  .nav__name small { display: none; }
}

/* ---------- Footer ---------- */
.footer { position: relative; padding: clamp(4rem, 10vw, 8rem) var(--pad) 2rem; background: var(--noc); border-top: 1px solid var(--line); }
.footer__top { display: grid; gap: 1.2rem; justify-items: start; }
.footer__tel {
  display: block; text-decoration: none;
  font-size: clamp(3.4rem, 13.5vw, 13rem); font-weight: 760; font-stretch: 75%; letter-spacing: -0.045em; line-height: 0.85;
  transition: text-shadow 0.4s, color var(--t-led);
}
.footer__tel:hover { text-shadow: var(--led-glow); }
.footer__ctas { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.footer__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: clamp(3rem, 7vw, 5.5rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.footer__col { display: grid; gap: 0.7rem; align-content: start; justify-items: start; color: var(--ink-2); }
.footer__list { display: grid; gap: 0.35rem; }
.footer__list a { text-decoration: none; transition: color 0.2s; }
.footer__list a:hover { color: var(--led); }
.footer__base { display: flex; align-items: center; gap: 1rem; margin-top: 3rem; }
.footer__logo { width: 52px; height: 52px; border-radius: 50%; }
.footer__small { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- Day sections ---------- */
[data-theme="dan"] { background: var(--dan); color: var(--dan-ink); --line: var(--dan-line); color-scheme: light; }

/* ---------- Page transition: lights go out along one LED strip ---------- */
.pt { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: var(--noc); opacity: 0; transition: opacity 0.42s ease; display: grid; place-items: center; }
.pt__strip { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--led); box-shadow: var(--led-glow); transform: scaleX(0); transition: transform 0.5s var(--ease-io); }
.pt__label { position: relative; margin-top: 3.2rem; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity 0.3s; }
.pt-enter .pt, .pt-out .pt { opacity: 1; pointer-events: auto; }
.pt-enter .pt__strip, .pt-out .pt__strip { transform: scaleX(1); }
.pt-enter .pt__label { opacity: 1; }
.pt-out .pt { transition-duration: 0.3s; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: 20px; max-width: min(92vw, 460px); padding: 0.85em 1.2em; border-radius: 14px; background: var(--noc-3); border: 1px solid var(--line); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7); transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform 0.45s var(--ease), visibility 0s 0.45s; font-size: 0.95rem; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform 0.45s var(--ease); }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
