@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #151312;
  --surface: #1e1b19;
  --surface-2: #262220;
  --ink: #ede6dc;
  --muted: #948a7e;
  --accent: #8a2a22;
  --accent-bright: #b23b2e;
  --hairline: rgba(237, 230, 220, 0.12);

  --display: 'Fraunces', serif;
  --body: 'Work Sans', sans-serif;

  --measure: 62ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: linear-gradient(135deg, #1a1512 0%, #151312 45%, #100e0e 100%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-fx::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 55% 45% at 12% 18%, rgba(138, 42, 34, 0.16), transparent 60%),
    radial-gradient(ellipse 45% 40% at 88% 78%, rgba(104, 96, 128, 0.12), transparent 62%),
    radial-gradient(ellipse 40% 35% at 80% 10%, rgba(178, 59, 46, 0.08), transparent 60%);
  filter: blur(60px);
}

.bg-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#starCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease-out;
  will-change: transform;
}

.nav,
.hero,
main {
  position: relative;
  z-index: 1;
}

/* ---------- Background ribbons ---------- */

.ribbons {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.1;
  transition: opacity 0.15s linear;
  will-change: opacity;
}

.ribbons__row {
  position: absolute;
  left: 0;
  width: 100%;
  height: 210px;
  overflow: hidden;
  filter: grayscale(0.4) contrast(1.05);
}

.ribbons__row--1 {
  top: 12%;
}
.ribbons__row--2 {
  top: 44%;
}
.ribbons__row--3 {
  top: 76%;
}

.ribbons__track {
  display: flex;
  gap: 14px;
  width: max-content;
  height: 100%;
  will-change: transform;
  transform: translateZ(0);
}

.ribbons__row--1 .ribbons__track {
  animation: ribbon-left 50s linear infinite;
}
.ribbons__row--2 .ribbons__track {
  animation: ribbon-right 62s linear infinite;
}
.ribbons__row--3 .ribbons__track {
  animation: ribbon-left 74s linear infinite;
}

.ribbons__track img {
  height: 100%;
  width: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

@keyframes ribbon-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes ribbon-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ribbons__track {
    animation: none !important;
  }
}

a {
  color: inherit;
}

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

.wrap {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav__brand {
  display: flex;
  align-items: center;
}

@media (min-width: 701px) {
  /* Desktop only: links stay centered like before, logo floats independently in the corner */
  .nav {
    justify-content: center;
  }
  .nav__brand {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
  }
  .nav__brand img {
    height: 46px;
  }
}

.nav__brand img {
  height: 38px;
  width: auto;
  display: block;
}

.nav__group {
  display: flex;
  align-items: center;
  gap: 44px;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  overflow: hidden;
  transition: color 0.25s ease;
}

.nav__link span {
  position: relative;
  z-index: 1;
}

.nav__link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(237, 230, 220, 0.16), transparent 72%);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--ink);
}

.nav__link:hover::before,
.nav__link:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.nav__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.25s ease;
}

@media (max-width: 700px) {
  .nav {
    padding: 12px 14px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .nav__brand img {
    height: 28px;
  }
  .nav__group {
    gap: 6px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .nav__link {
    padding: 7px 10px;
  }
  .nav__cta {
    padding: 7px 12px;
  }
  .hero {
    padding-top: 150px;
  }
  /* Mobile keeps the logo at its own spot, independent of the desktop
     base rule: margin-top:auto + margin-bottom:18vh lands it near the
     vertical center. */
  .hero__content {
    margin-top: auto;
    margin-bottom: 18vh;
  }
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background: var(--accent-bright);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  /* No margins here: the hero centers this block vertically via
     justify-content:center (the original look). Mobile sets its own
     margins in the max-width:700px block, so it is unaffected. */
}

.hero__logo {
  width: clamp(110px, 16vw, 170px);
  height: auto;
  margin: 0;
  filter: drop-shadow(0 0 20px rgba(148, 138, 126, 0.4));
  opacity: 0;
  animation: logoIn 1.4s ease forwards 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo {
    animation: none;
    opacity: 1;
  }
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero__sub {
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}


/* ---------- Section shell ---------- */

section {
  padding: 56px 0;
}

.section__eyebrow {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 44px;
}

.section__heading {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 28px;
}

/* ---------- About ---------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 56px;
  align-items: center;
}

.about__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) contrast(1.05);
}

.about__prose {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: var(--measure);
  margin: 0 0 20px;
}

.about__prose:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about__media {
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ---------- Gallery ---------- */

.carousel {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  /* Full-bleed breakout: .wrap is centered with a max-width, so a plain
     negative margin only cancels its padding, not its own side gutters
     on wide screens. width:100vw + this margin makes the carousel span
     the true viewport edge to edge regardless of the parent. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel + .carousel {
  margin-top: 14px;
}

.carousel:active {
  cursor: grabbing;
}

.carousel__track {
  display: flex;
  gap: 14px;
  width: max-content;
}

.gallery__item {
  position: relative;
  flex: 0 0 auto;
  width: 260px;
  height: 330px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  -webkit-user-drag: none;
}

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

.nav a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .gallery__item {
    width: 190px;
    height: 240px;
  }
  .gallery__caption {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(to top, rgba(10, 9, 8, 0.92), transparent);
  }
}

.gallery__item img {
  -webkit-user-drag: none;
  pointer-events: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.05);
}

.gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(10, 9, 8, 0.75), transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery__item:hover .gallery__caption,
.gallery__item:focus-visible .gallery__caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery__caption span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 8, 0.92);
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 84vh;
  width: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox__caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 28px;
  right: 32px;
  background: none;
  border: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  color: var(--accent-bright);
}

/* ---------- Mid-page CTA ---------- */

.mid-cta__text {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  max-width: 40ch;
  margin: 0 auto 28px;
}

.mid-cta__text--big {
  font-family: var(--body);
  font-style: normal;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 600;
  max-width: none;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */

.faq__list {
  border-top: 1px solid var(--hairline);
}

.faq__item {
  border-bottom: 1px solid var(--hairline);
  padding: 22px 0;
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font-family: var(--body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: '+';
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform 0.25s ease;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item summary:hover,
.faq__item summary:focus-visible {
  color: var(--ink);
}

.faq__item p {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  max-width: var(--measure);
  margin: 16px 0 0;
}

/* ---------- Contact ---------- */

.contact {
  text-align: center;
}

.contact--tight {
  padding-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 36px;
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--body);
  font-size: 14px;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(138, 42, 34, 0.35);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--accent-bright);
  box-shadow: 0 12px 36px rgba(178, 59, 46, 0.45);
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(138, 42, 34, 0.35);
}

.contact__icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.contact__icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.contact__icons a:hover,
.contact__icons a:focus-visible {
  color: var(--ink);
  border-color: var(--accent-bright);
  transform: translateY(-2px);
}

.contact__icons svg {
  width: 18px;
  height: 18px;
}

.contact__vk {
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  padding: 40px 32px 48px;
  border-top: 1px solid var(--hairline);
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}

.footer__copy {
  margin: 0;
}

.footer__link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--ink);
}

/* ---------- Legal page ---------- */

.legal {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 130px;
  padding-bottom: 80px;
}

.legal__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 8px;
}

.legal__meta {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 32px;
}

.legal__h {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 32px 0 10px;
}

.legal__p {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 14px;
}

.legal__a {
  color: var(--accent-bright);
  text-decoration: none;
}

.legal__a:hover,
.legal__a:focus-visible {
  text-decoration: underline;
}

.legal__back {
  margin-top: 36px;
}
