/* =========================================================
   Renae Custom Portraits
   Layout modelled on studiofreight.com: one-screen thumbnail
   grid, centred serif headline, tiny monospace chrome in the
   corners. Home hero = uneven photo grid behind the headline.
   ========================================================= */

:root {
  --paper: #fefdfb;
  --ink: #111;
  --muted: #8a8580;
  --accent: #c0682c;        /* ginger, from the rabbit painting */
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;  /* same serif as the portfolio */
  --mono: "EB Garamond", Garamond, "Times New Roman", serif;   /* small text (nav, footer, labels) */

  --edge: 10px;             /* outer margin */
  --gap: 10px;              /* gap between tiles */
  --bar: 32px;              /* height of top nav / footer strips */
  --cols: 12;
  --rows: 8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ================= NAV (top strip) ================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar);
  z-index: 40;
  display: grid;
  grid-template-columns: 25% 42% 1fr auto;
  align-items: center;
  padding: 0 var(--edge);
  background: var(--paper);
}
.nav__logo {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}
.nav__logo em { color: var(--accent); }
.nav__current { font-weight: 700; }
.nav__links { font-weight: 700; }
.nav__contact { font-weight: 700; justify-self: end; }

/* ================= FOOTER (bottom strip) ================= */
.foot {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bar);
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--edge);
  background: var(--paper);
}
.foot span:nth-child(2) { font-weight: 700; }
.foot span:last-child { justify-self: end; }

/* ================= HOME HERO ================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  margin: 0 var(--edge);
  padding: var(--bar) 0;
}
.hero .grid { inset: var(--bar) 0; }

.grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  gap: var(--gap);
  transition: opacity 0.25s ease;
}
.tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #eee9e2;
}
.tile img { transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.tile--mobile { display: none; }   /* phone layout, switched on in the MOBILE section */

/* intro: tiles start hidden and pop in one by one, in random order (see script.js) */
.grid.is-intro .tile { visibility: hidden; }
.grid.is-intro .tile.is-on { visibility: visible; }
/* hero text: name, headline, button fade up one after another */
.home__title > *,
.home__title > .hero__cta {
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .8, .2, 1), background 0.2s ease;
}
.home__title.is-intro > * { opacity: 0; transform: translateY(14px); }
.home__title > :nth-child(2) { transition-delay: 0.12s; }
.home__title > :nth-child(3) { transition-delay: 0.24s, 0.24s, 0s; }
/* once the intro has finished, the button goes back to a quick hover */
.home__title.is-settled > .hero__cta { transition: background 0.2s ease, transform 0.2s ease; }
.tile:hover img { transform: scale(1.04); }

.home__title {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 3.6vw, 4.2rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
/* small italic ginger name on top, big serif tagline below */
.home__title h1 {
  font-size: clamp(1rem, 1.25vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0;
}
.hero__sub {
  margin-top: 0.6rem;
  font-size: inherit;
  line-height: 1.08;
  color: var(--ink);
  white-space: normal;
  width: min(18ch, 60vw);
  margin-inline: auto;
}
/* nudge the small name down a touch, closer to the headline */
.home__title h1 { position: relative; top: 45px; }
/* headline nudged down so it sits just above the button (button doesn't move) */
.hero__sub { position: relative; top: 25px; }
.hero__cta {
  display: inline-block;
  margin-top: 0.1rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--ink);
  color: var(--paper);
  pointer-events: auto;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero__cta:hover { background: var(--accent); color: var(--paper); transform: translateY(-2px); }

/* ================= GALLERY ================= */
.gallery {
  margin: 0 var(--edge);
  padding: 6rem 0 10rem;
  border-top: 1px solid var(--ink);
}
.gallery__head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 3.5rem;
}
.gallery__heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 4.4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.gallery__count { font-style: italic; color: var(--accent); font-size: clamp(1rem, 1.3vw, 1.4rem); }

/* 3 columns, middle and right columns staggered lower for an uneven feel */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem 4.5rem;
  padding: 0 4rem 8rem;              /* side padding keeps photos a bit smaller; bottom = room for the stagger */
}
.gallery__item:nth-child(3n + 2) { translate: 0 8rem; }
.gallery__item:nth-child(3n + 3) { translate: 0 3rem; }

.gallery__img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #eee9e2;
  cursor: zoom-in;
}
.gallery__img img { transition: transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.gallery__img:hover img { transform: scale(1.035); }
.gallery__item figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.8rem;
  padding-top: 0.8rem;
}
.gallery__num { font-weight: 700; grid-row: span 2; }
.gallery__title { font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
.gallery__details { color: var(--muted); font-size: 14px; }

/* ================= MEET THE ARTIST ================= */
.about {
  padding: 7rem var(--edge) calc(var(--bar) + 7rem);
  border-top: 1px solid var(--ink);
  margin: 0 var(--edge);
  padding-inline: 0;
}
.about__label { font-weight: 700; margin-bottom: 2.5rem; }
.about__grid {
  display: grid;
  grid-template-columns: 8fr 3fr;
  gap: 4rem var(--gap);
  align-items: start;
}
.about__photo { aspect-ratio: 4 / 5; overflow: hidden; background: #eee9e2; }
.about__placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  font-style: italic;
  color: var(--muted);
  border: 1px dashed #cfc8bf;
}
.about__text { padding-right: 3rem; max-width: 60rem; }
.about__heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 4.4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.about__heading em { color: var(--accent); }
.about__lead {
  font-size: clamp(1.3rem, 1.8vw, 1.9rem);
  line-height: 1.25;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.about__text p:not(.about__lead) { font-size: clamp(19px, 1.45vw, 23px); line-height: 1.55; margin-bottom: 1.25rem; max-width: 48rem; }
.about__signoff { margin-top: 1.75rem; margin-left: 2.5rem; }
.about__signature { display: block; width: clamp(140px, 14vw, 220px); height: auto; }
.about__name {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 1.45vw, 23px);
}
.about__facts {
  list-style: none;
  margin: 2.5rem 0;
  border-top: 1px solid var(--ink);
}
.about__facts li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  padding: 0.6rem 0;
  border-bottom: 1px solid #ddd6cd;
  font-size: 17px;
}
.about__facts span { font-weight: 700; }
.about__cta { margin-top: 0; }

/* ================= GET IN CONTACT (inside Meet the artist) ================= */
/* sits in its own row below the bio and photo */
.contact {
  grid-column: 1;
  margin-top: -7rem;   /* pulls it up closer to the photo; lower number = higher */
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
  max-width: 36rem;
}
.contact__heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.contact .contact__text {
  margin: 0.8rem 0 1.6rem;
  font-size: clamp(1.05rem, 1.25vw, 1.3rem);
  line-height: 1.4;
  font-style: italic;
  color: var(--accent);
}
.contact__cta { display: inline-flex; align-items: center; gap: 0.6rem; }
.contact__cta svg { width: 1.25em; height: 1.25em; flex: none; }

/* ================= SCROLL REVEAL =================
   Elements with data-reveal fade up when scrolled into view (see script.js).
   Optional style="--d: 0.15s" adds a delay. Only hidden once JS is running. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease var(--d, 0s), transform 1s cubic-bezier(.2, .8, .2, 1) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero__cta:hover { transform: none; }
}

/* ================= TEXT PAGES (About / Commission) ================= */
.text-page {
  padding: calc(var(--bar) + 14px) var(--edge) calc(var(--bar) + 80px);
}
.statement {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.9vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 1500px;
}
.statement strong {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.statement em { font-style: italic; color: var(--accent); }
.statement--small { font-size: clamp(1.5rem, 2.6vw, 2.6rem); margin-top: 8rem; }
.inline-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }

.scatter {
  position: relative;
  height: min(80vw, 900px);
  margin-top: 6rem;
}
.scatter figure { position: absolute; overflow: hidden; }
.scatter__a { left: 4%;  top: 0;   width: 28%; aspect-ratio: 3/4; }
.scatter__b { left: 40%; top: 18%; width: 24%; aspect-ratio: 3/4; }
.scatter__c { right: 4%; top: 6%;  width: 22%; aspect-ratio: 3/4; }

.label { font-weight: 700; margin-bottom: 1rem; }
.process { margin-top: 4rem; }
.process__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  border-top: 1px solid var(--ink);
}
.process__list li { padding-top: 1rem; display: grid; gap: 1.5rem; }
.process__list span { font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--accent); }
.process__list p { max-width: 30ch; font-size: 14px; }
.process__list strong { display: block; margin-bottom: 0.4rem; }

/* ---- form ---- */
.form {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem var(--gap);
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}
.form label { display: flex; flex-direction: column; gap: 0.5rem; }
.form label span { font-weight: 700; }
.form__wide { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 0.3rem 0;
  outline: none;
  border-radius: 0;
  resize: vertical;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.form__send {
  grid-column: 1 / -1;
  justify-self: start;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
}
.form__send:hover { background: var(--accent); }

/* ================= LIGHTBOX ================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3.5rem var(--edge);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { width: auto; height: auto; max-width: 92vw; max-height: 82vh; object-fit: contain; }
.lightbox__cap { font-family: var(--serif); font-size: 1.6rem; }
.lightbox__close {
  position: absolute; top: 8px; right: var(--edge);
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  background: none; border: none; cursor: pointer;
}
.lightbox__close:hover { color: var(--accent); }

/* anchor links (#about, #work) land below the fixed nav, not under it */
section[id] { scroll-margin-top: var(--bar); }

/* ================= TABLET ================= */
@media (max-width: 1100px) {
  .gallery__grid { gap: 4rem 2.5rem; padding: 0 0 6rem; }
  .about__text { padding-right: 1rem; }
}

/* ================= MOBILE ================= */
@media (max-width: 800px) {
  :root { --gap: 4px; }

  /* nav: logo left, Commission right */
  .nav { grid-template-columns: 1fr auto; gap: 1rem; }
  .nav__logo { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav__current, .nav__links { display: none; }

  /* hero: one screen tall, 4-column collage (HERO_TILES_MOBILE) with the
     headline in its own band across the middle (row 3) */
  .home {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr auto 1fr 1fr;
    gap: var(--gap);
    height: 100vh;
    height: 100svh;
    min-height: 34rem;
    padding: var(--bar) 0;
  }
  .grid { display: contents; }   /* tiles become direct cells of .home */
  .home__title {
    position: static;
    transform: none;
    grid-column: 1 / -1;
    grid-row: 3;
    white-space: normal;
    font-size: clamp(1.9rem, 8.5vw, 2.6rem);
    line-height: 1.05;
    text-align: center;
    padding: 1rem 0 1.1rem;
  }
  .home__title h1, .hero__sub { top: 0; }
  .hero__sub { width: auto; max-width: 15ch; margin: 0.3rem auto 1rem; }
  .tile--desktop { display: none; }
  .tile--mobile { display: block; }

  /* gallery: even 2-column grid, no stagger */
  .gallery { padding: 3.5rem 0 5rem; }
  .gallery__head { margin-bottom: 2rem; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 1.75rem var(--gap); padding: 0 0 2rem; }
  .gallery__item:nth-child(n) { translate: none; }
  .gallery__title { font-size: 1.05rem; }
  .gallery__details { font-size: 13px; }

  /* about: text first, photo underneath */
  .about { padding-top: 3.5rem; padding-bottom: calc(var(--bar) + 3.5rem); }
  .about__grid { grid-template-columns: 1fr; gap: 2rem; }
  .about__text { padding: 0; }
  .about__text p:not(.about__lead) { font-size: 18px; }
  .about__signoff { margin-left: 1.5rem; }
  .about__photo { width: min(100%, 22rem); justify-self: center; }
  .contact { margin-top: 1rem; }
  .about__facts li { grid-template-columns: 9rem 1fr; }

  .lightbox__cap { font-size: 1.25rem; text-align: center; }

  .scatter { height: 130vw; }
  .scatter__a { width: 48%; left: 0; }
  .scatter__b { width: 44%; left: auto; right: 0; top: 30%; }
  .scatter__c { width: 40%; left: 10%; right: auto; top: 68%; }
  .process__list { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}

/* ================= SMALL PHONES ================= */
@media (max-width: 480px) {
  .foot { grid-template-columns: auto 1fr; }
  .foot span:nth-child(2) { display: none; }   /* name is already in the nav */
  .statement { font-size: 1.7rem; }
}
