/* Fonts, served from our own domain (licences in fonts/).
   Alegreya: the logo only (has Cyrillic for светик). Courier Prime: "records" under the logo.
   EB Garamond: book text (liner notes, panels). Golos Text: menus, buttons, small labels. */
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/alegreya-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/alegreya-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/courier-prime-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/eb-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/eb-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400 600; font-display: swap; src: url("../fonts/eb-garamond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Three colours: oat, a quiet dusty blue, and the warm red of the logo (plus a black record) */
  --room: #a3b3bd;
  --room-light: #b7c5cd;
  --bar: #97a8b3;
  --slate: #22303a;        /* text on the blue */
  --sleeve: #e6dac4;       /* oat: sleeve, panels and paper */
  --clay: #d9cab0;         /* deeper oat */
  --ink: #2f2520;          /* text on paper */
  --ink-soft: #654b3c;
  --rule: #cbb99a;
  --print: #f6eee4;
  --red: #c2503a;          /* the logo's warm red */
  --red-deep: #963726;     /* the same red, darker, for small red text on oat */
  --amber: #e8a33d;
  --book: "EB Garamond", Garamond, Georgia, serif;
  --ui: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --top: 64px;
  --bottom: 52px;
  --paper-grain: url("../img/grain.png");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }
body { background: var(--room); color: var(--slate); font: 400 16px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; border-radius: 2px; }
.panel :focus-visible, .doc-page main :focus-visible { outline-color: var(--ink); }

/* The home page is one screen: top bar, stage, bottom bar. Nothing scrolls. */
body.app { height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-rows: var(--top) minmax(0, 1fr) var(--bottom); }

/* Logo: "svetik", the dot over the i is the little light */
.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo .word { font-family: "Alegreya", Georgia, serif; font-weight: 800; font-size: 27px; color: var(--red); }
.logo .i { position: relative; }
.logo .i::after {
  content: ""; position: absolute; left: 50%; top: .2em; width: .17em; height: .17em; transform: translateX(-50%);
  border-radius: 50%; background: var(--amber); box-shadow: 0 0 .35em .08em rgba(232, 163, 61, .65);
}
.logo .sub { font-family: "Courier Prime", "Courier New", monospace; font-size: 9px; text-transform: lowercase; letter-spacing: .3em; margin-top: 2px; padding-left: 2px; color: var(--slate); }
/* svetik flips to светик (Russian) on hover or keyboard focus; tapping the logo on the sleeve does the same */
.flip { display: inline-grid; perspective: 400px; }
.flip > span { grid-area: 1 / 1; transition: transform .5s cubic-bezier(.2, .7, .2, 1), opacity .3s; backface-visibility: hidden; transform-origin: 50% 60%; }
.flip .cyr { transform: rotateX(-90deg); opacity: 0; }
.logo:hover .flip .latin, .logo:focus-visible .flip .latin, .flip.flipped .latin { transform: rotateX(90deg); opacity: 0; }
.logo:hover .flip .cyr, .logo:focus-visible .flip .cyr, .flip.flipped .cyr { transform: none; opacity: 1; }

/* Bars */
.bar { background: var(--bar); color: var(--slate); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); position: relative; z-index: 10; }
.bar nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.bar nav button, .bar nav a { font-size: 15px; text-decoration: none; padding: 5px 0; white-space: nowrap; border-bottom: 1.5px solid transparent; }
.bar nav button:hover, .bar nav a:hover { border-bottom-color: rgba(34, 48, 58, .4); }
.bar nav button[aria-expanded="true"] { border-bottom-color: var(--slate); }
.bottom .copy { font-size: 13px; white-space: nowrap; }
/* The logo in the top bar sits on a small oat tag, like a label on a record-shop divider */
.top .logo { background: var(--sleeve); padding: 6px 10px 5px; box-shadow: 0 1px 2px rgba(20, 30, 40, .15); }
.top .logo .sub { color: var(--ink-soft); }

/* Stage: a quiet room, softly lit from the middle */
.stage { position: relative; overflow: hidden; background: radial-gradient(100% 90% at 50% 42%, var(--room-light) 0, var(--room) 78%); }
.scene { position: absolute; inset: 0 0 48px; display: flex; align-items: center; justify-content: center; perspective: 1800px; }

/* The record: the sleeve's front, the record inside it, and the sleeve's back.
   The whole set turns over (.flipped), so the record peeks out of the other side. */
.record-set { --s: min(58vh, 440px, 62vw); position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; transition: transform 1.6s cubic-bezier(.45, .05, .25, 1); }
.record-set.flipped { transform: rotateY(180deg); }
.sleeve { position: absolute; inset: 0; background: var(--sleeve); color: var(--ink); -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 2px 3px rgba(20, 30, 40, .12), 0 26px 50px rgba(30, 45, 55, .28); }
.sleeve.front { transform: translateZ(2px); display: flex; align-items: center; justify-content: center; }
.sleeve.front .logo { cursor: default; }
.sleeve.front .logo .word { font-size: calc(var(--s) * .2); }
.sleeve.front .logo .sub { font-size: calc(var(--s) * .028); margin-top: calc(var(--s) * .02); color: var(--ink-soft); }
.vinyl { position: absolute; top: 3%; left: 33%; width: 94%; height: 94%; }

/* The back of the sleeve: liner notes printed straight onto it */
/* Text size follows the sleeve's size. The script shrinks it further (--fit) if it would spill out,
   and as a last resort hides the aside and footer (.tight); the same words are in the About panel. */
.sleeve.back { transform: rotateY(180deg) translateZ(2px); padding: calc(var(--s) * .08); display: flex; flex-direction: column; overflow: hidden; font-size: clamp(12px, calc(var(--s) * .042 * var(--fit, 1)), 19px); }
.sleeve.back .label { font-family: var(--book); font-style: italic; font-weight: 500; font-size: 1.5em; line-height: 1.1; color: var(--red); margin-bottom: .45em; }
.sleeve.back.small-label .label { color: var(--red-deep); }  /* the logo red needs 24px+ to be readable on oat */
.sleeve.back.tight .aside, .sleeve.back.tight .foot, .sleeve.back.brief .book p:not(.dropcap), .sleeve.back.bare .book { display: none; }
.sleeve.back .more { display: none; font-family: var(--book); }
.sleeve.back.bare .more { display: block; }
.sleeve.back .more a { text-decoration-color: var(--red); text-underline-offset: 3px; }
.book { font-family: var(--book); font-size: 1em; line-height: 1.5; color: var(--ink); }
.book p + p { text-indent: 1.4em; }
.book .dropcap::first-letter { float: left; font-size: 3.3em; line-height: .8; padding: .07em .08em 0 0; font-weight: 500; color: var(--red); }
.book .aside { text-indent: 0; margin-top: .9em; font-style: italic; color: var(--ink-soft); }
.sleeve .foot { margin-top: auto; padding-top: .6em; display: flex; justify-content: space-between; gap: 12px; font-size: max(11px, .66em); color: var(--ink-soft); }

/* Controls: pause/play, and turn the record over by hand */
.controls { position: absolute; right: var(--gutter); bottom: clamp(10px, 2.4vh, 18px); z-index: 4; display: flex; align-items: center; gap: 10px; }
.pause { width: 24px; height: 24px; display: grid; place-items: center; }
.pause::before { content: ""; width: 8px; height: 10px; border-left: 2.5px solid var(--slate); border-right: 2.5px solid var(--slate); }
.pause.paused::before { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--slate); }
.turn { font-size: 14px; padding: 3px 0; text-decoration: underline; text-decoration-color: rgba(34, 48, 58, .45); text-underline-offset: 4px; }
.turn:hover { text-decoration-color: var(--slate); }

/* Panels: the same warm paper as the sleeve, set like a book */
.panel {
  position: absolute; left: 0; right: 0; z-index: 5; max-height: 100%; overflow-y: auto;
  background: var(--sleeve); color: var(--ink); padding: clamp(26px, 4vw, 44px) var(--gutter);
  visibility: hidden; transition: transform .5s cubic-bezier(.2, .7, .2, 1), visibility 0s .5s;
}
.panel-top { top: 0; transform: translateY(-101%); box-shadow: 0 20px 40px rgba(30, 45, 55, .25); }
.panel-bottom { bottom: 0; transform: translateY(101%); box-shadow: 0 -20px 40px rgba(30, 45, 55, .25); }
.panel.open { transform: translateY(0); visibility: visible; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.panel .close { position: absolute; top: 14px; right: var(--gutter); z-index: 1; font-size: 14px; color: var(--ink-soft); padding: 4px 6px; }
.panel .close:hover { color: var(--ink); text-decoration: underline; }
.scrim { position: absolute; inset: 0; z-index: 4; background: rgba(40, 55, 65, .35); opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.on { opacity: 1; pointer-events: auto; }

.pane { position: relative; max-width: 1060px; margin: 0 auto; font-family: var(--book); font-size: 19px; line-height: 1.55; }
.pane h2:focus { outline: none; }
.pane h2 { font-family: var(--book); font-weight: 500; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; margin-bottom: 22px; }
.pane h3 { font-family: var(--ui); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.kicker { font-family: var(--ui); font-size: 13px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 17px; }
.gap-top { margin-top: 18px; }
.pane a.link, .contacts a { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 4px; word-break: break-word; }

/* Releases: sleeves */
.releases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.release .cover { aspect-ratio: 1; max-height: 32vh; background: var(--clay); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; box-shadow: 0 8px 18px rgba(80, 50, 30, .16); }
.release .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.release h3 { font-family: var(--book); font-weight: 500; font-size: 21px; margin-top: 12px; }
.release .muted { font-size: 16px; }
.release.empty .cover { background: none; border: 1px dashed var(--rule); box-shadow: none; }

/* Artists */
.artist { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.artist .photo { aspect-ratio: 4 / 5; max-height: 52vh; background: linear-gradient(160deg, #d9bba1, #c4a088); position: relative; overflow: hidden; border: 10px solid var(--print); box-shadow: 0 10px 24px rgba(80, 50, 30, .18); }
.artist .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.artist h3 { font-family: var(--book); font-weight: 500; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; margin: 4px 0 14px; }
.artist p { margin-bottom: 12px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); }
.about .lead { font-size: clamp(23px, 2.4vw, 28px); font-style: italic; line-height: 1.35; }
.about p + p { margin-top: 12px; }

/* Contact */
.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.contacts div { border-top: 1px solid var(--rule); padding-top: 14px; }
.contacts p { font-size: 17px; color: var(--ink-soft); margin-bottom: 8px; }
.contacts a { font-family: var(--ui); font-size: 15px; font-weight: 500; }

/* Upcoming */
.upcoming { list-style: none; border-top: 1px solid var(--rule); }
.upcoming li { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.upcoming .when { font-family: var(--ui); font-size: 14px; color: var(--ink-soft); }
.upcoming b { font-weight: 500; }
.upcoming .tag { font-family: var(--ui); font-size: 13px; color: var(--ink-soft); font-style: normal; }

/* Legal summary */
.legal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; font-size: 17px; }
.credits { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-soft); }
.credits a { color: inherit; }

/* 404 page */
.lost-page { background: var(--room); color: var(--slate); }
.lost { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; max-width: 1060px; margin: 0 auto; padding: 0 var(--gutter); }
.lost h1 { font-family: var(--book); font-weight: 500; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
.lost-note { font-family: var(--book); font-size: 20px; }
.lost .home { text-decoration-color: var(--slate); text-underline-offset: 4px; }

/* Full legal page (scrolls normally) */
.doc-page { background: var(--sleeve); }
.doc-page .bar { height: var(--top); }
.doc { padding: 56px var(--gutter) 90px; max-width: 720px; margin: 0 auto; font-family: var(--book); font-size: 19px; line-height: 1.6; color: var(--ink); }
.doc h1 { font-weight: 500; font-size: clamp(38px, 5vw, 52px); line-height: 1.1; margin-bottom: 8px; }
.doc h2 { font-weight: 500; font-size: 25px; margin: 38px 0 10px; }
.doc p, .doc li { margin-bottom: 10px; }
.doc ul { padding-left: 20px; }
.doc a { text-decoration-color: var(--red); text-underline-offset: 3px; }
.doc .updated { font-family: var(--ui); color: var(--ink-soft); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .record-set, .panel, .panel.open, .flip > span { transition: none; }
}

@media (max-width: 760px) {
  :root { --top: 58px; --bottom: 50px; }
  .logo .word { font-size: 23px; }
  .logo .sub { font-size: 8px; }
  .bar { gap: 10px; }
  .bar nav { gap: 14px; }
  .bar nav button, .bar nav a { font-size: 14px; }
  .bottom { justify-content: center; }
  .bottom .copy { display: none; }
  .bottom nav { gap: 22px; }
  .pane { font-size: 18px; }
  .releases { grid-template-columns: 1fr 1fr; }
  .release.empty:last-child { display: none; }
  .artist, .about, .contacts, .legal { grid-template-columns: 1fr; }
  .artist .photo { max-height: 30vh; aspect-ratio: 16 / 10; }
  .upcoming li { grid-template-columns: 1fr; gap: 2px; }
  .controls { left: 0; right: 0; justify-content: center; bottom: 8px; }
  /* On phones the record peeks out of the top of the sleeve, so the sleeve can be wider */
  .record-set { --s: min(86vw, 50vh); margin-top: calc(var(--s) * .22); }
  .vinyl { top: -24%; left: 3%; }
}

/* Smallest phones (320-380px): tighten the top bar so all four items fit */
@media (max-width: 380px) {
  :root { --gutter: 12px; }
  .bar { gap: 8px; }
  .logo .word { font-size: 19px; }
  .logo .sub { font-size: 7px; letter-spacing: .2em; }
  .top nav { gap: 8px; }
  .top nav button { font-size: 13px; }
  .top .logo { padding: 5px 7px 4px; }
}

/* Short screens (landscape phones): the record sits beside the sleeve again */
@media (max-height: 520px) {
  .scene { inset: 0 0 36px; }
  .record-set { --s: calc(100dvh - 150px); margin-top: 0; }
  .vinyl { top: 3%; left: 33%; }
  .controls { left: auto; right: var(--gutter); justify-content: flex-end; }
}
