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

/* ── TOKENS ── */
:root {
  --col-photo:   #FFFFFF;
  --col-prints:  #A8A8A8;
  --col-trade:   #5ECBA1;
  --col-code:    #C9A227;
  --bg:          #ECECEC;
  --border:      rgba(0, 0, 0, 0.14);
  --text-dark:   #111111;
  --text-muted:  #555555;
  --text-index:  rgba(0, 0, 0, 0.26);
  --font:        'Geist', sans-serif;

  /* Fine-tune per-word right offset to compensate for
     each glyph's built-in side bearing at 900 weight.
     Adjust these values after viewing in your browser. */
  --bleed-photo:   -6px;
  --bleed-prints:  -6px;
  --bleed-trade:   -20px;
  --bleed-code:    -20px;
}

/* ── BASE ── */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── ROOT LAYOUT ── */
.page {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

/* ── WORDMARK ── */
.wordmark-row {
  overflow: hidden;
  line-height: 0;
  padding: 0;
  padding-top: 8px;
  margin: 0;
}

.wordmark {
  display: block;
  font-family: var(--font);
  font-weight: 900;
  font-size: clamp(72px, 12.8vw, 180px);
  line-height: 0.78;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--text-dark);
  white-space: nowrap;
  padding: 0;
  margin: 0;
  transform: translateY(0);
}

.wordmark .www {
  color: #999999;
}

/* ── PANELS ── */
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-top: 2px solid #111111;
  overflow: hidden;
}

.panel {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-right: 2px solid #111111;
  transition: filter 0.25s ease;
}

.panel:last-child {
  border-right: none;
}

.panel:hover {
  filter: brightness(0.91);
}

.panel--photo  { background: var(--col-photo); }
.panel--prints { background: var(--col-prints); }
.panel--trade  { background: var(--col-trade); }
.panel--code   { background: var(--col-code); }

/* Index number */
.panel__num {
  position: absolute;
  top: 16px;
  left: 18px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-index);
  z-index: 2;
  user-select: none;
}

/* Vertical title — reads bottom to top, flush right */
.panel__title {
  font-family: var(--font);
  font-weight: 900;
  /* Scale with viewport width, capped at a comfortable max */
  font-size: clamp(80px, 11vw, 160px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  color: var(--text-dark);

  writing-mode: vertical-lr;
  transform: rotate(180deg);

  position: absolute;
  bottom: 0;
  right: var(--bleed-photo); /* override per panel below */

  white-space: nowrap;
  user-select: none;
  z-index: 2;
}

.panel--photo  .panel__title { right: var(--bleed-photo); }
.panel--prints .panel__title { right: var(--bleed-prints); }
.panel--trade  .panel__title { right: var(--bleed-trade); }
.panel--code   .panel__title { right: var(--bleed-code); }

.panel__desc {
  display: none;
}

/* Hover overlay — subtle darkening handled by filter above.
   Add a custom per-panel tint here if desired later. */

/* ── BOTTOM BAR ── */
.bottombar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-top: 2px solid #111111;
}

.bot-col {
  padding: 13px 18px 16px;
  border-right: 2px solid #111111;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
}

.bot-col:last-child {
  border-right: none;
}

.bot-col__brand {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dark);
}

.bot-col__desc {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
  text-align: right;
  width: 100%;
  text-align: right;
}

.bot-col__link {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 0.5px solid rgba(0,0,0,0.3);
  padding-bottom: 1px;
  width: fit-content;
  transition: opacity 0.2s;
}

.bot-col__link:hover {
  opacity: 0.45;
}

.bot-col__link {
  margin-top: auto;
  align-self: flex-start;
}

/* ── CURSOR ── */
.panel { cursor: pointer; }

@media (max-width: 768px) {

  html, body {
    overflow: auto;
  }

  .page {
    grid-template-rows: auto 1fr auto;
    height: auto;
    min-height: 100vh;
  }

  .wordmark {
    font-size: clamp(36px, 12vw, 60px);
    line-height: 0.78;
  }

  .panels {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 22vh);
  }

  .panel {
    border-right: none;
    border-bottom: 2px solid #111111;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 10px 12px 0 12px;
  }

  .panel:last-child {
    border-bottom: none;
  }

  .panel__num {
    position: absolute;
    top: 12px;
    left: 12px;
  }

  .panel__desc {
    display: block;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(0,0,0,0.5);
    text-align: right;
    align-self: flex-end;
    margin-top: 0;
  }

  .panel__title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: clamp(60px, 18vw, 100px);
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-start;
    margin-top: auto;
    line-height: 0.82;
    margin-bottom: -0.06em;
  }

  .bottombar {
    display: none;
  }

  .bot-col {
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.14);
    padding: 12px 16px;
  }

  .bot-col:last-child {
    border-bottom: none;
  }

  .bot-col__desc {
    text-align: left;
  }

}
