/* Farah Saleh — DESIGN.md implementation
   Colours: Gallery White #FAFAF8 · Ink #111111 · Stone #9B9B95 · Egress Red #A6382E
   Type: Archivo 400/500 only. Sharp 0px images, 999px pill buttons. Zero elevation. */

:root {
  --gallery-white: #FAFAF8;
  --ink: #111111;
  --stone: #9B9B95;
  --egress-red: #A6382E;
  --hairline: rgba(17, 17, 17, 0.15);

  --font-sans: 'Archivo', Inter, Helvetica, Arial, sans-serif;
  --text-display: clamp(40px, 7vw, 72px);
  --text-heading: clamp(30px, 4vw, 40px);
  --text-subheading: 24px;
  --text-body: 17px;
  --text-caption: 13px;
  --text-micro: 12px;

  --section-gap: 88px;
  --block-gap: 40px;
  --page-max: 1200px;
  --gutter: clamp(32px, 6vw, 64px);

  --ease-glide: cubic-bezier(0.19, 1, 0.22, 1);
  --slow: 0.7s;
  --fast: 0.3s;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--gallery-white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; border-radius: 0; }

video { display: block; max-width: 100%; border-radius: 0; background: var(--ink); }

a { color: var(--ink); text-decoration: none; transition: color var(--fast) ease; }

::selection { background: var(--egress-red); color: var(--gallery-white); }

/* ---------- type roles ---------- */

.display {
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1, .heading {
  font-size: var(--text-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2, .subheading {
  font-size: var(--text-subheading);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p { max-width: 640px; }

.caption {
  font-size: var(--text-caption);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--stone);
}

.eyebrow {
  font-size: var(--text-micro);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--gallery-white);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.01em;
}

.nav-links a:hover { color: var(--egress-red); }
.nav-links a[aria-current="page"] { font-weight: 500; }

/* ---------- buttons & links ---------- */

.pill {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color var(--slow) var(--ease-glide), border-color var(--slow) var(--ease-glide);
}

.pill:hover, .pill:focus-visible { color: var(--egress-red); border-color: var(--egress-red); }

.textlink { position: relative; }
.textlink:hover {
  color: var(--egress-red);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

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

/* ---------- layout ---------- */

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { margin: var(--section-gap) 0; }

main > .section:first-child { margin-top: calc(var(--section-gap) * 0.75); }

.rule { border: 0; border-top: 1px solid var(--hairline); }

/* ---------- hero (home) ---------- */

.hero {
  position: relative;
  height: 86vh;
  min-height: 480px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(32px, 8vh, 72px);
  color: var(--gallery-white);
}

.hero-title .display { line-height: 1.0; }

.hero-title .caption { color: var(--gallery-white); opacity: 0.9; margin-top: 10px; }

.hero-cta { margin-top: 28px; }

.pill--light {
  border-color: var(--gallery-white);
  color: var(--gallery-white);
}
.pill--light:hover, .pill--light:focus-visible {
  border-color: var(--egress-red);
  color: var(--egress-red);
}
/* ---------- editorial split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--block-gap);
  align-items: center;
}

.split.reverse > .split-media { order: 2; }

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > .split-media { order: 0; }
}

/* ---------- artwork presentation ---------- */

.artwork { margin-bottom: var(--section-gap); }
.artwork:last-child { margin-bottom: 0; }

.artwork img { width: 100%; }

.wall-label { margin-top: 16px; }
.wall-label .title { font-size: var(--text-body); color: var(--ink); }
.wall-label .meta { margin-top: 4px; }

.available {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: var(--text-micro);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.available::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--egress-red);
}

/* narrower editorial images (works on paper etc.) */
.artwork--contained { max-width: 760px; }

/* ---------- chamber band (portfolio's full-bleed gesture) ---------- */
/* A straight crop of Egress's black upper region, full bleed, with the
   collection title set over it in Gallery White — same no-scrim treatment
   as the home hero (decision #16). */

.chamber-band {
  position: relative;
  height: 52vh;
  min-height: 300px;
  overflow: hidden;
}

.chamber-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chamber-title {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(24px, 6vh, 56px);
  color: var(--gallery-white);
}

.chamber-title .eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--gallery-white);
  opacity: 0.85;
}

/* ---------- collection header ---------- */

.collection-header { max-width: 640px; }
.collection-header .eyebrow { display: block; margin-bottom: 12px; }
.collection-header p { margin-top: 20px; }

/* ---------- signup ---------- */

.signup-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 20px;
}

.signup-form input[type="email"] {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  padding: 8px 0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  min-width: min(320px, 70vw);
}
.signup-form input::placeholder { color: var(--stone); }
.signup-form input:focus { outline: none; border-bottom-color: var(--ink); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--section-gap);
  padding: 40px 0 48px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer .caption { max-width: none; }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; }
.footer-links a { font-size: 13px; color: var(--ink); }
.footer-links a:hover { color: var(--egress-red); }

/* ---------- contact centrepiece ---------- */

.contact-email {
  font-size: clamp(24px, 4.5vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  word-break: break-all;
}
.contact-email:hover, .contact-email:focus-visible { color: var(--egress-red); }

/* Shiny-text sweep (ported donor component): the email is clipped to an
   Ink→Egress Red gradient three times its width; at rest the visible window
   is pure Ink, on hover the background glides so the colour edge sweeps
   through the text and settles on solid Egress Red. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .contact-email {
    background-image: linear-gradient(90deg,
      var(--ink) 0%, var(--ink) 42%,
      var(--egress-red) 58%, var(--egress-red) 100%);
    background-size: 300% 100%;
    background-position: 0% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position var(--slow) var(--ease-glide);
  }
  .contact-email:hover, .contact-email:focus-visible {
    background-position: 100% 0;
  }
}

/* ---------- ink reveal veil ---------- */

.ink-reveal { position: relative; }

.ink-reveal .ink-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0;
}

/* ---------- circular gallery (ring of works) ---------- */

.ring { --ring-item-w: min(320px, 64vw); }

/* no-JS fallback: the works read as a plain stacked list */
.ring-item { max-width: var(--ring-item-w); margin: 0 auto var(--block-gap); }
.ring-item img { width: 100%; -webkit-user-drag: none; user-select: none; }
.ring-item .wall-label { margin-top: 12px; }

.ring--3d .ring-stage {
  position: relative;
  perspective: 2000px;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.ring--3d .ring-stage:active { cursor: grabbing; }

.ring--3d .ring-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.ring--3d .ring-scene.is-animating { transition: transform var(--slow) var(--ease-glide); }

.ring--3d .ring-item {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--ring-item-w);
  margin: 0 0 0 calc(var(--ring-item-w) / -2);
  transition: opacity var(--slow) var(--ease-glide);
  backface-visibility: hidden;
}

.ring--3d .ring-item .wall-label {
  opacity: 0;
  transition: opacity var(--fast) ease;
}
.ring--3d .ring-item.is-front .wall-label { opacity: 1; }

.ring-controls { display: flex; gap: 16px; margin-top: 24px; }
.ring-controls button {
  background: none;
  border: 0;
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: var(--text-subheading);
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: color var(--fast) ease;
}
.ring-controls button:hover,
.ring-controls button:focus-visible { color: var(--egress-red); }

/* ---------- reveal motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--slow) var(--ease-glide), transform var(--slow) var(--ease-glide);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill { transition: none; }
  .contact-email { transition: none; }
  .ring--3d .ring-scene.is-animating,
  .ring--3d .ring-item { transition: none; }
}
