/* === MULTI-PAGE CORNER LAYOUT === */

/* Corners: fixed on all pages */
.corner {
  position: fixed;
  z-index: 50;
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 0.9vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s;
  line-height: 1;
}

.corner:hover,
.corner.active {
  color: var(--accent);
}

.corner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.corner--tl {
  top: clamp(1.5rem, 3vw, 2.25rem);
  left: clamp(1.5rem, 3vw, 2.25rem);
}

.corner--tr {
  top: clamp(1.5rem, 3vw, 2.25rem);
  right: clamp(1.5rem, 3vw, 2.25rem);
}

.corner--bl {
  bottom: clamp(1.5rem, 3vw, 2.25rem);
  left: clamp(1.5rem, 3vw, 2.25rem);
}

.corner--br {
  bottom: clamp(1.5rem, 3vw, 2.25rem);
  right: clamp(1.5rem, 3vw, 2.25rem);
}

/* === LANDING PAGE === */
.page-home {
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-center {
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.landing-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 9rem);
  line-height: 0.93;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.landing-title {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  color: var(--mid);
}

/* === SUB-PAGES === */
.page-sub {
  min-height: 100svh;
}

/* Home link — top center */
.home-link {
  position: fixed;
  top: clamp(1.5rem, 3vw, 2.25rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s;
  white-space: nowrap;
}

.home-link:hover {
  color: var(--accent);
}

.home-link-icon {
  display: none;
  align-items: center;
  justify-content: center;
}

/* Content area: padded away from corners */
.sub-content {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(7rem, 14vh, 11rem) clamp(4rem, 7vw, 7rem) clamp(5rem, 9vh, 7rem);
}

/* Vertically centered content (for WITM) */
.sub-content--centered {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* === WITM BANNER === */
.witm-banner {
  width: 100%;
  height: 65vh;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* === WITM PAGE === */
.witm-page {
  text-align: center;
}

.witm-page-logo {
  width: clamp(120px, 20vw, 180px);
  height: auto;
  margin: 0 auto 2rem;
  object-fit: contain;
  mix-blend-mode: screen;
  animation: symbolPulse 3.5s ease-in-out infinite;
}

@keyframes symbolPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.07); opacity: 0.8; }
}

.witm-page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.witm-page-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--ink);
  margin-bottom: 0.5rem;
  opacity: 0.85;
}

.witm-page-date {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 2rem;
}

.witm-page-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.15rem;
  display: inline-block;
  transition: opacity 0.2s;
}

.witm-page-link:hover {
  color: var(--accent);
  opacity: 1;
}

/* About contact block (sits below layout) */
.about-contact {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.about-contact .contact-intro {
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  margin-bottom: 0.5rem;
}

.about-contact .contact-email {
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  word-break: break-all;
}

/* Vertically centered pages */
.page-about {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.page-about .sub-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* === CLIP REVEAL (saved) ===
.clip-wrap { display: block; overflow: hidden; line-height: 0.97; }
@keyframes clipUp { from { transform: translateY(108%); } to { transform: translateY(0); } }
.clip-inner { display: block; animation: clipUp 0.9s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.1s; }
.clip-inner--2 { animation-delay: 0.22s; }
=== END CLIP REVEAL === */

/* === LETTER-SPACING COLLAPSE === */
@keyframes collapseSpacing {
  from { letter-spacing: 0.45em; opacity: 0; }
  to   { letter-spacing: -0.025em; opacity: 1; }
}

@keyframes clipFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.name-collapse {
  animation: collapseSpacing 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.05s;
}

.clip-fade {
  opacity: 0;
  animation: clipFade 0.8s ease forwards;
  animation-delay: 0.9s;
}

/* === ANIMATIONS === */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes itemReveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  animation: pageFadeIn 0.45s ease forwards;
}

/* Staggered list reveals */
.work-item,
.insp-item {
  opacity: 0;
  animation: itemReveal 0.5s ease forwards;
}

.work-item:nth-child(1), .insp-item:nth-child(1) { animation-delay: 0.25s; }
.work-item:nth-child(2), .insp-item:nth-child(2) { animation-delay: 0.38s; }
.work-item:nth-child(3), .insp-item:nth-child(3) { animation-delay: 0.51s; }
.work-item:nth-child(4), .insp-item:nth-child(4) { animation-delay: 0.64s; }
.work-item:nth-child(5), .insp-item:nth-child(5) { animation-delay: 0.77s; }
.work-item:nth-child(6), .insp-item:nth-child(6) { animation-delay: 0.90s; }

/* === WORK ITEM PUNCH === */
.work-list {
  counter-reset: work;
}

.work-item {
  counter-increment: work;
  position: relative;
  overflow: hidden;
}

/* Ghost number */
.work-item::after {
  content: counter(work, decimal-leading-zero);
  position: absolute;
  right: -0.04em;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 11vw, 10rem);
  color: var(--ink);
  opacity: 0;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.work-item:hover::after {
  opacity: 0.06;
  transform: translateY(-50%) scale(1);
}

/* Name slide + teal */
.work-client {
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.work-item:hover .work-client {
  transform: translateX(10px);
  color: var(--accent);
}

/* === WORK HOVER-REVEAL === */
.work-item .work-desc {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease, margin-bottom 0.3s ease;
}

.work-item:hover .work-desc {
  max-height: 8rem;
  opacity: 1;
  margin-bottom: 0.9rem;
}

/* === CURSOR RING === */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s ease, height 0.2s ease, opacity 0.3s ease, border-color 0.2s ease;
  will-change: transform;
}

.cursor-ring--hover {
  width: 32px;
  height: 32px;
  margin-left: -6px;
  margin-top: -6px;
  border-color: var(--accent);
  opacity: 0.6;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .sub-content {
    padding: 5rem 1.5rem 4rem;
  }

  .home-link-text { display: none; }
  .home-link-icon { display: flex; }
  .home-link { line-height: 1; }

  .corner {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  /* Fix landing name overflow */
  .landing-name {
    font-size: clamp(2.2rem, 10vw, 4rem);
  }

  /* Show descriptions by default on mobile (no hover) */
  .work-item .work-desc {
    max-height: none;
    opacity: 1;
    margin-bottom: 0.9rem;
  }

}
