

:root {
  --red: #b32a2e;
  --red-dark: #9a2226;
  --black: #000000;
  --text: #111111;
  --gray-bg: #f1f1f1;
  --gray-line: #dcdcdc;
  --gray-text: #7a7f86;
  --container: 1600px;
  --gutter: clamp(20px, 8.333vw, 160px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Figtree", Arial, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }

.container {
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--container);
  margin: 0 auto;
}

.red { color: var(--red); }

/* bg cover helpers */
.bg-light {
  background: #fff url("../img/white-bg.png") center / cover no-repeat;
}

/* ---------- Virsraksti ---------- */
.section-title {
  font-weight: 700;
  font-size: clamp(30px, 3.75vw, 72px);
  line-height: 1.07;
  text-transform: uppercase;
  color: var(--black);
}
.section-title--white { color: #fff; }

/* ---------- Pogas ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: clamp(46px, 3.177vw, 61px);
  padding: 0 clamp(22px, 1.77vw, 34px);
  border-radius: 999px;
  font-size: clamp(14px, 1.042vw, 20px);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-red {
  color: #fff;
  background: linear-gradient(180deg, #c12f33 0%, var(--red) 55%, #a42529 100%);
  box-shadow: 0 6px 18px rgba(179, 42, 46, .35);
}
.btn-red:hover { background: var(--red-dark); }

.btn-outline {
  color: #fff;
  border: 2px solid #fff;
  /* 2px border on each side – trimmed so it matches the filled button visually */
  height: calc(clamp(46px, 3.177vw, 61px) - 4px);
  padding: 0 calc(clamp(22px, 1.77vw, 34px) - 2px);
}
.btn-outline:hover { color: var(--black); background: #fff; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: clamp(24px, 5.73vw, 110px);
}

.logo img {
  width: clamp(84px, 8.6vw, 165px);
}

.main-nav ul {
  display: flex;
  gap: clamp(16px, 1.98vw, 38px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  color: #fff;
  font-size: clamp(12px, .9375vw, 18px);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s ease;
}
.main-nav a:hover { color: var(--red); }

/* Burger – redzams tikai mobilajā skatā */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  color: #fff;
  background: #0d0f14 url("../img/hero-bg.jpg") center / cover no-repeat;
  background-image: image-set(url("../img/hero-bg.webp") type("image/webp"), url("../img/hero-bg.jpg") type("image/jpeg"));
  padding: clamp(150px, 15.4vw, 296px) 0 clamp(80px, 8.85vw, 170px);
}

.hero-title {
  font-weight: 900;
  font-size: clamp(36px, 4.22vw, 81px);
  line-height: 1.3;
  text-transform: uppercase;
}

.hero-lead {
  margin-top: clamp(4px, .4vw, 8px);
  font-size: clamp(18px, 1.77vw, 34px);
  font-weight: 500;
  line-height: 1.35;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(12px, 1.98vw, 38px);
  margin-top: clamp(36px, 4.5vw, 86px);
}

/* =========================================================
   PAR KAMPAŅU
   ========================================================= */
.intro {
  padding: clamp(60px, 9.2vw, 177px) 0 clamp(60px, 7.3vw, 140px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 4.43vw, 85px);
}

.stat {
  min-height: clamp(110px, 8.33vw, 160px);
  padding: clamp(14px, 1.04vw, 20px) clamp(20px, 1.88vw, 36px) clamp(14px, 1.04vw, 20px);
  border: 1px solid var(--gray-line);
  border-radius: clamp(14px, 1vw, 19px);
  background: var(--gray-bg);
}

.stat strong {
  display: block;
  font-size: clamp(44px, 4.6vw, 88px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.01em;
  color: var(--black);
}

.stat span {
  display: block;
  margin-top: clamp(2px, .2vw, 4px);
  padding-left: 3px;
  font-size: clamp(13px, .9375vw, 18px);
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--black);
}

.intro .section-title {
  margin-top: clamp(44px, 3.8vw, 72px);
}

.intro-text {
  margin-top: clamp(20px, 1.6vw, 30px);
  font-size: clamp(15px, 1vw, 19px);
  line-height: 1.58;
  color: var(--text);
}

.intro-text p + p { margin-top: clamp(20px, 1.6vw, 30px); }

/* =========================================================
   TESTS
   ========================================================= */
.test-section {
  color: #fff;
  background: #0b0d12 url("../img/test-bg.jpg") center / cover no-repeat;
  padding: clamp(60px, 6.25vw, 120px) 0 clamp(60px, 6.25vw, 112px);
}

.test-lead {
  margin-top: clamp(4px, .3vw, 6px);
  font-size: clamp(17px, 1.77vw, 34px);
  font-weight: 500;
  line-height: 1.3;
}

.test-grid {
  display: grid;
  grid-template-columns: clamp(260px, 19.06vw, 366px) minmax(0, 1fr);
  gap: clamp(20px, 2.7vw, 52px);
  margin-top: clamp(30px, 2.6vw, 50px);
}

.test-aside {
  display: flex;
  align-items: center;
  padding: clamp(28px, 2.5vw, 48px) clamp(22px, 2vw, 38px);
  border-radius: clamp(20px, 1.56vw, 30px);
  background: var(--red);
}

.test-aside p {
  font-size: clamp(22px, 1.85vw, 35.5px);
  font-weight: 700;
  line-height: 1.27;
}

.test-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.4vw, 46px) clamp(20px, 2.6vw, 50px) clamp(24px, 2.6vw, 50px);
  color: var(--text);
  border-radius: clamp(20px, 1.4vw, 27px);
  background: #fff;
}

.question-view,
.question-view form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: clamp(11px, .73vw, 14px);
  font-weight: 700;
  text-transform: uppercase;
  color: #5d636b;
}

.progress-track {
  height: clamp(6px, .4vw, 8px);
  margin-top: clamp(10px, .75vw, 14px);
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7ea;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transition: width .3s ease;
}

.question-title {
  margin-top: clamp(22px, 1.56vw, 30px);
  font-size: clamp(20px, 1.8vw, 34.5px);
  font-weight: 700;
  line-height: 1.28;
  color: var(--black);
}

.answers {
  display: grid;
  gap: clamp(10px, .8vw, 15px);
  margin: clamp(16px, 1.04vw, 20px) 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.answer-option { position: relative; }

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-label {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.1vw, 21px);
  min-height: clamp(62px, 3.75vw, 72px);
  padding: 12px clamp(12px, .73vw, 14px);
  border: 1px solid #d8dadd;
  border-radius: clamp(10px, .7vw, 13px);
  background: #fff;
  font-size: clamp(14px, .92vw, 17.5px);
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.answer-letter {
  flex: 0 0 auto;
  width: clamp(34px, 2.08vw, 40px);
  height: clamp(34px, 2.08vw, 40px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e9e9e9;
  font-size: clamp(16px, 1.2vw, 23px);
  font-weight: 700;
  color: var(--black);
  transition: background-color .15s ease, color .15s ease;
}

.answer-label:hover { border-color: #b3b6ba; }

.answer-option input:focus-visible + .answer-label {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.answer-option input:checked + .answer-label {
  border-color: var(--red);
  background: #fcf3f3;
}

.answer-option input:checked + .answer-label .answer-letter {
  color: #fff;
  background: var(--red);
}

.test-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: clamp(24px, 1.6vw, 30px);
}

.btn-test {
  height: clamp(46px, 2.86vw, 55px);
  padding: 0 clamp(18px, 1.15vw, 22px);
  border: 1px solid transparent;
  border-radius: clamp(9px, .6vw, 11px);
  font-size: clamp(14px, .885vw, 17px);
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.btn-test--back {
  color: #b0b4b9;
  border-color: #d8dadd;
  background: #fff;
  font-weight: 500;
}
.btn-test--back:not([disabled]),
.btn-test--active { color: var(--text); border-color: #b3b6ba; }
.btn-test--back:not([disabled]):hover { border-color: var(--text); }
.btn-test--back[disabled] { cursor: default; }

.btn-test--next {
  color: #fff;
  background: var(--red);
}
.btn-test--next:hover { background: var(--red-dark); }
.btn-test--next.is-locked { cursor: not-allowed; }

.privacy-note {
  margin-top: clamp(16px, .94vw, 18px);
  font-size: clamp(11px, .68vw, 13px);
  color: #c4c7cb;
}

/* rezultāts */
.result-view[hidden],
.question-view[hidden],
.risk-alert[hidden] { display: none; }

.result-view {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.15vw, 22px);
  animation: fadeUp .3s ease both;
}

.result-head {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1vw, 18px);
}

.result-icon {
  flex: 0 0 auto;
  width: clamp(36px, 2.9vw, 56px);
  height: clamp(36px, 2.9vw, 56px);
  color: var(--red);
}
.result-icon svg { display: block; width: 100%; height: 100%; }

.result-badge {
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: clamp(11px, .73vw, 14px);
  font-weight: 700;
  text-transform: uppercase;
}

.result-title {
  font-size: clamp(26px, 2.6vw, 50px);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--black);
}

.result-level {
  margin-top: -6px;
  font-size: clamp(14px, .94vw, 18px);
  font-weight: 700;
  color: var(--red);
}

.result-description {
  font-size: clamp(15px, .94vw, 18px);
  line-height: 1.55;
}
.result-description p + p { margin-top: 10px; }

.risk-alert {
  padding: 14px 18px;
  border: 1px solid #ecc2c3;
  border-radius: 12px;
  background: #fcf3f3;
  color: var(--red-dark);
  font-size: clamp(14px, .885vw, 17px);
  font-weight: 500;
}

.advice-box {
  padding: clamp(16px, 1.15vw, 22px);
  border-left: 5px solid var(--red);
  border-radius: 12px;
  background: var(--gray-bg);
  font-size: clamp(14px, .885vw, 17px);
}

.advice-box h4 {
  margin-bottom: 8px;
  font-size: clamp(15px, .94vw, 18px);
  font-weight: 700;
}

.advice-box ul { margin: 0; padding-left: 20px; }
.advice-box li + li { margin-top: 6px; }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* =========================================================
   VIDEO
   ========================================================= */
.video-section {
  padding: clamp(60px, 11.2vw, 215px) 0 clamp(60px, 10vw, 192px);
}

.video-grid {
  display: grid;
  grid-template-columns: minmax(0, 665fr) minmax(0, 935fr);
  align-items: center;
}

.video-copy { max-width: 470px; }

.video-copy p {
  margin-top: clamp(14px, 1.15vw, 22px);
  font-size: clamp(16px, 1.3vw, 25px);
  line-height: 1.25;
  color: var(--black);
}

.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: clamp(18px, 1.56vw, 30px);
  overflow: hidden;
  background: #0b0b0d url("../img/video-poster.png") center / cover no-repeat;
  cursor: pointer;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: clamp(28px, 3.75vw, 72px) 0 clamp(28px, 3.75vw, 72px) clamp(48px, 6.5vw, 125px);
  border-color: transparent transparent transparent #fff;
  transform: translate(-40%, -50%);
  transition: transform .2s ease;
}
.video-thumb:hover .play-icon { transform: translate(-40%, -50%) scale(1.08); }
.video-thumb:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

/* =========================================================
   PARTNERI / FOOTER
   ========================================================= */
.partners {
  overflow: hidden;
  color: #fff;
  background: var(--black);
  padding: clamp(60px, 6.5vw, 125px) 0 clamp(20px, 1.56vw, 30px);
}

.partners-title {
  font-size: clamp(30px, 4.22vw, 81px);
}

.partners-label {
  margin-top: clamp(36px, 3.65vw, 70px);
  font-size: clamp(14px, .9375vw, 18px);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.organizers-strip {
  display: flex;
  align-items: center;
  width: 49%;
  height: clamp(90px, 7.03vw, 135px);
  margin: clamp(18px, 1.82vw, 35px) 0 0 auto;
  padding-left: clamp(30px, 2.35vw, 45px);
  background: #fff;
  clip-path: polygon(clamp(30px, 3.4vw, 66px) 0, 100% 0, 100% 100%, 0 100%);
}

.organizers-strip img {
  height: 100%;
  width: auto;
  max-width: none;
}

.partners-label--support {
  margin-top: clamp(36px, 4.8vw, 92px);
}

.supporters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(30px, 4.4vw, 85px);
  margin-top: clamp(18px, 1.82vw, 35px);
}

.supporters img {
  height: clamp(36px, 3.2vw, 62px);
  width: auto;
}

.footer-note {
  margin-top: clamp(36px, 4.2vw, 80px);
  font-size: clamp(11px, .68vw, 13px);
  line-height: 1.45;
  text-align: center;
  color: #6f7277;
}

/* =========================================================
   VIDEO MODAL
   ========================================================= */
.video-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .88);
}
.video-modal.is-open { display: flex; }

.video-modal__inner {
  position: relative;
  width: min(1280px, 100%);
  /* Ierobežo arī pēc augstuma, lai aizvēršanas poga virs rāmja vienmēr ir ekrānā */
  width: min(1280px, 100%, calc((100vh - 140px) * 16 / 9));
  width: min(1280px, 100%, calc((100dvh - 140px) * 16 / 9));
}

.video-modal__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.video-modal__frame video,
.video-modal__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal__close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
}
.video-modal__close:hover { background: var(--red-dark); }

body.modal-open { overflow: hidden; }

/* =========================================================
   RESPONSĪVAIS
   ========================================================= */
@media (max-width: 1200px) {
  .br-desktop { display: none; }
  .test-aside p { font-size: clamp(22px, 2.6vw, 30px); }
  .video-copy { max-width: none; padding-right: 40px; }
}

@media (max-width: 1024px) {
  .test-grid { grid-template-columns: 1fr; }
  .test-card { min-height: 0; }
  .video-grid { grid-template-columns: 1fr; gap: 40px; }
  .video-copy { padding-right: 0; max-width: 680px; }
  .organizers-strip { width: 75%; }
}

@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr; }
  .stat { min-height: 0; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 90px var(--gutter) 24px;
    background: var(--black);
  }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    border-top: 1px solid rgba(255, 255, 255, .15);
  }
  .logo { position: relative; z-index: 2; }
  .hero { padding-top: 170px; }
  .hero-buttons {
    display: grid;
    grid-template-columns: max-content;
    justify-content: start;
    align-items: center;
  }
  .hero-buttons .btn { width: 100%; }
  /* outline trimmed by its 2px border on each side, same as on desktop */
  .hero-buttons .btn-outline { width: calc(100% - 4px); justify-self: center; }
  .test-controls .btn-test { flex: 1; }
  .organizers-strip {
    width: 100%;
    height: auto;
    padding: 14px 16px 14px 34px;
    clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%);
  }
  .organizers-strip img { height: auto; width: 100%; max-width: 100%; }
  .video-modal__close { top: -54px; }

}

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