/* ==========================================================================
   J&J CARD LAB, DESIGN SYSTEM
   Ported straight from the Claude Design handoff. Values here match the
   handoff one for one. Change tokens, not individual rules.
   ========================================================================== */

:root {
  /* Colour */
  --bg:          #08080A;
  --bg-alt:      #0F0F12;
  --fg:          #EDEEF1;
  --muted:       #A7ACB4;
  --faint:       #43474D;
  --slot-bg:     #0B0B0E;

  --hairline:    rgba(237, 238, 241, 0.07);
  --edge:        rgba(237, 238, 241, 0.16);
  --edge-hover:  rgba(237, 238, 241, 0.34);
  --fill:        rgba(237, 238, 241, 0.04);
  --fill-hover:  rgba(237, 238, 241, 0.09);

  /* Type */
  --sans: 'Space Grotesk', Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --gutter: 40px;
  --maxw:   1320px;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  color-scheme: dark;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  color: var(--fg);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, canvas { display: block; max-width: 100%; }

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

a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--fg); }

::selection { background: var(--faint); color: var(--fg); }

/* -------------------------------------------------------------------------- */
/* Accessibility                                                              */
/* -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -160%);
  padding: 14px 26px;
  border: 1px solid var(--edge-hover);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: transform 160ms ease;
}
/* :focus, not :focus-visible. The skip link is the first tabbable element on
   the page and only ever reached by keyboard, so it should show for any focus. */
.skip-link:focus { transform: translate(-50%, 0); }

/* -------------------------------------------------------------------------- */
/* Shared primitives                                                          */
/* -------------------------------------------------------------------------- */

/* Small monospace meta row, e.g. "02 · Featured Set" */
.rule {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--maxw);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 120px;
}
.rule--baseline { align-items: baseline; padding-top: 100px; margin-bottom: 0; }

/* Outlined capsule button */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 34px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--fill);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--fg);
  text-transform: uppercase;
  transition: background-color 220ms ease, border-color 220ms ease;
}
.pill:hover { background: var(--fill-hover); border-color: var(--edge-hover); color: var(--fg); }
.pill__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Image slot: always reserves its box so nothing shifts or pops in */
.slot {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--slot-bg);
  border-radius: 10px;
  aspect-ratio: 5 / 7;
}
.slot picture { display: block; width: 100%; height: 100%; }
.slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Copy the shop has not settled yet: a price, an allocation. Marked so an
   unfinished value is visible instead of shipping an invented number. */
.tbd {
  border-bottom: 1px dashed var(--faint);
  padding-bottom: 2px;
}

/* A link whose URL has not been pasted into links.js yet */
.is-unwired {
  border-bottom: 1px dashed var(--faint);
  cursor: not-allowed;
}
.pill.is-unwired { border-style: dashed; border-color: var(--faint); }

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px var(--gutter);
  background: linear-gradient(to bottom, rgba(8, 8, 10, 0.92), rgba(8, 8, 10, 0));
}

.wordmark {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--fg);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* 1. Hero                                                                    */
/* -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 160px var(--gutter) 120px;
}

.hero__meta {
  position: absolute;
  top: 120px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--faint);
  text-transform: uppercase;
}
.hero__meta--left  { left: var(--gutter); }
.hero__meta--right { right: var(--gutter); }

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__bg img {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 94%;
  max-width: 1900px;
  mix-blend-mode: screen;
  opacity: 0.72;
  filter: grayscale(1) contrast(1.1) brightness(0.82);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 26%, #000 74%, transparent 100%),
    linear-gradient(to right,  transparent 0%, #000  7%, #000 93%, transparent 100%);
          mask-image:
    linear-gradient(to bottom, transparent 0%, #000 26%, #000 74%, transparent 100%),
    linear-gradient(to right,  transparent 0%, #000  7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    #08080A 0%,
    rgba(8, 8, 10, 0.82) 14%,
    rgba(8, 8, 10, 0) 30%,
    rgba(8, 8, 10, 0) 62%,
    #08080A 100%
  );
}

.hero__title-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 38px;
  width: 100%;
  max-width: 1200px;
}

.hero__title {
  text-align: center;
  font-weight: 300;
  font-size: clamp(40px, 8vw, 132px);
  line-height: 1.02;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  text-shadow: 0 0 60px rgba(8, 8, 10, 0.9);
}

.hero__cta-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  margin-top: 44px;
}

.hero__sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--muted);
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
}

/* -------------------------------------------------------------------------- */
/* 2. Featured                                                                */
/* -------------------------------------------------------------------------- */

.featured {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 200px var(--gutter) 220px;
  background: var(--bg);
  overflow: hidden;
}

.featured__chrome {
  position: absolute;
  top: -120px;
  bottom: -120px;
  left: -6%;
  width: 44%;
  max-width: 640px;
  pointer-events: none;
  opacity: 0.62;
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0%, #000 26%, #000 52%, transparent 92%),
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 74%, transparent 100%);
          mask-image:
    linear-gradient(to right,  transparent 0%, #000 26%, #000 52%, transparent 92%),
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 74%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.featured__chrome picture,
.featured__chrome img { width: 100%; height: 100%; }
.featured__chrome img {
  object-fit: cover;
  object-position: 60% center;
  filter: grayscale(1) contrast(1.08) brightness(0.78);
}

.featured__stage {
  --card-w: min(380px, 74vw);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.featured__halo {
  position: absolute;
  top: -60px;
  width: min(820px, 150vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(167, 172, 180, 0.07) 0%, rgba(8, 8, 10, 0) 65%);
  pointer-events: none;
}

.slot--featured {
  width: var(--card-w);
  aspect-ratio: 38 / 53;
  border-radius: 14px;
  position: relative;
  z-index: 2;
}

.featured__reflection {
  width: var(--card-w);
  height: calc(var(--card-w) * 170 / 380);
  margin-top: 2px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  opacity: 0.16;
  transform: scaleY(-1);
  filter: blur(1.5px);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 100%);
          mask-image: linear-gradient(to top, transparent 0%, #000 100%);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}
.featured__reflection .slot {
  width: 100%;
  height: calc(var(--card-w) * 53 / 38);
  aspect-ratio: auto;
  border-radius: 0;
}

.featured__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 80px;
  text-align: center;
}

.featured__title {
  max-width: 900px;
  text-wrap: balance;
  font-weight: 300;
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
}

.featured__specs {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.featured__specs .sep { color: var(--faint); }

.featured__body {
  margin-top: 26px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}

.featured__actions {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 22px;
}

.featured__stock {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--faint);
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* 3. Gallery                                                                 */
/* -------------------------------------------------------------------------- */

.gallery {
  position: relative;
  padding: 120px var(--gutter) 240px;
  background: var(--bg-alt);
  overflow: hidden;
}

.gallery__ridge {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 820px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.gallery__ridge canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.gallery__inner { position: relative; max-width: var(--maxw); margin: 0 auto; }

.gallery__title {
  margin: 48px 0 260px;
  font-weight: 300;
  font-size: clamp(36px, 6vw, 92px);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}

.gallery__crater {
  position: absolute;
  top: 760px;
  left: calc(var(--gutter) * -1);
  right: calc(var(--gutter) * -1);
  height: 1500px;
  z-index: 0;
  opacity: 0.34;
  filter: grayscale(1) contrast(1.1) brightness(0.5);
  -webkit-mask-image: radial-gradient(ellipse 62% 48% at 50% 50%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 62% 48% at 50% 50%, #000 0%, transparent 72%);
}
.gallery__crater picture,
.gallery__crater img { width: 100%; height: 100%; }
.gallery__crater img { object-fit: cover; object-position: 60% center; }

.gallery__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px;
  align-items: start;
}

.card--1 { grid-column: 2 / span 4; margin: 0; }
.card--2 { grid-column: 8 / span 4; margin: 230px 0 0; }
.card--3 { grid-column: 3 / span 3; margin: 140px 0 0; }
.card--4 { grid-column: 8 / span 3; margin: 80px 0 0; }
.card--5 { grid-column: 4 / span 5; margin: 160px 0 0; }

.card__cap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.card__name  { color: var(--muted); }
.card__price { color: var(--fg); }
.card__link  {
  color: var(--faint);
  align-self: flex-start;
  transition: color 200ms ease;
}
.card__link:hover { color: var(--fg); }

/* -------------------------------------------------------------------------- */
/* 4. Process                                                                 */
/* -------------------------------------------------------------------------- */

.process {
  position: relative;
  background: var(--bg);
  padding: 200px 0 220px;
  overflow: hidden;
}
.process__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.process .rule { margin-bottom: 140px; }

.process__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 100px;
}

.fact { display: flex; flex-direction: column; gap: 36px; }

.fact__num {
  font-family: var(--mono);
  font-size: clamp(64px, 8vw, 120px);
  line-height: 0.8;
  color: var(--faint);
}
.fact__title {
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}
.fact__body {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  text-wrap: pretty;
}

/* -------------------------------------------------------------------------- */
/* 5. Footer                                                                  */
/* -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--bg);
  padding: 120px var(--gutter) 60px;
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 110px;
}

.footer-mark {
  font-weight: 300;
  font-size: clamp(48px, 11.4vw, 172px);
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .footer-mark {
    background-image: url('assets/streaks-900.jpg');
    background-image: image-set(
      url('assets/streaks-900.webp') type('image/webp'),
      url('assets/streaks-900.jpg')  type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
  }
}

.footer-foot { display: flex; flex-direction: column; gap: 34px; }

.footer-links {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--faint);
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .process__grid { gap: 64px; }
  .gallery { padding-bottom: 180px; }
}

@media (max-width: 1024px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .card--1, .card--2, .card--3, .card--4, .card--5 { grid-column: auto; margin: 0; }
  .card--2, .card--4 { margin-top: 72px; }
  .card--5 { grid-column: 1 / -1; width: min(100%, 58%); margin-inline: auto; }
  .gallery__title { margin-bottom: 140px; }
  .gallery__crater { top: 560px; height: 1100px; }
  .gallery__ridge { height: 620px; }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .site-header { padding: 18px var(--gutter); }
  .site-nav { gap: 18px; font-size: 10px; letter-spacing: 0.16em; }
  .wordmark { font-size: 11px; letter-spacing: 0.28em; }

  .hero { padding: 132px var(--gutter) 90px; }
  .featured { padding: 120px var(--gutter) 140px; }
  .featured__chrome { display: none; }
  .featured__copy { margin-top: 56px; }
  .rule { margin-bottom: 72px; }
  .rule--baseline { padding-top: 64px; }

  .gallery { padding-top: 80px; }
  .gallery__title { margin: 40px 0 96px; }

  .process { padding: 120px 0 140px; }
  .process .rule { margin-bottom: 84px; }
  .process__grid { grid-template-columns: 1fr; gap: 72px; }

  .site-footer { padding: 90px var(--gutter) 48px; }
  .site-footer__inner { gap: 64px; }
}

@media (max-width: 760px) {
  /* The two hero markers leave their corners and stack above the headline. */
  .hero { padding-top: 116px; row-gap: 4px; }
  .hero__meta { position: static; text-align: center; }
  .hero__meta--left { margin-bottom: 2px; }
  .hero__meta--right { margin-bottom: 26px; }
  .hero__cta-wrap { margin-top: 34px; gap: 26px; }
  .hero__title { letter-spacing: 0.04em; }

  .featured__specs { gap: 16px; font-size: 10px; }
  .footer-meta { flex-direction: column; gap: 12px; }
}

@media (max-width: 620px) {
  .gallery__grid { grid-template-columns: 1fr; gap: 56px; }
  .card--2, .card--4 { margin-top: 0; }
  .card--5 { width: 100%; }
  .gallery__crater { top: 420px; height: 900px; }
  .gallery__ridge { height: 460px; }

  .site-nav { gap: 14px; font-size: 9px; letter-spacing: 0.12em; }
  .pill { padding: 14px 26px; font-size: 10px; }
  .featured__actions { gap: 16px; }
  .footer-links { gap: 20px; }
}

@media (max-width: 400px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero { padding-top: 140px; }
}

/* -------------------------------------------------------------------------- */
/* Reduced motion                                                             */
/* -------------------------------------------------------------------------- */
/* The ridge canvas is the only looping motion on the page. main.js paints a
   single static frame instead of running the scroll loop when this is on. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
