/* =========================================================
   Алексей Колобов — саксофонист
   Светлый · прозрачный · уличный минимализм
   ========================================================= */

:root {
  --paper: #f3f2ee;
  --ink: #0c0c0d;
  --mute: rgba(12, 12, 13, .55);
  --line: rgba(12, 12, 13, .12);
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .78);
  --acc: #ff4a1c;

  --sans: 'Inter Tight', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --pad: clamp(18px, 3.4vw, 52px);
  --radius: 26px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Мягкий свет и зерно на фоне */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vmax 40vmax at 100% 0%, rgba(255, 74, 28, .10), transparent 60%),
    radial-gradient(55vmax 45vmax at 0% 100%, rgba(120, 150, 190, .16), transparent 60%),
    var(--paper);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--acc); color: #fff; }

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.modal-open { overflow: hidden; }

/* =========================================================
   Шапка
   ========================================================= */

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
  max-width: calc(100% - 28px);
  padding: 9px 10px 9px 20px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: var(--glass);
  box-shadow: 0 10px 40px rgba(12, 12, 13, .07);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc);
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute);
  transition: background .25s, color .25s;
}

.nav a:hover {
  background: var(--ink);
  color: #fff;
}

/* =========================================================
   Первый экран
   ========================================================= */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto minmax(0, 1fr);
  column-gap: 16px;
  min-height: 100svh;
  padding: 104px var(--pad) 34px;
}

.hero-meta {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
}

.hero-foot {
  grid-column: 1 / 8;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 520px;
  margin-top: clamp(22px, 4vh, 44px);
}

.hero-name {
  grid-column: 1 / 8;
  grid-row: 3;
  align-self: end;
  display: flex;
  flex-direction: column;
  margin: 0 0 -.06em -.04em;
  font-size: clamp(52px, 10.6vw, 220px);
  font-weight: 900;
  line-height: .84;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.hero-photo {
  grid-column: 8 / -1;
  grid-row: 2 / 4;
  position: relative;
  margin: 0;
  align-self: stretch;
  min-height: 420px;
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(12, 12, 13, .06);
  box-shadow: 0 30px 80px rgba(12, 12, 13, .14);
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.chip {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 13px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: var(--glass);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
}

.chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acc);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: .35; transform: scale(.7); }
}

.hero-line {
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: transform .3s var(--ease), background .25s, color .25s, border-color .25s;
}

.btn b { font-weight: 500; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover b { transform: translate(2px, 2px); }

.btn-solid {
  background: var(--ink);
  color: #fff;
}

.btn-solid:hover { background: var(--acc); }

.btn-glass {
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.btn-glass:hover { background: var(--glass-strong); border-color: var(--ink); }

/* =========================================================
   Бегущая строка
   ========================================================= */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.ticker-track {
  display: flex;
  width: max-content;
  padding: 13px 0;
  animation: ticker 38s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  padding-inline: 20px;
}

.ticker-track span::after {
  content: '';
  width: 5px;
  height: 5px;
  margin-left: 40px;
  background: var(--acc);
  transform: rotate(45deg);
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* =========================================================
   Секции
   ========================================================= */

.block {
  padding: clamp(70px, 10vw, 150px) var(--pad) 0;
}

.label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(26px, 4vw, 52px);
  color: var(--mute);
}

.label b { color: var(--acc); font-weight: 700; }
.label span { color: var(--ink); }
.label i { flex: 1; height: 1px; background: var(--line); }

.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.ed-on .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* =========================================================
   Ссылки (музыка и соцсети)
   ========================================================= */

.links { border-bottom: 1px solid var(--line); }

.link-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  padding: clamp(18px, 2.6vw, 34px) 8px;
  border-top: 1px solid var(--line);
  transition: background .35s, padding .45s var(--ease);
}

.link-row strong {
  font-size: clamp(44px, 9.5vw, 148px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.055em;
  text-transform: uppercase;
  transition: transform .5s var(--ease), color .3s;
}

.link-idx,
.link-cap { color: var(--mute); }

.link-arrow {
  display: grid;
  place-items: center;
  width: clamp(40px, 5vw, 68px);
  height: clamp(40px, 5vw, 68px);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  transition: background .3s, color .3s, border-color .3s, transform .5s var(--ease);
}

.link-row:hover {
  background: var(--glass);
  padding-inline: clamp(14px, 2vw, 30px);
}

.link-row:hover strong { transform: translateX(10px); color: var(--acc); }

.link-row:hover .link-arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  transform: rotate(45deg);
}

/* =========================================================
   Фото — альбомы
   ========================================================= */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  align-items: start;
}

.album-card { min-width: 0; }

.album-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background:
    repeating-linear-gradient(45deg, rgba(12, 12, 13, .05) 0 10px, transparent 10px 20px),
    rgba(12, 12, 13, .04);
  box-shadow: 0 18px 50px rgba(12, 12, 13, .10);
  transition: transform .5s var(--ease), box-shadow .5s;
}

.album-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}

.album-open {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: var(--glass);
  font-size: 18px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background .3s, color .3s, transform .5s var(--ease);
}

.album-card:hover .album-cover { transform: translateY(-4px); box-shadow: 0 26px 70px rgba(12, 12, 13, .16); }
.album-card:hover .album-cover-image { transform: scale(1.045); }
.album-card:hover .album-open { background: var(--acc); color: #fff; transform: rotate(45deg); }

.album-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 6px 0;
}

.album-meta h3 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.album-photo-count { color: var(--mute); white-space: nowrap; }
.album-photo-count::before { content: '['; }
.album-photo-count::after { content: ']'; }

.album-empty .album-cover { cursor: default; }

/* Режим редактирования: фото альбома */
.album-editor-photos { display: none; }

html.ed-on .album-editor-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  margin-top: 10px;
  border: 1px dashed rgba(128, 128, 128, .4);
  border-radius: 8px;
}

html.ed-on .album-editor-photo {
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(128, 128, 128, .12);
}

html.ed-on .album-editor-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   Контакты
   ========================================================= */

.contact { padding-bottom: 28px; }

.contact-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(10px, 1.6vw, 22px);
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  max-width: 100%;
  font-size: clamp(22px, 6.1vw, 104px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
  transition: color .3s;
}

.email-link b {
  font-weight: 500;
  color: var(--acc);
  transition: transform .5s var(--ease);
}

.email-link:hover { color: var(--acc); }
.email-link:hover b { transform: rotate(45deg); }

.phone-link {
  font-size: clamp(20px, 2.6vw, 36px);
  font-weight: 500;
  letter-spacing: -.03em;
  color: var(--mute);
  transition: color .3s;
}

.phone-link:hover { color: var(--ink); }

.legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(60px, 9vw, 130px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--mute);
}

.legal a:hover { color: var(--ink); }

/* =========================================================
   Галерея на весь экран
   ========================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  visibility: hidden;
  opacity: 0;
  background: rgba(243, 242, 238, .82);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  backdrop-filter: blur(30px) saturate(1.5);
  transition: opacity .35s, visibility .35s;
}

.modal-backdrop.is-open { visibility: visible; opacity: 1; }

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 910;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 18px var(--pad) 18px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s, visibility .35s;
}

.gallery-modal.is-open { visibility: visible; opacity: 1; }

.modal-head {
  display: flex;
  align-items: center;
  gap: 20px;
}

.modal-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.modal-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mute);
}

.modal-counter .current-photo { color: var(--ink); }
.counter-line { width: 28px; height: 1px; background: var(--line); }

.modal-close,
.modal-prev,
.modal-next {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: var(--glass-strong);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background .25s, color .25s, transform .3s var(--ease);
}

.modal-close:hover,
.modal-prev:hover,
.modal-next:hover { background: var(--ink); color: #fff; transform: scale(1.06); }

.modal-stage {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 16px;
  min-height: 0;
}

.modal-image {
  justify-self: center;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(12, 12, 13, .25);
  transition: opacity .3s;
}

.modal-image.loading { opacity: .25; }

.modal-caption {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.modal-thumbs::-webkit-scrollbar { display: none; }

.modal-thumbs button {
  flex: 0 0 auto;
  width: 56px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  opacity: .5;
  cursor: pointer;
  background: none;
  transition: opacity .25s, border-color .25s;
}

.modal-thumbs button:hover { opacity: .9; }
.modal-thumbs button.active { opacity: 1; border-color: var(--acc); }
.modal-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   Планшеты
   ========================================================= */

@media (max-width: 900px) {
  .hero { grid-template-rows: auto auto auto auto; min-height: 0; padding-bottom: 28px; }

  .hero-name {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: start;
    margin: clamp(18px, 4vw, 34px) 0 0 -.04em;
    font-size: clamp(54px, 18.6vw, 200px);
  }

  .hero-photo {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 0;
    aspect-ratio: 4 / 4.8;
    margin-top: 22px;
  }

  .hero-foot {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 22px;
    max-width: none;
  }
}

/* =========================================================
   Телефоны
   ========================================================= */

@media (max-width: 600px) {
  body { font-size: 16px; }

  .site-header { top: 10px; padding: 7px 8px 7px 16px; gap: 10px; }
  .nav a { padding: 8px 9px; font-size: 10px; letter-spacing: .06em; }

  .hero { padding-top: 88px; }

  .link-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .link-idx { display: none; }
  .link-row strong { grid-column: 1; grid-row: 1; }
  .link-cap { grid-column: 1; grid-row: 2; }
  .link-arrow { grid-column: 2; grid-row: 1 / 3; }

  .album-grid { grid-template-columns: 1fr; }

  .gallery-modal { padding-inline: 14px; }
  .modal-stage { grid-template-columns: minmax(0, 1fr); }
  .modal-prev,
  .modal-next {
    position: absolute;
    bottom: 98px;
    width: 44px;
    height: 44px;
  }
  .modal-caption { display: none; }
  .modal-prev { left: 14px; }
  .modal-next { right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .chip i { animation: none; }
  .reveal, .btn, .link-row, .link-row strong, .album-cover, .album-cover-image { transition: none; }
}
