/* Mira Chen Studio — cream editorial
   Shared across all pages. No frameworks. */

:root {
  --cream: #F7F1E8;
  --cream-deep: #EDE4D6;
  --paper: #FFF9F1;
  --ink: #1C1916;
  --ink-soft: #3F3832;
  --rose: #C47A7A;
  --rose-deep: #A86262;
  --taupe: #8A7E74;
  --taupe-soft: #B2A79C;
  --line: rgba(28, 25, 22, 0.14);
  --line-strong: rgba(28, 25, 22, 0.28);
  --shadow: 0 18px 50px rgba(28, 25, 22, 0.14);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 38rem;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 400;
  opacity: 0.07;
  background-image: url("../images/grain.png");
  background-size: 220px;
  mix-blend-mode: multiply;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

::selection {
  background: #E8C4C1;
  color: var(--ink);
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  z-index: 500;
  background: var(--ink);
  color: var(--cream);
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font-size: 0.85rem;
}
.skip:focus { top: 0.75rem; }

/* ——— Type ——— */
.eyebrow,
.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--taupe);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.1rem, 8vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}

.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--rose-deep);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 28ch;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin: 0 0 0.45em; }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); margin: 0 0 0.4em; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem var(--pad);
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand svg {
  width: 28px;
  height: 28px;
  color: var(--rose);
  flex: 0 0 auto;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand__name span {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-top: 0.28rem;
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  position: relative;
  padding: 0.2rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav a[aria-current="page"] { color: var(--ink); }

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--ink);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: 0.3s var(--ease);
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

body.nav-open .menu-toggle span { background: transparent; }
body.nav-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
body.nav-open .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ——— Layout ——— */
.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 8vw, 7.5rem) 0;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ——— Buttons / links ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  padding: 0.85rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s;
}

.btn:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn--ghost {
  border-color: transparent;
  padding-inline: 0;
  letter-spacing: 0.16em;
}

.btn--ghost::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.btn--ghost:hover {
  background: transparent;
  color: var(--rose-deep);
}
.btn--ghost:hover::after { width: 3.2rem; }

/* ——— Hero ——— */
.hero {
  padding: clamp(4.5rem, 12vw, 9.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  position: relative;
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.8rem, 4vw, 3.2rem);
}

.hero__year {
  font-variant-numeric: lining-nums;
}

.hero .display {
  max-width: 14ch;
}

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: clamp(2.4rem, 5vw, 4rem);
  align-items: end;
}

.hero__note {
  font-size: 1.02rem;
  max-width: 34ch;
}

.hero__meta {
  justify-self: end;
  text-align: right;
  color: var(--taupe);
  font-size: 0.88rem;
}

.hero__meta strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

/* ——— Featured grid ——— */
.featured-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.85rem;
}

.featured .plate:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.featured .plate:nth-child(2) { grid-column: 2 / span 2; grid-row: 1; }
.featured .plate:nth-child(3) { grid-column: 2; grid-row: 2; }
.featured .plate:nth-child(4) { grid-column: 3; grid-row: 2; }
.featured .plate:nth-child(5) { grid-column: 1 / span 2; grid-row: 3; }
.featured .plate:nth-child(6) { grid-column: 3; grid-row: 3; }

/* ——— Plates ——— */
.plate {
  position: relative;
  margin: 0;
  background: var(--cream-deep);
  overflow: hidden;
  isolation: isolate;
}

.plate__open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  color: inherit;
}

.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 1.1s var(--ease), filter 0.8s var(--ease);
  filter: saturate(0.92) contrast(1.03);
}

.plate:hover img,
.plate:focus-within img {
  transform: scale(1.045);
  filter: saturate(1) contrast(1.05);
}

.plate figcaption,
.plate__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.7rem 1.05rem 0.9rem;
  background: linear-gradient(to top, rgba(28, 25, 22, 0.55), transparent);
  color: #F7F1E8;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
  font-size: 0.82rem;
}

.plate:hover figcaption,
.plate:focus-within figcaption,
.plate:hover .plate__meta,
.plate:focus-within .plate__meta {
  opacity: 1;
  transform: none;
}

.plate__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}

.plate__cat {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.62rem;
  opacity: 0.8;
}

.ratio-portrait { aspect-ratio: 3 / 4; }
.ratio-land { aspect-ratio: 16 / 10; }
.ratio-square { aspect-ratio: 1; }
.ratio-tall { aspect-ratio: 4 / 5; }
.ratio-wide { aspect-ratio: 5 / 3; }

/* ——— Home about band ——— */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 6.5rem);
  align-items: start;
}

.split--reverse { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }

.cta-band {
  text-align: center;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.cta-band .display {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  max-width: 16ch;
  margin-inline: auto;
}

.cta-band .btn { margin-top: 2rem; }

/* ——— Work gallery ——— */
.page-hero {
  padding: clamp(3.4rem, 8vw, 6.5rem) 0 2rem;
}

.page-hero .lede { margin-top: 0.6rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.15rem;
  padding: 0.4rem 0 1.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.8rem;
}

.filter-btn {
  appearance: none;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe);
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  position: relative;
}

.filter-btn[aria-pressed="true"] {
  color: var(--ink);
}

.filter-btn[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.2rem;
  height: 1px;
  background: var(--rose);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.gallery .plate[hidden] { display: none; }

.gallery .plate:nth-child(3n+2):not([hidden]) { transform: translateY(1.4rem); }

/* ——— Lightbox ——— */
.lightbox {
  border: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: rgba(20, 17, 15, 0.92);
  color: var(--cream);
}

.lightbox::backdrop { background: transparent; }

.lightbox[open] { display: grid; }

.lightbox__inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  padding: 1rem var(--pad) 1.4rem;
}

.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.lightbox__count {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe-soft);
}

.lightbox__close,
.lightbox__nav {
  border: 0;
  background: none;
  color: var(--cream);
  font-family: var(--sans);
  cursor: pointer;
  padding: 0.5rem 0.2rem;
}

.lightbox__close {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  position: relative;
}

.lightbox__stage img {
  max-height: min(74vh, 860px);
  max-width: min(92vw, 1100px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  opacity: 0.75;
}
.lightbox__nav:hover { opacity: 1; }
.lightbox__prev { left: 0; }
.lightbox__next { right: 0; }

.lightbox__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 0.9rem;
}

.lightbox__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
}

.lightbox__cat {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe-soft);
}

/* ——— About ——— */
.bio {
  font-size: 1.08rem;
  max-width: 40rem;
}

.drop::first-letter {
  font-family: var(--serif);
  font-size: 3.4em;
  float: left;
  line-height: 0.8;
  padding: 0.12em 0.12em 0 0;
  color: var(--rose-deep);
}

.process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 1.2rem;
}

.process article {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.process .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.4rem;
  color: var(--rose);
  display: block;
  margin-bottom: 0.6rem;
  line-height: 1;
}

.about-plate {
  position: sticky;
  top: 6rem;
}

.about-plate img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(0.9);
}

.about-plate figcaption {
  position: static;
  background: none;
  color: var(--taupe);
  opacity: 1;
  transform: none;
  padding: 0.8rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ——— Contact form ——— */
.form {
  display: grid;
  gap: 1.35rem;
  max-width: 36rem;
}

.field { display: grid; gap: 0.4rem; }

.field label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.65rem 0 0.55rem;
  border-radius: 0;
  width: 100%;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--taupe) 50%),
                    linear-gradient(135deg, var(--taupe) 50%, transparent 50%);
  background-position: calc(100% - 12px) 54%, calc(100% - 7px) 54%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.6rem;
}

.field textarea { min-height: 8.5rem; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--rose);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-bottom-color: var(--rose-deep);
}

.field-error {
  font-size: 0.82rem;
  color: var(--rose-deep);
  min-height: 1.1em;
}

.form-note {
  font-size: 0.88rem;
  color: var(--taupe);
}

.success {
  display: none;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.success.is-visible { display: block; }
.form.is-sent { display: none; }

.success h2 { font-style: italic; }

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem var(--pad) 2.6rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.5rem;
}

.footer-brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--taupe);
  margin-top: 0.45rem;
  letter-spacing: 0.02em;
}

.footer-col h2 {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 0.7rem;
}

.footer-col a {
  display: block;
  text-decoration: none;
  font-size: 0.95rem;
  margin: 0.28rem 0;
  color: var(--ink-soft);
}

.footer-col a:hover { color: var(--rose-deep); }

.footer-legal {
  margin-top: 2.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--taupe);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ——— Utilities ——— */
.muted { color: var(--taupe); }
.serif { font-family: var(--serif); }
.mt-0 { margin-top: 0; }

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .menu-toggle { display: block; z-index: 60; }

  .nav {
    position: fixed;
    inset: 0;
    background: var(--cream);
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    transform: translateY(-110%);
    transition: transform 0.5s var(--ease);
    z-index: 50;
  }

  body.nav-open .nav { transform: none; }
  body.nav-open { overflow: hidden; }

  .nav a { font-family: var(--serif); font-size: 2.2rem; letter-spacing: 0; }

  .hero__foot,
  .split,
  .split--reverse,
  .footer-grid,
  .process {
    grid-template-columns: 1fr;
  }

  .hero__meta { justify-self: start; text-align: left; }

  .featured {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .featured .plate:nth-child(1) { grid-column: 1; grid-row: auto; }
  .featured .plate:nth-child(2) { grid-column: 2; grid-row: auto; }
  .featured .plate:nth-child(3) { grid-column: 1; grid-row: auto; }
  .featured .plate:nth-child(4) { grid-column: 2; grid-row: auto; }
  .featured .plate:nth-child(5) { grid-column: 1 / span 2; grid-row: auto; }
  .featured .plate:nth-child(6) { grid-column: 1 / span 2; grid-row: auto; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .plate:nth-child(3n+2):not([hidden]) { transform: none; }
  .gallery .plate:nth-child(even):not([hidden]) { transform: translateY(1.2rem); }

  .about-plate { position: static; }
}

@media (max-width: 560px) {
  .featured,
  .gallery { grid-template-columns: 1fr; }
  .featured .plate:nth-child(n) { grid-column: 1; }
  .gallery .plate { transform: none !important; }
  .hero .display { font-size: clamp(2.8rem, 14vw, 4rem); }
  .lightbox__nav { position: static; transform: none; }
  .lightbox__stage { padding-block: 0.6rem; }
  .lightbox__cap { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .plate img { transform: none !important; }
}

@media (hover: none) {
  .plate figcaption,
  .plate__meta {
    opacity: 1;
    transform: none;
  }
}
