/* =========================================================================
   base.css — tokeni, reset, tipografija, mreža, dugmad
   Nina Nikolić — portfolio
   ========================================================================= */

/* ------------------------------------------------------------- 1. TOKENI */
:root {
  /* svetla tema je osnovna, tamna je prepisuje ispod */
  --bg:         #FFFFFF;
  --bg-soft:    #F4F9F9;
  --bg-tint:    #EEF6F5;
  --surface:    #FFFFFF;
  --surface-2:  #F7FAFA;
  --line:       #E3EBEC;
  --line-soft:  #EFF4F4;

  --ink:        #17272E;
  --ink-2:      #3E545D;
  --muted:      #6C8189;

  --teal:       #16776C;
  --teal-ink:   #12655C;
  --teal-dark:  #0E4F49;
  --teal-deep:  #0C3B38;
  --teal-soft:  #E4F1EF;
  --teal-glow:  rgba(22, 119, 108, .14);

  --warm:       #C9834A;
  --script:     #5D7379;

  --on-deep:      #EAF3F2;
  --on-deep-mute: #9FBDB9;

  --shadow-xs: 0 1px 2px rgba(16, 40, 45, .05);
  --shadow-sm: 0 2px 6px rgba(16, 40, 45, .05), 0 1px 2px rgba(16, 40, 45, .04);
  --shadow-md: 0 10px 30px rgba(16, 40, 45, .07), 0 2px 6px rgba(16, 40, 45, .04);
  --shadow-lg: 0 24px 60px rgba(16, 40, 45, .11), 0 4px 12px rgba(16, 40, 45, .05);

  --r-sm:  10px;
  --r:     16px;
  --r-lg:  24px;
  --r-xl:  32px;
  --r-pill: 999px;

  /* tipografija */
  --ff:        'Plus Jakarta Sans', 'Jakarta-fb', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-script: 'Caveat', 'Segoe Script', cursive;

  --fs-hero:  clamp(2.35rem, 4.8vw, 3.9rem);
  --fs-h2:    clamp(1.7rem, 2.9vw, 2.45rem);
  --fs-h3:    clamp(1.15rem, 1.5vw, 1.35rem);
  --fs-h4:    1.0625rem;
  --fs-body:  1rem;
  --fs-sm:    .9375rem;
  --fs-xs:    .875rem;
  --fs-eyebrow: .75rem;
  --fs-script: clamp(1.15rem, 1.6vw, 1.45rem);

  /* razmaci */
  --s1: .25rem; --s2: .5rem;  --s3: .75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem;   --s7: 3rem;   --s8: 4rem;
  --s9: 5.5rem; --s10: 7.5rem;

  --container: 1220px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --nav-h: 76px;

  /* kretanje */
  --motion: 1;
  --ease:   cubic-bezier(.22, 1, .36, 1);
  --d-fast: calc(180ms * var(--motion));
  --d:      calc(340ms * var(--motion));
  --d-slow: calc(620ms * var(--motion));
}

:root[data-theme="dark"] {
  --bg:         #0E1719;
  --bg-soft:    #121F22;
  --bg-tint:    #11211F;
  --surface:    #16242700;
  --surface:    #152326;
  --surface-2:  #1A2B2F;
  --line:       #24393D;
  --line-soft:  #1E3034;

  --ink:        #ECF4F3;
  --ink-2:      #BFD2D2;
  --muted:      #8CA5A8;

  --teal:       #4BC7B3;
  --teal-ink:   #5CD3C0;
  --teal-dark:  #2FA795;
  --teal-deep:  #0A1517;
  --teal-soft:  rgba(75, 199, 179, .13);
  --teal-glow:  rgba(75, 199, 179, .18);

  --warm:       #E0A06A;
  --script:     #8FA8AC;

  --on-deep:      #E8F2F1;
  --on-deep-mute: #9DB8B7;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, .38);
  --shadow-lg: 0 26px 64px rgba(0, 0, 0, .48);

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) { :root { --motion: 0; } }

/* -------------------------------------------------------------- 2. RESET */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--teal); color: #fff; }

html.theming, html.theming * {
  transition: background-color 220ms linear, color 220ms linear,
              border-color 220ms linear, fill 220ms linear, stroke 220ms linear;
}

/* --------------------------------------------------------- 3. TIPOGRAFIJA */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); }

.h1 { font-size: var(--fs-hero); letter-spacing: -.035em; line-height: 1.06; }
.h2 { font-size: var(--fs-h2);  letter-spacing: -.03em;  line-height: 1.15; text-wrap: balance; }
.h3 { font-size: var(--fs-h3);  letter-spacing: -.02em; }
.h4 { font-size: var(--fs-h4);  letter-spacing: -.015em; }

.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--s3);
  display: block;
}

.lede { font-size: 1.0625rem; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.teal { color: var(--teal); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }

.script {
  font-family: var(--ff-script);
  font-size: var(--fs-script);
  font-weight: 500;
  line-height: 1.25;
  color: var(--script);
  letter-spacing: 0;
}
.script em { font-style: normal; color: var(--teal); }

.prose p { color: var(--ink-2); max-width: 64ch; }
.prose p + p { margin-top: var(--s4); }
.prose strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------- 4. RASPORED */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }

.sec-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s5);
  flex-wrap: wrap;
}
.sec-head .lede { margin-top: var(--s3); }

.grid { display: grid; gap: var(--s5); }
.stack-2 > * + * { margin-top: var(--s2); }
.stack-3 > * + * { margin-top: var(--s3); }
.stack-4 > * + * { margin-top: var(--s4); }
.stack-5 > * + * { margin-top: var(--s5); }

.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;
}

/* --------------------------------------------------------------- 5. KARTE */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease),
              border-color var(--d) var(--ease);
}
.card--lift:hover, .card--lift:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--teal) 35%, var(--line));
}

/* --------------------------------------------------------------- 6. DUGMAD */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .8rem 1.35rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease),
              border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease),
              box-shadow var(--d-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--teal-dark); color: #fff; box-shadow: 0 4px 14px var(--teal-glow); }
.btn--primary:hover { background: var(--teal); box-shadow: 0 8px 22px var(--teal-glow); }
:root[data-theme="dark"] .btn--primary { background: var(--teal); color: #08211E; }
:root[data-theme="dark"] .btn--primary:hover { background: var(--teal-ink); }

.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn--light { background: rgba(255,255,255,.12); color: var(--on-deep); border-color: rgba(255,255,255,.22); }
.btn--light:hover { background: rgba(255,255,255,.2); }

.btn--sm { padding: .55rem 1rem; font-size: var(--fs-xs); }

.btn .arw { transition: transform var(--d-fast) var(--ease); }
.btn:hover .arw { transform: translateX(3px); }

.link-more {
  display: inline-flex; align-items: center; gap: .45em;
  font-weight: 600; font-size: var(--fs-sm); color: var(--teal);
}
.link-more .arw { transition: transform var(--d-fast) var(--ease); }
.link-more:hover .arw { transform: translateX(4px); }

/* ---------------------------------------------------------------- 7. ČIPOVI */
.chip {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip--teal { background: var(--teal-soft); border-color: transparent; color: var(--teal-ink); }
.chip--glass { background: rgba(255,255,255,.7); border-color: rgba(255,255,255,.9); color: var(--ink); backdrop-filter: blur(6px); }
:root[data-theme="dark"] .chip--glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* -------------------------------------------------------------- 8. OTKRIVANJE */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity var(--d-slow) var(--ease), transform var(--d-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .reveal.in { transition: none; }
}

/* ------------------------------------------------------------ 9. DEKORACIJA */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}
.leaf { position: absolute; pointer-events: none; opacity: .5; color: var(--line); z-index: 0; }

.section > .container { position: relative; z-index: 1; }
