/* =========================================================
   CORYNN MARIE MCATEE — style.css
   Quiet, photo-first. Tokens → base → layout → sections → responsive
   ========================================================= */

/* Animatable theme colors (smooth shift between chapters) */
@property --bg { syntax: '<color>'; inherits: true; initial-value: #0F0E0C; }
@property --fg { syntax: '<color>'; inherits: true; initial-value: #ECEAE5; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: #8C8981; }
@property --line { syntax: '<color>'; inherits: true; initial-value: #2E2C28; }

:root {
  --ink: #0F0E0C;
  --carbon: #1B1A17;
  --stone: #D8D5CE;
  --fog: #ECEAE5;
  --ash: #8C8981;
  --warm: #17130F;

  --bg: var(--ink);
  --fg: var(--fog);
  --muted: var(--ash);
  --line: #2E2C28;

  --f-sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --margin: clamp(20px, 5vw, 96px);
  --gutter: clamp(16px, 2vw, 32px);
  --section-y: clamp(120px, 20vh, 240px);
  --row-gap: clamp(64px, 12vh, 160px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  transition: --bg 1.2s ease, --fg 1.2s ease, --muted 1.2s ease, --line 1.2s ease;
}
:root.theme-light { --bg: var(--stone); --fg: var(--ink); --muted: #5E5B55; --line: rgba(15,14,12,.15); }
:root.theme-warm  { --bg: var(--warm); --fg: #EDE6DC; --muted: #A08E7A; --line: #332A22; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.label { color: var(--muted); margin-bottom: 20px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--fog); color: var(--ink); padding: 8px 12px; }
.skip:focus { top: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--margin);
  mix-blend-mode: difference; color: #fff;
  pointer-events: none;
}
.nav a, .nav button { pointer-events: auto; }
.nav__links { display: flex; gap: clamp(16px, 2vw, 32px); }
.nav__links a { opacity: .75; transition: opacity .3s; }
.nav__links a:hover { opacity: 1; }
.nav__menu { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 95;
  background: var(--ink); color: var(--fog);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 96px var(--margin) var(--margin);
  opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu__links { display: flex; flex-direction: column; }
.menu__links a { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; border-bottom: 1px solid #2E2C28; padding: 12px 0; }
.menu__foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  padding: 14px 20px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  transition: border-color .3s, background-color .3s, color .3s;
}
.btn:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }

/* ---------- Grid & images ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--row-gap);
  padding: 0 var(--margin);
  align-items: start;
}
.c-1-4 { grid-column: 1 / 4; }   .c-1-5 { grid-column: 1 / 5; }   .c-1-6 { grid-column: 1 / 6; }
.c-1-7 { grid-column: 1 / 7; }   .c-1-9 { grid-column: 1 / 9; }   .c-1-13 { grid-column: 1 / 13; }
.c-4-7 { grid-column: 4 / 7; }   .c-5-9 { grid-column: 5 / 9; }   .c-7-10 { grid-column: 7 / 10; }
.c-7-13 { grid-column: 7 / 13; } .c-9-13 { grid-column: 9 / 13; } .c-10-13 { grid-column: 10 / 13; }

.ar-45 { aspect-ratio: 4 / 5; }
.ar-34 { aspect-ratio: 3 / 4; }
.ar-23 { aspect-ratio: 2 / 3; }
.ar-32 { aspect-ratio: 3 / 2; }
.ar-43 { aspect-ratio: 4 / 3; }
.ar-11 { aspect-ratio: 1 / 1; }
.ar-wide { aspect-ratio: 1.92 / 1; }

.tile { cursor: zoom-in; }
.tile__media { position: relative; overflow: hidden; background: var(--carbon); }
.tile__media img, .tile__media video,
.bleed__media img, .specimen__media img, .about__img img {
  width: 100%; height: 100%; object-fit: cover;
}
figcaption { margin-top: 14px; color: var(--muted); }

/* product shots on white sit on a soft stone card */
.tile--pdp .tile__media { background: var(--stone); }
.tile--pdp .tile__media img { mix-blend-mode: multiply; }

.bleed { margin: 0 0 var(--section-y); cursor: zoom-in; }
.bleed__media { position: relative; height: clamp(420px, 88vh, 1100px); overflow: hidden; background: var(--carbon); }
.bleed figcaption { padding: 0 var(--margin); }
.bleed--inset { padding: 0 var(--margin); margin-bottom: var(--row-gap); }
.bleed--inset figcaption { padding: 0; }
.bleed--inset .bleed__media { height: clamp(360px, 80vh, 960px); }

/* scene video over its still (Higgsfield clips, optional) */
.scene-video, .scene-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-video { opacity: 0; transition: opacity 1s; }
.media-scene.has-video .scene-video { opacity: 1; }

/* spec list */
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px var(--gutter); border-top: 1px solid var(--line); padding-top: 18px; }
.spec dt { color: var(--muted); margin-bottom: 4px; }

/* ---------- Opening ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; color: var(--ink); background: #E9E9E7; }
.hero__media { position: absolute; inset: 0; }
.hero__inner {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: 0 var(--margin) clamp(28px, 5vh, 56px);
}
.hero__title { font-size: clamp(24px, 2.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 400; }
.hero__sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: .8; }

/* ---------- About ---------- */
.about { padding: var(--section-y) var(--margin); }
.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); row-gap: 56px; align-items: start; }
.about__portrait { grid-column: 1 / 6; cursor: zoom-in; }
.about__img { aspect-ratio: 3 / 2; overflow: hidden; background: #BDB9B1; }
.about__img img { filter: grayscale(100%); }
.about__body { grid-column: 7 / 13; }
.about__title { font-size: clamp(26px, 2.4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 400; margin-bottom: 32px; max-width: 22ch; }
.about__copy p { max-width: 60ch; margin-bottom: 1.1em; }
.about__contact { display: flex; flex-wrap: wrap; gap: 12px; margin: 40px 0 56px; }
.cv { border-top: 1px solid var(--line); }
.cv__row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cv__row span:last-child { color: var(--muted); }

/* ---------- Mission ---------- */
.mission { padding: var(--section-y) var(--margin) calc(var(--section-y) * .6); }
.mission__text { font-size: clamp(22px, 2.2vw, 36px); line-height: 1.3; letter-spacing: -0.015em; max-width: 34ch; margin-left: calc(50% + var(--gutter) / 2); }

/* ---------- Collections ---------- */
.collection { padding-bottom: var(--section-y); }
.collection:not(:has(> .bleed:first-child)) { padding-top: var(--section-y); }
.collection__head {
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); row-gap: 20px;
  padding: 0 var(--margin) var(--row-gap);
}
.collection__head .label { grid-column: 1 / -1; margin-bottom: 0; }
.collection__title { grid-column: 1 / 7; font-size: clamp(32px, 3.6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 400; }
.collection__title--sm { font-size: clamp(26px, 2.6vw, 44px); }
.collection__title .mono { color: var(--muted); vertical-align: middle; margin-left: .4em; }
.collection__brief { grid-column: 7 / 13; grid-row: 2 / 3; max-width: 56ch; }
.collection__head .spec { grid-column: 7 / 13; }

.subsection { padding-top: var(--section-y); }
.capabilities { padding: var(--row-gap) var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); }
.capabilities .label { grid-column: 1 / 7; }
.capabilities__list { grid-column: 7 / 13; border-top: 1px solid var(--line); }
.capabilities__list li { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- Entomon specimens ---------- */
.specimens {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--row-gap) var(--gutter);
  padding: 0 var(--margin) var(--row-gap);
}
.specimen { cursor: zoom-in; }
.specimen__media { aspect-ratio: 4 / 5; overflow: hidden; background: #221C16; }
.specimen figcaption { display: flex; gap: 16px; }
.specimen figcaption span:first-child { color: var(--fg); }

.inquire { padding: var(--row-gap) var(--margin) 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__cols { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 32px var(--margin) 40px; color: var(--muted); }
.footer__cols a { transition: color .3s; }
.footer__cols a:hover { color: var(--fg); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(15,14,12,.97); color: var(--fog);
  display: grid; place-items: center;
}
.lightbox[hidden] { display: none; }
.lightbox__stage { width: min(88vw, 1400px); height: 82vh; display: grid; place-items: center; }
.lightbox__stage img, .lightbox__stage video { max-width: 100%; max-height: 82vh; width: auto; height: auto; object-fit: contain; }
.lightbox__close { position: absolute; top: 18px; right: var(--margin); }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 18px; padding: 20px; }
.lightbox__prev { left: calc(var(--margin) * .4); }
.lightbox__next { right: calc(var(--margin) * .4); }
.lightbox__caption { position: absolute; left: var(--margin); bottom: 24px; }
.lightbox__count { position: absolute; right: var(--margin); bottom: 24px; color: var(--ash); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .specimens { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .about__portrait { grid-column: 1 / 7; }
  .about__body { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  :root { --row-gap: 48px; --section-y: 96px; }
  .nav__links { display: none; }
  .nav__menu { display: block; }

  .hero__inner { flex-direction: column; align-items: flex-start; gap: 6px; }

  .about__portrait, .about__body { grid-column: 1 / -1; }
  .cv__row { grid-template-columns: 1fr auto; }
  .cv__row span:first-child { grid-column: 1 / -1; }
  .cv__row span:first-child:empty { display: none; }

  .mission__text { margin-left: 0; }

  .grid > * { grid-column: 1 / -1 !important; }
  .grid > .tile--pdp { grid-column: span 6 !important; }
  .collection__title, .collection__brief, .collection__head .spec,
  .capabilities .label, .capabilities__list { grid-column: 1 / -1; grid-row: auto; }

  .specimens { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .specimen figcaption { flex-direction: column; gap: 2px; }

  .lightbox__prev, .lightbox__next { top: auto; bottom: 56px; transform: none; }
}

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


/* sub-series heading inside a collection (e.g. Pattern making: pant) */
.collection__head--sub { padding-top: var(--row-gap); }
.ar-lb { aspect-ratio: 1.44 / 1; }

/* ---------- Carousels (Construction details, Systems of dress) ---------- */
.carousel {
  margin: var(--section-y) 0;
  padding: var(--row-gap) 0;
  background: #000;
  color: var(--fog);
}
.carousel__head { text-align: center; padding: 0 var(--margin); margin-bottom: clamp(40px, 7vh, 80px); }
.carousel__head .label { margin-bottom: 12px; }
.carousel__title { font-size: clamp(28px, 3vw, 48px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 400; }
.carousel__track {
  --side: 2.5vw;
  display: flex; gap: clamp(12px, 1.2vw, 20px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--side);
  padding: 0 var(--side);
  scrollbar-width: none;
  cursor: grab; outline: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.carousel__track::after { content: ''; flex: 0 0 1px; }
.carousel__item { flex: none; margin: 0; scroll-snap-align: start; }
.carousel__item img {
  display: block; height: min(70vh, 800px); width: auto; max-width: none; background: #111;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.carousel__item figcaption { margin-top: 12px; color: var(--ash); }
.carousel__bar {
  width: calc(100% - 5vw); margin: 28px auto 0;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 20px;
}
.carousel__progress { height: 1px; background: #2E2C28; overflow: hidden; }
.carousel__progress span { display: block; height: 100%; background: var(--fog); transform-origin: left; transform: scaleX(0); transition: transform .25s ease-out; }
.carousel__count { color: var(--ash); font-variant-numeric: tabular-nums; }
.carousel__prev, .carousel__next {
  border: 1px solid #2E2C28; padding: 10px 16px; font-size: 14px;
  transition: border-color .3s, background-color .3s, color .3s;
}
.carousel__prev:hover, .carousel__next:hover { border-color: var(--fog); background: var(--fog); color: #000; }
@media (max-width: 700px) {
  .carousel { padding: 64px 0; }
  .carousel__track { --side: 16px; }
  .carousel__item img { height: 56vh; }
  .carousel__bar { width: calc(100% - 32px); gap: 12px; }
}
.c-4-10 { grid-column: 4 / 10; }
.carousel__item video { display: block; height: min(70vh, 800px); width: auto; background: #111; }
@media (max-width: 700px) { .carousel__item video { height: 56vh; } }
