@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #EDEAE2;
  --ink: #161412;
  --muted: #4A453F;
  --accent: #5B3DF5;
  --accent-2: #E8A33D;
  --accent-soft: #E8E3FB;
  --line: #D8D3C8;
  --card: #F8F6F0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}
h1, h2 { font-family: 'Fraunces', serif; font-weight: 400; letter-spacing: -0.02em; margin: 0 0 20px; }
h1 { font-size: clamp(40px, 6vw, 88px); line-height: 1; }
h2 { font-size: clamp(28px, 4vw, 44px); }
p { color: var(--muted); }
a { color: var(--ink); }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 64px; position: sticky; top: 0; z-index: 50;
  background: rgba(237, 234, 226, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color 250ms ease, box-shadow 250ms ease, padding 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 24px rgba(22, 20, 18, 0.06); padding-top: 16px; padding-bottom: 16px; }
.site-logo { font-family: 'Fraunces', serif; font-weight: 600; font-size: 20px; text-decoration: none; color: var(--ink); }
.site-nav { display: flex; gap: 36px; }
.site-nav-item { position: relative; }
.site-nav-item > a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink);
  position: relative; padding-bottom: 3px;
}
.site-nav-item > a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px; background: var(--accent);
  transition: right 200ms ease;
}
.site-nav-item > a:hover { color: var(--ink); }
.site-nav-item > a:hover::after { right: 0; }
.site-nav-dropdown {
  display: none; position: absolute; top: 28px; left: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 0; min-width: 180px; z-index: 10;
}
.site-nav-dropdown a { display: block; padding: 8px 16px; text-decoration: none; font-size: 14px; color: var(--ink); }
.site-nav-dropdown a:hover { color: var(--accent); }
.site-nav-item.has-children:hover .site-nav-dropdown,
.site-nav-item.has-children:focus-within .site-nav-dropdown { display: block; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none;
  padding: 16px 30px; font-size: 15px; font-weight: 500; transition: background 250ms, transform 150ms, box-shadow 250ms;
  position: relative;
}
.btn:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(91, 61, 245, 0.28); }
.btn:active { transform: translateY(0); }
.btn--outline { background: none; color: var(--ink); border: 1px solid var(--ink); padding: 15px 29px; }
.btn--outline:hover { background: var(--ink); color: var(--bg); box-shadow: 0 10px 24px rgba(22, 20, 18, 0.18); }

/* ---------- Sections (generic spacing) ---------- */
.site-section { padding: 40px 64px; max-width: 1400px; margin: 0 auto; }

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: flex-start; gap: 48px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 90px;
  position: relative; isolation: isolate; overflow: visible;
}
.hero::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: -160px; left: -12%; width: 78%; height: 720px;
  background:
    radial-gradient(circle at 28% 32%, rgba(91, 61, 245, 0.30), transparent 58%),
    radial-gradient(circle at 72% 62%, rgba(232, 163, 61, 0.26), transparent 55%),
    conic-gradient(from 0deg at 50% 50%, rgba(91, 61, 245, 0.14), rgba(232, 163, 61, 0.14), rgba(91, 61, 245, 0.14));
  filter: blur(70px); animation: hero-aurora 26s linear infinite;
}
@keyframes hero-aurora { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero-copy { flex: 1 1 520px; min-width: 300px; position: relative; z-index: 1; }
.hero-copy h1, .hero-copy .hero-sub, .hero-copy p, .hero-copy .btn {
  opacity: 0; transform: translateY(14px); animation: hero-rise 700ms ease forwards;
}
.hero-copy h1 { animation-delay: 60ms; }
.hero-copy .hero-sub { animation-delay: 180ms; }
.hero-copy p:not(.hero-sub) { animation-delay: 260ms; }
.hero-copy .btn { animation-delay: 340ms; }
@keyframes hero-rise { to { opacity: 1; transform: translateY(0); } }
.hero-sub { font-size: 19px; }
.hero-visual {
  flex: 0 0 460px; height: 520px; position: relative; border-radius: 20px; overflow: hidden;
  background: var(--card); box-shadow: 0 24px 60px rgba(22, 20, 18, 0.14);
}
.hero-visual::before {
  content: ''; position: absolute; inset: -40%; z-index: 0;
  background: conic-gradient(from 120deg, var(--accent), var(--accent-2), var(--accent));
  opacity: 0.16; filter: blur(60px);
}
.hero-visual-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity 700ms ease, transform 700ms ease; z-index: 1;
}
.hero-visual-img.is-active { opacity: 1; }

/* ---------- Hero gallery strip (replaces hero-visual when a gallery is merged in) ---------- */
.hero-gallery-strip {
  flex: 0 0 300px; height: 560px; display: flex; flex-direction: column; align-items: center; gap: 34px;
  overflow-y: auto; overflow-x: visible; scroll-snap-type: y proximity;
  cursor: grab; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none; position: relative; z-index: 1;
  padding: 20px 30px 40px; margin: -20px -30px -40px;
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
.hero-gallery-strip::-webkit-scrollbar { display: none; }
.hero-gallery-strip.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.hero-gallery-strip.is-dragging .hero-gallery-frame { transition: none; }
.hero-gallery-frame {
  flex: 0 0 auto; width: 240px; scroll-snap-align: center; position: relative; cursor: zoom-in;
  background: #fff; padding: 10px 10px 24px; border-radius: 10px;
  box-shadow: 0 18px 40px rgba(22, 20, 18, 0.20);
  transition: transform 380ms cubic-bezier(0.22, 0.9, 0.3, 1), box-shadow 300ms ease;
}
.hero-gallery-frame:nth-child(4n+1) { transform: rotate(-5deg) translateX(-8px); }
.hero-gallery-frame:nth-child(4n+2) { transform: rotate(4deg) translateX(12px); }
.hero-gallery-frame:nth-child(4n+3) { transform: rotate(-3deg) translateX(3px); }
.hero-gallery-frame:nth-child(4n) { transform: rotate(5deg) translateX(-10px); }
.hero-gallery-frame:hover {
  transform: rotate(0deg) translateX(0) scale(1.06); z-index: 2; box-shadow: 0 26px 54px rgba(22, 20, 18, 0.28);
}
.hero-gallery-frame img {
  width: 100%; height: auto; max-height: 320px; object-fit: contain; display: block; border-radius: 3px; background: var(--line-soft);
}
@media (max-width: 720px) {
  .hero-gallery-strip { flex-basis: 100%; height: 420px; padding: 20px 12px 40px; margin: -20px -12px -40px; }
  .hero-gallery-frame { width: 190px; }
  .hero-gallery-frame:nth-child(4n+1) { transform: rotate(-3deg) translateX(-4px); }
  .hero-gallery-frame:nth-child(4n+2) { transform: rotate(2deg) translateX(6px); }
  .hero-gallery-frame:nth-child(4n+3) { transform: rotate(-2deg) translateX(2px); }
  .hero-gallery-frame:nth-child(4n) { transform: rotate(3deg) translateX(-5px); }
}

/* ---------- About ---------- */
.about-block { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 70px 64px; }
.about-block .about-image-wrap { position: relative; }
.about-block .about-image-wrap::before {
  content: ''; position: absolute; top: -24px; left: -24px; right: 24px; bottom: 24px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 65%); border-radius: 16px; z-index: 0;
}
.about-image { border-radius: 14px; width: 100%; height: auto; display: block; position: relative; z-index: 1; }
@media (max-width: 800px) { .about-block { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; padding: 0 64px 70px; }
.gallery-grid figure { margin: 0; }
.gallery-grid .gallery-frame {
  border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--card);
  box-shadow: 0 1px 2px rgba(22,20,18,0.04);
}
.gallery-grid img { border-radius: 0; width: 100%; height: auto; display: block; transition: transform 450ms ease; }
.gallery-grid .gallery-frame:hover img { transform: scale(1.06); }
.gallery-grid figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(16, 14, 11, 0.92); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 40px;
  opacity: 0; pointer-events: none; transition: opacity 220ms ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 90vw; max-height: 78vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox figcaption { color: #EDEAE2; text-align: center; margin-top: 16px; font-size: 14px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,0.08); color: #EDEAE2; border: none; cursor: pointer;
  border-radius: 50%; width: 44px; height: 44px; font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background 150ms ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.18); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox-prev, .lightbox-next { width: 38px; height: 38px; } }

/* ---------- CTA ---------- */
.cta-block {
  text-align: center; padding: 90px 64px; margin: 20px 64px 60px; border-radius: 22px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #17151f 0%, #241f38 55%, #17151f 100%); color: #EDEAE2;
}
.cta-block::before {
  content: ''; position: absolute; top: -30%; right: -10%; width: 60%; height: 160%;
  background: radial-gradient(circle, rgba(91,61,245,0.35), transparent 65%); pointer-events: none;
}
.cta-block h2, .cta-block p { color: #EDEAE2; position: relative; z-index: 1; }
.cta-block .btn { position: relative; z-index: 1; background: #fff; color: #161412; }
.cta-block .btn:hover { background: var(--accent); color: #fff; }
@media (max-width: 720px) { .cta-block { margin-left: 24px; margin-right: 24px; padding: 60px 28px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 64px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .site-header, .site-section, .about-block, .gallery-grid { padding-left: 24px; padding-right: 24px; }
  .site-nav { gap: 20px; flex-wrap: wrap; }
  .hero-visual { flex-basis: 100%; height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual-img { transition: none; }
  .hero-copy h1, .hero-copy .hero-sub, .hero-copy p, .hero-copy .btn { animation: none; opacity: 1; transform: none; }
}
