/* ---------- shared ---------- */
.section-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4em;
  color: var(--coral); margin-bottom: clamp(24px, 4vh, 48px);
}
/* word-reveal targets (js/ui/reveal.js) */
[data-reveal-words] .w {
  display: inline-block;
  opacity: 0; transform: translateY(0.6em) rotate(2deg);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--wd, 0s);
}
[data-reveal-words].revealed .w { opacity: 1; transform: none; }

/* ---------- manifesto / about ---------- */
.manifesto {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18vh clamp(24px, 8vw, 140px) clamp(48px, 10vh, 120px);
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(20, 15, 56, 0.72) 22%,
    rgba(20, 15, 56, 0.88) 60%,
    rgba(34, 26, 51, 1) 100%);
  overflow: hidden;
}

/* Decorative annotations in negative space */
.manifesto__deco {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: rgba(255, 246, 236, 0.2);
  pointer-events: none;
  user-select: none;
}
.manifesto__deco--fig-i  { top: 12%;  left: 2%;  }
.manifesto__deco--cross  { top: 52%;  right: 2%; font-size: 22px; }
.manifesto__deco--fig-ii { bottom: 22%; left: 48%; }
@media (max-width: 899px) {
  /* FIG. I collides with the kicker in the single-column layout */
  .manifesto__deco--fig-i { display: none; }
  .manifesto__deco--fig-ii { display: none; }
}

/* Two-column layout: ~62/38 */
.manifesto__columns {
  display: grid;
  grid-template-columns: 62fr 38fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  padding-bottom: clamp(48px, 8vh, 96px);
}
@media (max-width: 899px) {
  .manifesto__columns {
    grid-template-columns: 1fr;
    gap: clamp(40px, 6vh, 64px);
  }
}

/* Left column */
.manifesto__text-col {
  display: flex;
  flex-direction: column;
}

.manifesto__statement {
  font-size: clamp(28px, 4.4vw, 58px);
  font-weight: 340; line-height: 1.32;
  letter-spacing: -0.01em;
  max-width: 22ch;
}

/* Secondary body paragraph */
.manifesto__body {
  margin-top: clamp(24px, 3.5vh, 40px);
  font-style: italic;
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 246, 236, 0.7);
  max-width: 38ch;
}

.manifesto__signature {
  margin-top: clamp(28px, 4vh, 48px);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em;
  color: rgba(255, 246, 236, 0.55);
}

/* Right column — portrait artifact */
.manifesto__portrait-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: clamp(8px, 2vh, 24px);
  /* scroll-reveal start state */
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.manifesto__portrait-col.about-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 899px) {
  .manifesto__portrait-col {
    align-items: center;
  }
}

/* Blueprint corner-bracket wrapper */
.manifesto__portrait-frame-wrap {
  position: relative;
  display: block;
  max-width: 300px;
  width: 100%;
}
.manifesto__portrait-frame-wrap::before,
.manifesto__portrait-frame-wrap::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 246, 236, 0.35);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}
/* top-right */
.manifesto__portrait-frame-wrap::before {
  top: -6px; right: -6px;
  border-width: 1px 1px 0 0;
}
/* bottom-left */
.manifesto__portrait-frame-wrap::after {
  bottom: -6px; left: -6px;
  border-width: 0 0 1px 1px;
}
/* top-left */
.manifesto__corner-tl {
  display: block;
  position: absolute;
  top: -6px; left: -6px;
  width: 14px; height: 14px;
  border: 1px solid rgba(255, 246, 236, 0.35);
  border-width: 1px 0 0 1px;
  pointer-events: none;
  z-index: 2;
}
/* bottom-right */
.manifesto__corner-br {
  display: block;
  position: absolute;
  bottom: -6px; right: -6px;
  width: 14px; height: 14px;
  border: 1px solid rgba(255, 246, 236, 0.35);
  border-width: 0 1px 1px 0;
  pointer-events: none;
  z-index: 2;
}

.manifesto__portrait-frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 246, 236, 0.25);
  box-shadow: 0 24px 60px -20px rgba(6, 3, 24, 0.6);
}
.manifesto__portrait-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.manifesto__portrait-caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: rgba(255, 246, 236, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .manifesto__portrait-col {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- works — full-dark Galekto-style artworks page ---------- */
.works {
  position: relative;
  /* Lifted indigo, distinct from the near-black indigo of the contact seam */
  background:
    linear-gradient(to bottom, #1d1650 0%, #241a5e 100%);
  color: var(--warm-white);
  padding: clamp(64px, 10vh, 120px) clamp(24px, 8vw, 120px)
    clamp(96px, 16vh, 200px);
  overflow: hidden;
  border-top: 1px solid rgba(255, 246, 236, 0.08);
}
/* Faint blueprint grid across the whole section */
.works::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(255, 246, 236, 0.05) 0 1px,
      transparent 1px 90px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 246, 236, 0.05) 0 1px,
      transparent 1px 90px
    );
  z-index: 0;
}
.works__head,
.works__grid,
.works__marquee { position: relative; z-index: 2; }

.works__head { margin-bottom: clamp(24px, 4vh, 48px); }

/* Giant uppercase headline — same light weight and coral→amber gradient as
 * the contact display, so both giant titles read as one voice. */
.works__display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(90px, 16vw, 240px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: rgba(255, 246, 236, 0.85); /* Firefox / no-support fallback */
}
@supports (-webkit-background-clip: text) {
  .works__display {
    background: linear-gradient(135deg, var(--coral) 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* ---------- decorative technical annotations ---------- */
.works__deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: rgba(255, 246, 236, 0.12);
}
.works__deco-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: rgba(255, 246, 236, 0.28);
}
.works__deco-label--a { top: 34%; right: 8%; }
.works__deco-label--b { top: 62%; left: 6%; }
.works__deco-label--c { top: 82%; right: 14%; }
.works__deco-cross {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
  color: rgba(255, 246, 236, 0.22);
}
.works__deco-cross--a { top: 46%; left: 4%; }
.works__deco-cross--b { top: 70%; right: 5%; }
.works__deco-cross--c { top: 90%; left: 22%; }
.works__deco-line {
  position: absolute;
  width: clamp(90px, 12vw, 180px);
  height: 1px;
  background: rgba(255, 246, 236, 0.12);
}
.works__deco-line--a { top: 40%; left: 30%; transform: rotate(-32deg); }
.works__deco-line--b { top: 76%; right: 26%; transform: rotate(24deg); }
.works__deco-sketch {
  position: absolute;
  top: 55%;
  right: 3%;
  width: clamp(120px, 14vw, 220px);
  height: auto;
  color: rgba(255, 246, 236, 0.1);
}
@media (max-width: 899px) {
  .works__deco-label--a,
  .works__deco-cross--a,
  .works__deco-line--a { display: none; }
}

/* ---------- marquee strip ---------- */
.works__marquee {
  overflow: hidden;
  border-top: 1px solid rgba(255, 246, 236, 0.15);
  border-bottom: 1px solid rgba(255, 246, 236, 0.15);
  padding: 11px 0;
  margin-bottom: clamp(48px, 8vh, 96px);
  opacity: 0.45;
}
.works__marquee-inner {
  display: flex; white-space: nowrap;
  animation: marquee-scroll 28s linear infinite;
}
.works__marquee-track {
  display: flex; gap: 0; flex-shrink: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.35em;
  color: var(--warm-white);
}
.works__marquee-track span { padding: 0 2.4em; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- works badge chip ---------- */
.works__badge {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(14px, 2vh, 22px);
  padding: 5px 14px;
  border: 1px solid rgba(255, 246, 236, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: rgba(255, 246, 236, 0.75);
}

/* ---------- works grid — scattered 12-col editorial ---------- */
.works__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  align-items: start;
}

/* Desktop card positions — scattered collage, strong vertical scatter */
@media (min-width: 900px) {
  /* Card 1 — Ember Tide: small landscape, top-left */
  .work-card:nth-child(1) {
    grid-column: 1 / span 3;
    margin-top: 0;
  }
  .work-card:nth-child(1) .work-card__frame {
    aspect-ratio: 4 / 3;
  }

  /* Card 2 — Salt Cathedral: wide, nudged up */
  .work-card:nth-child(2) {
    grid-column: 5 / span 4;
    margin-top: -40px;
  }
  .work-card:nth-child(2) .work-card__frame {
    aspect-ratio: 16 / 10;
  }

  /* Card 3 — Midnight Bloom: portrait, dropped deep */
  .work-card:nth-child(3) {
    grid-column: 10 / span 3;
    margin-top: clamp(80px, 10vw, 160px);
  }
  .work-card:nth-child(3) .work-card__frame {
    aspect-ratio: 3 / 4;
  }

  /* Card 4 — Helios Drift: wide, dropped */
  .work-card:nth-child(4) {
    grid-column: 3 / span 4;
    margin-top: clamp(60px, 8vw, 140px);
  }
  .work-card:nth-child(4) .work-card__frame {
    aspect-ratio: 16 / 10;
  }
}

/* Mobile: full-width stacking */
@media (max-width: 899px) {
  .works__grid {
    grid-template-columns: 1fr;
    row-gap: 56px;
  }
  .work-card {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
    transform: none !important;
  }
  .work-card .work-card__frame {
    aspect-ratio: 16 / 10;
  }
}

/* scroll-reveal entrance */
.work-card {
  display: block; text-align: left; width: 100%;
  background: none; border: none; cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.work-card--visible {
  opacity: 1;
  transform: translateY(0);
}
/* stagger via inline --delay set in JS */
.work-card { transition-delay: var(--reveal-delay, 0s); }

/* tilt hover overrides the reveal transform in JS — keep transition for tilt smooth */

/* Blueprint corner-bracket wrapper sits outside the clipped frame */
.work-card__frame-wrap {
  position: relative;
  display: block;
}

/* Four L-shaped corner brackets */
.work-card__frame-wrap::before,
.work-card__frame-wrap::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 246, 236, 0.35);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}
.work-card__corner-tl,
.work-card__corner-br {
  display: block;
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 246, 236, 0.35);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}
/* top-right */
.work-card__frame-wrap::before {
  top: -6px; right: -6px;
  border-width: 1px 1px 0 0;
}
/* bottom-left */
.work-card__frame-wrap::after {
  bottom: -6px; left: -6px;
  border-width: 0 0 1px 1px;
}
/* top-left */
.work-card__corner-tl {
  top: -6px; left: -6px;
  border-width: 1px 0 0 1px;
}
/* bottom-right */
.work-card__corner-br {
  bottom: -6px; right: -6px;
  border-width: 0 1px 1px 0;
}

.work-card__frame {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255, 246, 236, 0.18);
  box-shadow: 0 30px 70px -30px rgba(6, 3, 24, 0.7);
}
.work-card__frame canvas { width: 100%; height: 100%; display: block; }
.work-card__view {
  position: absolute; right: 14px; bottom: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.3em;
  color: var(--warm-white);
  text-shadow: 0 1px 10px rgba(6, 3, 24, 0.8);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.work-card:hover .work-card__view { opacity: 0.95; transform: none; }
.work-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 0 2px;
}
/* REF label: "REF 001 — EMBER TIDE" */
.work-card__ref {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: rgba(255, 246, 236, 0.85);
  text-transform: uppercase;
}
.work-card__ref strong {
  color: var(--amber);
  font-weight: 500;
}
/* Year + medium, right-aligned */
.work-card__info {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 246, 236, 0.5);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Hidden from card — available in data attr for lightbox */
.work-card__title { display: none; }
.work-card__index { display: none; }

/* ---------- lightbox overlay ---------- */
.lb-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16, 11, 44, 0.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.lb-overlay--open { opacity: 1; visibility: visible; }
.lb-overlay--open .lb-body {
  opacity: 1; transform: translateY(0);
}
.lb-body {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.55s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.55s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lb-close {
  position: absolute; top: clamp(18px, 3vh, 34px); right: clamp(18px, 3vw, 44px);
  z-index: 10;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.35em;
  color: rgba(255, 246, 236, 0.65);
  transition: color 0.25s;
  padding: 8px;
}
.lb-close:hover { color: var(--coral); }
.lb-canvas-wrap {
  position: absolute; inset: 0;
  z-index: 0;
}
.lb-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.lb-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 5;
  padding: clamp(32px, 6vh, 72px) clamp(24px, 8vw, 120px);
  background: linear-gradient(to top, rgba(16, 11, 44, 0.92) 0%, transparent 100%);
  pointer-events: none;
}
.lb-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.35em;
  color: rgba(255, 246, 236, 0.5);
  margin-bottom: 12px;
}
.lb-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 84px);
  font-weight: 420; line-height: 1.05; letter-spacing: -0.02em;
  color: var(--warm-white);
  margin-bottom: 14px;
}
.lb-desc {
  font-family: var(--font-display);
  font-style: italic; font-size: clamp(15px, 1.6vw, 20px);
  color: rgba(255, 246, 236, 0.65);
  max-width: 48ch;
}

/* ---------- contact ---------- */
.contact {
  background: linear-gradient(to bottom, var(--ink) 0%, var(--indigo) 30%, #2c1650 100%);
  min-height: 90svh;
  padding: clamp(90px, 16vh, 180px) clamp(24px, 10vw, 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact__layout {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  width: 100%;
}

/* --- display headline — gradient fill, always on, no word-split ---
 *
 * Technique: gradient applied via background-clip:text on the h2 directly.
 * Descender safety via line-height + padding-bottom so the clip never clips
 * letters like p/g/y. Degrades to warm-white in Firefox.
 */
.contact__display {
  font-size: clamp(64px, 11vw, 170px);
  font-weight: 380;
  line-height: 1.05;
  letter-spacing: -0.02em;
  cursor: default;
}

/* Gradient clipped on an INLINE span: inline background boxes cover the full
 * glyph ascent/descent per line, so descenders (the "p") don't get truncated
 * the way block-level background-clip:text does in Chrome. */
.contact__display-fill {
  /* Firefox / no-support fallback */
  color: rgba(255, 246, 236, 0.85);
}
@supports (-webkit-background-clip: text) {
  .contact__display-fill {
    background: linear-gradient(135deg, var(--coral) 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* --- info column --- */
.contact__info {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3.5vh, 40px);
}

.contact__email-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact__email {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(26px, 3.4vw, 48px);
  color: var(--warm-white);
  text-decoration: none;
  /* Sweep underline via background */
  background-image: linear-gradient(var(--coral), var(--coral));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  transition: background-size 0.4s ease;
}

.contact__email:hover { background-size: 100% 1.5px; }

/* Ghost pill copy button */
.contact__copy {
  background: transparent;
  border: 1px solid rgba(255, 246, 236, 0.3);
  border-radius: 999px;
  padding: 6px 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(255, 246, 236, 0.65);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.contact__copy:hover {
  color: var(--warm-white);
  border-color: rgba(255, 246, 236, 0.6);
}

.contact__copy--copied {
  color: var(--coral);
  border-color: var(--coral);
}

/* Social links row */
.contact__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.contact__socials a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255, 246, 236, 0.7);
  text-decoration: none;
  transition: color 0.3s;
}

.contact__socials a:hover { color: var(--coral); text-decoration: underline; }

.contact__note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 246, 236, 0.45);
  line-height: 1.7;
}

/* Mobile: single column */
@media (max-width: 899px) {
  .contact__layout {
    grid-template-columns: 1fr;
    gap: clamp(36px, 6vh, 60px);
  }

  .contact__display {
    font-size: clamp(56px, 14vw, 100px);
  }
}

/* ---------- footer ---------- */
.footer {
  background: #100b2c;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 34px clamp(24px, 6vw, 90px);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.25em;
  color: rgba(255, 246, 236, 0.45);
}
.footer a { transition: color 0.3s; }
.footer a:hover { color: var(--coral); }
@media (max-width: 640px) {
  .footer { justify-content: center; text-align: center; }
  .footer__mid { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal-words] .w { opacity: 1; transform: none; transition: none; }
  .work-card {
    transition: none;
    opacity: 1; transform: none;
  }
  .works__marquee-inner { animation: none; }
  .lb-body { transition: none; }
  .lb-overlay { transition: none; }
}
