/* ==========================================================================
   WOODY — Your Sleep Oasis in Zagreb
   Shared design system. Link this FIRST in <head>, before any page <style>.

   Anything that should look the same on EVERY page lives here.
   Page-specific components live in that page's inline <style>.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Brand colours sampled directly from the Woody logo file
     (Dropbox\Petrinjska\Logo\color1) — do not eyeball these. */
  --teal:       #49C5B1;   /* logo mark — accent + decoration only (2.1:1 on white) */
  --mint:       #E4F6F3;   /* logo background tint — soft section grounds */
  --mint-deep:  #CFEBE5;   /* borders/dividers inside mint blocks */

  /* Derived, contrast-safe extensions of the brand */
  --teal-deep:  #1A7D6D;   /* interactive: links, buttons — 5.0:1 on white */
  --teal-dark:  #14655A;   /* hover/active */
  --ink:        #12332C;   /* headings + dark sections — 14:1 on white */
  --body:       #46564F;   /* body copy — 7.3:1 on white */
  --muted:      #5F6E68;   /* captions, meta — 5.4:1 on white, 4.8:1 on mint (AA) */
  --line:       #DDE9E5;   /* hairlines on white */
  --white:      #FFFFFF;

  /* Radius — coherent two-step scale */
  --r-sm: 8px;             /* buttons, chips */
  --r-md: 14px;            /* cards, images */

  /* Layout */
  --wrap: 1180px;
  --gutter: 24px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---- Reset / base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }  /* height:auto = never distort (global rule 9) */

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.15rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }

:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 200;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---- Section rhythm + labels ------------------------------------------ */
section { padding: clamp(56px, 8vw, 96px) 0; }

.section-label {
  font-family: 'Karla', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-dark);   /* 6.8:1 on white, 6.1:1 on mint — teal-deep fell to 4.47 on mint */
  margin: 0 0 .8rem;
}
.section-title { margin: 0 0 .6rem; }
.section-intro { max-width: 62ch; color: var(--body); margin: 0 0 2.4rem; }

.band-mint { background: var(--mint); }
.band-ink  { background: var(--ink); color: #C9DAD4; }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink .section-label { color: var(--teal); }   /* 6.4:1 on ink — safe */
.band-ink a:not(.btn) { color: var(--teal); }
/* `.band-ink a` / `.band-mint a` (0,1,1) outrank `.btn-primary` (0,1,0). Without
   these the primary button's label inherits the band's link colour and drops to
   2.35:1 on teal. Buttons keep their own colours inside every band. */
.band-ink a.btn-primary, .band-ink a.btn-primary:hover { color: #fff; }
.band-mint a:not(.btn) { color: var(--teal-dark); }  /* teal-deep is only 4.47:1 on mint */

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 50px;
  padding: 0 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: 'Karla', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* WhatsApp — brand green, used wherever we invite a direct message */
.btn-wa { background: #1A7A43; color: #fff; }   /* 5.4:1 with white — measured, AA */
.btn-wa:hover { background: #146537; color: #fff; transform: translateY(-1px); }
.band-ink a.btn-wa, .band-ink a.btn-wa:hover,
.band-mint a.btn-wa, .band-mint a.btn-wa:hover { color: #fff; }

.btn-primary { background: var(--teal-deep); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--mint); color: var(--ink); border-color: var(--mint-deep); transform: translateY(-1px); }

.band-ink .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.band-ink .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.6); }

/* ---- SIGNATURE: the stack marker --------------------------------------
   Three studios sit stacked in one building. This marker shows which floor
   you are looking at — top segment = attic, bottom = lowest. It carries
   real information, so it appears on every studio card and studio page. */
.stack {
  display: inline-flex; flex-direction: column; gap: 3px;
  padding: 0; margin: 0; border: 0;
}
.stack span {
  display: block; width: 22px; height: 4px; border-radius: 2px;
  background: var(--mint-deep);
}
.stack span.is-on { background: var(--teal-deep); }
.band-ink .stack span { background: rgba(255,255,255,.22); }
.band-ink .stack span.is-on { background: var(--teal); }

.stack-row { display: flex; align-items: center; gap: .7rem; }
.stack-row .floor {
  font-size: .75rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.band-ink .stack-row .floor { color: #A9C1BA; }

/* ---- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand-name {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.28rem;
  letter-spacing: .18em; color: var(--ink); text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .9rem; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: .4rem 0; border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { color: var(--teal-deep); border-bottom-color: var(--teal); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--teal-deep); }
.nav .btn { min-height: 42px; padding: 0 1.1rem; }

/* `.nav-links a` (0,1,1) outranks `.btn-primary` (0,1,0), so without this the
   button label inherits --ink and drops to 2.73:1 on the teal. Keep it. */
.nav-links a.btn { border-bottom: 0; }
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover { color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { gap: 1rem; }
  .nav-links .nav-hide-sm { display: none; }
}
/* At phone widths the brand + two links + CTA collide. Shrink the wordmark and
   drop "Location" (still reachable from the footer), keeping the primary path
   ("Studios") and the CTA. */
@media (max-width: 620px) {
  .nav { min-height: 62px; gap: .6rem; }
  .brand { gap: .45rem; }
  .brand img { width: 30px; height: 30px; }
  .brand-name { font-size: 1.02rem; letter-spacing: .1em; }
  .nav-links { gap: .8rem; }
  .nav-links .nav-hide-xs { display: none; }
  .nav-links a { font-size: .82rem; }
  .nav .btn { min-height: 38px; padding: 0 .8rem; font-size: .74rem; letter-spacing: .05em; }
}

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #A9C1BA; padding: 64px 0 32px; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: .8rem; }
.site-footer a { color: #C9DAD4; text-decoration: none; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.footer-grid {
  display: grid; gap: 2.4rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .5rem; }
.footer-brand img { width: 48px; height: 48px; margin-bottom: .9rem; }
.footer-bottom {
  margin-top: 2.8rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .82rem; color: #8CA79F;
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ---- FAQ (details/summary — no JS) ------------------------------------ */
.faq { max-width: 74ch; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.15rem 2.2rem 1.15rem 0;
  position: relative;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.08rem;
  color: var(--ink); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 1.5rem;
  width: 10px; height: 10px;
  border-right: 2px solid var(--teal-deep); border-bottom: 2px solid var(--teal-deep);
  transform: rotate(45deg);
  transition: transform .24s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--teal-deep); }
.faq .faq-a { padding: 0 1.5rem 1.35rem 0; }

/* ---- Studio pages -----------------------------------------------------
   Shared by /woody-1, /woody-2 and /woody-3. Lives here rather than being
   copied into three inline <style> blocks. */
.studio-hero { padding: clamp(36px, 5vw, 60px) 0 0; }
.studio-hero .kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--teal-deep); margin: 0 0 .7rem;
}
.studio-hero h1 { margin-bottom: .4em; max-width: 18ch; }
.studio-hero .lede { max-width: 58ch; }
.studio-figure { margin: clamp(28px, 4vw, 44px) 0 0; }
.studio-figure img { width: 100%; border-radius: var(--r-md); }

/* At-a-glance spec strip */
.glance {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; margin: clamp(32px, 4vw, 48px) 0 0;
}
.glance div { background: var(--white); padding: 1.15rem 1.2rem; }
.glance dt {
  font-size: .7rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .3rem;
}
.glance dd { margin: 0; font-weight: 700; color: var(--ink); font-size: 1.02rem; line-height: 1.35; }
@media (max-width: 900px) { .glance { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .glance { grid-template-columns: 1fr; } }

/* Two-column prose + list */
.detail-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.tick { list-style: none; margin: 0; padding: 0; }
.tick li {
  position: relative; padding: .55rem 0 .55rem 1.9rem;
  border-bottom: 1px solid var(--line);
}
.tick li:last-child { border-bottom: 0; }
.tick li::before {
  content: ""; position: absolute; left: .25rem; top: 1.15rem;
  width: 9px; height: 5px;
  border-left: 2px solid var(--teal-deep); border-bottom: 2px solid var(--teal-deep);
  transform: rotate(-45deg);
}
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-md); }
.gallery figcaption { font-size: .87rem; color: var(--muted); margin-top: .55rem; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }

/* SIGNATURE: the studio switcher. Three segments = three studios in one
   building; the lit one is where you are. Doubles as navigation. */
.switcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.switcher a, .switcher span.here {
  display: block; padding: 1.1rem 1.2rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: var(--ink);
  transition: border-color .22s var(--ease), background-color .22s var(--ease), transform .22s var(--ease);
}
.switcher a:hover { border-color: var(--teal); background: var(--mint); transform: translateY(-2px); }
.switcher span.here { background: var(--ink); border-color: var(--ink); color: #fff; }
.switcher .name { display: block; font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.1rem; }
.switcher .what { display: block; font-size: .87rem; color: var(--muted); margin-top: .15rem; }
.switcher span.here .what { color: #A9C1BA; }
.switcher .stack { margin-bottom: .7rem; }
.switcher span.here .stack span { background: rgba(255,255,255,.25); }
.switcher span.here .stack span.is-on { background: var(--teal); }
@media (max-width: 700px) { .switcher { grid-template-columns: 1fr; } }

/* Booking CTA band: buttons wrap on narrow screens */
#book .btn { margin: .35rem .3rem 0; }

/* ---- Utilities --------------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.lede { font-size: 1.15rem; line-height: 1.65; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
