:root {
  --lake: #0b2a33;
  --lake-2: #103a45;
  --snow: #eef4f6;
  --snow-2: rgb(238 244 246 / .72);
  --hair: rgb(238 244 246 / .22);
  --apple: #e0474c;
  --serif: "Oranienbaum", "Times New Roman", serif;
  --sans: "Onest", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 3vw, 44px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--lake); }
html.loading, html.loading body { overflow: hidden; height: 100%; }
body {
  color: var(--snow);
  font: 300 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--snow); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#scene { position: fixed; inset: 0; width: 100%; height: 100lvh; display: block; }
#journey { position: relative; height: calc(var(--u, 20) * 80lvh); pointer-events: none; }

.shade { position: fixed; left: 0; right: 0; height: 150px; pointer-events: none; z-index: 1; }
.shade-top { top: 0; background: linear-gradient(rgb(8 18 30 / .55), transparent); }
.shade-bottom { bottom: 0; background: linear-gradient(transparent, rgb(8 18 30 / .5)); }

/* Preloader: the horizon draws itself as the assets arrive */
.pre {
  position: fixed; inset: 0; z-index: 50; background: var(--lake);
  transition: opacity 1.2s ease .15s, visibility 1.4s;
}
.pre.done { opacity: 0; visibility: hidden; }
.pre-line { position: absolute; left: var(--gutter); right: var(--gutter); top: 58%; height: 1px; background: var(--hair); }
.pre-line i { display: block; height: 100%; width: 100%; background: var(--snow); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s ease; }
.pre-foot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.pre-num { font: 400 clamp(4rem, 11vw, 9rem)/.8 var(--serif); font-variant-numeric: lining-nums; }

/* Top bar */
.top {
  position: fixed; z-index: 20; top: calc(22px + env(safe-area-inset-top, 0px));
  left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.top.solid::before { content: ""; position: absolute; z-index: -1; top: -80px; bottom: -12px; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); background: var(--lake); border-bottom: 1px solid var(--hair); }
.mark { font: 400 26px/1 var(--serif); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 15px; font-weight: 400; }
.top nav a { text-decoration: none; }
.top nav a, .top nav button { padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .2s; }
.top nav a:hover, .top nav button:hover { border-color: var(--snow); }
/* Oranienbaum has no Ә Ғ Қ Ң Ө Ұ Ү Һ, so Kazakh headings use a serif that does. The logo is Latin and stays put. */
:root[lang="kk"] { --serif: "Noto Serif Display", "Times New Roman", serif; }
:root[lang="kk"] .mark { font-family: "Oranienbaum", "Times New Roman", serif; }
.top nav { margin-left: auto; }
.langs { display: flex; gap: 10px; font-size: 13px; letter-spacing: .04em; }
.langs button { padding: 8px 0; color: var(--snow-2); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.langs button:hover { color: var(--snow); }
.langs button[aria-pressed="true"] { color: var(--snow); border-color: var(--snow); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; font: 400 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--snow); transition: background .2s, color .2s;
}
.btn-solid { background: var(--snow); color: var(--lake); }
.btn-solid:hover { background: transparent; color: var(--snow); }
.btn-line { color: var(--snow); background: rgb(11 42 51 / .25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: rgb(238 244 246 / .5); }
.btn-line:hover { background: var(--snow); color: var(--lake); border-color: var(--snow); }

/* Hero sits on the water, below the title standing on the horizon */
.hero { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity .5s ease; height: 100svh; }
.hero.off { opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 300px; background: linear-gradient(transparent, rgb(8 18 30 / .72)); z-index: -1; }
.hero-row { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; }
.hero-tag { font: 400 clamp(1.9rem, 3.2vw, 2.9rem)/1.1 var(--serif); }
.hero-lead { margin-top: 8px; max-width: 32em; }
.hero-side { display: grid; justify-items: end; gap: 12px; flex: none; }
.hero-act { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-act button { pointer-events: auto; }
.hero-place { font-size: 14px; color: var(--snow-2); }

/* Sentences met along the walk */
.line {
  position: fixed; z-index: 9; left: 50%; top: 36%; transform: translate(-50%, -50%);
  width: min(22em, calc(100vw - 2 * var(--gutter))); text-align: center;
  font: 400 clamp(1.6rem, 3.4vw, 2.7rem)/1.14 var(--serif);
  padding: .42em .7em .5em;
  background: rgb(9 24 34 / .58);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  opacity: 0; pointer-events: none;
}

.line[data-line="3"] { top: 80%; }

/* The one caption card; it changes sides as the path zigzags */
.card {
  position: fixed; z-index: 12; top: 50%;
  width: min(390px, calc(100vw - 2 * var(--gutter)));
  padding: 26px 28px 28px; display: grid; gap: 10px; justify-items: start;
  background: rgb(9 24 34 / .66); border: 1px solid var(--hair);
  backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px) saturate(1.2);
  opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 12px));
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1), visibility .35s;
}
.card[data-side="right"] { right: calc(var(--gutter) + 2vw); }
.card[data-side="left"] { left: calc(var(--gutter) + 2vw); }
.card.on { opacity: 1; visibility: visible; transform: translateY(-50%); }
.card-count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; width: 100%; font-size: 14px; color: var(--snow-2); }
.card-status { color: var(--snow); }
.card-status.is-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--apple); margin-right: 7px; vertical-align: 1px; }
.card h2 { font: 400 clamp(2.1rem, 3.4vw, 2.9rem)/1.04 var(--serif); }
.card-kind { font-weight: 400; }
.card-text { color: var(--snow-2); font-size: 16px; }
.card-tags { font-size: 14px; color: var(--snow-2); margin-bottom: 8px; }

/* Six stops along a line */
.track { position: fixed; z-index: 11; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(420px, 46vw); height: 28px; transition: opacity .4s; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgb(238 244 246 / .4); }
.track i { position: absolute; left: 0; top: 50%; height: 1px; width: 100%; background: var(--snow); transform: scaleX(0); transform-origin: 0 50%; }
.track button { position: absolute; top: 0; width: 28px; height: 28px; margin-left: -14px; }
.track button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--snow); opacity: .6; transition: transform .2s, opacity .2s, background .2s; }
.track button:hover::after { transform: scale(1.5); opacity: 1; }
.track button[aria-current="true"]::after { background: var(--apple); opacity: 1; transform: scale(1.6); }
.track.off { opacity: 0; pointer-events: none; }

/* Page after the lake */
#after { position: relative; z-index: 15; padding: 46vh var(--gutter) 0; background: linear-gradient(transparent 0, var(--lake) 44vh); }
#after > section { max-width: 1160px; margin-inline: auto; scroll-margin-top: 96px; }
#after h2 { font: 400 clamp(2.4rem, 5vw, 4.2rem)/1.06 var(--serif); }
.services { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 90px); padding-bottom: clamp(80px, 12vw, 160px); }
.side p { margin-top: 18px; color: var(--snow-2); max-width: 24em; }
.price li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 26px; padding: 22px 0; border-top: 1px solid var(--hair); }
.price li:last-child { border-bottom: 1px solid var(--hair); }
.price h3 { margin: 0; font: 400 1.5rem/1.2 var(--serif); }
.price p { grid-column: 1; color: var(--snow-2); font-size: 16px; max-width: 34em; }
.price b { grid-column: 2; grid-row: 1 / span 2; font: 400 1.5rem/1.2 var(--serif); white-space: nowrap; }
.about { padding-bottom: clamp(80px, 12vw, 160px); }
.about p { margin-top: 20px; max-width: 34em; font: 400 clamp(1.3rem, 2.3vw, 1.75rem)/1.36 var(--serif); }
.contact { padding-bottom: clamp(70px, 10vw, 120px); }
.contact > p:not(.pay) { margin-top: 18px; max-width: 36em; color: var(--snow-2); }
.mail { display: inline-block; margin-top: 28px; font: 400 clamp(1.8rem, 7.2vw, 6rem)/1.05 var(--serif); text-decoration: none; overflow-wrap: anywhere; background: linear-gradient(var(--apple), var(--apple)) 0 100% / 0 2px no-repeat; transition: background-size .35s; }
.mail:hover { background-size: 100% 2px; }
.contact-act { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.pay { margin-top: 22px; font-size: 15px; color: var(--snow-2); }
footer { max-width: 1160px; margin-inline: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; padding: 22px 0 calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hair); font-size: 14px; color: var(--snow-2); }

/* Work list */
dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: clamp(20px, 4vw, 44px) var(--gutter); border: 0; background: var(--lake); color: var(--snow); overflow-y: auto; }
dialog::backdrop { background: var(--lake); }
.index-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 1160px; margin: 0 auto 26px; }
.index-head h2 { font: 400 clamp(2.2rem, 4.6vw, 3.8rem)/1.05 var(--serif); }
.index-nogl { max-width: 1160px; margin: 0 auto 22px; color: var(--snow-2); }
.index-list { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 22px; }
.index-list img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.index-list h3 { margin: 12px 0 2px; font: 400 1.55rem/1.15 var(--serif); }
.index-list p { font-size: 15px; color: var(--snow-2); }
.index-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 15px; font-weight: 400; }
.index-links a, .index-links button { text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }

/* No WebGL: the list becomes the page */
.nogl #scene, .nogl .shade, .nogl #journey, .nogl .card, .nogl .track, .nogl .line, .nogl .hero, .nogl #open-index, .nogl #close-index { display: none; }
.nogl dialog { position: static; display: block; height: auto; padding-top: 96px; }
.nogl #after { padding-top: 70px; background: var(--lake); }
.nogl .index-links button { display: none; }

.noscript { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; padding: 24px; background: var(--lake); }

@media (max-width: 900px) {
  .services { grid-template-columns: minmax(0, 1fr); }
  .index-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-aspect-ratio: 23/20) {
  .line[data-line="3"] { top: 74%; }
  .card, .card[data-side] {
    left: var(--gutter); right: var(--gutter); width: auto; top: auto;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    padding: 18px 20px 20px; gap: 6px; transform: translateY(12px);
  }
  .card.on { transform: none; }
  .card h2 { font-size: 2rem; }
  .card-text { font-size: 15px; line-height: 1.45; }
  .card-tags { display: none; }
  .card .btn { margin-top: 8px; }
  .line { top: 34%; }
}
@media (max-width: 760px) {
  .hero-row { flex-direction: column; align-items: center; text-align: center; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .hero-side { justify-items: center; }
  .hero-act { justify-content: center; }
  .hero-lead { margin-inline: auto; }
}
@media (max-width: 560px) {
  .top { flex-wrap: wrap; gap: 2px 16px; }
  .langs { margin-left: auto; }
  .top nav { order: 1; width: 100%; margin-left: 0; justify-content: space-between; font-size: 14px; }
  .index-list { grid-template-columns: minmax(0, 1fr); }
  .track { width: calc(100vw - 2 * var(--gutter)); }
  .hero-place { font-size: 13px; }
  .price li { grid-template-columns: minmax(0, 1fr); }
  .price b { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) and (max-height: 700px) {
  .hero-tag { font-size: 1.55rem; }
  .hero-lead { font-size: 15px; line-height: 1.4; }
  .hero-place { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
