/* ============================================================
   Frizerski salon Olivera — styles
   Palette & type extracted from the original Framer site.
   ============================================================ */

:root {
  --navy:      #19154e;   /* headings / brand */
  --ink:       #14131f;   /* strong text */
  --muted:     #5b5e76;   /* body copy */
  --accent:    #f0652f;   /* CTA */
  --accent-dk: #d5511f;
  --soft:      #f4f3f1;   /* alternating section band */
  --paper:     #ffffff;
  --line:      #e7e5f2;
  --open:      #2fb457;   /* "otvoreni" dot */
  --closed:    #d23b3b;   /* "zatvoreni" dot */

  --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Bodoni Moda', Didot, Georgia, 'Times New Roman', serif;

  --maxw: 1200px;
  --gap: clamp(1.25rem, 4vw, 3rem);
  --radius: 6px;
  --header-h: 76px;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--muted);
  background: var(--paper);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  /* Optical kerning everywhere */
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
}
@media (max-width: 809px) {
  body { font-size: 16px; }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

/* Grid items default to min-width:auto, which lets a large image's intrinsic
   size blow out the track even though the image itself has max-width:100%. */
.hero-inner, .about-inner, .hours-inner, .location-inner, .booking-inner,
.hero-ticker, .hours-grid {
  min-width: 0;
}
.hero-inner > *, .about-inner > *, .hours-inner > *, .location-inner > *, .booking-inner > *,
.hero-ticker > *, .hours-grid > * {
  min-width: 0;
}

/* Every section fills the viewport and centres its content vertically. */
.section-full {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- shared bits ---------- */
.section-title {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;      /* tighter Bodoni tracking */
  color: var(--navy);
  margin-bottom: 1.4rem;
  /* orange rule sitting on the baseline (crosses descenders) */
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.06em;
}
@media (max-width: 809px) {
  .section-title { font-size: 30px; }
}
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-lead { max-width: 56ch; }

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85em 1.6em;
  border-radius: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 14px -8px rgba(240, 101, 47, 0.7); }
.btn-accent:hover { background: var(--accent-dk); transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(240, 101, 47, 0.7); }
/* CTA arrow that nudges on hover */
.btn-accent::after {
  content: "→"; display: inline-block; margin-left: 0.55em;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btn-accent:hover::after { transform: translateX(5px); }

/* ---------- scroll reveal (everything but the hero) ---------- */
.has-js .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 0.84, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 0.84, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.12s; }
.reveal.d2 { transition-delay: 0.24s; }
.reveal.d3 { transition-delay: 0.36s; }

/* ---------- open / closed status pill ---------- */
.status {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.35rem 0.6rem;
  font-weight: 600; font-size: 0.95rem; color: var(--ink);
  margin: 0;
}
/* second line: next opening time when we're closed */
.status-next {
  flex: 0 0 100%;
  font-weight: 500; font-size: 0.85rem; color: var(--muted);
}
.status-next:empty { display: none; }
.status-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--muted); flex: none;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
.status.is-open .status-dot {
  background: var(--open);
  animation: pulse 2s ease-in-out infinite;
}
.status.is-open .status-text { color: var(--open); }
.status.is-closed .status-dot { background: var(--closed); }
.status.is-closed .status-text { color: var(--closed); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 180, 87, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(47, 180, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 180, 87, 0); }
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--navy);
  letter-spacing: -0.04em;
}

.primary-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); list-style: none; margin: 0; padding: 0; }
.primary-nav a { font-weight: 500; font-size: 0.95rem; color: var(--navy); transition: color 0.15s ease; }
.primary-nav a:hover { color: var(--accent); }
/* animated underline drawing in from the left on hover */
.primary-nav a:not(.nav-cta) { position: relative; }
.primary-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.primary-nav a:not(.nav-cta):hover::after,
.primary-nav a:not(.nav-cta):focus-visible::after { transform: scaleX(1); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 0.6em 1.25em; border-radius: 8px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover { background: var(--accent-dk); transform: translateY(-1px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 26px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }

/* ============================================================
   HERO
   ============================================================ */
.hero { background: #fff; overflow: hidden; }
.hero.section-full { min-height: auto; display: block; }   /* height comes from hero-inner */
.hero-inner {
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  display: grid; grid-template-columns: 1fr 0.8fr; grid-template-rows: 100%;
  gap: var(--gap); align-items: stretch; width: 100%;
}
.hero-inner > * { min-height: 0; }   /* let the ticker clip instead of stretching the page */
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding-block: 2rem; }
.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.8rem;
}
.hero-title .lead { font-size: 1.28em; line-height: 1; }
.hero-title .u {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.06em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* vertical photo ticker — two full-height columns drifting opposite ways */
.hero-ticker {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  height: 100%; overflow: hidden;
}
.ticker-col { overflow: hidden; }
.ticker-track { will-change: transform; }
.ticker-track img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 3px; margin-bottom: 12px;
}
.ticker-up   { animation: tickerUp   28s linear infinite; }
.ticker-down { animation: tickerDown 28s linear infinite; }
@keyframes tickerUp   { from { transform: translateY(0);     } to { transform: translateY(-50%); } }
@keyframes tickerDown { from { transform: translateY(-50%); } to { transform: translateY(0);     } }

/* ============================================================
   ABOUT / UPOZNAJ NAS  (scissors left, copy right)
   ============================================================ */
.about { background: var(--soft); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; width: 100%; }
.about-media { align-self: stretch; display: flex; align-items: flex-start; }
.about-scissors {
  width: 100%; max-width: 520px; margin-inline: auto;
  transform-origin: 50% 50%;   /* rotate from the centre — no vertical drift */
  will-change: transform;      /* scroll-driven rotation set from JS */
}
.about-copy p + p { margin-top: 1rem; }

/* ============================================================
   RADNO VRIJEME / HOURS  (centered)
   ============================================================ */
.hours { background: #fff; }
.hours-inner { text-align: center; width: 100%; }
.hours .section-title {
  font-family: var(--font-sans);   /* Montserrat, per request */
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

.clock { position: relative; width: min(280px, 66vw); aspect-ratio: 1; margin: 0 auto; }
.clock img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.clock-hand { transform-origin: 50% 50%; }
/* Hands rotate freely — big hand = minutes (fast), small hand = hours (slow). */
.clock-minute { animation: spin 8s linear infinite; }
.clock-hour   { animation: spin 96s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hours .status { justify-content: center; text-align: center; margin: 1.4rem auto 2.4rem; }

.hours-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; max-width: 620px; margin: 0 auto;
}
.hours-am { text-align: left; }
.hours-pm { text-align: right; }
.hours-col h3 { font-weight: 600; font-size: 1.1rem; color: var(--ink); margin-bottom: 0.5rem; }
.hours-time { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; color: #111; margin: 0 0 1rem; letter-spacing: 0.01em; }
.hours-col ul { list-style: none; margin: 0; padding: 0; }
.hours-col li { padding: 0.28rem 0; font-weight: 500; color: var(--ink); transition: color 0.2s ease; }
.hours-col li.today { color: var(--open); font-weight: 700; }

/* ============================================================
   LOKACIJA / LOCATION
   ============================================================ */
.location { background: var(--soft); }
.location-inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--gap); align-items: center; width: 100%; }
.location-copy p + p { margin-top: 0.8rem; }
.location-copy .btn { margin-top: 1.5rem; }
.location-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.location-map iframe { width: 100%; height: 440px; border: 0; display: block; }

/* ============================================================
   PROIZVODI / PRODUCTS  (horizontal ticker)
   ============================================================ */
.products { background: #fff; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(2rem, 5vw, 3rem); }
.section-head .section-lead { margin-inline: auto; }
.products-ticker {
  width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.products-track {
  display: flex; align-items: center; width: max-content;
  animation: tickerLeft 34s linear infinite; will-change: transform;
}
.products-track img {
  height: clamp(180px, 22vw, 290px); width: auto;
  margin-right: 40px; object-fit: contain;
}
@keyframes tickerLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   REZERVIRAJ / BOOKING  (light)
   ============================================================ */
.booking { background: var(--soft); }
.booking-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--gap); align-items: center; width: 100%; }
.booking-copy p { margin: 0 0 1.2rem; }
.booking-copy .status { display: flex; margin: 0 0 1.2rem; }
.phone-link {
  display: inline-block;
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--ink);
  letter-spacing: 0.01em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.08em;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.phone-link:hover { color: var(--accent); border-color: var(--accent); }

.phone-wrap { position: relative; width: min(400px, 82%); margin-inline: auto; }
.booking-phone { width: 100%; }
/* Rotary finger-wheel overlaid on the phone's dial, bobbing like it's being dialled. */
.phone-dial {
  position: absolute; width: 40%;
  top: 15%; left: 24%;
  transform-origin: 52% 50%;
  animation: dialBob 3.2s ease-in-out infinite;
}
@keyframes dialBob {
  0%, 100% { transform: rotate(-14deg); }
  50%      { transform: rotate(16deg); }
}

/* ============================================================
   FOOTER  (orange)
   ============================================================ */
.site-footer { background: var(--accent); color: #fff; padding: 2.4rem 0; }
.footer-brand { font-weight: 600; font-size: 1rem; color: #fff; margin: 0 0 0.4rem; }
.footer-meta { font-size: 0.9rem; color: rgba(255, 255, 255, 0.92); margin: 0 0 0.6rem; }
.footer-meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-meta a:hover { color: rgba(255, 255, 255, 0.8); }
.footer-legal { font-size: 0.8rem; color: rgba(255, 255, 255, 0.9); margin: 0; }
.footer-legal a:hover { color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 809px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
    box-shadow: 0 18px 40px -24px rgba(25, 21, 78, 0.35);
  }
  .primary-nav.open { max-height: 420px; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.2rem 1.2rem; }
  .primary-nav li { border-top: 1px solid var(--line); }
  .primary-nav a { display: block; padding: 0.95rem 0.2rem; }
  .nav-cta { text-align: center; margin-top: 0.7rem; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Full-height sections relax on mobile so stacked content isn't cramped. */
  .section-full { min-height: auto; padding-block: clamp(3rem, 12vw, 5rem); }

  .hero-inner,
  .about-inner,
  .location-inner,
  .booking-inner { grid-template-columns: 1fr; }

  .hero-inner { height: auto; grid-template-rows: auto; }
  .hero-ticker { height: 60vh; max-width: 460px; margin-inline: auto; }
  .about-media { order: -1; }
  .about-scissors { max-width: 340px; }
  .about-scissors { transform: none !important; }  /* no scroll drift on mobile */
  .booking-media { order: -1; }
  .location-map iframe { height: 340px; }
}

@media (max-width: 540px) {
  .hours-grid { gap: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-up, .ticker-down, .products-track,
  .clock-hand, .phone-dial, .status.is-open .status-dot { animation: none !important; }
  .about-scissors { transform: none !important; }
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
}
