/* ==========================================================
   Vikasitha Jaathika Ekamuthuwa — site styles
   ========================================================== */

:root {
  --night: #0f1326;
  --night-2: #161c38;
  --night-3: #1f2750;
  --gold: #f2a43a;
  --gold-2: #ffcf6b;
  --saffron: #e8862a;
  --maroon: #7d1a2a;
  --cream: #fbf6ee;
  --cream-2: #f3eadb;
  --ink: #1b1f33;
  --ink-soft: #4a4f66;
  --white: #ffffff;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(27, 31, 51, 0.1);

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 20px 50px -20px rgba(15, 19, 38, 0.35);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-body: "Noto Sans Sinhala", "Inter", system-ui, sans-serif;
  --font-display: "Noto Serif Sinhala", "Playfair Display", Georgia, serif;
  --lh: 1.8;
}

body.lang-en {
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --lh: 1.65;
}
body.lang-ta {
  --font-body: "Noto Sans Tamil", "Inter", system-ui, sans-serif;
  --font-display: "Noto Serif Tamil", "Playfair Display", Georgia, serif;
  --lh: 1.8;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: var(--lh);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open, body.modal-open { overflow: hidden; }

/* language change fade */
main > section:not(.hero), .hero-title, .hero-tagline, .hero-cta,
.site-footer, .main-nav ul, .brand-text { transition: opacity 0.16s ease; }
body.lang-fade main > section:not(.hero), body.lang-fade .hero-title, body.lang-fade .hero-tagline,
body.lang-fade .hero-cta,
body.lang-fade .site-footer, body.lang-fade .main-nav ul, body.lang-fade .brand-text { opacity: 0; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.3; margin: 0; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--night); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, color 0.3s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), var(--saffron));
  color: var(--night);
  box-shadow: 0 10px 30px -10px rgba(242, 164, 58, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(242, 164, 58, 0.85); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, 0.55); color: var(--white); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: var(--white); color: var(--night); transform: translateY(-2px); }
.btn-outline { border: 1.5px solid var(--line-light); color: var(--ink); }
.btn-outline:hover { border-color: var(--gold); color: var(--maroon); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  color: var(--white);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), height 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(15, 19, 38, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 30px -12px rgba(0, 0, 0, 0.5);
  --header-h: 66px;
}
.header-inner { max-width: 1400px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: contain;
  background: #fff; padding: 2px; box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s var(--ease), width 0.4s var(--ease), height 0.4s var(--ease);
}
.site-header.scrolled .brand-mark { width: 42px; height: 42px; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  position: relative; display: block; padding: 8px 14px; font-size: 0.95rem; font-weight: 500;
  opacity: 0.85; transition: opacity 0.2s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--gold); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.main-nav a:hover, .main-nav a.active { opacity: 1; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.lang-switch {
  display: flex; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-dark);
  backdrop-filter: blur(8px);
}
.lang-switch button {
  min-width: 42px; height: 34px; padding: 0 10px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: rgba(255, 255, 255, 0.8);
  transition: background 0.3s var(--ease), color 0.3s;
}
.lang-switch button[lang="si"] { font-family: "Noto Sans Sinhala", sans-serif; }
.lang-switch button[lang="ta"] { font-family: "Noto Sans Tamil", sans-serif; }
.lang-switch button:hover { color: var(--white); }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: var(--night); }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; position: relative; }
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(circle at 80% 0%, var(--night-3), var(--night) 70%);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
  }
  .menu-open .main-nav { opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; align-items: center; gap: 6px; }
  .main-nav a { font-family: var(--font-display); font-size: 1.6rem; padding: 10px 20px; opacity: 0;
    transform: translateY(16px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
  .menu-open .main-nav a { opacity: 1; transform: none; }
  .menu-open .main-nav li:nth-child(2) a { transition-delay: 0.05s; }
  .menu-open .main-nav li:nth-child(3) a { transition-delay: 0.1s; }
  .menu-open .main-nav li:nth-child(4) a { transition-delay: 0.15s; }
  .menu-open .main-nav li:nth-child(5) a { transition-delay: 0.2s; }
  .main-nav a::after { left: 20px; right: 20px; }
}
@media (max-width: 480px) {
  .brand-text { font-size: 0.9rem; max-width: 42vw; }
  .brand-mark, .site-header.scrolled .brand-mark { width: 38px; height: 38px; }
  .lang-switch button { min-width: 34px; padding: 0 7px; height: 32px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; color: var(--white); overflow: hidden; background: var(--night);
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(232, 134, 42, 0.35), transparent 60%),
    linear-gradient(180deg, rgba(15, 19, 38, 0.55) 0%, rgba(15, 19, 38, 0.35) 40%, rgba(15, 19, 38, 0.9) 100%);
}
.hero-content { position: relative; text-align: center; padding-top: var(--header-h); padding-bottom: 80px; will-change: transform, opacity; }
.hero-title {
  font-size: clamp(2.2rem, 7vw, 5.2rem); font-weight: 800; line-height: 1.2;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, #fff 30%, #ffe2a8 110%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.lang-ta .hero-title { font-size: clamp(1.9rem, 6vw, 4.4rem); }
.hero-tagline {
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.6vw, 1.75rem); font-weight: 600;
  color: var(--gold-2); margin: 18px auto 38px; max-width: 760px; position: relative;
}
.hero-tagline::before, .hero-tagline::after {
  content: ""; display: inline-block; width: 40px; height: 1px; background: currentColor;
  vertical-align: middle; margin: 0 14px; opacity: 0.6;
}
@media (max-width: 600px) { .hero-tagline::before, .hero-tagline::after { display: none; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.hero .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero .reveal:nth-child(2) { transition-delay: 0.25s; }
.hero .reveal:nth-child(3) { transition-delay: 0.4s; }
.hero .reveal:nth-child(4) { transition-delay: 0.55s; }

.video-controls { position: absolute; right: 24px; bottom: 28px; display: flex; gap: 8px; z-index: 2; }
.vc-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(15, 19, 38, 0.45); border: 1px solid var(--line-dark); backdrop-filter: blur(8px);
  transition: background 0.3s, transform 0.3s var(--ease);
}
.vc-btn:hover { background: rgba(242, 164, 58, 0.9); transform: scale(1.06); }
.vc-btn svg { width: 18px; height: 18px; fill: currentColor; }
.vc-btn .i-play, .vc-btn.paused .i-pause { display: none; }
.vc-btn.paused .i-play { display: block; }
.vc-btn .i-sound, .vc-btn.unmuted .i-muted { display: none; }
.vc-btn.unmuted .i-sound { display: block; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--gold-2); border-radius: 2px; animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 600px) { .scroll-cue { display: none; } .video-controls { right: 16px; bottom: 16px; } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--saffron); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; margin-bottom: 12px;
}
body.lang-en .section-eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; }
.section-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section-title { font-size: clamp(1.8rem, 4.2vw, 3rem); font-weight: 800; margin-bottom: 16px; }
body.lang-ta .section-title { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
.section-sub { color: var(--ink-soft); font-size: 1.08rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about { background: var(--cream); overflow: hidden; }
.about::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -180px; top: -120px;
  background: url("../../resource/logo.jpeg") center / contain no-repeat; opacity: 0.06; pointer-events: none;
  mix-blend-mode: multiply; filter: grayscale(1);
}
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.about-text .lead { font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.about-text p { color: var(--ink-soft); }
.about-pillars { display: grid; gap: 16px; transition-delay: 0.15s; }
.pillar {
  display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: baseline;
  padding: 24px 28px; background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--line-light); box-shadow: 0 10px 30px -22px rgba(15, 19, 38, 0.4);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.pillar:hover { transform: translateX(8px); border-color: rgba(242, 164, 58, 0.5); box-shadow: var(--shadow); }
.pillar-num { grid-row: span 2; font-family: "Playfair Display", serif; font-size: 2.2rem; font-weight: 800; color: var(--gold); line-height: 1; }
.pillar h3 { font-size: 1.35rem; color: var(--maroon); }
.pillar p { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Mission & Vision ---------- */
.mv {
  background:
    radial-gradient(circle at 10% 10%, rgba(242, 164, 58, 0.12), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(125, 26, 42, 0.4), transparent 45%),
    var(--night);
  color: var(--white);
}
.mv .section-eyebrow { color: var(--gold-2); }
.mv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.mv-card {
  position: relative; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-dark); overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s;
}
.mv-card:nth-child(2) { transition-delay: 0.12s; }
.mv-card::after {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 164, 58, 0.25), transparent 70%);
  transition: transform 0.6s var(--ease);
}
.mv-card:hover { transform: translateY(-6px); border-color: rgba(255, 207, 107, 0.4); }
.mv-card:hover::after { transform: scale(1.3); }
.mv-card h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; color: var(--gold-2); }
.mv-card p { font-size: 1.12rem; color: rgba(255, 255, 255, 0.85); margin: 0; position: relative; z-index: 1; }

@media (max-width: 760px) { .mv-grid { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.projects { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; perspective: 1200px; }
@media (max-width: 1100px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  --c1: #1f2750; --c2: #0f1326; --accent: var(--gold-2);
  border-radius: var(--radius-lg); overflow: hidden; background: var(--white);
  box-shadow: 0 18px 40px -26px rgba(15, 19, 38, 0.55);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out, box-shadow 0.4s var(--ease), opacity 0.8s var(--ease);
}
.project-grid.pending .project-card { opacity: 0; transform: translateY(40px); }
.project-grid .project-card { transition-delay: calc(var(--i) * 0.1s); }
.project-grid:not(.pending) .project-card:hover { transition-delay: 0s; }
.project-card:hover { box-shadow: 0 30px 60px -24px rgba(15, 19, 38, 0.55); }

.theme-echo  { --c1: #3a1f5c; --c2: #1a1033; --accent: #ffcf6b; }
.theme-steps { --c1: #7d1a2a; --c2: #3d0c15; --accent: #ffd59a; }
.theme-moon  { --c1: #1f2750; --c2: #0a0d1c; --accent: #ffe7a8; }
.theme-lotus { --c1: #b5541c; --c2: #6b2a0b; --accent: #fff1d0; }

.project-hit { display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left; }
.project-art {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(150deg, var(--c1), var(--c2));
  color: var(--accent);
}
.project-art svg { width: 46%; transition: transform 0.6s var(--ease); }
.project-card:hover .project-art svg { transform: scale(1.1); }
.project-art.has-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.project-card:hover .project-art.has-photo img { transform: scale(1.06); }

.project-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; position: relative; }
.project-index {
  position: absolute; top: -26px; right: 22px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); color: var(--maroon);
  font-family: "Playfair Display", serif; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 8px 20px -8px rgba(15, 19, 38, 0.4);
}
.project-meaning { font-size: 0.82rem; font-weight: 600; color: var(--saffron); margin: 0 0 6px; letter-spacing: 0.03em; }
.project-name { font-size: 1.45rem; font-weight: 800; color: var(--ink); }
body.lang-ta .project-name { font-size: 1.25rem; }
.project-alt { font-size: 0.85rem; color: var(--ink-soft); opacity: 0.75; margin: 2px 0 12px; }
.project-desc {
  font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.project-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--maroon); margin-top: auto; padding-top: 8px; align-self: flex-start; font-size: 0.95rem; }
.project-more svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.3s var(--ease); }
.project-card:hover .project-more svg { transform: translateX(5px); }

/* illustration animations */
.ring { fill: none; stroke: currentColor; stroke-width: 2.5; transform-origin: 60px 60px; animation: ring 3s var(--ease) infinite; opacity: 0; }
.r2 { animation-delay: 0.5s; } .r3 { animation-delay: 1s; }
@keyframes ring { 0% { opacity: 0; transform: scale(0.6); } 40% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.1); } }
.step { animation: step 2.4s ease-in-out infinite; opacity: 0.25; }
.s2 { animation-delay: 0.4s; } .s3 { animation-delay: 0.8s; }
@keyframes step { 0%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.sparkle { animation: twinkle 2.6s ease-in-out infinite; transform-origin: 88px 38px; }
@keyframes twinkle { 0%, 100% { opacity: 0.5; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }
.petal { transform-origin: 60px 92px; animation: bloom 4s ease-in-out infinite; }
.p1 { animation-name: bloomL; } .p2 { animation-name: bloomR; }
@keyframes bloom { 0%, 100% { transform: scaleY(0.95); } 50% { transform: scaleY(1.04); } }
@keyframes bloomL { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-3deg); } }
@keyframes bloomR { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg); } }

/* ---------- Gallery ---------- */
.gallery { background: var(--night-2); color: var(--white); overflow: hidden; }
.gallery::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 85% 15%, rgba(242, 164, 58, 0.14), transparent 40%),
              radial-gradient(circle at 10% 90%, rgba(125, 26, 42, 0.35), transparent 45%);
}
.gallery .container { position: relative; }
.gallery .section-eyebrow { color: var(--gold-2); }
.gallery .section-sub { color: rgba(255, 255, 255, 0.75); }

.album-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1100px) { .album-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .album-grid { grid-template-columns: 1fr; } }

.album-card {
  position: relative; display: block; text-align: left; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden; background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-dark);
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s var(--ease);
}
.album-card:hover { transform: translateY(-6px); border-color: rgba(255, 207, 107, 0.45); box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.8); }
.album-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.album-media img, .album-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.album-card:hover .album-media img, .album-card:hover .album-placeholder { transform: scale(1.07); }
.album-placeholder { display: grid; place-items: center; color: var(--accent); background: linear-gradient(150deg, var(--c1), var(--c2)); }
.album-placeholder svg { width: 38%; opacity: 0.9; }
/* stacked-photos look behind the cover */
.album-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 13, 28, 0.55));
}
.album-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-family: "Inter", sans-serif; font-size: 0.8rem; font-weight: 600;
  background: rgba(10, 13, 28, 0.6); backdrop-filter: blur(6px); color: #fff;
}
.album-count svg { width: 15px; height: 15px; fill: var(--gold-2); }
.album-info { padding: 18px 20px 20px; }
.album-title { font-size: 1.15rem; font-weight: 700; color: var(--white); }
.album-meta { margin: 4px 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.album-link { display: inline-block; margin-top: 10px; font-size: 0.88rem; font-weight: 600; color: var(--gold-2); }
.album-link::after { content: " →"; transition: margin 0.3s var(--ease); }
.album-card:hover .album-link::after { margin-left: 4px; }

.album-more { text-align: center; margin-top: 32px; }
.album-empty {
  text-align: center; padding: 48px 24px; border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.7);
}

/* ---------- Album view ---------- */
.album-view {
  position: fixed; inset: 0; z-index: 260; overflow-y: auto; overscroll-behavior: contain;
  background: var(--night); color: var(--white);
  opacity: 0; transform: translateY(24px); transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.album-view[hidden] { display: none; }
.album-view.open { opacity: 1; transform: none; }
.av-header {
  position: sticky; top: 0; z-index: 2; padding: 14px 0;
  background: rgba(15, 19, 38, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.av-header-inner { display: flex; align-items: center; gap: 18px; }
.av-back {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-dark); font-weight: 600; font-size: 0.92rem;
  transition: background 0.3s, color 0.3s;
}
.av-back:hover { background: var(--gold); color: var(--night); }
.av-back svg { width: 18px; height: 18px; fill: currentColor; }
.av-heading { min-width: 0; }
.av-heading h3 { font-size: clamp(1.1rem, 2.6vw, 1.6rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-heading p { margin: 0; font-size: 0.85rem; color: var(--gold-2); }
.av-body { padding-top: 28px; padding-bottom: 64px; }
.av-desc { max-width: 760px; color: rgba(255, 255, 255, 0.78); margin-bottom: 24px; white-space: pre-line; }

.av-loading { width: 100%; display: grid; place-items: center; padding: 80px 0; }
.av-loading span {
  width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--gold); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.av-error { width: 100%; text-align: center; padding: 60px 0; font-size: 2rem; color: var(--gold-2); }

/* justified photo rows: each tile grows in proportion to its aspect ratio */
.av-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.av-grid::after { content: ""; flex-grow: 999999; }
.av-photo {
  --r: 1; position: relative; overflow: hidden; border-radius: 10px; background: var(--night-3);
  flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * 240px); aspect-ratio: var(--r);
  max-height: 420px;
}
.av-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.3s; }
.av-photo:hover img { transform: scale(1.05); filter: brightness(1.08); }
.av-photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--gold);
  transition: box-shadow 0.25s;
}
.av-photo:focus-visible::after { box-shadow: inset 0 0 0 3px var(--gold); }
@media (max-width: 600px) {
  .av-grid { gap: 4px; }
  .av-photo { flex-basis: calc(var(--r) * 130px); border-radius: 6px; }
  .av-back span { display: none; }
  .av-back { padding: 10px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 310; display: grid; place-items: center;
  background: rgba(6, 8, 18, 0.94); opacity: 0; transition: opacity 0.3s var(--ease);
  padding: 64px 72px;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
#lb-img {
  max-width: 100%; max-height: calc(100vh - 180px); object-fit: contain; border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); opacity: 0; transform: scale(0.98);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
#lb-img.loaded { opacity: 1; transform: none; }
.lb-figure figcaption { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; text-align: center; }
.lb-count { color: var(--gold-2); margin-left: 8px; font-family: "Inter", sans-serif; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1); color: #fff; transition: background 0.3s, transform 0.3s var(--ease);
}
.lb-btn:hover { background: var(--gold); color: var(--night); }
.lb-btn svg { width: 24px; height: 24px; fill: currentColor; }
.lb-close { top: 16px; right: 16px; font-size: 1.8rem; line-height: 1; }
.lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.lb-next { right: 16px; top: 50%; margin-top: -24px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
@media (max-width: 600px) {
  .lightbox { padding: 64px 8px 80px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; margin-top: 0; width: 44px; height: 44px; }
  }

/* ---------- Connect ---------- */
.connect {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 207, 107, 0.18), transparent 40%),
    linear-gradient(135deg, var(--maroon) 0%, var(--night) 75%);
  color: var(--white); text-align: center;
}
.connect-inner { max-width: 980px; }
.connect .section-eyebrow { color: var(--gold-2); }
.connect .section-sub { color: rgba(255, 255, 255, 0.78); }
.social-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.social-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 36px 24px; border-radius: var(--radius-lg); overflow: hidden;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-dark);
  transition: transform 0.4s var(--ease), background 0.4s, border-color 0.4s;
}
.social-card svg { width: 52px; height: 52px; fill: currentColor; margin-bottom: 10px; transition: transform 0.4s var(--ease); }
.social-card .sc-label { font-family: "Inter", sans-serif; font-size: 1.3rem; font-weight: 700; }
.social-card .sc-handle { font-family: "Inter", sans-serif; opacity: 0.7; font-size: 0.95rem; }
.social-card .sc-cta {
  margin-top: 14px; padding: 8px 22px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.12); transition: background 0.3s, color 0.3s;
}
.social-card:hover { transform: translateY(-6px); }
.social-card:hover svg { transform: scale(1.1); }
.social-card.yt:hover { background: rgba(255, 0, 0, 0.18); border-color: rgba(255, 80, 80, 0.6); }
.social-card.yt:hover .sc-cta { background: #ff0033; color: #fff; }
.social-card.fb:hover { background: rgba(24, 119, 242, 0.2); border-color: rgba(80, 150, 255, 0.6); }
.social-card.fb:hover .sc-cta { background: #1877f2; color: #fff; }
.social-card.x:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.6); }
.social-card.x:hover .sc-cta { background: #fff; color: #000; }
.social-card.x svg { width: 44px; height: 44px; margin: 4px 0 14px; }
@media (max-width: 760px) { .social-cards { grid-template-columns: 1fr; } }
.contact-email {
  display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 32px; padding: 14px 26px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-dark);
  color: rgba(255, 255, 255, 0.85); transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.contact-email svg { width: 22px; height: 22px; fill: var(--gold-2); flex: none; transition: fill 0.3s; }
.contact-email strong { font-family: "Inter", sans-serif; font-weight: 600; color: var(--white); word-break: break-all; transition: color 0.3s; }
.contact-email:hover { background: var(--gold); border-color: var(--gold); color: var(--night); }
.contact-email:hover svg, .contact-email:hover strong { fill: var(--night); color: var(--night); }

/* ---------- Footer ---------- */
.site-footer { background: #0a0d1c; color: rgba(255, 255, 255, 0.72); padding: 48px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { font-family: var(--font-display); color: var(--white); font-size: 1.1rem; }
.footer-logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 3px; object-fit: contain; flex: none; }
.footer-brand p { margin: 2px 0 0; font-size: 0.92rem; color: var(--gold-2); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-dark); transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.footer-social a:hover { background: var(--gold); color: var(--night); transform: translateY(-3px); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.copyright { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: 0.85rem; text-align: center; }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; text-align: center; } .footer-brand { flex-direction: column; } .footer-social { justify-content: center; } }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-2), var(--saffron)); color: var(--night);
  box-shadow: 0 10px 24px -8px rgba(232, 134, 42, 0.7);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity 0.35s, transform 0.35s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 13, 28, 0.7); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s; }
.modal-panel {
  position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(30px) scale(0.97); transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-panel { opacity: 1; transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 1.6rem; line-height: 1; backdrop-filter: blur(6px);
  transition: background 0.3s, transform 0.3s var(--ease);
}
.modal-close:hover { background: rgba(255, 255, 255, 0.35); transform: rotate(90deg); }
.modal-art {
  height: 220px; display: grid; place-items: center; color: var(--accent);
  background: linear-gradient(150deg, var(--c1), var(--c2));
}
.modal-art svg { height: 70%; width: auto; }
.modal-art.has-photo { height: auto; display: block; background: var(--night); }
.modal-art.has-photo img { width: 100%; height: auto; max-height: 55vh; object-fit: cover; display: block; }
.modal-body { padding: 28px clamp(20px, 4vw, 40px) 36px; }
.modal-meaning { color: var(--saffron); font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.modal-body h3 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.modal-alt { color: var(--ink-soft); opacity: 0.75; margin: 4px 0 18px; }
#modal-desc { color: var(--ink-soft); font-size: 1.08rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 480px) { .modal-actions .btn { width: 100%; } .modal-art:not(.has-photo) { height: 170px; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
