/* ============================================================
   JELVEH — Private Art Atelier
   Ivory & Gold Gallery Theme
   ============================================================ */

:root {
  --ivory: #faf7f0;
  --ivory-2: #f3eee2;
  --cream: #ede5d3;
  --gold: #b9924c;
  --gold-light: #d4b877;
  --gold-deep: #96733a;
  --ink: #23201a;
  --ink-soft: #5a5346;
  --white: #fffdf8;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --display: 'Playfair Display', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.7;
  font-weight: 300;
}

::selection { background: var(--gold); color: var(--white); }

/* ---------- Scroll progress bar ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  z-index: 2000;
}

/* ---------- Grain overlay for cinematic texture ---------- */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%;
  pointer-events: none; z-index: 1500; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(10) infinite;
}
@keyframes grainShift {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); }
  60% { transform: translate(-2%,-2%); }
  80% { transform: translate(3%,3%); }
}

/* ---------- Navigation ---------- */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 4vw;
  transition: background .5s ease, box-shadow .5s ease, padding .5s ease;
}
header.nav.scrolled {
  background: rgba(250, 247, 240, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(185,146,76,.25);
  padding: 1rem 4vw;
}
.brand {
  font-family: var(--display); font-size: 1.9rem; letter-spacing: .35em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  display: flex; align-items: baseline; gap: 0;
}
.brand em { font-style: normal; color: var(--gold); }
.brand small {
  font-family: var(--sans); font-size: .55rem; letter-spacing: .45em;
  color: var(--ink-soft); text-transform: uppercase; margin-left: 1rem;
}
nav.links { display: flex; gap: 2.6rem; align-items: center; }
nav.links a {
  color: var(--ink); text-decoration: none; font-size: .78rem;
  letter-spacing: .28em; text-transform: uppercase; position: relative;
  padding: .3rem 0; transition: color .3s;
}
nav.links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width .45s cubic-bezier(.22,1,.36,1);
}
nav.links a:hover, nav.links a.active { color: var(--gold-deep); }
nav.links a:hover::after, nav.links a.active::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--gold) !important; padding: .55rem 1.5rem !important;
  color: var(--gold-deep) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--gold); color: var(--white) !important; }

/* Burger */
.burger { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1101; background: none; border: none; }
.burger span { width: 28px; height: 1.5px; background: var(--ink); transition: .4s; }
.mobile-menu {
  position: fixed; inset: 0; background: var(--ivory); z-index: 1100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2.2rem; transform: translateY(-100%); transition: transform .65s cubic-bezier(.77,0,.18,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--display); font-size: 2rem; color: var(--ink);
  text-decoration: none; letter-spacing: .15em;
}
.mobile-menu a:hover { color: var(--gold); }

/* ---------- Hero (cinematic) ---------- */
.hero {
  position: relative; height: 100vh; min-height: 640px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.hero-media {
  position: absolute; inset: -12% 0; z-index: 0;
  background-size: cover; background-position: center;
  will-change: transform; animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1) translateY(0); } to { transform: scale(1.12) translateY(-2%); } }
.hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(35,32,26,.45) 0%, rgba(35,32,26,.25) 40%, rgba(250,247,240,.0) 68%, var(--ivory) 100%);
}
.hero-inner { position: relative; z-index: 2; color: var(--white); padding: 0 6vw; max-width: 1100px; }
.hero .kicker { color: var(--gold-light); }
.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.8rem, 7.5vw, 6.4rem); line-height: 1.05; letter-spacing: .02em;
  margin: 1.4rem 0 1.8rem; text-shadow: 0 2px 40px rgba(0,0,0,.35);
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: inline-block; transform: translateY(110%); animation: riseUp 1.3s cubic-bezier(.22,1,.36,1) forwards; }
.hero h1 .line:nth-child(2) span { animation-delay: .18s; }
.hero h1 .line:nth-child(3) span { animation-delay: .36s; }
@keyframes riseUp { to { transform: translateY(0); } }
.hero p.lede {
  font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-style: italic; opacity: 0; animation: fadeSoft 1.6s ease .8s forwards;
  text-shadow: 0 1px 20px rgba(0,0,0,.4);
}
@keyframes fadeSoft { to { opacity: .95; } }
.hero-actions { margin-top: 2.6rem; display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; opacity: 0; animation: fadeSoft 1.4s ease 1.15s forwards; }
.scroll-cue {
  position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .7rem;
  color: var(--white); font-size: .62rem; letter-spacing: .4em; text-transform: uppercase;
  opacity: 0; animation: fadeSoft 1.5s ease 1.6s forwards;
}
.scroll-cue .wheel {
  width: 1px; height: 56px; background: rgba(255,255,255,.5); position: relative; overflow: hidden;
}
.scroll-cue .wheel::after {
  content: ''; position: absolute; top: -40%; left: 0; width: 100%; height: 40%;
  background: var(--gold-light); animation: cueDrop 1.9s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes cueDrop { to { top: 110%; } }
@media (max-height: 860px) { .scroll-cue { display: none; } }

/* Inner-page hero (shorter) */
.hero.short { height: 72vh; min-height: 520px; }

/* ---------- Typography helpers ---------- */
.kicker {
  font-size: .68rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--gold-deep); display: inline-flex; align-items: center; gap: 1rem;
}
.kicker::before, .kicker.center::after { content: ''; width: 42px; height: 1px; background: var(--gold); }
h2.display {
  font-family: var(--display); font-weight: 500; color: var(--ink);
  font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.14; margin: 1.1rem 0 1.4rem;
}
h2.display em { font-style: italic; color: var(--gold-deep); }
.prose { color: var(--ink-soft); font-size: 1.02rem; max-width: 62ch; }
.prose p + p { margin-top: 1.1em; }
.serif-lede { font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: var(--ink); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-size: .74rem;
  letter-spacing: .32em; text-transform: uppercase; padding: 1.05rem 2.6rem;
  transition: all .45s cubic-bezier(.22,1,.36,1); cursor: pointer; font-family: var(--sans);
}
.btn-gold { background: var(--gold); color: var(--white); border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(150,115,58,.55); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.65); }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.btn-outline { background: transparent; color: var(--gold-deep); border: 1px solid var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--white); }

/* ---------- Layout ---------- */
section { position: relative; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 5vw; }
.section-pad { padding: 8.5rem 0; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(56px); transition: opacity 1.1s cubic-bezier(.22,1,.36,1), transform 1.1s cubic-bezier(.22,1,.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-64px); transition: all 1.2s cubic-bezier(.22,1,.36,1); }
.reveal-right { opacity: 0; transform: translateX(64px); transition: all 1.2s cubic-bezier(.22,1,.36,1); }
.reveal-left.visible, .reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(.92); transition: all 1.3s cubic-bezier(.22,1,.36,1); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }
[data-delay="1"] { transition-delay: .15s; } [data-delay="2"] { transition-delay: .3s; }
[data-delay="3"] { transition-delay: .45s; } [data-delay="4"] { transition-delay: .6s; }

/* ---------- Split intro ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.frame {
  position: relative; overflow: hidden;
}
.frame::before {
  content: ''; position: absolute; inset: 1.2rem; border: 1px solid rgba(255,253,248,.55);
  z-index: 2; pointer-events: none;
}
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.08); transition: transform 1.6s cubic-bezier(.22,1,.36,1); will-change: transform; }
.frame:hover img { transform: scale(1.0); }
.frame.tall { aspect-ratio: 3/4; }
.frame.wide { aspect-ratio: 16/10; }
.frame-caption {
  margin-top: 1rem; font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- Discipline cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem; margin-top: 3.6rem; }
.card {
  position: relative; overflow: hidden; aspect-ratio: 3/4.1; display: block; text-decoration: none;
  background: var(--cream);
}
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.22,1,.36,1), filter 1s; }
.card:hover img { transform: scale(1.09); filter: brightness(.85); }
.card .veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(28,24,18,.82)); }
.card .card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.8rem; color: var(--white); }
.card .num { font-family: var(--serif); font-style: italic; color: var(--gold-light); font-size: .95rem; letter-spacing: .1em; }
.card h3 { font-family: var(--display); font-weight: 500; font-size: 1.55rem; margin: .4rem 0 .5rem; }
.card p { font-size: .82rem; opacity: .85; line-height: 1.55; }
.card .go {
  display: inline-block; margin-top: .9rem; font-size: .62rem; letter-spacing: .35em;
  text-transform: uppercase; color: var(--gold-light); border-bottom: 1px solid var(--gold-light);
  padding-bottom: .25rem; opacity: 0; transform: translateY(8px); transition: all .5s ease .1s;
}
.card:hover .go { opacity: 1; transform: translateY(0); }

/* ---------- Parallax quote band ---------- */
.band {
  position: relative; min-height: 72vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center; color: var(--white);
}
.band .band-bg {
  position: absolute; inset: -20% 0; background-size: cover; background-position: center;
  will-change: transform; z-index: 0;
}
.band .band-veil { position: absolute; inset: 0; background: rgba(30,26,19,.6); z-index: 1; }
.band .band-inner { position: relative; z-index: 2; max-width: 900px; padding: 6rem 6vw; }
.band blockquote { font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 3.4vw, 2.7rem); line-height: 1.45; font-weight: 400; }
.band cite { display: block; margin-top: 2rem; font-family: var(--sans); font-style: normal; font-size: .7rem; letter-spacing: .45em; text-transform: uppercase; color: var(--gold-light); }

/* ---------- Founder teaser ---------- */
.founder { background: var(--ivory-2); }
.founder .portrait-wrap { position: relative; }
.founder .portrait-wrap::after {
  content: ''; position: absolute; top: 2rem; left: 2rem; right: -2rem; bottom: -2rem;
  border: 1px solid var(--gold); z-index: -1;
}
.sig { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--gold-deep); margin-top: 1.6rem; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 2rem; text-align: center; padding: 4.5rem 0; border-top: 1px solid rgba(185,146,76,.3); border-bottom: 1px solid rgba(185,146,76,.3); }
.stat .n { font-family: var(--display); font-size: 3rem; color: var(--gold-deep); }
.stat .l { font-size: .68rem; letter-spacing: .35em; text-transform: uppercase; color: var(--ink-soft); margin-top: .4rem; }

/* ---------- Testimonials ---------- */
.quote-card { background: var(--white); border: 1px solid rgba(185,146,76,.25); padding: 2.6rem; position: relative; }
.quote-card::before { content: '\201C'; font-family: var(--display); font-size: 5rem; color: var(--gold-light); position: absolute; top: .6rem; left: 1.6rem; line-height: 1; opacity: .5; }
.quote-card p { font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--ink); position: relative; }
.quote-card .who { margin-top: 1.4rem; font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-deep); }

/* ---------- Course sections (courses.html) ---------- */
.course { display: grid; grid-template-columns: 1.05fr .95fr; gap: 5rem; align-items: center; padding: 6.5rem 0; }
.course:nth-child(even) .course-media { order: 2; }
.course + .course { border-top: 1px solid rgba(185,146,76,.22); }
.course-media { position: relative; }
.course-media .frame { box-shadow: 0 40px 80px -40px rgba(35,32,26,.4); }
.course-detail { list-style: none; margin-top: 2rem; }
.course-detail li {
  display: flex; justify-content: space-between; gap: 2rem; padding: .85rem 0;
  border-bottom: 1px solid rgba(185,146,76,.22); font-size: .86rem;
}
.course-detail li b { font-weight: 500; letter-spacing: .18em; text-transform: uppercase; font-size: .68rem; color: var(--gold-deep); align-self: center; white-space: nowrap; }
.course-detail li span { color: var(--ink-soft); text-align: right; }

/* ---------- Gallery ---------- */
.masonry { columns: 3; column-gap: 1.4rem; }
.masonry .g-item { break-inside: avoid; margin-bottom: 1.4rem; position: relative; overflow: hidden; display: block; }
.masonry img { width: 100%; display: block; transition: transform 1.3s cubic-bezier(.22,1,.36,1); }
.g-item:hover img { transform: scale(1.06); }
.g-item .g-label {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1.4rem;
  background: linear-gradient(180deg, transparent 55%, rgba(28,24,18,.75));
  color: var(--white); font-family: var(--serif); font-style: italic; font-size: 1.05rem;
  opacity: 0; transition: opacity .6s;
}
.g-item:hover .g-label { opacity: 1; }

/* Horizontal cinematic strip */
.h-strip { overflow: hidden; padding: 4rem 0; }
.h-track { display: flex; gap: 1.6rem; will-change: transform; }
.h-track .frame { flex: 0 0 clamp(260px, 30vw, 420px); aspect-ratio: 3/4; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
.field { margin-bottom: 1.8rem; }
.field label { display: block; font-size: .66rem; letter-spacing: .35em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .6rem; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(185,146,76,.45);
  padding: .8rem 0; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); outline: none;
  transition: border-color .4s; border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-deep); }
.field textarea { resize: vertical; min-height: 120px; }
.info-line { display: flex; gap: 1.4rem; padding: 1.5rem 0; border-bottom: 1px solid rgba(185,146,76,.22); align-items: baseline; }
.info-line b { font-size: .66rem; letter-spacing: .35em; text-transform: uppercase; color: var(--gold-deep); min-width: 110px; font-weight: 500; }
.info-line span, .info-line a { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.info-line a:hover { color: var(--gold-deep); }

/* ---------- Footer ---------- */
footer {
  background: var(--ink); color: rgba(255,253,248,.75); margin-top: 6rem;
}
footer .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 3rem; padding: 5rem 0 3.4rem; }
footer .brand { color: var(--white); font-size: 1.5rem; }
footer h4 { font-size: .66rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 1.3rem; font-weight: 500; }
footer a { color: rgba(255,253,248,.75); text-decoration: none; display: block; padding: .3rem 0; font-size: .9rem; transition: color .3s; }
footer a:hover { color: var(--gold-light); }
footer p { font-size: .9rem; }
.foot-bottom {
  border-top: 1px solid rgba(255,253,248,.12); padding: 1.6rem 0;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,253,248,.45);
}

/* ---------- Page transition veil ---------- */
.page-veil {
  position: fixed; inset: 0; background: var(--ivory); z-index: 3000; pointer-events: none;
  transform-origin: top; animation: veilUp 1s cubic-bezier(.77,0,.18,1) .05s forwards;
}
@keyframes veilUp { to { transform: scaleY(0); } }

/* ---------- Nav over hero (transparent state = light text) ---------- */
header.nav:not(.scrolled) .brand { color: var(--white); }
header.nav:not(.scrolled) .brand small { color: rgba(255,253,248,.75); }
header.nav:not(.scrolled) nav.links a { color: var(--white); }
header.nav:not(.scrolled) nav.links a:hover,
header.nav:not(.scrolled) nav.links a.active { color: var(--gold-light); }
header.nav:not(.scrolled) .nav-cta { border-color: rgba(255,255,255,.75) !important; color: var(--white) !important; }
header.nav:not(.scrolled) .nav-cta:hover { background: var(--gold); border-color: var(--gold) !important; }
header.nav:not(.scrolled) .burger span { background: var(--white); }
.mobile-menu.open ~ * .burger span, body:has(.mobile-menu.open) .burger span { background: var(--ink) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  nav.links { display: none; }
  .burger { display: flex; }
  .split, .course, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .course:nth-child(even) .course-media { order: 0; }
  .masonry { columns: 2; }
  footer .foot-grid { grid-template-columns: 1fr 1fr; }
  .section-pad { padding: 5.5rem 0; }
}
@media (max-width: 600px) {
  .masonry { columns: 1; }
  footer .foot-grid { grid-template-columns: 1fr; }
  .brand { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
