/* =========================================================
   Irina Ginj — Painter
   Palette : gallery-white paper, warm ink, deep sage accent,
             soft multi-pigment watercolour washes (signature)
   Type    : Cormorant Garamond (display) + Hanken Grotesk (body)
   ========================================================= */

:root {
  --paper:   #F5F4F0;
  --ink:     #1C1C19;
  --soft-ink:#46453F;
  --stone:   #8A887F;
  --line:    #E3E1DA;
  --accent:  #5E6B57;

  --wash-blue:  #A9BBC9;
  --wash-rose:  #D9B5AE;
  --wash-sage:  #B3C2A4;
  --wash-ochre: #DCC9A0;

  --measure: 38rem;
  --gutter: clamp(1.5rem, 5vw, 6rem);
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Shared type devices ---------- */
.eyebrow,
.hero__eyebrow,
.intro__open-eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stone);
}

.section__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.s-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.s-word > span { display: inline-block; will-change: transform; }

/* ---------- Watercolour washes ---------- */
.washes { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: multiply;
  will-change: transform;
}
.wash--blue  { width: 46vw; height: 46vw; top: -8vw;  left: -6vw;
               background: radial-gradient(circle at 35% 35%, var(--wash-blue), transparent 68%); }
.wash--rose  { width: 40vw; height: 40vw; top: 22vh;  right: -10vw;
               background: radial-gradient(circle at 50% 40%, var(--wash-rose), transparent 66%); }
.wash--sage  { width: 50vw; height: 50vw; top: 120vh; left: -12vw;
               background: radial-gradient(circle at 50% 50%, var(--wash-sage), transparent 66%); }
.wash--ochre { width: 38vw; height: 38vw; top: 180vh; right: -8vw;
               background: radial-gradient(circle at 50% 50%, var(--wash-ochre), transparent 66%); }

.nav, main, .footer { position: relative; z-index: 1; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, padding 0.4s ease;
}
/* hidden during the intro dive only when JS + motion are on
   (opacity only — GSAP owns the transform, so it has no stray translate to inherit) */
html.js:not(.reduced) .nav { opacity: 0; }
.nav.is-scrolled { padding-top: 1rem; padding-bottom: 1rem; border-bottom-color: var(--line); }
.nav__mark { font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.02em; }
.nav__links { display: flex; gap: clamp(1.1rem, 3vw, 2.6rem); font-size: 0.82rem; letter-spacing: 0.06em; }
.nav__links a { position: relative; color: var(--stone); transition: color 0.3s ease; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

.nav__toggle {
  display: none; position: relative;
  width: 30px; height: 18px;
  background: none; border: 0; padding: 0; cursor: pointer; z-index: 70;
}
.nav__toggle span { position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--ink); transition: transform 0.4s ease, opacity 0.3s ease; }
.nav__toggle span:nth-child(1) { top: 3px; }
.nav__toggle span:nth-child(2) { bottom: 3px; }
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(5.25px) rotate(45deg); }
body.menu-open .nav__toggle span:nth-child(2) { transform: translateY(-5.25px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
  gap: 2.5rem; padding: var(--gutter);
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
body.menu-open .menu { opacity: 1; visibility: visible; }
.menu__links { display: flex; flex-direction: column; gap: 0.4rem; }
.menu__links a { font-family: var(--display); font-size: clamp(2.6rem, 14vw, 4.5rem); line-height: 1.1; color: var(--ink); }
.menu__links a:nth-child(even) { font-style: italic; }
.menu__ig { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); }

/* =========================================================
   CINEMATIC INTRO
   ========================================================= */
.intro {
  position: relative;
  height: 360vh;                 /* scroll length of the dive */
  z-index: 2;
}
.intro__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--paper);
}

/* the painting, in depth layers */
.scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: 50% 66%;
  will-change: transform;
}
.scene__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene #scene-sky,
.scene #scene-hills,
.scene #scene-grove,
.scene #scene-tree,
.scene #scene-ground { will-change: transform; }

/* atmospheric haze that clears as you dive in (cheap colour "pop") */
.scene__grade {
  position: absolute; inset: -5%;
  background:
    linear-gradient(180deg, rgba(232,235,236,0.55), rgba(232,232,228,0.15) 55%, rgba(210,196,166,0.35));
  opacity: 0.15;
  pointer-events: none;
}
.scene__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 42%, transparent 55%, rgba(28,28,25,0.30));
  opacity: 0.25;
  pointer-events: none;
}
/* the "framed canvas" edge, visible only in the opening moment */
.scene__frame {
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(28,28,25,0.18), inset 0 0 0 14px var(--paper), inset 0 0 0 15px rgba(28,28,25,0.12);
  opacity: 0;
  pointer-events: none;
}
html:not(.js) .scene__frame { opacity: 0; }

/* Opening copy */
.intro__open {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
  padding: var(--gutter);
}
html:not(.js) .intro__open { display: none; }   /* no-JS: skip the opening, show the hero */
.intro__open-eyebrow { color: var(--soft-ink); }
.intro__open-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.4rem, 1rem + 15vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  display: flex; gap: 0.3em; flex-wrap: wrap; justify-content: center;
  color: var(--ink);
}
.intro__open-title .word { display: inline-block; overflow: hidden; padding-bottom: 0.08em; }
.intro__open-title .word--italic { font-style: italic; font-weight: 400; }
.intro__open-title .char { display: inline-block; will-change: transform; }
.intro__open-cue {
  margin-top: 0.8rem;
  font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--stone);
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.intro__open-cue .arrow {
  width: 1px; height: 34px; background: var(--stone); position: relative; overflow: hidden; display: inline-block;
}
.intro__open-cue .arrow::after {
  content: ""; position: absolute; top: -60%; left: 0; width: 100%; height: 60%;
  background: var(--accent); animation: scrolldrop 2.2s cubic-bezier(0.76,0,0.24,1) infinite;
}
@keyframes scrolldrop { 0% { transform: translateY(0); } 100% { transform: translateY(280%); } }

/* Resolved hero copy (over the painting, bottom-left) */
.intro__hero {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(2.5rem, 8vh, 6rem);
  max-width: 40rem;
  color: #fff;
  text-shadow: 0 1px 30px rgba(20,18,14,0.45);
  opacity: 0;
}
html:not(.js) .intro__hero,
html.reduced .intro__hero { opacity: 1; }
.intro__hero .hero__eyebrow { color: rgba(255,255,255,0.82); margin-bottom: 1.2rem; }
.hero__name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(3rem, 1.5rem + 7vw, 7rem);
  line-height: 0.92; letter-spacing: -0.02em; margin-bottom: 1.2rem;
}
.hero__lede {
  max-width: 34rem; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.6; color: rgba(255,255,255,0.92);
}
.hero__cue {
  display: inline-flex; align-items: center; gap: 0.9rem; margin-top: 2rem;
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
}
.hero__cue-line { width: 3rem; height: 1px; background: rgba(255,255,255,0.8); transition: width 0.4s ease; }
.hero__cue:hover .hero__cue-line { width: 4.5rem; }

/* reduced motion: present the painting calmly, no dive */
html.reduced .scene { transform: none; }
html.reduced .intro { height: auto; }
html.reduced .intro__stage { position: relative; height: 100svh; }
html.reduced .intro__open { display: none; }
html.reduced .scene__vignette { opacity: 0.35; }

/* ---------- Generic section frame ---------- */
.section { padding: clamp(4.5rem, 9vw, 9rem) var(--gutter); border-top: 1px solid var(--line); position: relative; z-index: 3; background: var(--paper); }
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head .eyebrow { display: block; margin-bottom: 1rem; }

/* ---------- Work / gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.plate {
  margin: 0; position: relative; aspect-ratio: 4 / 5;
  border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: flex-end;
}
.plate--tall { aspect-ratio: 3 / 4; }
.plate--wide { grid-column: span 2; aspect-ratio: 16 / 10; }

.plate__media, .plate img {
  position: absolute; left: 0; right: 0; top: -8%; height: 116%;
  width: 100%; object-fit: cover; will-change: transform;
}
.plate[data-tone="rose"]  .plate__media { background: linear-gradient(150deg, #efe2dd, #d9b5ae 130%); }
.plate[data-tone="sage"]  .plate__media { background: linear-gradient(150deg, #e7ece0, #b3c2a4 130%); }
.plate[data-tone="blue"]  .plate__media { background: linear-gradient(150deg, #e4ebef, #a9bbc9 130%); }
.plate[data-tone="ochre"] .plate__media { background: linear-gradient(150deg, #f0e9d6, #dcc9a0 130%); }

.plate__caption {
  position: relative; z-index: 2; width: 100%; padding: 1.1rem 1.2rem;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; flex-direction: column; gap: 0.15rem;
  transform: translateY(101%); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.plate:hover .plate__caption, .plate:focus-within .plate__caption { transform: translateY(0); }
.plate__title { font-family: var(--display); font-size: 1.4rem; line-height: 1.1; }
.plate__meta  { font-size: 0.78rem; letter-spacing: 0.04em; color: var(--stone); }

/* ---------- Mediums ---------- */
.mediums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.8rem, 4vw, 3.5rem) clamp(2rem, 6vw, 6rem); }
.medium { padding-top: 1.4rem; border-top: 1px solid var(--line); }
.medium__index { display: block; font-size: 0.72rem; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 0.8rem; }
.medium__name { font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); margin-bottom: 0.5rem; }
.medium__text { max-width: 30ch; color: var(--soft-ink); }

/* ---------- About ---------- */
.section--about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about__portrait { margin: 0; position: relative; aspect-ratio: 4 / 5; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: flex-end; }
.about__media, .about__portrait img {
  position: absolute; left: 0; right: 0; top: -8%; height: 116%; width: 100%;
  object-fit: cover; will-change: transform;
  background: linear-gradient(155deg, #e7ece0, #b3c2a4 140%);
}
.about__portrait figcaption { position: relative; z-index: 2; padding: 1rem 1.2rem; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--stone); background: color-mix(in srgb, var(--paper) 86%, transparent); }
.about__text .eyebrow { display: block; margin-bottom: 1rem; }
.about__text .section__title { margin-bottom: 1.6rem; }
.about__text p { max-width: var(--measure); color: var(--soft-ink); }
.about__text p + p { margin-top: 1.2rem; }

/* ---------- Contact ---------- */
.section--contact { text-align: center; }
.section--contact .eyebrow { display: block; margin-bottom: 1.4rem; }
.contact__title { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 1.4rem + 3vw, 4rem); line-height: 1.1; margin-bottom: 2.2rem; margin-inline: auto; }
.contact__email { display: inline-block; font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 1rem + 2vw, 2.6rem); border-bottom: 1px solid var(--accent); padding-bottom: 0.15rem; transition: color 0.3s ease; }
.contact__email:hover { color: var(--accent); }
.contact__ig { display: block; margin-top: 1.8rem; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); transition: color 0.3s ease; }
.contact__ig:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 3; background: var(--paper); display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; padding: 2rem var(--gutter) 2.6rem; border-top: 1px solid var(--line); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--stone); }

/* ---------- Reveal hook ---------- */
.reveal { opacity: 0; }
html:not(.js) .reveal, html.reduced .reveal { opacity: 1; }

/* ---------- Focus ---------- */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .plate--wide { grid-column: span 2; }
  .section--about { grid-template-columns: 1fr; }
  .about__portrait { max-width: 24rem; }
}
@media (max-width: 640px) {
  .intro { height: 300vh; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .gallery { grid-template-columns: 1fr; }
  .plate, .plate--tall, .plate--wide { grid-column: auto; aspect-ratio: 4 / 5; }
  .mediums { grid-template-columns: 1fr; }
  .plate__caption { transform: translateY(0); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wash { display: none; }
  .intro__open-cue .arrow::after { animation: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
