/* ============ Elvgren Gallery — style.css ============ */

:root {
  --cream: #f6ead8;
  --cream-2: #efe0c8;
  --ink: #2b1d12;
  --ink-soft: #5a4632;
  --teal: #1f6f6b;
  --teal-deep: #14504d;
  --coral: #d4574b;
  --gold: #c9973f;
  --shadow: 0 18px 40px rgba(43, 29, 18, 0.22);
  --serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --sans: "Futura", "Avenir Next", "Century Gothic", "Trebuchet MS", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--coral); color: var(--cream); }

/* film-grain canvas overlay */
#grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.10;
  z-index: 40;
  mix-blend-mode: multiply;
}

/* ---------- type helpers ---------- */
.overline {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 60% at 50% 115%, rgba(201, 151, 63, 0.28), transparent 65%),
    radial-gradient(ellipse 70% 50% at 85% -10%, rgba(31, 111, 107, 0.16), transparent 60%),
    linear-gradient(180deg, #f9f0df 0%, var(--cream) 55%, var(--cream-2) 100%);
  position: relative;
}

.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 60rem;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 0.95;
  margin: 0.5rem 0 1.4rem;
}

.hero h1 .line {
  display: block;
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--teal);
  font-style: italic;
}

.hero-sub {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 2.4rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-block;
  padding: 0.85rem 2.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-solid {
  background: var(--teal);
  color: var(--cream);
  box-shadow: 0 10px 24px rgba(20, 80, 77, 0.35);
}
.btn-solid:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(20, 80, 77, 0.45); }

.btn-ghost {
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); transform: translateY(-3px); }

/* marquee */
.marquee {
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  background: var(--teal-deep);
  color: var(--cream);
  overflow: hidden;
  padding: 0.65rem 0;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 26s linear infinite;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  font-weight: 700;
}

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

/* ============ SECTIONS ============ */
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 6.5rem 1.5rem 4rem;
}

.section-head { text-align: center; margin-bottom: 3.5rem; }

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 0.9rem;
}

.section-sub {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--ink-soft);
}

/* ---------- gallery frames ---------- */
.frames { display: flex; flex-direction: column; gap: 5rem; }

.frame {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.frame-right { flex-direction: row-reverse; }

.frame-tile {
  flex: 1.35;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateX(4deg) rotateY(-4deg) rotateZ(1deg);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  background: #fff;
  border: 10px solid #fdf8ee;
  outline: 1px solid rgba(43, 29, 18, 0.18);
}

.frame-right .frame-tile { transform: perspective(1200px) rotateX(4deg) rotateY(4deg) rotateZ(-1deg); }

.frame:hover .frame-tile {
  transform: perspective(1200px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1.02);
  box-shadow: 0 26px 60px rgba(43, 29, 18, 0.32);
}

.frame-tile img {
  display: block;
  width: 100%;
  height: auto;
}

.frame-meta { flex: 1; }

.plate-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.frame-meta h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-bottom: 0.8rem;
}

.frame-meta p { color: var(--ink-soft); max-width: 26rem; }

/* ---------- cinema / video ---------- */
.section-film {
  width: 100%;
  max-width: none;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(20, 80, 77, 0.10), transparent 70%),
    linear-gradient(180deg, var(--cream-2), var(--cream));
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
}

.cinema { max-width: 62rem; margin: 0 auto; }

.cinema-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 12px solid var(--ink);
  box-shadow: var(--shadow);
  background: #000;
}

.cinema-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.55);
}

.cinema-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.cinema-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.reel { color: var(--coral); font-weight: 700; animation: blink 1.6s steps(2, start) infinite; }

@keyframes blink { to { visibility: hidden; } }

/* ---------- story ---------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2.5rem;
}

.story-col h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.story-col p { color: var(--ink-soft); margin-bottom: 1rem; font-size: 0.97rem; }

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  background: var(--ink);
  color: var(--cream);
}

.footer-sign {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.footer-note { opacity: 0.65; font-size: 0.85rem; max-width: 30rem; margin: 0 auto 1.6rem; }

.to-top {
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}
.to-top:hover { color: var(--cream); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reel { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .frame, .frame-right { flex-direction: column; gap: 1.4rem; }
  .frame-tile, .frame-right .frame-tile { transform: none; }
  .frame:hover .frame-tile { transform: none; }
  .section { padding: 4.5rem 1.2rem 3rem; }
}
