/* ==========================================================
   Deva Pino — premium single-page site
   Design tokens
   ========================================================== */
:root {
  --bg: #FAF7F1;
  --surface: #FFFFFF;
  --ink: #17140F;
  --ink-soft: #6B6455;
  --gold: #B08D4F;
  --gold-soft: #E4D9C0;
  --gold-line: rgba(176, 141, 79, .38);
  --tg-blue: #229ED9;
  --tg-blue-deep: #1A86BD;
  --shadow-sm: 0 2px 10px rgba(23, 20, 15, .06);
  --shadow-md: 0 14px 40px rgba(23, 20, 15, .10);
  --shadow-lg: 0 24px 70px rgba(23, 20, 15, .16);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1080px;
  --container-narrow: 640px;

  --ease: cubic-bezier(.22, .8, .28, 1);
  --dur-fast: .25s;
  --dur-med: .6s;
  --dur-slow: 1.1s;
}

/* ==========================================================
   Reset
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container-narrow { max-width: var(--container-narrow); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 8px;
  z-index: 200;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================
   Type
   ========================================================== */
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .9rem;
  position: relative;
  padding-bottom: .8rem;
}
.eyebrow::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 34px; height: 1px;
  background: var(--gold-line);
}
.eyebrow-light { color: #F1E4C8; }
.eyebrow-light::after { background: rgba(241, 228, 200, .5); }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), padding var(--dur-fast) var(--ease);
}
.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  color: #fff;
  transition: color var(--dur-fast) var(--ease);
}
.wordmark.small { color: var(--ink); font-size: 1.05rem; }

.site-header.scrolled {
  background: rgba(250, 247, 241, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  padding: .8rem 0;
}
.site-header.scrolled .wordmark { color: var(--ink); }

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn-tg {
  background: linear-gradient(135deg, var(--tg-blue), var(--tg-blue-deep));
  color: #fff;
  box-shadow: 0 10px 30px rgba(34, 158, 217, .35);
}
.btn-tg:hover, .btn-tg:focus-visible { transform: translateY(-2px) scale(1.015); box-shadow: 0 16px 40px rgba(34, 158, 217, .45); }
.btn-tg:active { transform: translateY(0) scale(.99); }

.btn-lg { padding: 1.05rem 2rem; font-size: 1.02rem; }
.icon-tg { width: 20px; height: 20px; fill: #fff; flex-shrink: 0; }

.btn-tg-mini {
  background: rgba(34, 158, 217, .16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  padding: .5rem 1rem;
  font-size: .82rem;
  backdrop-filter: blur(6px);
}
.btn-tg-mini .icon-tg { width: 15px; height: 15px; }
.site-header.scrolled .btn-tg-mini {
  background: var(--tg-blue);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(34, 158, 217, .3);
}

/* Signature motif: gold path leading to the CTA */
.cta-path {
  display: flex;
  align-items: center;
  gap: .4rem;
  height: 20px;
  margin-bottom: .6rem;
}
.cta-path-center { justify-content: center; margin-inline: auto; }
.path-line {
  display: block;
  width: 64px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease);
}
.cta-path-center .path-line { transform-origin: center; }
.path-plane {
  width: 15px; height: 15px;
  fill: var(--gold);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .5s var(--ease) .5s, transform .5s var(--ease) .5s;
}
.reveal.is-visible .path-line,
.is-visible .path-line { transform: scaleX(1); }
.reveal.is-visible .path-plane,
.is-visible .path-plane { opacity: 1; transform: translateX(0); }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  will-change: transform;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 12, 8, .35) 0%, rgba(15, 12, 8, .12) 30%, rgba(15, 12, 8, .55) 78%, rgba(10, 8, 5, .86) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 1.5rem 4.5rem;
  color: #fff;
  text-align: center;
}
.hero-title {
  font-size: clamp(3rem, 14vw, 5.75rem);
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,.2);
}
.hero-subtitle {
  margin: 1.1rem auto 1.8rem;
  max-width: 30ch;
  font-size: clamp(1rem, 3.4vw, 1.15rem);
  color: rgba(255, 255, 255, .88);
}
.hero .cta-path { justify-content: center; }
.hero .btn-lg { padding: 1.15rem 2.3rem; font-size: 1.06rem; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 1;
  width: 22px; height: 36px;
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: 999px;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 999px;
  background: #fff;
  animation: cueMove 1.8s ease-in-out infinite;
}
@keyframes cueMove {
  0% { opacity: 1; transform: translateY(0); }
  60% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* ==========================================================
   About
   ========================================================== */
.about {
  padding: 6.5rem 0;
  text-align: center;
}
.about h2 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); margin-bottom: 1.4rem; }
.about-text {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}

/* ==========================================================
   Gallery
   ========================================================== */
.gallery { padding: 2rem 0 6rem; text-align: center; }
.gallery h2 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); }
.section-sub { color: var(--ink-soft); margin-top: .6rem; margin-bottom: 3rem; }

.gallery-grid {
  columns: 2;
  column-gap: .9rem;
}
.gallery-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: .9rem;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-fast) var(--ease);
}
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23,20,15,0) 60%, rgba(23,20,15,.35));
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.gallery-item img {
  width: 100%;
  transition: transform .7s var(--ease);
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item:hover::after,
.gallery-item:focus-visible::after { opacity: 1; }
.gallery-item:hover,
.gallery-item:focus-visible { box-shadow: var(--shadow-md); }

/* ==========================================================
   Telegram CTA card
   ========================================================== */
.join { padding: 2rem 0 7rem; }
.join-card {
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  border-radius: 28px;
  padding: 3.2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
}
.join-logo {
  width: 34px; height: 34px;
  fill: var(--gold);
  margin: 0 auto 1.4rem;
}
.join h2 { font-size: clamp(1.9rem, 6vw, 2.5rem); margin-bottom: .9rem; }
.join-text {
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.join .btn-lg { padding: 1.15rem 2.3rem; font-size: 1.06rem; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { padding: 3.2rem 0 3rem; border-top: 1px solid var(--gold-soft); }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}
.social-links { display: flex; gap: 1.3rem; }
.social-links a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--gold-soft);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.social-links svg { width: 18px; height: 18px; fill: currentColor; }
.social-links a:hover, .social-links a:focus-visible {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}
.copyright { color: var(--ink-soft); font-size: .85rem; }

/* ==========================================================
   Reveal on scroll
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.hero-content .reveal:nth-child(1) { transition-delay: .05s; }
.hero-content .reveal:nth-child(2) { transition-delay: .15s; }
.hero-content .reveal:nth-child(3) { transition-delay: .25s; }
.hero-content .reveal:nth-child(4) { transition-delay: .35s; }
.hero-content .reveal:nth-child(5) { transition-delay: .45s; }
.gallery-item.reveal:nth-child(1) { transition-delay: 0s; }
.gallery-item.reveal:nth-child(2) { transition-delay: .08s; }
.gallery-item.reveal:nth-child(3) { transition-delay: .16s; }
.gallery-item.reveal:nth-child(4) { transition-delay: .24s; }
.gallery-item.reveal:nth-child(5) { transition-delay: .32s; }

/* ==========================================================
   Lightbox
   ========================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 10, 7, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease);
  padding: 1.2rem;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-figure { max-width: min(90vw, 720px); max-height: 86vh; }
.lightbox-figure img {
  max-width: 100%;
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
  transform: scale(.96);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.lightbox.is-open .lightbox-figure img { transform: scale(1); opacity: 1; }

.lightbox-close, .lightbox-nav {
  position: absolute;
  color: #fff;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  transition: background var(--dur-fast) var(--ease);
}
.lightbox-close svg, .lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-close:hover, .lightbox-nav:hover,
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { background: rgba(255,255,255,.18); }
.lightbox-close { top: 1.2rem; right: 1.2rem; }
.lightbox-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ==========================================================
   Responsive — tablet / desktop
   ========================================================== */
@media (min-width: 640px) {
  .gallery-grid { columns: 3; column-gap: 1.1rem; }
  .gallery-item { margin-bottom: 1.1rem; border-radius: 22px; }
  .join-card { padding: 4rem 3rem; }
}

@media (min-width: 900px) {
  .container { padding-inline: 2.5rem; }
  .hero-content { padding-bottom: 6rem; text-align: center; }
  .about { padding: 8.5rem 0; }
  .gallery { padding: 3rem 0 8rem; }
  .join { padding: 3rem 0 9rem; }
  .join-card { padding: 5rem 4rem; }
}

/* ==========================================================
   Motion & accessibility
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  * , *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-img { transform: none !important; }
  .reveal { opacity: 1; transform: none; }
  .path-line { transform: scaleX(1); }
  .path-plane { opacity: 1; transform: none; }
}
