/* Ruslan Shabanov, portfolio landing page */

/* Jost Regular (SIL Open Font License, see fonts/Jost-OFL.txt): only the big name at the top of the page */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jost-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jost-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jost-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Fonts: the system font of Apple devices (San Francisco, the typeface used on apple.com) is used where it exists.
   Everywhere else Inter, a free typeface very close to it, is loaded from fonts/ (SIL Open Font License, see fonts/Inter-OFL.txt).
   San Francisco itself is not licensed for web hosting, so it is never copied into the site. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-cyrillic-300-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-latin-ext-300-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-latin-300-normal.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: "Inter";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-cyrillic-300-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-latin-ext-300-italic.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-latin-300-italic.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: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.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: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-cyrillic-400-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-ext-400-italic.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-italic.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: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-ext-600-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.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 {
  --bg: #f2f2f2;
  --bg-alt: #e5e5e5;
  --surface: #fafafa;
  --text: #222222;
  --muted: #626262;
  --line: #d2d2d2;
  --accent: #3d3d3d;
  --accent-dark: #1f1f1f;
  --error: #a0402f;
  --success: #4c6b4a;

  --display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --radius: 4px;
  --header-h: 60px;
  /* Size of the big name: the longer line (about 5.5 em wide) must fit the screen */
  --name-size: min(calc((100vw - 2 * var(--gutter)) / 5.7), 15rem);
}
/* On Apple devices (class set by platform.js) the system font, San Francisco, is used for everything */
html.apple-os {
  --display: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent-dark); }

h1, h2 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
}

h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 720px; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 12px 16px;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 242, 242, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.12rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.1;
  min-height: 44px;
}
/* The word under the name */
.logo-role {
  margin-top: 0.25em;
  font-size: 0.52em;   /* relative to the name, so it scales with it */
  font-weight: 400;
  letter-spacing: 0.38em;
  color: var(--muted);
}

.nav { display: none; }

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.nav a { transition: color 0.15s; }
.nav a:hover { color: #000; }

/* Menu button (three lines), shown below 900px on the right of the header */
.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.menu-icon { position: relative; }
.menu-icon::before,
.menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .header-inner { gap: 8px; }
  .logo { font-size: clamp(0.84rem, 4.1vw, 1.12rem); letter-spacing: 0.1em; }
  .lang { margin-left: auto; }
  .menu-btn { display: inline-flex; }

  /* The menu drops down under the header */
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  }
  .nav.is-open a {
    min-height: 48px;
    margin: 0 -12px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.15s, background-color 0.15s;
  }
  .nav.is-open a:hover,
  .nav.is-open a:focus-visible {
    color: #000;
    background: var(--bg-alt);
  }
  .nav.is-open a:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-icon, .menu-icon::before, .menu-icon::after { transition: none; }
}

/* Language toggle: small to the eye, but each button still has a 44px-tall
   tap area. The visible pill is drawn inside that area. */
.lang {
  position: relative;
  display: flex;
  flex-shrink: 0;
  padding: 0 3px;
}
.lang::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 30px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  pointer-events: none;
}

.lang-btn {
  position: relative;
  isolation: isolate;
  min-width: 34px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lang-btn::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 999px;
  z-index: -1;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { color: var(--bg); }
.lang-btn[aria-pressed="true"]::before { background: var(--text); }

/* Hero: photo with the name in large capitals, after a printed-poster layout.
   The lower part of the letters runs past the photo into the band below,
   where it blends into the page colour. */

/* The photo stays pinned under the header while the rest of the page
   slides up over it. Everything after the hero gets its own background
   and sits on a higher layer. */
.hero {
  position: sticky;
  top: var(--header-h);
  z-index: 0;
  background: var(--bg);
}

.hero-stage { position: relative; }

/* :where() keeps this rule weak, so section backgrounds set elsewhere still apply */
:where(main > :not(.hero)) {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.hero-media {
  position: relative;
  overflow: hidden;
  background: #1c1c1c;
  /* Phones: vertical photo in a 4:5 frame */
  aspect-ratio: 4 / 5;
  max-height: calc(100svh - var(--header-h) - 5rem);
  width: 100%;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 55%;   /* keeps the huts on the shore in view on narrow screens */
}

/* Black and white, as in the reference. Remove "is-mono" in index.html to bring colour back. */
.hero-media.is-mono .hero-img { filter: grayscale(1) contrast(1.1) brightness(0.92); }

/* Gentle shade at the bottom so the light letters stay readable */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 16, 16, 0.55) 0%, rgba(16, 16, 16, 0.18) 30%, rgba(16, 16, 16, 0) 50%);
}

/* The name belongs to the band that scrolls over the photo, so it moves with
   the page. It hangs above the band's top edge, over the photo; the lowest
   part of the letters lies on the band itself and melts into its colour. */
.hero-name {
  position: absolute;
  z-index: 1;
  left: calc(var(--gutter) - var(--name-bl, 0px));   /* the first letter's ink starts exactly at the gutter */
  right: 0;
  /* --name-lift is set by script.js so that the baseline of the letters lies exactly on the top edge of the band */
  bottom: calc(100% - var(--name-size) * 0.1 + var(--name-lift, 0px));
  margin: 0;
  font-family: "Jost", var(--display);   /* the big name keeps its own typeface */
  font-weight: 400;
  font-size: var(--name-size);
  line-height: 0.8;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--bg);
  pointer-events: none;
}
.hero-name-line { display: block; white-space: nowrap; }

/* Band under the photo: the cut-off letters fade here, then the short intro */
.hero-band {
  position: relative;
  padding: calc(var(--name-size) * 0.1 + 28px) 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero-band-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6em;
}

.lead {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.95rem, 2vw, 1.05rem);   /* same size as .order-text and the About lead */
  line-height: 1.45;
  max-width: 30em;
  margin: 0;
}

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost { border-color: var(--text); color: var(--text); }
.btn-ghost:hover { background: var(--text); color: var(--bg); }

/* Sections */

.section { padding: 72px 0; }


/* All section titles: capitals, spaced, semibold */
.section h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.2vw, 2.3rem);
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* About: photo on top on small screens, on the right on wide ones */
.about-inner {
  display: grid;
  gap: 32px;
}

.about-photo {
  margin: 0;
  width: 100%;
  max-width: 420px;
  justify-self: center;   /* centred above the text on small screens */
}
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--bg-alt);
}

.about-text { max-width: 680px; min-width: 0; justify-self: center; width: 100%; }

/* Small screens: all section titles and the action buttons are centred */
@media (max-width: 899px) {
  .section h2 { text-align: center; }
  .hero-actions,
  .order-actions,
  .tabs { justify-content: center; }
  /* Intro text under the top photo: same block as the About text, left-aligned */
  .hero-text { width: 100%; max-width: 680px; margin: 0 auto; }
  .hero-text .lead { max-width: none; }   /* lines run the full width of the block */
}

.about p { font-size: 0.95rem; }

/* The lead paragraph */
.about-text > p {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.5;
}

/* The two paragraphs below the lead: italic and light, behind one vertical line
   that runs the full height of the block. */
.about-note {
  margin-top: 2em;
  margin-left: 0;        /* the line sits at the left edge of the lead paragraph */
  padding-left: 50px;
  border-left: 1px solid #a8a8a8;
}
@media (max-width: 640px) { .about-note { padding-left: 24px; } } /* 50px leaves too little room for the text on phones */
.about-note p {
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.005em;
}
.about-note p:last-child { margin-bottom: 0; }

/* Niches overview: a compact index of every genre, linking into the Gallery tabs below */

.niches { background: var(--surface); }
.niches .panel-caption { margin: 0 0 28px; }

/* Gallery */

.gallery { background: var(--surface); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 30px;          /* plain words need more room between them than the old pills did */
  margin: 8px 0 24px;
}

/* Plain text, not buttons. The selected series is underlined. */
.tab {
  min-height: 44px;       /* the tap area stays 44px even though nothing is drawn around it */
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.25s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }

/* One line that glides from the old tab to the new one (moved by script.js) */
.tabs { position: relative; }
.tab-line {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  background: var(--text);
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.45, 0.05, 0.2, 1), width 0.9s cubic-bezier(0.45, 0.05, 0.2, 1);
}
.tab-line.is-still { transition: none; }
@media (prefers-reduced-motion: reduce) { .tab-line { transition: none; } }

.panel-caption { color: var(--muted); }

/* Gallery mosaic. script.js lays each series out in rows: every photo keeps its own
   proportions and every row is exactly as wide as the block, so the series forms one
   clean rectangle of frames in different sizes. Without script the photos stack in
   two columns. */
.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.grid.is-mosaic {
  display: flex;
  flex-direction: column;
  gap: var(--mosaic-gap, 12px);
}
.mosaic-row {
  display: flex;
  flex: none;
  gap: var(--mosaic-gap, 12px);
}

/* A frame holds one photo */
.frame {
  position: relative;
  min-width: 0;
}
.frame:hover,
.frame:focus-within { z-index: 2; }   /* a lifted photo stays above its neighbours */

.tile {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
  background: var(--bg-alt);
  overflow: hidden;
  border-radius: 2px;
}
.frame .tile { height: 100%; }

.tile img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1);   /* previews are black and white; the viewer shows the colour photo */
  transition: transform 0.5s ease, opacity 0.3s, filter 0.35s ease;
}
/* Under the cursor (or keyboard focus) the preview quickly turns to colour */
.tile:hover img,
.tile:focus-visible img { filter: grayscale(0); }

/* Gallery section only: previews stay in colour, all graded to one shared tone
   so photos shot in different light still read as one consistent set. */
.gallery .tile img,
.gallery .tile:hover img,
.gallery .tile:focus-visible img {
  filter: saturate(0.88) sepia(0.12) hue-rotate(-8deg) contrast(1.04) brightness(1.02);
}
/* In the mosaic the frame already has the photo's proportions, so nothing is cropped */
.frame .tile img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Hover: the photo lifts slightly towards the viewer, outlined by a narrow shadow.
   Only for mouse / trackpad; with reduced motion only the shadow appears. */
.tile {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover,
  .tile:focus-visible {
    z-index: 1;
    transform: translateY(-6px) scale(1.03);
    /* a narrow, even shadow line on all four sides */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 0 12px 2px rgba(0, 0, 0, 0.38);
  }
}

/* Booking */

.order-text {
  font-family: var(--sans);   /* same light italic as the note in About */
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.5;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.005em;
  max-width: 34em;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* buttons centred on every screen size */
  gap: 12px;
  margin-top: 28px;
}
.order h2 { text-align: center; }   /* the title too */
.order-text { margin-left: auto; margin-right: auto; text-align: center; }   /* block and lines centred */

.site-footer {
  padding: 28px 0;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 24px;
}
.site-footer .footer-role { margin-left: auto; text-align: right; }
/* Below the desktop width the back-to-top arrow sits at the screen edge: keep the text clear of it */
@media (max-width: 899px) { .site-footer .footer-role { margin-right: 52px; } }

/* Back-to-top arrow: translucent, appears after scrolling past the top photo */

.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 15;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(34, 34, 34, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s, background-color 0.2s ease;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s, background-color 0.2s ease;
}
.to-top:hover { background: rgba(34, 34, 34, 0.6); }

@media (min-width: 900px) {
  .to-top { right: 28px; bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .to-top, .to-top.is-visible { transition: none; transform: none; }
}

/* Photo viewer: the photo is enlarged over the dimmed, blurred page */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgba(16, 16, 16, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: lb-fade-in 0.5s ease;
}
.lightbox.is-closing::backdrop { opacity: 0; transition: opacity 0.45s ease; }
@keyframes lb-fade-in { from { opacity: 0; } }

.lb-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: zoom-out;
}

/* Three slots side by side (previous, current, next); JS moves them as a strip */
.lb-slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 64px;       /* phones: room for the arrows below */
  will-change: transform;
  backface-visibility: hidden;
}

.lightbox-img {
  display: block;
  max-width: none;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
  will-change: transform;
}
.lightbox-img:active { cursor: grabbing; }

.lb-btn {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(34, 34, 34, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}
.lb-btn:hover { background: rgba(34, 34, 34, 0.6); }
.lightbox.is-closing .lb-btn { opacity: 0; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: calc(50% - 56px); bottom: 16px; }
.lb-next { left: calc(50% + 8px); bottom: 16px; }

body.no-scroll { overflow: hidden; }

/* Tablet */

@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-media { aspect-ratio: 3 / 2; }
  .section { padding: 96px 0; }
}

/* Desktop */

@media (min-width: 900px) {
  .logo { font-size: 1.4rem; letter-spacing: 0.13em; }
  /* The menu sits on the right, just before the language toggle */
  .nav {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: 38px;
    max-width: none;
    margin: 0 28px 0 0;
  }
  /* Wide screens: the name goes on one line, sized so that
     "RUSLAN SHABANOV" (about 9.5 em wide) spans the screen */
  :root { --name-size: min(calc((100vw - 2 * var(--gutter)) / 9.9), 15rem); }
  .hero-name { white-space: nowrap; }
  .hero-name-line { display: inline; }
  .about-inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: center;   /* text block sits in the middle of the photo frame */
  }
  .about-text { grid-column: 1; grid-row: 1; }
  .about-photo { grid-column: 2; grid-row: 1; max-width: none; justify-self: stretch; }
  .hero-media {
    aspect-ratio: auto;
    height: clamp(420px, calc(100svh - var(--header-h) - 170px), 860px);
    max-height: none;
  }
  .hero-band-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
  }
  .hero-actions { flex-shrink: 0; }
  .lb-slot { padding-bottom: 0; }
  .lb-prev, .lb-next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lb-prev { left: 24px; }
  .lb-next { left: auto; right: 24px; }
  .lb-close { top: 20px; right: 24px; }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (min-width: 1600px) {
  .container { max-width: 1440px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile img { transition: none; }
  .tile { transition: box-shadow 0.2s ease; }
  .tile:hover, .tile:focus-visible { transform: none !important; }
}

/* Three language buttons: on very narrow phones the header gets a little tighter */
@media (max-width: 380px) {
  .header-inner { gap: 4px; }
  .logo { font-size: 3.5vw; letter-spacing: 0.08em; }
  .lang-btn { min-width: 32px; padding: 0 5px; }
}

/* Two-line name (phones, tablets): more space between the lines so the
   mark on Š / Č / Ž does not touch the letters of the line above.
   The translate keeps the lower line where it was. */
@media (max-width: 899px) {
  .hero-name { line-height: 1; transform: translateY(0.1em); }
}

/* Albums page: the title on each preview and the current menu item */
.tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: left;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.albums { padding-top: 64px; }
.albums .panel-caption { margin: 0 0 28px; }
.nav a[aria-current="page"] { color: var(--text); }
@media (min-width: 900px) {
  .albums { padding-top: 88px; }
}

/* Album pages */
a.tile { cursor: pointer; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 8px;
  color: var(--muted, inherit);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.back-link:hover, .back-link:focus-visible { color: var(--text); }
.album-page .panel-caption { margin: 0 0 28px; }
.album-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.album-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  max-width: 48%;
  color: inherit;
  text-decoration: none;
}
.album-nav a[rel="next"] { text-align: right; margin-left: auto; }
.album-nav-label { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }
.album-nav-title { font-size: 1.05rem; }
.album-nav a:hover .album-nav-title, .album-nav a:focus-visible .album-nav-title { text-decoration: underline; text-underline-offset: 4px; }
/* Inside an album the photos are shown in colour */
.album-page .tile img { filter: none; }
/* Album pages: tighter spacing between the header, the back link and the title */
.album-page { padding-top: 20px; }
.album-page .back-link { margin: 0; }
.album-page h2 { margin-top: 0; margin-bottom: 8px; }
.album-page .panel-caption { margin-bottom: 20px; }
@media (min-width: 900px) {
  .album-page { padding-top: 28px; }
}
/* Albums page: the same tight spacing as on the album pages */
.albums { padding-top: 20px; }
.albums h2 { margin-top: 0; margin-bottom: 8px; }
.albums .panel-caption { margin-bottom: 20px; }
@media (min-width: 900px) {
  .albums { padding-top: 28px; }
}

/* Prices */
.prices .panel-caption { margin: 0 0 32px; }
.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 40px;
  grid-template-columns: 1fr;
}
.price-fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.price-big {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.price-label { color: var(--muted); font-size: 1rem; }
@media (min-width: 640px) {
  .price-list { grid-template-columns: repeat(3, 1fr); }
}

/* Five menu items: tighter gaps on the narrowest desktop widths so the header never overflows */
@media (min-width: 900px) and (max-width: 1099px) {
  .nav { gap: 20px; margin-right: 16px; }
}

/* Prices: everything centred on the page */
.prices h2,
.prices .panel-caption,
.price-fact { text-align: center; }
.price-fact { align-items: center; }
.prices .panel-caption { margin-left: auto; margin-right: auto; }
.price-note { margin: 24px 0 0; text-align: center; font-style: italic; color: var(--muted); }

/* The big figures in Prices: Inter Light Italic (variable, cut down to the few letters and digits used there) */
@font-face {
  font-family: "Inter Figures";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-num-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013;
}
@font-face {
  font-family: "Inter Figures";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-num-cyr-italic.woff2") format("woff2");
  unicode-range: U+0400-045F;
}
.price-big {
  font-family: "Inter Figures", "Inter", sans-serif;
  font-weight: 200;
}

/* Booking text: one line on wide screens (wraps on phones) */
@media (min-width: 900px) {
  .order-text { max-width: none; width: max-content; margin-left: 0; margin-right: 0; position: relative; left: 50%; transform: translateX(-50%); }
}
