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

html, body { height: 100%; }

body {
  background: #ffffff;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  min-height: 100vh;
  /* No text selection anywhere on the site — keeps the visual chrome clean. */
  -webkit-user-select: none;
  user-select: none;
}


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

a:hover { opacity: 0.45; }

ul { list-style: none; }

/* ---------- Center reel ---------- */
.reel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52vw;
  max-width: 920px;
  aspect-ratio: 16 / 9;
  background: #000;
  z-index: 1;
  overflow: hidden;
}

.reel__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: clamp(56px, 9vw, 140px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: none;
  z-index: 2;
  opacity: 1;
  transition: opacity 220ms ease;
}

/* Hide the overlay only when the cursor is in the list rows AND not on a
   specific title — i.e. when it's somewhere on the <ul> that isn't a title.
   Padding around the list (left/right/below) no longer triggers this. */
body:has(.corner--bl ul:hover):not(:has(a[data-preview]:hover)) .reel__title {
  opacity: 0;
}

/* ---------- Corner anchors ---------- */
.corner {
  position: fixed;
  z-index: 3;
  padding: 24px 32px;
  font-size: 13px;
  line-height: 1.45;
}

.corner ul li { font-size: 13px; line-height: 1.45; }

/* Project list: expand each link to fill its row so there are no dead gaps
   between titles. The hover hit area is now contiguous top-to-bottom. */
.corner--bl ul li {
  line-height: 1;
}
.corner--bl ul li a {
  display: block;
  padding: 4px 0;
}

.corner--tl { top: 0;    left: 0;    text-align: left; text-transform: uppercase; }

/* X (Twitter) social icon in the bottom-right corner */
.icon-x {
  width: 14px;
  height: 14px;
  display: block;
  color: currentColor;
}
.corner--br a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}
.corner--tr { top: 0;    right: 0;   text-align: right; }
.corner--bl { bottom: 0; left: 0;    text-align: left; }
.corner--br { bottom: 0; right: 0;   text-align: right; }

.brand {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
.brand a:hover { opacity: 1; }
.brand__role {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

/* ---------- Info page ---------- */
.info {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52vw;
  max-width: 640px;
  z-index: 1;
}

.info__section { margin-bottom: 40px; }
.info__section:last-child { margin-bottom: 0; }

.info__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 12px;
}

.info p {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 6px;
  max-width: 56ch;
}

.info a {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.info a:hover { opacity: 0.55; }

/* Active state for the corner nav */
.corner--tr a.is-active {
  position: relative;
}
.corner--tr a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
}

/* ---------- Lightbox (Vimeo full-play) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__frame {
  position: relative;
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 16 / 9;
}

.lightbox__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 8px 12px;
  opacity: 0.7;
  transition: opacity 120ms ease;
}

.lightbox__close:hover { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  /* Fixed mobile layout — no scrolling. Everything fits in the viewport. */
  html, body { overflow: hidden; }
  body {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Mobile-Safari fix: 100vh can briefly include the address bar.
       100dvh (dynamic viewport height) tracks the actual visible area. */
    height: 100dvh;
  }

  /* Stack order: brand → nav → reel → projects → social.
     The brand/nav/social blocks stay at natural size; the reel and list
     share the remaining space so everything fits the viewport. */
  .corner--tl { order: 1; flex-shrink: 0; }
  .corner--tr { order: 2; flex-shrink: 0; }
  .reel       { order: 3; flex-shrink: 1; flex-grow: 0; }
  .corner--bl { order: 4; flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .corner--br { order: 5; flex-shrink: 0; }

  .corner {
    position: static;
    text-align: left;
  }
  .corner--tl { padding: 18px 20px 4px; }
  .corner--tr { padding: 4px 20px 18px; }
  .corner--bl { padding: 28px 20px 16px; }
  .corner--br { padding: 8px 20px 28px; }

  .corner--tr ul,
  .corner--br p { text-align: left; }

  /* Inline the top-right nav into a row so it doesn't waste 3 lines */
  .corner--tr ul {
    display: flex;
    gap: 18px;
  }

  .brand { font-size: 14px; }
  .brand__role { font-size: 14px; }

  /* Reel is full-width in the flex column. flex-shrink (set above) lets it
     scale down if there isn't enough vertical room. */
  .reel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  /* Wordmark sized for the smaller reel — narrower screens get smaller text */
  .reel__title {
    font-size: clamp(44px, 13vw, 80px);
  }

  /* Bigger, easier-to-tap project titles, but tight enough that all 6 fit
     between the reel and the bottom-right X without scrolling. */
  .corner--bl ul li {
    font-size: 15px;
    line-height: 1;
  }
  .corner--bl ul li a {
    display: block;
    padding: 10px 0;
  }

  /* Info page: flow naturally instead of being fixed-centered */
  .info {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    padding: 0 20px 28px;
    order: 3;
  }
  .info__section { margin-bottom: 28px; }
  .info p { font-size: 15px; }

  .lightbox { padding: 12px; }
}
