/* <!-- brand-voice: skip --> CSS property keywords are not marketing copy.
   Enhaus pixera.enhaus.io
   Standalone Pixera credits page.

   Design tokens are the Enhaus brand canon (brand-voice-guidelines.md §11,
   mirrored in the enhaus-app-design design tokens). Dark is the primary
   brand surface. Do not invent new tokens here; if the canon changes, update
   these values to match rather than adding ad-hoc colours or sizes.

   Typefaces are self-hosted to match the main site (no CDN). Drop the woff2
   files into /assets/fonts/ (see README). Until they are present the page
   renders on the system fallbacks below, which keep the same editorial feel. */

/* ---- Self-hosted brand fonts ------------------------------------------- */

/* The real Enhaus web faces (self-hosted, no CDN): Instrument Sans for text and
   headings, JetBrains Mono for labels and spec-style meta. */
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans-400-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---- Tokens ------------------------------------------------------------ */

:root {
  /* Colour (brand canon §11, dark surface) */
  --bg: #0A0A0B;
  --fg: #EDEDED;
  --muted: #8A8A8A;   /* 5.7:1 on --bg, passes WCAG AA for text */
  --accent: #D4CBB8;
  --rule: rgba(237, 237, 237, 0.10);

  /* Type families (the real Enhaus web fonts) */
  --font-display: "Instrument Sans", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo,
               "Liberation Mono", monospace;

  /* Spacing scale: 4 / 8 / 16 / 24 / 32 / 48 / 64 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;

  /* Layout */
  --container: 68rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ---- Reset / base ------------------------------------------------------ */

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;   /* the page never scrolls left to right */
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }

img { max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease;
}

a:hover { color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---- Layout ------------------------------------------------------------ */

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

/* ---- Masthead ---------------------------------------------------------- */

.masthead {
  padding-top: clamp(2.5rem, 7vw, 4.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.wordmark {
  display: inline-block;
  line-height: 0;   /* the mark is an image; kill inline descender gap */
}

.wordmark__img {
  display: block;
  height: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem);
  width: auto;
}

.masthead__lead {
  margin: var(--space-3) auto 0;
  max-width: 30rem;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

/* ---- Sections ---------------------------------------------------------- */

.section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space-5);
}

/* ---- Credits ----------------------------------------------------------- */

.credits {
  list-style: none;
  padding: 0;
}

/* Ledger row: title left, role/year right. Uses the full frame width, so it
   reads as a composed index rather than a narrow stacked list. */
.credit {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-5);
  padding-block: clamp(1.5rem, 4vw, 2.25rem);
  border-top: 1px solid var(--rule);
}

.credit:first-child { border-top: 0; padding-top: 0; }

.credit__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: color 140ms ease;
}

/* Brand-accent highlight on the event name when its row is hovered/focused. */
.credit:hover .credit__title,
.credit:focus-within .credit__title { color: var(--accent); }

.credit__meta {
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (max-width: 44rem) {
  .credit { display: block; }
  .credit__meta { margin-top: var(--space-2); text-align: left; }
}

/* Optional photo. Constrained so it never forces horizontal scroll and keeps
   the editorial whitespace. No shadow, no gradient, no rounded card. */
.credit__media {
  margin-top: var(--space-4);
  max-width: 34rem;
}

.credit__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;          /* reserves space to prevent layout shift;
                                   override with real width/height on the img */
  object-fit: cover;
  background: #141416;          /* quiet tone while lazy loading */
}

.credit__media figcaption {
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---- References -------------------------------------------------------- */

.references {
  list-style: none;
  padding: 0;
}

.reference {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-5);
  padding-block: var(--space-3);
  border-top: 1px solid var(--rule);
}
.reference:first-child { border-top: 0; padding-top: 0; }

.reference__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Reference name is a click-to-email link: accent + underline on hover. */
a.reference__name { text-decoration: none; }
a.reference__name:hover,
a.reference__name:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

.reference__meta {
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (max-width: 44rem) {
  .reference { display: block; }
  .reference__name { display: block; }
  .reference__meta { display: block; margin-top: var(--space-1); text-align: left; }
}

.references__note {
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---- Pixera rentals (lead-gen CTA) ------------------------------------- */

/* Extra room up top so the shift from portfolio to offering eases in. */
.rentals { padding-top: clamp(3.5rem, 8vw, 6rem); }

.rentals__lead {
  max-width: 42rem;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: var(--space-4);
}

/* Two small, quiet buttons. Present, not in-your-face. Each opens a
   pre-written enquiry email so the request arrives already labelled. */
.rentals__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.rentals__link {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--rule);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  color: var(--fg);
  transition: border-color 140ms ease, color 140ms ease;
}

.rentals__link:hover,
.rentals__link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

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

/* ---- Footer ------------------------------------------------------------ */

.site-footer {
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--rule);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer__nav a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.site-footer__nav a:hover { color: var(--accent); }

/* ---- Selected work (hero + auto-scroll carousel) ----------------------- */

.works {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
  text-align: center;
}

.works:not(:has(.work)) { display: none; }

/* Oversized centred hero with the tagline beneath it. */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.18em;
  margin: 0;
  font-weight: 400;
  line-height: 0.95;
  font-size: clamp(2.5rem, 9vw, 6rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__script { font-family: var(--font-display); font-style: italic; font-weight: 400; }
.hero__grotesk { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.015em; }

.works__sub {
  margin: var(--space-3) auto 0;
  max-width: 32rem;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.45;
  color: var(--muted);
}

/* The strip sits in the page's content column and is driven by scrollLeft (JS).
   It auto-scrolls slowly, pauses on hover/focus, can be dragged while paused,
   and resumes when the pointer leaves. Side edges fade into the page. Without
   JS it is a plain horizontal scroll row. */
.carousel {
  margin-top: clamp(1.75rem, 5vw, 3rem);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 11%, #000 89%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 11%, #000 89%, transparent 100%);
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.is-dragging { cursor: grabbing; user-select: none; }

.carousel__track {
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  width: max-content;
  max-width: none;
}

.work {
  flex: 0 0 auto;
  scroll-snap-align: start;
  outline: none;
}

.work__figure {
  position: relative;
  margin: 0;
  width: clamp(15rem, 40vw, 21rem);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #141416;   /* quiet tone while lazy loading. No shadow, no radius. */
}

.work__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* Identity revealed on hover / focus. Text stays in the DOM for screen readers. */
.work__caption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: var(--space-3);
  background: linear-gradient(to top, rgba(10, 10, 11, 0.92), rgba(10, 10, 11, 0));
  color: var(--fg);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
}
/* The gradient here is a legibility scrim over the photo, not a decorative
   fill; the page itself stays flat per the brand. */

.work:hover .work__caption,
.work:focus-visible .work__caption {
  opacity: 1;
  transform: translateY(0);
}

.work:focus-visible .work__figure { outline: 2px solid var(--accent); outline-offset: 3px; }

.work__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--accent);   /* brand-accent event name on the revealed caption */
}

.work__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Touch devices have no hover: keep identities visible. */
@media (hover: none) {
  .work__caption { opacity: 1; transform: none; }
}

/* ---- Share control ----------------------------------------------------- */

.share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-4);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 120ms ease;
}

.share:hover,
.share:focus-visible { color: var(--accent); }

.share:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.share__icon { display: block; }

/* ---- Motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  a,
  .share,
  .credit__title,
  .work__caption { transition: none; }
}
