/* ==========================================================
   DZINTARI EVENTS – WEBSITE
   Foundation: tokens, chrome, components
   Ported from the Dzintari Brand Book / Design System
   ========================================================== */

:root {
  /* Brand palette */
  --c-white:  #FFFFFF;
  --c-sun:    #FFD22B;
  --c-amber:  #FEB204;
  --c-orange: #EC6408;  /* primary */
  --c-ember:  #D53600;  /* primary hover */
  --c-maroon: #700E01;
  --c-ink:    #1D1D1B;

  --c-paper:   #FBF8F3;
  --c-paper-2: #F4EFE5;
  --c-line:    #E7E0D1;
  --c-line-2:  #D8CFBD;
  --c-mute:    #6B645A;
  --c-mute-2:  #97907F;

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-body:    "Inter", system-ui, -apple-system, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --nav-h: 68px;
  --maxw: 1200px;

  /* The built-in CSS easings are too weak to read as intentional. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* entering / exiting */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* moving on screen */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* iOS-like sheets */
}

* { box-sizing: border-box; }
/* Unconditional smooth scroll is a motion-sickness trigger with no way out. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* .nav is sticky, so anchor targets landed underneath it. */
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }

/* hidden by language */
[data-lv] { display: none; }
html[lang="lv"] [data-en] { display: none; }
html[lang="lv"] [data-lv] { display: revert; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }

/* ---------- Eyebrow / kicker ---------- */
.kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.kicker::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--c-orange);
}
.kicker--center { justify-content: center; }

/* ---------- Display headings ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.display em { font-style: italic; color: var(--c-orange); }
.d-xl { font-size: clamp(44px, 7vw, 92px); }
.d-lg { font-size: clamp(36px, 5vw, 64px); }
.d-md { font-size: clamp(28px, 3.5vw, 44px); }

.lead { font-size: 19px; line-height: 1.55; color: var(--c-mute); max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s var(--ease-out), color .15s var(--ease-out), border-color .15s var(--ease-out), transform 160ms var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }   /* a 1px nudge is below the perception threshold */
.btn--primary { background: var(--c-orange); color: #fff; border-color: var(--c-orange); }
@media (hover: hover) and (pointer: fine) { .btn--primary:hover { background: var(--c-ember); border-color: var(--c-ember); } }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line-2); }
@media (hover: hover) and (pointer: fine) { .btn--ghost:hover { border-color: var(--c-ink); } }
.btn--on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
@media (hover: hover) and (pointer: fine) { .btn--on-dark:hover { background: #fff; color: var(--c-ink); border-color: #fff; } }
.btn--lg { font-size: 15px; padding: 16px 28px; }
.btn--sm { font-size: 13px; padding: 9px 15px; }
.btn__arrow { transition: transform .15s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover .btn__arrow { transform: translateX(3px); } }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  font-weight: 500;
  background: var(--c-paper-2);
  color: var(--c-ink);
  border: 1px solid var(--c-line);
}
.badge--wr { background: var(--c-maroon); color: #fff; border-color: var(--c-maroon); }
.badge--live { background: var(--c-ember); color: #fff; border-color: var(--c-ember); }
.badge--live::before { content:""; width:7px; height:7px; border-radius:50%; background:#fff; animation: blink 1.3s var(--ease-in-out) infinite; }
@keyframes blink { 50% { opacity: .35; transform: scale(0.9); } }
.badge--amber { background: var(--c-sun); color: var(--c-ink); border-color: var(--c-amber); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,248,243,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__logo { height: 30px; width: auto; }
.nav__links { display: flex; gap: 26px; margin-left: 8px; }
.nav__links a {
  font-size: 14.5px;
  text-decoration: none;
  color: var(--c-ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--c-orange); } }
.nav__links a.is-active { border-bottom-color: var(--c-orange); }
.nav__spacer { flex: 1; }
.nav__lang {
  display: inline-flex;
  font-family: var(--f-mono);
  font-size: 12px;
  border: 1px solid var(--c-line-2);
  border-radius: 100px;
  overflow: hidden;
}
.nav__lang button {
  border: none;
  background: transparent;
  padding: 6px 11px;
  cursor: pointer;
  color: var(--c-mute);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .05em;
}
.nav__lang button { transition: transform 160ms var(--ease-out); }
.nav__lang button:active { transform: scale(0.96); }
.nav__lang button.is-active { background: var(--c-ink); color: #fff; }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--c-ink); margin: 4px 0; }
/* closing sequence: outer lines straighten first, then the middle line returns */
.nav__burger span:nth-child(1), .nav__burger span:nth-child(3) { transition: transform .2s ease 0s; }
.nav__burger span:nth-child(2) { transition: opacity .15s ease .2s; }

/* mobile nav drawer */
.nav__drawer, .nav__scrim { display: none; }

@media (max-width: 940px) {
  .nav__links, .nav .btn--primary { display: none; }
  .nav__burger { display: block; }
  .nav__drawer {
    display: block;
    position: fixed;
    inset: var(--nav-h) 0 0 auto;
    width: min(320px, 82vw);
    background: var(--c-paper);
    border-left: 1px solid var(--c-line);
    transform: translateX(100%);
    transition: transform 300ms var(--ease-drawer);
    padding: 24px;
    z-index: 49;
    overflow-y: auto;
  }
  body.drawer-open .nav__drawer { transform: translateX(0); }
  /* A real element rather than body::after, so it is also the click-to-close
     target - that let the document-wide click handler in site.js go away. */
  .nav__scrim {
    display: block; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 48;
    background: rgba(20,18,16,.4); opacity: 0; pointer-events: none;
    transition: opacity 250ms var(--ease-out);
  }
  body.drawer-open .nav__scrim { opacity: 1; pointer-events: auto; }
  /* opening sequence: middle line disappears first, then the outer lines form the X */
  body.drawer-open .nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); transition: transform .2s ease .15s; }
  body.drawer-open .nav__burger span:nth-child(2) { opacity: 0; transition: opacity .15s ease 0s; }
  body.drawer-open .nav__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); transition: transform .2s ease .15s; }
  .nav__drawer a { display: block; padding: 13px 0; font-size: 18px; text-decoration: none; border-bottom: 1px solid var(--c-line); font-family: var(--f-display); }
  .nav__drawer .btn { width: 100%; justify-content: center; margin-top: 18px; }
}

/* ---------- Footer ---------- */
.foot { background: var(--c-ink); color: #fff; padding: 64px 0 32px; }
/* minmax(0,…) lets tracks shrink below their content's min-width on small screens;
   overflow-wrap lets long unbreakable tokens (IBAN, email) wrap instead of overflowing */
.foot__top { display: grid; grid-template-columns: minmax(0,1.6fr) repeat(3, minmax(0,1fr)); gap: 32px; }
.foot__logo { height: 34px; width: auto; margin-bottom: 18px; }
.foot__blurb { color: #b9b2a5; font-size: 14px; max-width: 32ch; overflow-wrap: anywhere; }
.foot__col h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-amber); margin-bottom: 14px; }
.foot__col a { display: block; color: #d9d3c7; text-decoration: none; font-size: 14px; padding: 5px 0; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .foot__col a:hover { color: #fff; } }
.foot__bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); display: flex; justify-content: space-between; gap: 16px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-mute-2); }
@media (max-width: 820px) { .foot__top { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .foot__bottom { flex-direction: column; } }

/* ---------- Shard strip divider ---------- */
.shards { height: 16px; background: url("/assets/shards-strip.png") repeat-x center/auto 100%; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.card__media { aspect-ratio: 16/10; background-size: cover; background-position: center; }
.card__body { padding: 22px 24px; }
.card__title { font-family: var(--f-display); font-size: 24px; line-height: 1.1; margin-bottom: 8px; }

/* ---------- Stat ---------- */
.stat__num { font-family: var(--f-display); font-size: clamp(40px, 5vw, 58px); line-height: 1; color: var(--c-orange); }
.stat__lbl { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-mute); margin-top: 6px; }

/* ---------- Section heading block ---------- */
.sec-head { margin-bottom: 44px; }
.sec-head--center { text-align: center; }
.sec-head--center .kicker { justify-content: center; }
.sec-head .lead { margin-top: 14px; }
.sec-head--center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Utility ---------- */
.muted { color: var(--c-mute); }
.center { text-align: center; }
.mono { font-family: var(--f-mono); }
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 860px) { .g-3, .g-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* event-name lockups (use logos, not type) */
.ev-logo { display: block; width: auto; max-width: 100%; align-self: flex-start; }
.ev-logo--lg { height: clamp(58px, 8.5vw, 84px); }
.ev-logo--md { height: 50px; }
.ev-logo--sm { height: 38px; }

/* page hero (interior pages) */
.phero { background: var(--c-ink); color: #fff; padding: 56px 0; position: relative; overflow: hidden; min-height: 46vh; display: grid; grid-template-columns: 1fr; align-content: center; }
/* keep hero content full-width (left-aligned within .wrap) while the grid centers it vertically */
.phero > .wrap, .ev-hero > .wrap, .oc-hero > .wrap { width: 100%; }
.phero .kicker { color: var(--c-sun); }
.phero .kicker::before { background: var(--c-sun); }
.phero__amber { position: absolute; right: -60px; bottom: -50px; width: 260px; opacity: .9; pointer-events: none; }
.phero .lead { color: #c9c2b5; }

/* breadcrumbs */
.crumbs { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-mute-2); margin-bottom: 22px; }
.crumbs a { color: var(--c-mute-2); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--c-orange); } }

/* ---------- Registration closed (temporary) ----------
   Entries don't open for a few months, so every link to the register page is
   hidden site-wide – including the Register buttons that site.js injects into
   the nav and mobile drawer. To re-enable registration, delete this block.
   Add class="reg-link" to any register link that should stay visible anyway
   (e.g. the "Register at" line in the invitation). */
a[href*="register"]:not(.reg-link) { display: none !important; }

/* ---------- Email subscribe ---------- */
.subscribe { width: 100%; max-width: 520px; }
.subscribe__row { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe__row input {
  flex: 1 1 220px; min-width: 0;
  font-family: var(--f-body); font-size: 15px;
  padding: 13px 15px; border: 1px solid var(--c-line-2);
  border-radius: var(--r-sm); background: #fff; color: var(--c-ink);
}
.subscribe__row input:focus { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px rgba(236,100,8,.18); }
.subscribe__row .btn { white-space: nowrap; }
.subscribe__note { font-size: 12.5px; line-height: 1.5; margin: 10px 0 0; color: var(--c-mute); }
.subscribe__msg { font-size: 14px; font-weight: 500; margin: 10px 0 0; }
.subscribe__msg[data-ok] { color: #2f7d1e; }
.subscribe__msg[data-err], .subscribe__msg[data-invalid] { color: #a3372b; }
.subscribe .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* on a dark/orange band */
.subscribe--on-dark .subscribe__note { color: rgba(255,255,255,.9); }
.subscribe--on-dark .subscribe__msg[data-ok] { color: #eaf6e2; }
.subscribe--on-dark .subscribe__msg[data-err], .subscribe--on-dark .subscribe__msg[data-invalid] { color: #ffe1dc; }

/* light "get notified" card */
.sub-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 40px 44px; }
@media (max-width: 640px) { .sub-card { padding: 30px 26px; } }

/* ---------- Reduced motion ----------
   Fewer and gentler, not zero: colour and opacity still carry meaning, so only
   movement and the looping pulse are removed. */
@media (prefers-reduced-motion: reduce) {
  .btn:active, .nav__lang button:active,
  .feature:hover, .post:hover, a.logo:hover { transform: none; }
  .btn:hover .btn__arrow { transform: none; }
  .nav__drawer { transition: none; }
  .badge--live::before { animation: none; }
}
