@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF; }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(../fonts/barlow-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(../fonts/barlow-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02AF; }

:root { --navy: #0d2233; --deep: #081824; --sea: #1f5c8c; --steel: #4f5e6b; --mist: #eef1f4; --line: #cfd6dc; --dusk: #e8945a; --flag-blue: #0072ce; --pad: clamp(1.25rem, 5vw, 4.5rem); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 3.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--navy); background: #fff; font: 400 1.125rem/1.6 Barlow, 'Helvetica Neue', Arial, sans-serif; }
img, video { display: block; max-width: 100%; }
a { color: var(--sea); }
:focus-visible { outline: 3px solid var(--flag-blue); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .75rem; z-index: 5; background: #fff; padding: .4rem .75rem; }

.top { position: absolute; z-index: 3; inset: 0 0 auto; display: flex; align-items: center; gap: 1.5rem; padding: 1rem var(--pad); color: #fff; }
.top a { color: #fff; text-decoration: none; font-weight: 500; }
.top a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mark { font-weight: 600; letter-spacing: .14em; margin-right: auto; }
.login { font-size: .95rem; letter-spacing: .03em; padding: .3rem .7rem; border: 1px solid rgba(255, 255, 255, .6); border-radius: 2px; }
.top .login:hover { background: #fff; color: var(--navy); text-decoration: none; }

/* Kangelasala: pealkiri taevas, laevad all */
.hero { position: relative; height: 100svh; min-height: 38rem; max-height: 68rem; color: #fff; background: var(--deep); isolation: isolate; overflow: hidden; }
.hero img, .hero video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 38% 75%; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 24, 36, .62) 0%, rgba(8, 24, 36, .18) 52%, rgba(8, 24, 36, .05) 100%); }
.hero-text { padding: clamp(5.5rem, 13vh, 8.5rem) var(--pad) 0; max-width: 66rem; }
h1 { margin: 0 0 .9rem; font-weight: 600; font-size: clamp(2.25rem, 5.6vw, 4.6rem); line-height: 1.05; letter-spacing: .01em; }
.abbr { margin: 0 0 .4rem; font-weight: 500; font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.lead { margin: 0; max-width: 38rem; font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.45; }
.hero-toggle { position: absolute; right: var(--pad); bottom: 1.25rem; font: 500 .95rem Barlow, sans-serif; color: #fff; background: rgba(8, 24, 36, .55); border: 1px solid rgba(255, 255, 255, .55); border-radius: 2px; padding: .3rem .7rem; cursor: pointer; }
.hero-toggle:hover { background: rgba(8, 24, 36, .85); }

.flag { display: flex; height: 7px; border-bottom: 1px solid var(--line); }
.flag i { flex: 1; }
.flag i:nth-child(1) { background: var(--flag-blue); }
.flag i:nth-child(2) { background: #000; }
.flag i:nth-child(3) { background: #fff; }

.band { padding: clamp(3.25rem, 8vw, 6.5rem) var(--pad); }
.band.grey { background: var(--mist); }
.narrow { max-width: 44rem; }
h2 { margin: 0 0 1rem; font-weight: 600; font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.12; }
h3 { margin: 0 0 .35rem; font-weight: 600; font-size: 1.25rem; line-height: 1.25; }
.band p { margin: 0 0 1rem; }

/* Lehe osad */
.sections { position: sticky; top: 0; z-index: 2; display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); padding: 0 var(--pad); background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sections a { flex: none; padding: .85rem 0 .7rem; color: var(--navy); font-weight: 500; font-size: 1rem; text-decoration: none; border-bottom: 3px solid transparent; }
.sections a:hover { color: var(--sea); }
.sections a[aria-current='true'] { border-color: var(--sea); }
.sections a:focus-visible { outline-offset: -3px; }

/* Küsimused */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { padding: .9rem 0; font-weight: 600; cursor: pointer; }
.faq summary:hover { color: var(--sea); }
.faq details p { margin: 0 0 1.1rem; color: var(--steel); }

/* Laeva teekond */
.story { background: var(--deep); color: #e8eef3; padding: clamp(3.25rem, 8vw, 6.5rem) var(--pad); }
.story > h2, .story > .intro { max-width: 44rem; color: #fff; }
.story > .intro { margin: 0 0 2.5rem; color: #c9d5de; }
.step { margin: 0 0 3rem; max-width: 40rem; }
.step img { width: 100%; height: auto; margin-bottom: 1.1rem; border-radius: 2px; }
.step h3 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.step .when { margin: 0 0 .2rem; color: var(--dusk); font-weight: 600; }
.step p:last-child { margin: 0; }
.story-media { display: none; }

@media (min-width: 900px) {
  .js .story-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .js .story-media { display: block; position: sticky; top: 5rem; height: calc(100vh - 6.5rem); max-height: 46rem; }
  .js .step img { display: none; }
  .js .step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; margin: 0; transition: color .35s; }
  .js .step:not(.is-active), .js .step:not(.is-active) h3 { color: #a9b8c4; }
  .js .step:not(.is-active) .when { color: #c8a78e; }
  .story-frame { position: relative; height: calc(100% - 4.5rem); overflow: hidden; border-radius: 2px; }
  .story-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
  .story-frame img.is-active { opacity: 1; }
}

.route { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: 4.5rem; align-items: start; margin: 0; padding: 0; list-style: none; }
.route::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 1.45rem; height: 2px; background: repeating-linear-gradient(90deg, #6f8596 0 8px, transparent 8px 14px); }
.route button { position: relative; width: 100%; padding: 2.2rem .2rem .2rem; font: 500 .95rem Barlow, sans-serif; color: #c9d5de; background: none; border: 0; cursor: pointer; }
.route button::before { content: ''; position: absolute; left: 50%; top: 1.05rem; width: .9rem; height: .9rem; margin-left: -.45rem; border-radius: 50%; background: var(--deep); border: 2px solid #8ba0b0; }
.route button.is-passed { color: #fff; }
.route button.is-passed::before { border-color: var(--dusk); }
.route button:hover { color: #fff; }
.route-wrap { position: relative; }
.route-ship { position: absolute; top: 1.05rem; left: calc(12.5% + var(--at, 0) * 75%); width: .9rem; height: .9rem; margin-left: -.45rem; border-radius: 50%; background: var(--dusk); box-shadow: 0 0 0 5px rgba(232, 148, 90, .28); transition: left .6s cubic-bezier(.45, 0, .25, 1); pointer-events: none; }

/* Rahust kriisini */
.levels-ui { margin: 1.75rem 0 1.25rem; max-width: 44rem; }
.levels-ui label { display: block; font-weight: 600; margin-bottom: .5rem; }
.levels input { -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; margin: 0; background: none; cursor: pointer; }
.levels input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--sea) var(--fill, 0%), var(--line) var(--fill, 0%)); }
.levels input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.levels input::-moz-range-progress { height: 6px; background: var(--sea); }
.levels input::-webkit-slider-thumb { -webkit-appearance: none; width: 1.75rem; height: 1.75rem; margin-top: -.72rem; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--navy); }
.levels input::-moz-range-thumb { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--navy); }
.level-names { display: flex; justify-content: space-between; color: var(--steel); }
.level-names .is-on { color: var(--navy); font-weight: 600; }
.level { margin: 0 0 1.5rem; max-width: 72rem; }
.level h3 { font-size: 1.4rem; margin-bottom: .75rem; }
.js .level h3 { position: absolute; left: -999px; }
.level dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem 2.5rem; margin: 0; }
.level dt { font-weight: 600; }
.level dd { margin: 0; color: var(--steel); }

.work { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 72rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 2.5rem; }
.work svg { width: 2.5rem; height: 2.5rem; margin-bottom: .65rem; fill: none; stroke: var(--sea); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.work p { margin: 0; color: var(--steel); }

.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); gap: 0 clamp(2rem, 6vw, 6rem); padding-right: max(var(--pad), calc(100% - 72rem - var(--pad))); }
.sources summary { font-weight: 600; cursor: pointer; }
.sources ul { padding-left: 1.2rem; font-size: 1rem; }
.sources li { margin-bottom: .4rem; }

.foot { padding: 2.25rem var(--pad); background: var(--deep); color: #d5dee6; font-size: .98rem; }
.foot p { margin: 0 0 .6rem; max-width: 52rem; }

@media (max-width: 620px) {
  .top { gap: .9rem; }
  .mark { letter-spacing: .08em; }
  .login { font-size: .85rem; padding: .25rem .45rem; }
  .hero img, .hero video { object-position: 66% 75%; }
}
@media (max-width: 899px) { .route-wrap { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .step, .story-frame img, .route-ship { transition: none; }
}
