/* Best of Istria – privremena stranica (stranica u izradi) */

:root {
  --ink: #1A1F1D;
  --text: #3A423E;
  --muted: #55615B;
  --line: #E3E6E1;
  --terra: #A8401F;
  --olive: #5C6B2E;
  --sea: #1F5F8B;
  --stone: #EFE9DF;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #FFFFFF;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--terra); }

.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

/* Tekst */
.content { display: flex; flex-direction: column; min-height: 100vh; padding: 0 clamp(24px, 6vw, 88px); }
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.logo .dot { width: 13px; height: 13px; border-radius: 50%; background: var(--terra); }
.lang { display: flex; gap: 2px; }
.lang button {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--muted);
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  min-width: 44px; height: 44px; padding: 0 8px; cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--terra); }
.lang button:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }

main { flex: 1; display: flex; align-items: center; padding: 32px 0 56px; }
main section { max-width: 34em; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 28px; font-size: 15px; font-weight: 600; color: var(--terra);
}
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--terra); flex: none; }
.pulse::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--terra); opacity: 0; animation: pulse 2.4s ease-out infinite;
}
h1 {
  margin: 0 0 24px;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--terra); }
p { margin: 0 0 16px; color: var(--text); }
.lead { font-size: 20px; }

.first { margin-top: 36px; }
.first h2 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--muted); }
.first ul { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.first li {
  display: flex; align-items: baseline; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 17px;
}
.first li span { color: var(--olive); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; min-width: 1.5em; }

.partner {
  margin-top: 32px; padding: 20px 22px; border-radius: 4px;
  background: var(--stone); font-size: 16px; color: var(--ink);
}
.partner strong { display: block; margin-bottom: 2px; }

footer { border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: 14px; color: var(--muted); }
footer p { margin: 0; color: var(--muted); }

/* Ilustracija */
.art { position: sticky; top: 0; height: 100vh; background: var(--stone); overflow: hidden; }
.art svg { display: block; width: 100%; height: 100%; }
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.art.gl svg { visibility: hidden; }
.sun { animation: rise 1.6s cubic-bezier(.2,.7,.2,1) both; }
.town { animation: fade 1.2s .5s ease-out both; }

/* Ulazak teksta */
.reveal > * { animation: up .8s cubic-bezier(.2,.7,.2,1) both; }
.reveal > *:nth-child(2) { animation-delay: .08s; }
.reveal > *:nth-child(3) { animation-delay: .16s; }
.reveal > *:nth-child(4) { animation-delay: .24s; }
.reveal > *:nth-child(5) { animation-delay: .32s; }
.reveal > *:nth-child(6) { animation-delay: .40s; }

@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: translateY(60px); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { opacity: .6; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* Mobitel i tablet */
@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
  .content { display: contents; }
  header { order: 1; padding-left: 24px; padding-right: 24px; }
  .art { position: relative; height: 380px; order: 2; }
  main { order: 3; padding: 32px 24px 56px; }
  footer { order: 4; margin: 0 24px; }
}

[hidden] { display: none !important; }
