/* SUPERKOMFORT — black version of the tour.yeezy.com layout.
   Measured from the original: 480px centred column, 16px gap between blocks,
   IBM Plex Mono in uppercase, 1px outlined square buttons (8px 20px),
   tab row with a 2px underline and inactive tabs at 30% opacity, 9px footer.
   The values below are defaults; /theme.css (built from Admin → Design) overrides them. */
:root {
  --bg: #000000;
  --fg: #ffffff;
  --accent: #ffffff;
  --accent-ink: #000000;
  --line: #ffffff;
  --font: "IBM Plex Mono", monospace;
  --fs: 16px;
  --ls: 1px;
  --tt: uppercase;
  --col: 480px;
  --hero-ratio: 16 / 9;
  --logo-max-h: 160px;
  --bw: 1px;
  --radius: 0px;
  --menu-fs: 24px;
  --menu-pad: 28px;
  --muted: color-mix(in srgb, var(--fg) 55%, transparent);
  --faint: color-mix(in srgb, var(--fg) 35%, transparent);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs);
  font-weight: 400;
  text-transform: var(--tt);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { text-transform: inherit; }

.page { display: flex; flex-direction: column; align-items: center; min-height: 100vh; }
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--col);
  padding: 10px 0 40px;
}
.dim { color: var(--muted); }

/* ---- header: logo + big picture ---- */
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 0 10px; }
/* logo. Plain: as wide as its file, up to --logo-max-h tall. */
.hero-logo { display: flex; justify-content: center; max-width: 100%; }
.logo-box { position: relative; display: block; max-width: 100%; }
.logo-box img { display: block; width: auto; max-width: 100%; max-height: var(--logo-max-h); }
.logo-fx { position: absolute; inset: 0; pointer-events: none; }

/* Fitted: the logo's visible edges sit exactly on the picture's edges. --logo-* come from
   /theme.css (measured from the logo file); the file's transparent margins hang outside the
   box and the glow just past the letters stays visible a little (overflow-clip-margin). */
.hero-logo.fit { width: 100%; }
.hero-logo.fit .logo-box { width: 100%; aspect-ratio: var(--logo-ar); overflow: hidden; overflow: clip; overflow-clip-margin: 8px; }
.hero-logo.fit .logo-box img,
.hero-logo.fit .logo-fx {
  position: absolute; inset: auto; max-width: none; max-height: none;
  width: calc(100% / var(--logo-bw)); height: calc(100% / var(--logo-bh));
  left: calc(-100% * var(--logo-l) / var(--logo-bw)); top: calc(-100% * var(--logo-t) / var(--logo-bh));
}

/* Colour change: one flat colour shown through the logo's shape, slowly fading to the next.
   The colours and @keyframes logo-colors come from /theme.css. Browsers without masks keep
   the plain logo. */
@supports ((-webkit-mask-image: url(x)) or (mask-image: url(x))) {
  .shimmer .logo-box img { opacity: 0; }
  .logo-fx {
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    animation: logo-colors 40s linear infinite;
  }
}
@supports not ((-webkit-mask-image: url(x)) or (mask-image: url(x))) { .logo-fx { display: none; } }
@media (prefers-reduced-motion: reduce) { .logo-fx { animation: none; } }

/* Analog noise: the filters are in the page (.fx-defs, built from the Design settings).
   The logo flips through a few grain frames, and now and then the whole line tears
   sideways for a moment, like a worn tape. */
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.noise .logo-box { filter: url(#logo-noise-1); animation: logo-grain .6s step-end infinite; }
.hero-logo.noise { animation: logo-glitch 9s step-end infinite; }
@keyframes logo-grain {
  0% { filter: url(#logo-noise-1); } 20% { filter: url(#logo-noise-2); } 40% { filter: url(#logo-noise-3); }
  60% { filter: url(#logo-noise-4); } 80% { filter: url(#logo-noise-5); }
}
@keyframes logo-glitch {
  0% { filter: none; }
  37% { filter: url(#logo-glitch-1); } 38.2% { filter: none; }
  71% { filter: url(#logo-glitch-2); } 71.8% { filter: none; } 73% { filter: url(#logo-glitch-1); } 74% { filter: none; }
}
@media (prefers-reduced-motion: reduce) { .noise .logo-box, .hero-logo.noise { animation: none; } }
/* a picture that was still loading when the page opened fades in when it arrives (site.js) */
.hero img.arriving { opacity: 0 !important; }
.hero img.arrived { animation: img-in .6s ease; }
@keyframes img-in { from { opacity: 0; } }
.hero-art { width: 100%; aspect-ratio: var(--hero-ratio); overflow: hidden; background: color-mix(in srgb, var(--fg) 4%, var(--bg)); border-radius: var(--radius); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
/* Slideshow (several pictures): site.js moves "on" to the next picture, which fades in over
   the previous one ("was"). The first picture stays in the flow so the box keeps its shape. */
.hero-art { position: relative; }
.hero-art.slides img { position: absolute; inset: 0; opacity: 0; }
.hero-art.slides img:first-child { position: relative; }
.hero-art.slides img.was { opacity: 1; z-index: 1; }
.hero-art.slides img.on { opacity: 1; z-index: 2; transition: opacity var(--hero-fade, 3s) ease-in-out; }


.text-section { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 16px; }
.page-heading { font-size: 1.25em; letter-spacing: calc(var(--ls) * 2); }

/* ---- big stacked buttons: main menu, music links, stores ---- */
.menu, .links, .shops { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 0 10px; }
.links.cols-2 { display: grid; grid-template-columns: 1fr 1fr; }
.menu a, .links a, .shop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  transition: background .25s, color .25s, border-color .25s, opacity .25s;
}
.menu a { padding: var(--menu-pad) 20px; font-size: var(--menu-fs); letter-spacing: calc(var(--ls) * 4); }
.links a { padding: 18px 20px; letter-spacing: calc(var(--ls) * 2); text-align: center; }
.links a span { min-width: 0; text-align: center; }
/* two columns are narrow: tighter padding and spacing so labels like "Яндекс Музыка" stay on one line */
.links.cols-2 a { padding: 18px 12px; gap: 8px; letter-spacing: var(--ls); }
/* icon-only buttons: squares side by side, sharing the row's width */
.links.icons-only { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.links.icons-only a { flex: 1 1 0; min-width: 48px; max-width: 88px; aspect-ratio: 1; padding: 0; overflow: hidden; }
.links.icons-only .icon { width: 28px; height: 28px; }
.links.icons-only a span { font-size: 11px; letter-spacing: 0; }
.shop { flex-direction: column; gap: 10px; padding: 28px 20px; }
.shop-label { font-size: var(--menu-fs); letter-spacing: calc(var(--ls) * 4); }
.shop-note { font-size: 12px; letter-spacing: var(--ls); opacity: .6; }

.menu a:hover, .menu a:focus-visible,
.links a:hover, .links a:focus-visible,
.shop:hover, .shop:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); outline: none; }

/* filled button style (Design → Buttons) */
.btn-filled .menu a { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-filled .menu a:hover, .btn-filled .menu a:focus-visible { opacity: .75; background: var(--fg); color: var(--bg); }

/* icons */
.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-img { object-fit: contain; }
.shop .icon { width: 44px; height: 44px; }

/* link colour styles — --brand / --brand-ink come from /theme.css per link */
.cs-icon a .icon, .cs-icon .shop .icon { color: var(--brand, currentColor); }
.cs-icon a:hover .icon, .cs-icon a:focus-visible .icon { color: inherit; }
.cs-outline a { border-color: var(--brand, var(--line)); color: var(--brand, var(--fg)); }
.cs-outline a:hover, .cs-outline a:focus-visible { background: var(--brand, var(--accent)); border-color: var(--brand, var(--accent)); color: var(--brand-ink, var(--accent-ink)); }
.cs-filled a { background: var(--brand, var(--fg)); border-color: var(--brand, var(--fg)); color: var(--brand-ink, var(--bg)); }
.cs-filled a:hover, .cs-filled a:focus-visible { background: var(--brand, var(--fg)); border-color: var(--brand, var(--fg)); color: var(--brand-ink, var(--bg)); opacity: .8; }

/* ---- tab row ---- */
.tabs { display: flex; width: 100%; }
.tabs a {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 14px 4px;
  letter-spacing: var(--ls);
  text-align: center;
  border-bottom: 2px solid var(--line);
  opacity: .3;
  transition: opacity .25s;
}
.tabs a:hover { opacity: .6; }
.tabs a[aria-current="page"] { opacity: 1; }

/* ---- tour rows ---- */
.list { display: flex; flex-direction: column; width: 100%; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; }
.row-info { display: flex; flex-direction: column; gap: 2px; }

.btn {
  display: inline-block;
  flex-shrink: 0;
  padding: 8px 20px;
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  background: none;
  letter-spacing: var(--ls);
  text-align: center;
  cursor: pointer;
  transition: opacity .25s, background .25s, color .25s;
}
a.btn:hover, button.btn:hover { opacity: .6; }
.btn-off { border-color: var(--faint); color: var(--faint); cursor: default; }
.btn-solid { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-wide { width: 100%; padding: 14px 20px; }

/* transfer warning */
.transfer {
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  text-align: center;
}
.transfer::backdrop { background: rgba(0, 0, 0, .8); }
.transfer-msg { margin: 0 0 8px; line-height: 1.5; }
.transfer-host { margin: 0 0 20px; font-size: 12px; color: var(--muted); letter-spacing: var(--ls); }
.transfer-actions { display: flex; gap: 10px; justify-content: center; }
.transfer-actions .btn { flex: 1; }

/* ---- pre-save ---- */
.presave { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.cover { width: calc(100% - 20px); aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.track { font-size: 1.5em; letter-spacing: calc(var(--ls) * 2); }
.countdown { font-size: 12px; letter-spacing: calc(var(--ls) * 2); color: var(--muted); min-height: 1em; }
.note { margin: 0; padding: 0 16px; text-align: center; line-height: 1.5; font-size: .875em; }
.presave-form { display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 0 16px; }
.presave-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: var(--ls); color: var(--muted); }
.presave-form label small { font-size: 10px; opacity: .7; }
.presave-form input:not([type="checkbox"]) {
  padding: 12px;
  border: var(--bw) solid var(--faint);
  border-radius: var(--radius);
  background: none;
  font-size: 16px;
  text-transform: none;
}
.presave-form input:focus { outline: none; border-color: var(--fg); }
.presave-form .consent { flex-direction: row; align-items: flex-start; gap: 10px; text-transform: none; line-height: 1.4; }
.presave-form .consent input { margin: 2px 0 0; accent-color: var(--fg); }
.form-title { text-align: center; letter-spacing: calc(var(--ls) * 2); }
.form-error { margin: 0; padding: 10px; border: var(--bw) solid var(--line); text-align: center; font-size: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- about article ---- */
.article { width: 100%; padding: 0 16px; }
.article h2 { margin: 28px 0 12px; font-size: 1.125em; font-weight: 500; letter-spacing: calc(var(--ls) * 2); }
.article h2:first-child { margin-top: 8px; }
.article p { margin: 0 0 14px; font-size: .875em; line-height: 1.7; text-transform: none; color: color-mix(in srgb, var(--fg) 85%, transparent); }
.article figure { margin: 24px 0; }
.article figure img { width: 100%; border-radius: var(--radius); }
.article figcaption { margin-top: 8px; font-size: 11px; letter-spacing: var(--ls); color: var(--muted); }
.article blockquote { margin: 24px 0; padding: 4px 0 4px 16px; border-left: 2px solid var(--line); }
.article blockquote p { margin: 0 0 6px; font-size: 1.1em; line-height: 1.5; color: var(--fg); }
.article cite { font-style: normal; font-size: 11px; letter-spacing: var(--ls); color: var(--muted); }
.article hr { margin: 28px 0; border: 0; border-top: 1px solid var(--faint); }
.article .article-btn { text-align: center; margin: 24px 0; }

/* ---- first-visit language choice: logo + buttons, vertically centred ---- */
.lang-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; width: 100%; min-height: calc(100vh - 60px); }
/* the language page's logo is as wide as the buttons below it */
.lang-choice .hero-logo { padding: 0 10px; }
.lang-choice .hero-logo.fit { width: 100%; }

/* ---- short-link redirect page ---- */
.redirect .btn { margin-top: 8px; }

.back { font-size: 12px; letter-spacing: var(--ls); color: var(--muted); transition: color .25s; }
.back:hover { color: var(--fg); }

/* ---- footer ---- */
.footer-wrap { width: 100%; margin-top: auto; }
.booking { padding-top: 10px; text-align: center; font-size: 9px; color: var(--muted); }
.footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 10px 16px; font-size: 9px; color: var(--muted); }
.footer span { color: var(--faint); }
.footer.copyright { padding-top: 0; }
.lang-switch { padding-top: 0; font-size: 11px; letter-spacing: var(--ls); }
.lang-switch a { padding: 4px 6px; }
.lang-switch a[aria-current="true"] { color: var(--fg); }
.booking a:hover, .footer a:hover { color: var(--fg); }

@media (max-width: 400px) {
  .menu a, .shop-label { font-size: min(var(--menu-fs), 20px); }
  .menu a { padding: min(var(--menu-pad), 24px) 16px; }
  .tabs a { font-size: 13px; letter-spacing: 0; }
  .links.cols-2 { grid-template-columns: 1fr; }
}

/* ---- page load: blocks fade and rise into place, one after another (Design → Layout) ----
   Starts once the stylesheets are in, so nothing is ever seen half-styled. The logo and the
   big picture are left alone: they stay put from page to page. */
@media (prefers-reduced-motion: no-preference) {
  .intro .tabs, .intro .content > .text-section, .intro .back, .intro .footer-wrap,
  .intro .menu > a, .intro .links > a, .intro .shops > .shop, .intro .list > .row,
  .intro .article > *, .intro .presave > *, .intro .lang-choice > .hero-logo {
    animation: block-in .55s cubic-bezier(.2, .7, .2, 1) backwards;
    animation-delay: calc(var(--n, 0) * 55ms);
  }
  .intro .back, .intro .footer-wrap { animation-delay: .35s; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(1) { --n: 1; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(2) { --n: 2; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(3) { --n: 3; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(4) { --n: 4; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(5) { --n: 5; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(6) { --n: 6; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(7) { --n: 7; }
  .intro :is(.menu, .links, .shops, .list, .article, .presave) > :nth-child(n + 8) { --n: 8; }
}
@keyframes block-in { from { opacity: 0; transform: translateY(12px); } }
