/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-canvas:     #f2f2f2;
  --color-surface:    #ffffff;
  --color-ink:        #333333;
  --color-ink-dim:    #b2b2b2;
  --radius-sm:      1px;
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss02', 'ss04', 'ss07', 'ss08';
  font-size: 12px;
  color: var(--color-ink);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 767px) {
  .sm-display-block {
    display: block;
  }
  .sm-hide, .xs-hide {
    display: none !important;
  }


}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: row;
}

/* ─── Aside ──────────────────────────────────────────────────────────────── */
.aside {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(320px, 33vw, 480px);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  padding: 36px 40px;
  background: white;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 10;
  overflow: hidden;
}

/* ─── Main ───────────────────────────────────────────────────────────────── */
.main {
  margin-left: clamp(321px, calc(33vw + 1px), 481px);
  width: calc(100% - clamp(321px, calc(33vw + 1px), 481px));
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.aside__photo {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity 900ms ease 1200ms;
  overflow: hidden;
  flex-shrink: 0;
  pointer-events: none;
}

.aside__photo.is-visible {
  opacity: 1;
  transition: opacity 600ms ease;
}

.aside__photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.aside__body {
  flex: 0 0 auto;
  display: flow-root;
}

.aside__filler-y {
  flex: 1 0 auto;
}

.aside__logo {
  float: left;
  width: 68px;
  height: 41px;
  shape-outside: inset(0px);
  shape-margin: 10px;
  margin-right: 12px;
  margin-top: -8px;
  margin-bottom: 4px;
}

.aside__copy {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 21px;
  color: #808080;
  font-feature-settings: 'ss02', 'ss04', 'ss07', 'ss08';
  margin: 0;
}

.aside__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: #808080;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  white-space: nowrap;
}

.aside__footer-left,
.aside__footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.aside__footer-right {
  gap: 3px;
}

.aside__copyright {
  display: flex;
  align-items: center;
  gap: 1px;
}

.aside__trigger {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  white-space: nowrap;
  border: none;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(
    90deg,
    #808080 0%,
    #808080 35%,
    #333333 50%,
    #808080 65%,
    #808080 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2400ms linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}

/* ─── Brand Grid ─────────────────────────────────────────────────────────── */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  width: 100%;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.card,
.cell--empty {
  aspect-ratio: 248.8 / 208.2;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
}

.card {
  --card-bg: #ffffff;
  position: relative;
  overflow: hidden;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card:hover {
  cursor: pointer;
}

/* ─── Card — Canvas overlay ─────────────────────────────────────────────── */
.card__canvas {
  position: absolute;
  inset: 0;
  width:  100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ─── Card — Brandmark ───────────────────────────────────────────────────── */
.card__brandmark {
  position: relative;
  z-index: 2;
  width: 50%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__brandmark svg {
  width: 100%;
  height: 100%;
  max-width: clamp(60px, 10vw, 100px);
  max-height: clamp(60px, 10vw, 100px);
}

/* ─── Ghost path fill tracks the card background via CSS variable ─────────── */
/* full-opacity ghost paths use fill="var(--card-bg)" in the processed SVGs. */
/* No transition needed — GSAP drives all other path animations. */

/* ─── Dev Panel ──────────────────────────────────────────────────────────── */
#dev-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  font-size: 11px;
  z-index: 9999;
  overflow: hidden;
}

.dp__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e5e5;
  background: #fafafa;
}

.dp__title {
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 10px;
  color: #808080;
}

.dp__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #b2b2b2;
  line-height: 1;
  padding: 0;
}

.dp__close:hover { color: #333333; }

.dp__body {
  padding: 8px 0;
  max-height: 80dvh;
  overflow-y: auto;
}

.dp__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  cursor: default;
}

.dp__row:hover { background: #f7f7f7; }

.dp__label {
  font-size: 10.5px;
  color: #404040;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp__slider {
  width: 80px;
  accent-color: #333333;
  cursor: pointer;
}

.dp__select {
  font-size: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  padding: 2px 4px;
  background: white;
  color: #333333;
  cursor: pointer;
  grid-column: 2 / span 2;
}

.dp__value {
  font-size: 10px;
  color: #808080;
  text-align: right;
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}

.dp__footer {
  padding: 8px 14px 10px;
  border-top: 1px solid #e5e5e5;
}

.dp__copy-btn {
  width: 100%;
  padding: 5px 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #808080;
  background: none;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.dp__copy-btn:hover {
  color: #333333;
  border-color: #b2b2b2;
}

/* ─── Mobile header (hidden on desktop) ─────────────────────────────────── */
.mobile-header {
  display: none;
}

/* ─── Mobile-only utility ───────────────────────────────────────────────── */
.mobile-only { display: none; }

/* ─── Grid row full (spans all columns) ────────────────────────────────── */
.grid-row-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 60px 100px 32px;
  
}

.grid-footer__thanks {
  font-size: 15px;
  line-height: 21px;
  color: #808080;
}

.grid-footer__thanks strong {
  font-weight: 600;
}

.grid-footer__tagline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: #808080;
  text-transform: uppercase;
  letter-spacing: 0.25px;
}

.grid-footer__pi {
  background: none;
  border: none;
  font-size: 12px;
  color: #808080;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aside__trigger-static {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: #808080;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  text-decoration: none;
}

.aside__trigger-static:hover {
  color: var(--color-ink);
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    #808080 0%,
    #808080 35%,
    #333333 50%,
    #808080 65%,
    #808080 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2400ms linear infinite;
}

.credit-name {
  cursor: default;
  transition: color 200ms ease;
}

.credit-name:hover {
  color: var(--color-ink);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

/* LG — 4 columns (1024–1279px) */
@media (max-width: 1279px) {
  .brand-grid { grid-template-columns: repeat(4, 1fr); }

  .grid-row-full {
    padding-top:52px;
    padding-right: 68px;
    padding-left: 68px;
  }
}

/* MD — 3 columns, narrower aside (768–1023px) */
@media (max-width: 1023px) {
  .brand-grid { grid-template-columns: repeat(3, 1fr); }

  .aside {
    width: 340px;
    padding: 28px 32px 32px;
  }

  .main {
    margin-left: 341px;
    width: calc(100% - 341px);
  }

  .aside__trigger {
    font-size: 0;
    letter-spacing: 0;
    animation-duration: 700ms;
  }

  .aside__trigger::before {
    content: 'RP';
    font-size: 11px;
    letter-spacing: 0.25px;
    display: inline-block;
    background: linear-gradient(
      90deg,
      #808080 0%,
      #808080 35%,
      #333333 50%,
      #808080 65%,
      #808080 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 700ms linear infinite;
  }

  .grid-row-full {
    padding-right: 60px;
    padding-bottom: 28px;
    padding-left: 60px;
  }
}

/* SM — aside hidden, mobile layout (< 768px) */
@media (max-width: 767px) {
  html {
    height: auto;
    overflow: visible;
  }

  .aside { display: none; }

  body {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
  }

  .main {
    margin-left: 0;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .mobile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    padding: 104px 48px 48px;
    width: 100%;
  }

  .mobile-header__logo {
    width: 79.61px;
    height: 48px;
  }

  .mobile-header__copy {
    font-size: 15px;
    line-height: 21px;
    color: #808080;
    margin: 0;
    width: 100%;
  }

  .mobile-only { display: flex; }

  .grid-row-full {
    padding-top: 56px;
    padding-right: 48px;
    padding-bottom: 40px;
    padding-left: 48px;
  }

  .grid-footer__tagline{
    font-size: 13px;
  }

  .grid-footer__aside-footer {
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 11px;
    color: #808080;
    letter-spacing: 0.25px;
    text-transform: uppercase;
    white-space: nowrap;
  }
}

/* XS (< 480px) */
@media (max-width: 479px) {
  .mobile-header {
    gap: 40px;
    padding: 88px 40px 40px;
  }

  .grid-row-full {
    padding: 48px 36px 28px;
  }

  .grid-footer__tagline {
    text-align: center;
    line-height: 19px;
    max-width: 100%;
    margin: 8px auto 12px;
  }
  .grid-footer__tagline p {
    width: 100%;
  }
}
