/* ==========================================================================
   Maja Ratković · Masaže i hidžama Trebinje — base: tokens, reset, type, themes, buttons, forms
   ========================================================================== */

:root {
  /* Palette — basalt stone, the ember of a warmed stone, eucalyptus, linen towels; magenta is her business card */
  --bazalt: #1A1816;
  --bazalt-2: #24211E;
  --bazalt-3: #34302B;
  --ember: #E5893B;
  --ember-hi: #F4B26B;
  --ember-deep: #B5571C;
  --sage: #7F8E66;
  --eukaliptus: #E1E7D9;
  --eukaliptus-2: #D2DACA;
  --lan: #F4EFE8;
  --lan-2: #EAE2D7;
  --ink: #1E1C1A;
  --cream: #F3EDE4;
  --magenta: #E0157A;

  --f-sans: 'Bricolage Grotesque', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --f-serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --fs-h1: clamp(3rem, 1.3rem + 6.6vw, 9rem);
  --fs-h2: clamp(2.1rem, 1.2rem + 3.4vw, 4.6rem);
  --fs-h3: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  --fs-lead: clamp(1.1rem, 1rem + 0.45vw, 1.34rem);
  --fs-body: clamp(1rem, 0.96rem + 0.16vw, 1.08rem);
  --fs-small: 0.875rem;
  --fs-label: 0.72rem;

  --gutter: clamp(1rem, 0.55rem + 2.4vw, 3rem);
  --space-2xl: clamp(7rem, 4rem + 10vw, 14rem);
  --space-xl: clamp(5rem, 3rem + 6vw, 9rem);
  --space-l: clamp(3rem, 2rem + 3vw, 5rem);
  --space-m: clamp(1.75rem, 1.2rem + 1.5vw, 2.75rem);
  --max: 1360px;

  --r-pill: 999px;
  --r-card: 22px;
  --r-stone: 46% 54% 52% 48% / 58% 50% 50% 42%;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-calm: cubic-bezier(0.45, 0, 0.2, 1);
  --t-fast: 180ms;
  --t-med: 450ms;

  --nav-h: 80px;
}

/* Themes */
:root, [data-theme="bazalt"] {
  --bg: var(--bazalt);
  --bg-2: var(--bazalt-2);
  --fg: var(--cream);
  --muted: #B3A99E;
  --line: rgba(243, 237, 228, 0.12);
  --line-strong: rgba(243, 237, 228, 0.38);
  --accent: var(--ember-hi);
  --hot: var(--ember-hi);
}
[data-theme="lan"] {
  --bg: var(--lan);
  --bg-2: var(--lan-2);
  --fg: var(--ink);
  --muted: #6E655C;
  --line: rgba(30, 28, 26, 0.11);
  --line-strong: rgba(30, 28, 26, 0.36);
  --accent: var(--ember-deep);
  --hot: var(--ember-deep);
}
[data-theme="eukaliptus"] {
  --bg: var(--eukaliptus);
  --bg-2: var(--eukaliptus-2);
  --fg: var(--ink);
  --muted: #56604D;
  --line: rgba(30, 28, 26, 0.12);
  --line-strong: rgba(30, 28, 26, 0.38);
  --accent: var(--ember-deep);
  --hot: var(--ember-deep);
}
[data-theme="zar"] {
  --bg: var(--ember);
  --bg-2: #D6782A;
  --fg: var(--bazalt);
  --muted: rgba(26, 24, 22, 0.72);
  --line: rgba(26, 24, 22, 0.18);
  --line-strong: rgba(26, 24, 22, 0.5);
  --accent: var(--bazalt);
  --hot: var(--bazalt);
}
[data-theme] { background-color: var(--bg); color: var(--fg); }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  font-family: var(--f-sans); font-size: var(--fs-body); line-height: 1.6;
  font-variation-settings: 'opsz' 14;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul[class], ol[class] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--ember); color: var(--bazalt); }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 400; padding: 0.7rem 1.1rem; border-radius: var(--r-pill);
  background: var(--ember); color: var(--bazalt); transform: translateY(-180%); transition: transform var(--t-fast);
}
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

/* Type — a calm, slightly narrow grotesque; the warm words switch to a serif italic */
.h1, .h2, .h3 {
  font-family: var(--f-sans); font-weight: 300; letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 96, 'wdth' 84;
}
.h1 { font-size: var(--fs-h1); line-height: 0.9; }
.h2 { font-size: var(--fs-h2); line-height: 0.98; }
.h3 { font-size: var(--fs-h3); line-height: 1.1; font-weight: 400; }
.h1 em, .h2 em, .h3 em, .serif-em {
  font-family: var(--f-serif); font-style: italic; font-weight: 300; letter-spacing: -0.02em; color: var(--accent);
  font-variation-settings: 'opsz' 72;
}
.lead { font-size: var(--fs-lead); line-height: 1.5; max-width: 38ch; }
.muted { color: var(--muted); }
.label {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.label::before { content: ''; width: 0.62em; height: 0.5em; border-radius: var(--r-stone); background: var(--accent); flex: none; }

.link-u {
  position: relative; display: inline-block; font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size var(--t-med) var(--ease-out);
}
.link-u:hover { background-size: 0 1px; background-position: 100% 100%; }

/* Buttons — pills that warm up from the inside on hover */
.btn {
  --b-bg: transparent; --b-fg: var(--fg); --b-line: var(--line-strong); --b-fill: var(--fg); --b-fill-fg: var(--bg);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 54px; padding: 0.85rem 1.7rem; border-radius: var(--r-pill);
  background: var(--b-bg); color: var(--b-fg); box-shadow: inset 0 0 0 1px var(--b-line);
  font-size: 0.96rem; font-weight: 600; white-space: nowrap;
  transition: color 350ms var(--ease-out), box-shadow var(--t-med) var(--ease-out), transform var(--t-fast);
}
.btn::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 140%; aspect-ratio: 1; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, var(--b-fill) 58%, transparent 71%);
  transform: translate(-50%, -50%) scale(0); transition: transform 700ms var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translate(-50%, -50%) scale(1.15); }
.btn:hover, .btn:focus-visible { color: var(--b-fill-fg); box-shadow: inset 0 0 0 1px transparent; }
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn--sm { min-height: 44px; padding: 0.6rem 1.25rem; font-size: 0.88rem; }
.btn--ember { --b-bg: var(--ember); --b-fg: var(--bazalt); --b-line: transparent; --b-fill: var(--ember-hi); --b-fill-fg: var(--bazalt); }
.btn--ember:hover { box-shadow: 0 10px 34px -8px rgba(229, 137, 59, 0.65); }
.btn--dark { --b-bg: var(--bazalt); --b-fg: var(--cream); --b-line: transparent; --b-fill: var(--bazalt-3); --b-fill-fg: var(--ember-hi); }
.btn--line { --b-fill: var(--fg); --b-fill-fg: var(--bg); }
.btn .arrow { transition: transform var(--t-med) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* Form controls */
.field { display: grid; gap: 0.45rem; }
.field > span:first-child { font-size: var(--fs-small); font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.input {
  width: 100%; min-height: 54px; padding: 0.85rem 1.1rem; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231E1C1A' stroke-width='1.5'/%3E%3C/svg%3E") right 1.1rem center no-repeat; padding-right: 2.6rem; }
.input:focus { outline: none; border-color: var(--ember-deep); box-shadow: 0 0 0 3px rgba(229, 137, 59, 0.22); }
.input[aria-invalid="true"] { border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.14); }
.input::placeholder { color: #A39A90; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
