@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@400;500&family=JetBrains+Mono:wght@400&display=swap');

@font-face {
  font-family: 'Erotique Alternate';
  src: url('ErotiqueAlternateTrial-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Erotique Alternate';
  src: url('ErotiqueAlternateTrial-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Erotique Alternate';
  src: url('ErotiqueAlternateTrial-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Erotique Alternate Monoline';
  src: url('ErotiqueAlternateTrial-Monoline.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #F4F0E8;
  color: #1a1a1a;
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  cursor: url('cursor-arrow.svg') 1 0, default;   /* Win98-style pixelated arrow */
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 56px 64px 32px;
  transition: background 0.4s ease;
}

/* Masthead */
.masthead {
  text-align: center;
  margin-bottom: 96px;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a1a1a;
  opacity: 0.55;
  margin-bottom: 48px;
}

.headline {
  font-family: 'Erotique Alternate', 'DM Serif Display', serif;
  font-weight: 700;
  font-size: clamp(56px, 8.4vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin: 0;
}

.headline-svg {
  display: block;
  width: clamp(273px, 49vw, 830px);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Gallery row */
.gallery {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  padding: 0 8px;
  --fig-scale: 0.55;
}

.figure-svg {
  display: block;
  pointer-events: none;
  width: calc(110px * var(--fig-scale)) !important;
  height: auto !important;
}

.figure-btn {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: url('cursor-hand-tilt.png?v=4') 4 3, pointer;   /* Win98-style pixelated hand */
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
  transform-origin: bottom center;
  outline: none;
}

.figure-btn:hover {
  transform: translateY(-4px) scale(1.04);
}

.figure-btn:hover .figure-preview {
  opacity: 1;
  pointer-events: none;
}

.gallery:hover .figure-btn:not(:hover) {
  opacity: 0.45;
}

/* ── Figure preview (hover) ──────────────────────────────────
   Faithful miniature: renders the actual ProfileLayout1 component
   inside a fixed 1440px-wide container, scaled down via transform.
   ────────────────────────────────────────────────────────── */

/* macOS-inspired popup preview */
.figure-preview {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  box-sizing: border-box;
  background: #FFFFFF;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.10);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  z-index: 50;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

.figure-preview__titlebar {
  position: relative;
  height: 14px;
  background: linear-gradient(to bottom, #E8E6E3, #DAD7D3);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.figure-preview__lights {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}

.figure-preview__light {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
}

.figure-preview__light--close { background: #FF5F57; }
.figure-preview__light--min   { background: #FEBC2E; }
.figure-preview__light--max   { background: #28C840; }

.figure-preview__title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 6px;
  font-weight: 500;
  color: #4A4845;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 22px;
}

.figure-preview__frame {
  width: 100%;
  height: 100px;
  background: #FFFFFF;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

.figure-preview__inner {
  width: 1440px;
  transform: scale(0.0542);             /* 78 / 1440 */
  transform-origin: top left;
  pointer-events: none;
}

/* macOS-style minimal scrollbar (thin pill, no arrows) */
.figure-preview__scrollbar {
  position: absolute;
  top: 6px;
  right: 2px;
  bottom: 6px;
  width: 3px;
}

.figure-preview__sb-thumb {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 22px;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 2px;
}

.figure-caption {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #1a1a1a;
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  text-transform: uppercase;
}

.figure-btn:hover .figure-caption {
  opacity: 0.6;
}

.gallery[data-captions="on"] .figure-caption {
  opacity: 0.5;
}

/* Colophon */
.colophon {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 80px;
  padding-top: 18px;
  border-top: 1px solid rgba(26, 26, 26, 0.12);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1a1a;
  opacity: 0.55;
}

/* Modal */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease;
  padding: 24px;
}

.modal {
  background: #F4F0E8;
  width: min(560px, 100%);
  padding: 56px 56px 48px;
  position: relative;
  animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: transparent;
  border: 0;
  font-size: 28px;
  color: #1a1a1a;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}
.modal-close:hover { opacity: 1; }

.modal-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 28px;
}

.modal-name {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.modal-role {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 18px;
  opacity: 0.7;
  margin-bottom: 28px;
}

.modal-divider {
  width: 32px;
  height: 1px;
  background: #1a1a1a;
  opacity: 0.35;
  margin-bottom: 22px;
}

.modal-blurb {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin-bottom: 28px;
  text-wrap: pretty;
}

.modal-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 8px;
}

.modal-why {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.85;
  text-wrap: pretty;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .page { padding: 40px 24px 24px; }
  .masthead { margin-bottom: 56px; }
  .colophon { flex-direction: column; gap: 6px; align-items: center; text-align: center; }
  .modal { padding: 40px 28px 32px; }
  .modal-name { font-size: 32px; }
  .modal-blurb { font-size: 18px; }
}
