/* ============================================================
   ВЕРЕСК — скандинавский сет-ресторан.
   Сланец, лишайник, 12 колонок, воздух.
   Display: Cormorant Garamond · UI: Onest
   ============================================================ */

:root {
  --slate: #e9eae6;
  --ink: #1b211f;
  --moss: #7a8a6a;
  --sage: #b6c2b0;
  --hair: rgba(27, 33, 31, 0.16);
  --dim: rgba(27, 33, 31, 0.58);
  --pad: clamp(20px, 4vw, 64px);
  --gap: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--slate);
  color: var(--ink);
  font-family: 'Onest', sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  line-height: 1.05;
  margin: 0;
}

::selection { background: var(--moss); color: var(--slate); }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 4px; }

.accent { color: var(--moss); }

/* ---------- интро: 12 линий-колонок ---------- */
.gridline-intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--gap);
  padding: 0 var(--pad);
  pointer-events: none;
}
.gridline-intro i {
  width: 1px;
  justify-self: center;
  background: linear-gradient(180deg, transparent, var(--ink) 25%, var(--ink) 75%, transparent);
  transform: scaleY(0);
  opacity: 0.5;
}
.gridline-intro.play i { animation: line-grow 0.55s var(--ease) forwards; }
.gridline-intro.play i:nth-child(2) { animation-delay: 0.05s; }
.gridline-intro.play i:nth-child(3) { animation-delay: 0.1s; }
.gridline-intro.play i:nth-child(4) { animation-delay: 0.15s; }
.gridline-intro.play i:nth-child(5) { animation-delay: 0.2s; }
.gridline-intro.play i:nth-child(6) { animation-delay: 0.25s; }
.gridline-intro.play i:nth-child(7) { animation-delay: 0.3s; }
.gridline-intro.play i:nth-child(8) { animation-delay: 0.35s; }
.gridline-intro.play i:nth-child(9) { animation-delay: 0.4s; }
.gridline-intro.play i:nth-child(10) { animation-delay: 0.45s; }
.gridline-intro.play i:nth-child(11) { animation-delay: 0.5s; }
.gridline-intro.play i:nth-child(12) { animation-delay: 0.55s; }
.gridline-intro.fade i { animation: line-fade 0.6s 0.9s var(--ease) forwards; }
@keyframes line-grow { to { transform: scaleY(1); } }
@keyframes line-fade { to { opacity: 0; } }
.gridline-intro.done { display: none; }

/* ---------- шапка: тонкая линейка ---------- */
.hdr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  padding: 13px var(--pad);
  background: rgba(233, 234, 230, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 0.5s var(--ease);
}
.hdr.gone { transform: translateY(-110%); visibility: hidden; }
.hdr__logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.24em;
  text-transform: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.hdr__logo-sub { font-family: 'Onest', sans-serif; font-size: 9px; letter-spacing: 0.3em; color: var(--dim); text-transform: uppercase; }
.hdr__center { margin: 0; color: var(--dim); text-align: center; transition: opacity 0.4s; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.hdr__nav { display: flex; gap: clamp(12px, 2vw, 26px); }
.hdr__nav a { position: relative; color: var(--dim); padding: 4px 0; transition: color 0.3s; }
.hdr__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.hdr__nav a:hover { color: var(--ink); }
.hdr__nav a:hover::after { transform: scaleX(1); }
.hdr__book {
  border: 1px solid var(--ink);
  padding: 7px 16px;
  transition: background 0.35s var(--ease), color 0.35s;
}
.hdr__book:hover { background: var(--ink); color: var(--slate); }

/* ---------- ярлык ---------- */
.label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(24px, 4vh, 44px);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--dim);
}
.label__line { width: clamp(30px, 5vw, 64px); height: 1px; background: var(--moss); flex: none; }
.label--center { justify-content: center; }
.label--center .label__line:last-child { margin-left: 16px; }

/* ---------- герой ---------- */
.hero {
  padding: clamp(130px, 20vh, 210px) var(--pad) 0;
  max-width: 1560px;
  margin: 0 auto;
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: end;
}
.hero__left { grid-column: 1 / span 8; }
.hero__meta { grid-column: 10 / span 3; }
.hero__title {
  font-size: clamp(90px, 15vw, 240px);
  letter-spacing: 0.01em;
  display: flex;
  align-items: flex-start;
}
.hero__w { display: inline-block; }
.hero__dot {
  width: 0.055em;
  height: 0.055em;
  border-radius: 50%;
  background: var(--moss);
  margin: 0.85em 0 0 0.08em;
  flex: none;
}
.hero__sub {
  grid-column: 1 / span 6;
  margin: clamp(16px, 3vh, 30px) 0 0;
  max-width: 520px;
  font-size: 16px;
  color: var(--dim);
}
.hero__meta dl {
  margin: 0 0 clamp(16px, 3vh, 28px);
  display: grid;
  gap: 18px;
}
.hero__meta dl > div { border-top: 1px solid var(--hair); padding-top: 10px; }
.hero__meta dt {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 4px;
}
.hero__meta dd { margin: 0; font-size: 14px; line-height: 1.55; }

.hero__photo {
  position: relative;
  margin: clamp(50px, 9vh, 100px) 0 0;
  aspect-ratio: 16 / 8.2;
  overflow: hidden;
  border-radius: 2px;
  background:
    radial-gradient(ellipse 70% 90% at 20% 110%, rgba(122, 138, 106, 0.55), transparent 60%),
    linear-gradient(165deg, #d7dbd3 0%, #a9b1a4 45%, #7d8878 100%);
}
.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  font-size: 0;
}
.hero__cap {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 2;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--slate);
  background: rgba(27, 33, 31, 0.55);
  padding: 7px 13px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}

/* ---------- философия ---------- */
.philo {
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(90px, 16vh, 180px) var(--pad) clamp(60px, 10vh, 120px);
}
.philo__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.philo .label { grid-column: 1 / span 12; }
.philo__q {
  grid-column: 1 / span 7;
  font-size: clamp(38px, 5.2vw, 84px);
}
.philo__cols {
  grid-column: 9 / span 4;
  align-self: end;
  display: grid;
  gap: 20px;
}
.philo__cols p { margin: 0; font-size: 15px; color: var(--dim); }

/* ---------- сет: sticky courses ---------- */
.set {
  border-top: 1px solid var(--hair);
  padding: clamp(70px, 12vh, 130px) var(--pad) 0;
  max-width: 1560px;
  margin: 0 auto;
}
.set__head { max-width: 640px; margin-bottom: clamp(50px, 9vh, 100px); }
.set__head h2 { font-size: clamp(40px, 5.6vw, 88px); }
.set__note { color: var(--dim); font-size: 15px; }

.courses {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  position: relative;
}
.rail {
  grid-column: 7;
  grid-row: 1 / span 7;
  align-self: start;
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  pointer-events: none;
}
.rail i {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--hair);
  transition: width 0.6s var(--ease), background 0.6s var(--ease);
}
.rail i.on { width: 44px; background: var(--moss); }
.stage {
  grid-column: 8 / span 5;
  grid-row: 1 / span 7;
  position: sticky;
  top: 0;
  height: 100svh;
}
.stage__stack { position: relative; width: 100%; height: 100%; }
.stage__cap {
  position: absolute;
  left: 0;
  bottom: clamp(24px, 5vh, 56px);
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  transition: opacity 0.5s var(--ease);
}
.stage__slide {
  position: absolute;
  inset: clamp(90px, 14vh, 150px) 0 clamp(60px, 10vh, 100px);
  margin: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s var(--ease), transform 2.4s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage__slide.is-on { opacity: 1; transform: scale(1); }
.plate::before {
  content: '';
  position: absolute;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  top: 26%;
  left: 40%;
  background: radial-gradient(circle at 40% 35%, rgba(27, 33, 31, 0.22), rgba(27, 33, 31, 0.08) 70%);
}
.plate::after {
  content: '';
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(27, 33, 31, 0.25);
}
.stage__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  font-size: 0;
  background: linear-gradient(165deg, #d7dbd3, #8b958a);
}
.plate {
  width: min(64%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 40px 80px -50px rgba(27, 33, 31, 0.55);
}
.plate--1 { background: radial-gradient(circle at 38% 30%, #dfe4d9, #aab6a2 60%, #7a8a6a); }
.plate--2 { background: radial-gradient(circle at 60% 40%, #e6e2d6, #b3a98f 55%, #857a5e); }
.plate--4 { background: radial-gradient(circle at 30% 65%, #d8d6cf, #97a08e 55%, #5f6b58); }
.plate--5 { background: radial-gradient(circle at 50% 25%, #e3e5df, #9fae9b 55%, #6f7f68); }
.plate--7 { background: radial-gradient(circle at 45% 55%, #efe6da, #cdb28e 55%, #a4784a); }

.course {
  grid-column: 1 / span 6;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 46px);
  min-height: 68svh;
  align-content: center;
  border-top: 1px solid var(--hair);
  padding: clamp(30px, 5vh, 56px) 0;
}
.course__no { position: sticky; top: 96px; align-self: start; }
.num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(72px, 9vw, 150px);
  line-height: 0.9;
  color: var(--ink);
  display: inline-block;
  transition: opacity 0.6s var(--ease);
}
.course.active .num {
  background: linear-gradient(100deg, var(--ink) 20%, var(--moss) 45%, var(--sage) 55%, var(--ink) 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 2.6s linear infinite;
}
@keyframes shimmer {
  from { background-position: 220% 0; }
  to { background-position: -20% 0; }
}
.course__name { font-size: clamp(26px, 3.4vw, 46px); }
.course__ru { margin: 14px 0 0; font-size: 16px; color: var(--ink); max-width: 460px; }
.course__meta { margin: 22px 0 0; font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }

/* ---------- инфо о сете ---------- */
.setinfo { border-top: 1px solid var(--hair); background: var(--ink); color: var(--slate); }
.setinfo__grid {
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(60px, 10vh, 110px) var(--pad);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.setinfo__item { border-top: 1px solid rgba(233, 234, 230, 0.25); padding-top: 18px; }
.setinfo__item b {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 52px);
  color: var(--sage);
  margin-bottom: 10px;
}
.setinfo__item p { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(233, 234, 230, 0.72); }

/* ---------- бар ---------- */
.bar {
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--pad);
}
.bar__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.bar__left { grid-column: 1 / span 4; }
.bar__left h2 { font-size: clamp(38px, 4.8vw, 72px); }
.bar__left p:last-child { color: var(--dim); font-size: 15px; max-width: 380px; }
.bar__list { grid-column: 7 / span 6; align-self: center; }
.brow {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--hair);
  transition: border-color 0.35s, padding-left 0.35s var(--ease);
}
.brow:hover { border-color: var(--moss); padding-left: 10px; }
.brow__n { font-family: 'Cormorant Garamond', serif; font-size: 21px; font-weight: 500; }
.brow__d { flex: 1; min-width: 24px; border-bottom: 1px dotted var(--hair); transform: translateY(-4px); }
.brow__p { font-size: 14px; color: var(--dim); white-space: nowrap; }

/* ---------- дом / команда ---------- */
.dom {
  border-top: 1px solid var(--hair);
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--pad);
}
.dom__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.dom .label { grid-column: 1 / span 12; }
.dom__title { grid-column: 1 / span 5; font-size: clamp(38px, 5vw, 72px); }
.people {
  grid-column: 7 / span 6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 34px);
  align-items: start;
}
.person { border-top: 1px solid var(--ink); padding-top: 16px; transition: border-color 0.4s; }
.person:hover { border-color: var(--moss); }
.person h3 { font-size: clamp(20px, 2vw, 28px); font-weight: 500; }
.person__role { margin: 6px 0 12px; font-size: 10.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--moss); }
.person p:last-child { margin: 0; font-size: 14px; line-height: 1.65; color: var(--dim); }

/* ---------- гости ---------- */
.guests {
  border-top: 1px solid var(--hair);
  padding: clamp(70px, 12vh, 140px) var(--pad);
  max-width: 1560px;
  margin: 0 auto;
}
.guests__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(18px, 2.6vw, 40px);
}
.guests blockquote {
  grid-column: span 4;
  margin: 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--moss);
}
.guests blockquote:nth-child(2) { margin-top: clamp(20px, 4vw, 60px); }
.guests blockquote:nth-child(3) { margin-top: clamp(40px, 8vw, 120px); }
.guests p { margin: 0 0 18px; font-family: 'Cormorant Garamond', serif; font-size: clamp(19px, 1.9vw, 25px); font-style: italic; font-weight: 400; line-height: 1.45; }
.guests footer { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); }

/* ---------- визит ---------- */
.vizit {
  border-top: 1px solid var(--hair);
  background:
    radial-gradient(ellipse 70% 90% at 90% 0%, rgba(182, 194, 176, 0.4), transparent 55%),
    var(--slate);
  padding: clamp(80px, 14vh, 160px) var(--pad);
}
.vizit__grid {
  max-width: 1560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.vizit__left { grid-column: 1 / span 6; }
.vizit__left h2 { font-size: clamp(42px, 6vw, 96px); }
.vizit__left p { color: var(--dim); max-width: 480px; }
.book {
  display: inline-block;
  margin-top: 26px;
  padding: 15px 32px;
  border: 1px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  background: linear-gradient(var(--ink), var(--ink)) left bottom / 100% 0% no-repeat;
  transition: background-size 0.45s var(--ease), color 0.35s;
  white-space: nowrap;
}
.book:hover { color: var(--slate); background-size: 100% 130%; }
.vizit__info {
  grid-column: 8 / span 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
  align-self: end;
  margin: 0;
}
.vizit__info > div { border-top: 1px solid var(--hair); padding-top: 12px; }
.vizit__info dt {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 8px;
}
.vizit__info dd { margin: 0; font-size: 14.5px; line-height: 1.6; }
.vizit__info dd a { border-bottom: 1px solid var(--hair); transition: border-color 0.3s, color 0.3s; }
.vizit__info dd a:hover { color: var(--moss); border-color: var(--moss); }

/* ---------- футер ---------- */
.ftr { border-top: 1px solid var(--hair); background: var(--slate); }
.ftr__grid {
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 70px) var(--pad) 34px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: end;
}
.ftr__word {
  grid-column: 1 / span 4;
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(44px, 6vw, 92px);
  line-height: 1;
}
.ftr__cols {
  grid-column: 6 / span 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 30px);
}
.ftr__cols p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--dim); }
.ftr__up {
  grid-column: 12 / span 1;
  justify-self: end;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--moss);
  transition: color 0.3s;
}
.ftr__up:hover { color: var(--ink); }

/* ---------- появления ---------- */
.rise { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rise.in { opacity: 1; transform: none; }
.drawline { transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease); }
.drawline.in { transform: scaleX(1); }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .hero__left { grid-column: 1 / span 12; }
  .hero__meta { grid-column: 1 / span 12; }
  .hero__meta dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__sub { grid-column: 1 / span 12; }
  .philo__q { grid-column: 1 / span 12; }
  .philo__cols { grid-column: 1 / span 12; }
  .stage { display: none; }
  .rail { display: none; }
  .course { grid-column: 1 / span 12; min-height: 0; }
  .bar__left { grid-column: 1 / span 12; }
  .bar__list { grid-column: 1 / span 12; }
  .dom__title { grid-column: 1 / span 12; margin-bottom: 30px; }
  .people { grid-column: 1 / span 12; }
  .guests blockquote { grid-column: 1 / span 12; margin-top: 0 !important; }
  .vizit__left { grid-column: 1 / span 12; }
  .vizit__info { grid-column: 1 / span 12; margin-top: 40px; }
  .ftr__word { grid-column: 1 / span 12; margin-bottom: 26px; }
  .ftr__cols { grid-column: 1 / span 11; }
  .ftr__up { grid-column: 12; }
  .setinfo__grid { grid-template-columns: 1fr 1fr; }
  .hdr__center { display: none; }
}

@media (max-width: 640px) {
  .hdr { font-size: 10px; gap: 10px; }
  .hdr__nav { display: none; }
  .course { grid-template-columns: 1fr; }
  .course__no { position: static; }
  .hero__meta dl { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; }
  .vizit__info { grid-template-columns: 1fr; }
  .ftr__cols { grid-template-columns: 1fr; }
  .setinfo__grid { grid-template-columns: 1fr; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gridline-intro { display: none; }
  .rise { opacity: 1 !important; transform: none !important; transition: none !important; }
  .drawline { transform: none !important; transition: none !important; }
  .stage__slide { transition: none; transform: none; }
  .course.active .num { animation: none; background: none; color: var(--moss); }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
