/* ==========================================================================
   Lunera Lab — dizajn sistem
   Boje i tipografija preuzete iz brend kita i Cirkadijalnog protokola.
   ========================================================================== */

:root {
  /* Ground */
  --ink:        #11151F;
  --ink-deep:   #080B12;
  --ink-soft:   #1A2030;

  /* Signal */
  --amber:      #E8B84B;
  --amber-dim:  #C99B33;
  --amber-wash: rgba(232, 184, 75, 0.12);

  /* Paper */
  --paper:      #FFFFFF;
  --sand:       #F7F4ED;
  --sand-deep:  #F0EBE0;

  /* Text */
  --head:       #11151F;
  --body:       #2E3645;
  --body-soft:  #565E6B;
  --on-dark:    #C6D2DE;
  --on-dark-dim:#8397A9;
  --on-dark-faint: #5B6B7D;

  /* Lines */
  --line:       #E4E6EA;
  --line-dark:  rgba(255, 255, 255, 0.10);

  /* Metrics */
  --shell:      1200px;
  --gutter:     clamp(20px, 5vw, 56px);
  --radius:     10px;

  /* Type */
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

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

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: 760px; }

.band { padding-block: clamp(64px, 9vw, 120px); }
.band--tight { padding-block: clamp(48px, 6vw, 80px); }
.band--sand { background: var(--sand); }
.band--ink  { background: var(--ink); color: var(--on-dark); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--amber-dim);
}
.band--ink .eyebrow { color: var(--amber); }
.eyebrow::before {
  content: ''; width: 22px; height: 1px; background: currentColor; opacity: 0.55;
}

.display {
  font-weight: 200;
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--head);
}
.band--ink .display, .hero .display { color: #FFFFFF; }

h2, .h2 {
  font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--head);
}
.band--ink h2, .band--ink .h2 { color: #FFFFFF; }

h3, .h3 {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--head);
}
.band--ink h3, .band--ink .h3 { color: #FFFFFF; }

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  font-weight: 300;
  line-height: 1.72;
  color: var(--body-soft);
}
.band--ink .lede { color: var(--on-dark); }

.rule-amber {
  width: 40px; height: 2px; background: var(--amber);
  border: 0; margin: 22px 0 0;
}

.muted { color: var(--body-soft); }
.fine {
  font-size: 0.78rem; line-height: 1.7; color: var(--body-soft);
}
.band--ink .fine { color: var(--on-dark-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px;
  font-size: 0.83rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  border-radius: 999px; border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .22s ease, color .22s ease,
              border-color .22s ease, transform .22s ease;
}
.btn:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 3px;
}
.btn--primary {
  background: var(--amber); color: var(--ink); border-color: var(--amber);
}
.btn--primary:hover { background: #F2C766; border-color: #F2C766; transform: translateY(-1px); }

.btn--ghost {
  background: transparent; color: var(--head); border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--head); }

.band--ink .btn--ghost, .hero .btn--ghost {
  color: #FFFFFF; border-color: rgba(255,255,255,0.28);
}
.band--ink .btn--ghost:hover, .hero .btn--ghost:hover {
  border-color: var(--amber); color: var(--amber);
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.84rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--head); border-bottom: 1px solid var(--amber);
  padding-bottom: 3px;
  transition: gap .22s ease, color .22s ease;
}
.link-arrow:hover { gap: 14px; color: var(--amber-dim); }
.band--ink .link-arrow { color: #FFFFFF; }
.band--ink .link-arrow:hover { color: var(--amber); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark { width: 26px; height: 26px; flex: none; }
.logo__type {
  font-size: 0.94rem; font-weight: 300;
  letter-spacing: 0.34em; color: #FFFFFF;
  padding-left: 2px;
}
.logo--ink .logo__type { color: var(--head); }

/* ---------- Header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(17, 21, 31, 0.86);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.masthead--light {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--line);
}
.masthead__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 68px;
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.05em;
  color: var(--on-dark); padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: #FFFFFF; border-bottom-color: var(--amber);
}
.masthead--light .nav a { color: var(--body); }
.masthead--light .nav a:hover,
.masthead--light .nav a[aria-current="page"] { color: var(--head); }

.masthead__tools { display: flex; align-items: center; gap: 16px; }

/* Language switch */
.lang {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-dark); border-radius: 999px;
  overflow: hidden;
}
.masthead--light .lang { border-color: var(--line); }
.lang button {
  background: none; border: 0; cursor: pointer;
  padding: 6px 12px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em;
  color: var(--on-dark-dim);
  transition: background-color .2s ease, color .2s ease;
}
.masthead--light .lang button { color: var(--body-soft); }
.lang button:hover { color: #FFFFFF; }
.masthead--light .lang button:hover { color: var(--head); }
.lang button[aria-pressed="true"] { background: var(--amber); color: var(--ink); }
.lang button:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }

/* Mobile nav */
.burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 9px;
}
.burger span {
  display: block; height: 1.5px; background: #FFFFFF; margin: 5px 0;
  transition: transform .25s ease, opacity .25s ease;
}
.masthead--light .burger span { background: var(--head); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ink);
    padding: 8px var(--gutter) 26px;
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  .masthead--light .nav { background: var(--paper); }
  .nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line-dark); }
  .masthead--light .nav a { border-bottom-color: var(--line); }
}

/* ==========================================================================
   HERO — cirkadijalni sat (potpisni element)
   ========================================================================== */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--on-dark);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(232,184,75,0.10), transparent 58%),
    radial-gradient(90% 70% at 12% 92%, rgba(90,120,170,0.14), transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(64px, 8.5vw, 112px);
}
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
}

.hero__title { margin-top: 22px; }
.hero__lede { margin-top: 24px; max-width: 46ch; }
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px;
}

/* --- Circadian dial --- */
.dial { justify-self: center; width: min(100%, 430px); }

.dial__ring {
  position: relative;
  padding: 34px;               /* prostor za oznake sati van kruga */
}
.dial__svg { width: 100%; height: auto; overflow: visible; display: block; }

.dial__track { fill: none; stroke: rgba(255,255,255,0.09); stroke-width: 1.5; }
.dial__tick  { stroke: rgba(255,255,255,0.20); stroke-width: 1; }
.dial__tick--major { stroke: rgba(255,255,255,0.40); stroke-width: 1.2; }
.dial__hour {
  fill: var(--on-dark-faint); font-size: 8px; font-weight: 500;
  letter-spacing: 0.1em; text-anchor: middle; dominant-baseline: middle;
}
.dial__now circle { fill: var(--amber); }
.dial__now line { stroke: var(--amber); stroke-width: 1.4; }
.dial__glow { fill: var(--amber); opacity: 0.28; filter: blur(4px); }

.dial__overlay {
  position: absolute; inset: 34px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
}
.dial__time {
  font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 200;
  letter-spacing: 0.02em; color: #FFFFFF;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.dial__phase {
  margin-top: 10px;
  font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber);
}

.dial__foot { margin-top: 14px; text-align: center; }
.dial__note {
  font-size: 0.86rem; line-height: 1.62; color: var(--on-dark);
  max-width: 40ch; margin-inline: auto;
}
.dial__next {
  display: block; margin-top: 7px;
  font-size: 0.72rem; letter-spacing: 0.03em; color: var(--on-dark-faint);
}
.dial__caption {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.68rem; line-height: 1.55; color: var(--on-dark-faint);
  max-width: 38ch; margin-inline: auto;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section-head { max-width: 660px; }
.section-head h2 { margin-top: 16px; }
.section-head .lede { margin-top: 18px; }

/* Principles */
.principles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3.4vw, 48px); margin-top: clamp(40px, 5vw, 64px);
}
@media (max-width: 820px) { .principles { grid-template-columns: 1fr; gap: 34px; } }

.principle { padding-top: 22px; border-top: 1px solid var(--line); }
.band--ink .principle { border-top-color: var(--line-dark); }
.principle__idx {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em;
  color: var(--amber-dim);
}
.band--ink .principle__idx { color: var(--amber); }
.principle h3 { margin: 12px 0 10px; }
.principle p { font-size: 0.93rem; line-height: 1.72; color: var(--body-soft); }
.band--ink .principle p { color: var(--on-dark-dim); }

/* Guide feature */
.guide {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; gap: 36px; } }

.guide__cover {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--ink); aspect-ratio: 1 / 1.414;
  width: 100%; max-width: 340px; margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12%;
  box-shadow: 0 26px 60px -26px rgba(17,21,31,0.55);
}
.guide__cover img { width: 62%; height: auto; }
.guide__cover-title {
  margin-top: 12%; font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 300; letter-spacing: 0.04em; color: #FFFFFF; text-align: center;
}
.guide__cover-sub {
  margin-top: 10px; font-size: 0.7rem; font-style: italic;
  color: var(--on-dark-dim); text-align: center; line-height: 1.5;
}
.guide__list { margin: 26px 0 0; }
.guide__list li {
  position: relative; padding-left: 26px; margin-bottom: 13px;
  font-size: 0.94rem; line-height: 1.68; color: var(--body-soft);
}
.guide__list li::before {
  content: ''; position: absolute; left: 3px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--amber);
}

/* Form */
.capture { max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--on-dark-dim);
}
.band--sand .field label, .band--paper .field label { color: var(--body-soft); }
.field input {
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-dark);
  border-radius: 6px; color: #FFFFFF;
  transition: border-color .2s ease, background-color .2s ease;
}
.field input::placeholder { color: var(--on-dark-faint); }
.field input:focus {
  outline: none; border-color: var(--amber); background: rgba(255,255,255,0.08);
}
.form-note { margin-top: 14px; }

/* Blog list */
.posts { margin-top: clamp(36px, 4.6vw, 56px); }
.post-row {
  display: grid; grid-template-columns: 130px 1fr auto;
  gap: clamp(18px, 3vw, 40px); align-items: baseline;
  padding: 28px 0; border-top: 1px solid var(--line);
  transition: background-color .2s ease;
}
.post-row:last-child { border-bottom: 1px solid var(--line); }
.post-row:hover { background: var(--sand); }
.post-row__meta {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--amber-dim);
}
.post-row h3 { font-weight: 400; font-size: clamp(1.05rem, 2vw, 1.32rem); }
.post-row p {
  margin-top: 9px; font-size: 0.9rem; line-height: 1.68; color: var(--body-soft);
  max-width: 62ch;
}
.post-row__go { font-size: 1.1rem; color: var(--amber); }
@media (max-width: 760px) {
  .post-row { grid-template-columns: 1fr; gap: 10px; }
  .post-row__go { display: none; }
}

.empty {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: clamp(36px, 6vw, 64px); text-align: center;
  margin-top: clamp(32px, 4vw, 48px);
}
.empty h3 { margin-bottom: 10px; }
.empty p { color: var(--body-soft); max-width: 46ch; margin-inline: auto; }

/* Article */
.article { padding-block: clamp(48px, 6vw, 76px); }
.article__head { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article__meta {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 20px;
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--body-soft);
}
.prose { margin-top: 38px; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 46px; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.prose h3 { margin-top: 34px; }
.prose p { font-size: 1.01rem; line-height: 1.82; }
.prose strong { font-weight: 600; color: var(--head); }
.prose ul { margin-top: 18px; }
.prose ul li {
  position: relative; padding-left: 26px; margin-bottom: 12px; line-height: 1.78;
}
.prose ul li::before {
  content: ''; position: absolute; left: 3px; top: 12px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--amber);
}
.prose blockquote {
  margin-top: 30px; padding: 22px 26px;
  background: var(--sand); border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  font-size: 1rem; line-height: 1.75;
}
.prose a { border-bottom: 1px solid var(--amber); }
.prose a:hover { color: var(--amber-dim); }

.refs {
  margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line);
}
.refs h3 { margin-bottom: 14px; }
.refs ol { counter-reset: r; }
.refs li {
  counter-increment: r; position: relative; padding-left: 28px;
  margin-bottom: 11px; font-size: 0.82rem; line-height: 1.65; color: var(--body-soft);
}
.refs li::before {
  content: counter(r) '.'; position: absolute; left: 0;
  font-weight: 600; color: var(--amber-dim);
}

/* Quote block */
.pull {
  max-width: 720px; margin-inline: auto; text-align: center;
  padding: clamp(30px, 4vw, 46px);
  background: #FCFAF5; border: 1px solid var(--amber);
  border-radius: var(--radius);
}
.pull p {
  font-style: italic; font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.72; color: var(--head);
}
.pull cite {
  display: block; margin-top: 16px; font-style: normal;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.24em; color: var(--amber-dim);
}

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--on-dark); }
.foot__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(48px, 6vw, 76px);
}
@media (max-width: 780px) { .foot__top { grid-template-columns: 1fr; gap: 32px; } }
.foot h4 {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--on-dark-faint); margin-bottom: 16px;
}
.foot ul li { margin-bottom: 10px; }
.foot a { font-size: 0.88rem; color: var(--on-dark); transition: color .2s ease; }
.foot a:hover { color: var(--amber); }
.foot__tag {
  margin-top: 16px; font-size: 0.88rem; font-style: italic;
  color: var(--on-dark-dim); max-width: 34ch;
}
.foot__base {
  display: flex; flex-wrap: wrap; gap: 14px 28px;
  justify-content: space-between; align-items: center;
  padding-block: 22px; border-top: 1px solid var(--line-dark);
  font-size: 0.72rem; letter-spacing: 0.14em; color: var(--on-dark-faint);
}

/* ---------- Utilities ---------- */
.stack-sm > * + * { margin-top: 12px; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-l { margin-top: clamp(28px, 4vw, 44px); }

.skip {
  position: absolute; left: -9999px;
  background: var(--amber); color: var(--ink);
  padding: 12px 20px; z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; top: 0; }

[hidden] { display: none !important; }

/* Reveal on scroll — aktivira se samo ako JS radi,
   tako da je sadržaj uvek vidljiv i bez JavaScripta. */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .7s ease;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Logo lockup (korice vodiča) ---------- */
.lockup { text-align: center; width: 100%; }
.lockup__moon { width: 34px; height: 34px; margin: 0 auto 16px; }
.lockup__word {
  font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 300;
  letter-spacing: 0.42em; color: #FFFFFF; padding-left: 0.42em;
}
.lockup__rule {
  width: 62%; height: 1px; background: var(--amber);
  margin: 12px auto 9px;
}
.lockup__sub {
  font-size: 0.52rem; letter-spacing: 0.36em;
  color: var(--on-dark-dim); padding-left: 0.36em;
}
