/* claudel.me - Gallery White + Klein Cobalt + Matte Pitch Monograph */

:root {
  --bg-light: #ffffff;
  --ink-light: #0f0f10;
  --muted-light: #5c5c63;
  --subtle-light: #7c7c84;
  --rule-light: #e7e7eb;

  --bg-cobalt: #15329e;
  --ink-cobalt: #ffffff;
  --muted-cobalt: #d6dffd;
  --subtle-cobalt: #b3c4fa;
  --rule-cobalt: rgba(255, 255, 255, 0.24);

  --bg-dark: #0c0c0d;
  --ink-dark: #f4f4f2;
  --muted-dark: #9c9ca4;
  --subtle-dark: #74747c;
  --rule-dark: #232327;

  --font-sans: "Inter", "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-light);
  color: var(--ink-light);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg-light);
  color: var(--ink-light);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

/* Keep the hidden attribute authoritative over class display rules (used by Off-clock links) */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.serif-numeral {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: normal;
  line-height: 0.88;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 56px);
  padding-right: clamp(20px, 5vw, 56px);
}

/* Understated Editorial Links */
.ed-link {
  text-decoration: underline;
  text-decoration-color: rgba(15, 15, 16, 0.28);
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 180ms ease, color 180ms ease;
}
.ed-link:hover {
  text-decoration-color: rgba(15, 15, 16, 0.95);
}

.ed-link-inv {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.36);
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 180ms ease, opacity 180ms ease;
}
.ed-link-inv:hover {
  text-decoration-color: rgba(255, 255, 255, 0.96);
}

/* Navigation */
.site-nav {
  padding-top: 32px;
  padding-bottom: 24px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-light);
}

.nav-brand-mark {
  display: inline-block;
  height: 24px;
  aspect-ratio: 529 / 460;
  background-color: var(--bg-cobalt);
  -webkit-mask-image: url("../images/ck-mark.png");
  mask-image: url("../images/ck-mark.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: background-color 220ms ease;
}

.nav-brand:hover .nav-brand-mark {
  background-color: var(--ink-light);
}

.nav-brand-divider {
  width: 1px;
  height: 16px;
  background: var(--rule-light);
}

.nav-brand-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted-light);
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--ink-light);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--subtle-light);
  padding-left: 16px;
  border-left: 1px solid var(--rule-light);
}

.lang-toggle button {
  padding: 2px 3px;
  color: var(--subtle-light);
  transition: color 160ms ease;
}

.lang-toggle button[aria-pressed="true"] {
  color: var(--bg-cobalt);
  font-weight: 600;
}

.lang-toggle button:hover {
  color: var(--ink-light);
}

/* Breathing Hero */
.hero {
  padding-top: clamp(44px, 7vw, 88px);
  padding-bottom: clamp(56px, 8vw, 100px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 48px;
  align-items: end;
}

.hero-title {
  margin: 0 0 24px 0;
  font-size: clamp(36px, 5.4vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.032em;
  font-weight: 500;
  color: var(--ink-light);
}

.hero-title .serif-italic {
  color: var(--bg-cobalt);
  font-size: 1.08em;
}

.hero-lead {
  margin: 0;
  max-width: 540px;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.65;
  color: var(--muted-light);
}

.hero-lead a {
  color: var(--ink-light);
}

.hero-portrait-col {
  display: flex;
  justify-content: flex-end;
  padding: 22px 26px 18px 22px;
}

/* C1 Dual-Corner Cascade Portrait */
.c1-portrait {
  position: relative;
  width: 200px;
  height: 250px;
  user-select: none;
  cursor: pointer;
}

.c1-base {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f0f0f3;
}

.c1-base img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%) contrast(1.07);
  transition: filter 540ms var(--ease-out);
}

.c1-portrait:hover .c1-base img,
.c1-portrait.is-active .c1-base img {
  filter: grayscale(0%) contrast(1.02) saturate(1.05);
}

.c1-notch {
  position: absolute;
  background: var(--bg-light);
  z-index: 2;
  pointer-events: none;
}

.c1-tile {
  position: absolute;
  overflow: hidden;
  z-index: 4;
  filter: grayscale(100%) contrast(1.07);
  transition:
    transform 560ms var(--ease-out),
    filter 520ms var(--ease-out);
}

.c1-tile img {
  position: absolute;
  max-width: none;
  object-fit: cover;
  object-position: top center;
}

.c1-portrait:hover .c1-tile,
.c1-portrait.is-active .c1-tile {
  transform: translate(0, 0) !important;
  filter: grayscale(0%) contrast(1.02) saturate(1.05);
}

.c1-accent {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  transition: transform 560ms var(--ease-out);
}

.c1-portrait:hover .c1-accent,
.c1-portrait.is-active .c1-accent {
  transform: translate(0, 0) !important;
}

/* 12-Column Editorial Band System (Margin Anchor Numerals A) */
.band {
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(64px, 8vw, 108px);
}

.band-light {
  background: var(--bg-light);
  color: var(--ink-light);
  border-top: 1px solid var(--rule-light);
}

.band-cobalt {
  background: var(--bg-cobalt);
  color: var(--ink-cobalt);
}

.band-dark {
  background: var(--bg-dark);
  color: var(--ink-dark);
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.margin-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-numeral {
  font-size: clamp(46px, 4.6vw, 62px);
  margin-bottom: 4px;
}

.chapter-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.chapter-sub {
  font-size: 13px;
  color: var(--subtle-light);
}

.band-cobalt .chapter-sub {
  color: var(--subtle-cobalt);
}

.band-dark .chapter-sub {
  color: var(--muted-dark);
}

.chapter-cta {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  width: fit-content;
}

/* 01 Background: Hairline + Index */
.index-list {
  border-top: 1px solid var(--rule-light);
}

.index-row {
  border-bottom: 1px solid var(--rule-light);
}

.index-trigger {
  width: 100%;
  padding: 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr) 24px;
  gap: 20px;
  align-items: baseline;
  text-align: left;
}

.index-kicker {
  font-size: 13px;
  color: var(--muted-light);
}

.index-summary {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-light);
}

.index-plus {
  font-size: 20px;
  line-height: 1;
  font-weight: 300;
  color: var(--subtle-light);
  justify-self: end;
  transition: transform 260ms var(--ease-out), color 180ms ease;
}

.index-row.is-open .index-plus {
  transform: rotate(45deg);
  color: var(--bg-cobalt);
}

.index-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 300ms var(--ease-out), opacity 220ms ease;
}

.index-row.is-open .index-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.index-panel-inner {
  overflow: hidden;
}

.index-panel-content {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr) 24px;
  gap: 20px;
  padding-bottom: 24px;
}

.index-detail {
  grid-column: 2;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-light);
}

.podcast-links {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-light);
}

/* Section Lead */
.section-lead {
  margin: 0 0 44px 0;
  max-width: 620px;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.38;
  letter-spacing: -0.018em;
  font-weight: 400;
}

.section-lead .serif-italic {
  font-size: 1.1em;
}

/* 02 Atalaku Studio & 03 YouTube: Symmetrical 3-Column Spreads */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.trio-grid:hover .trio-item:not(:hover) {
  opacity: 0.42;
}

.trio-item {
  display: flex;
  flex-direction: column;
  transition: opacity 300ms ease;
}

/* Studio Case Study Column */
.studio-rule {
  height: 1px;
  width: 100%;
  background: var(--rule-cobalt);
  margin-bottom: 14px;
  transform-origin: left center;
  transition: background-color 260ms ease, transform 260ms var(--ease-out);
}

.trio-item:hover .studio-rule {
  background: #ffffff;
  transform: scaleY(2);
}

.studio-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--subtle-cobalt);
  margin-bottom: 10px;
}

.studio-duration {
  color: #ffffff;
  font-weight: 500;
}

.studio-name {
  margin: 0 0 10px 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: #ffffff;
}

.studio-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-cobalt);
}

.studio-cta {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  opacity: 0.72;
  transform: translateX(0);
  transition: opacity 220ms ease, transform 260ms var(--ease-out);
}

.trio-item:hover .studio-cta {
  opacity: 1;
  transform: translateX(4px);
}

/* YouTube Horizontal Carousel */
.yt-col-main {
  min-width: 0;
}

.yt-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.yt-header-row .section-lead {
  margin-bottom: 0;
}

.yt-carousel-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.yt-counter {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
}

.yt-nav-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yt-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule-dark);
  color: var(--ink-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: border-color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.yt-nav-btn:hover:not(:disabled) {
  border-color: var(--ink-dark);
  background: rgba(255, 255, 255, 0.06);
}

.yt-nav-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.yt-carousel-shell {
  position: relative;
}

.yt-carousel-shell::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56px;
  background: linear-gradient(to right, rgba(12, 12, 13, 0), rgba(12, 12, 13, 0.88));
  pointer-events: none;
  transition: opacity 240ms ease;
}

.yt-carousel-shell.at-end::after {
  opacity: 0;
}

.yt-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 6px;
  outline: none;
}

.yt-carousel::-webkit-scrollbar {
  display: none;
}

.yt-carousel:hover .yt-card:not(:hover) {
  opacity: 0.48;
}

.yt-card {
  flex: 0 0 calc((100% - 48px) / 2.35);
  display: flex;
  flex-direction: column;
  transition: opacity 280ms ease;
}

/* YouTube Widescreen Screening Cards */
.yt-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #18181b;
  margin-bottom: 16px;
}

.yt-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 620ms var(--ease-out);
}

.yt-card:hover .yt-frame img {
  transform: scale(1.035);
}

.yt-play {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 13, 0.72);
  color: #ffffff;
  font-size: 10px;
  transition: background-color 220ms ease, transform 220ms ease;
}

.yt-card:hover .yt-play {
  background: var(--bg-cobalt);
  transform: scale(1.06);
}

.yt-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-dark);
}

.yt-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted-dark);
}

/* Off-clock Footnote & Footer */
.site-footer {
  background: var(--bg-light);
  color: var(--ink-light);
  border-top: 1px solid var(--rule-light);
  padding-top: 48px;
  padding-bottom: 44px;
}

.offclock-row {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule-light);
  align-items: baseline;
}

.offclock-label {
  font-size: 13px;
  color: var(--muted-light);
}

.offclock-text {
  margin: 0;
  font-size: 15px;
  color: var(--muted-light);
}

.offclock-text a {
  color: var(--ink-light);
  font-weight: 500;
}

.offclock-row[hidden] + .footer-bottom {
  padding-top: 0;
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--subtle-light);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a:hover {
  color: var(--ink-light);
}

/* Subpages: Music, Photos & 404 */
.subpage-header {
  padding-top: clamp(44px, 6vw, 76px);
  padding-bottom: 44px;
}

.subpage-title {
  margin: 0 0 14px 0;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.subpage-lead {
  margin: 0;
  max-width: 540px;
  font-size: 16px;
  color: var(--muted-light);
}

/* Minimal Audio Tracklist */
.track-list {
  border-top: 1px solid var(--rule-light);
}

.track-row {
  border-bottom: 1px solid var(--rule-light);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.track-play-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-light);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.track-row.is-playing .track-play-btn,
.track-play-btn:hover {
  background: var(--bg-cobalt);
  border-color: var(--bg-cobalt);
  color: #ffffff;
}

.track-title {
  font-size: 15px;
  font-weight: 500;
}

.track-meta {
  font-size: 13px;
  color: var(--muted-light);
  margin-top: 2px;
}

.track-progress-wrap {
  margin-top: 10px;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.track-progress-rail {
  width: 100%;
  height: 2px;
  background: var(--rule-light);
  position: relative;
}

.track-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--bg-cobalt);
}

.track-time {
  font-size: 12px;
  color: var(--subtle-light);
}

/* Minimal Photography Contact Sheet */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.photo-card {
  display: block;
  text-align: left;
  cursor: pointer;
}

.photo-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f2f2f4;
  margin-bottom: 10px;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.04);
  transition: transform 620ms var(--ease-out), filter 460ms ease;
}

.photo-card:hover .photo-frame img {
  transform: scale(1.03);
  filter: grayscale(0%);
}

.photo-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted-light);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 12, 13, 0.94);
  color: #f4f4f2;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 56px);
}

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

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 20px 0;
}

.lightbox-stage img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted-dark);
}

.lightbox-bar button {
  color: #f4f4f2;
  padding: 4px 8px;
}

.empty-state {
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  padding: 48px 0;
}

.empty-state h2 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 500;
}

.empty-state p {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  color: var(--muted-light);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-portrait-col {
    order: -1;
    justify-content: flex-start;
    padding: 18px 22px 14px 16px;
  }

  .c1-portrait {
    width: 144px;
    height: 180px;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .margin-rail {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule-light);
  }

  .band-cobalt .margin-rail {
    border-bottom-color: var(--rule-cobalt);
  }

  .band-dark .margin-rail {
    border-bottom-color: var(--rule-dark);
  }

  .margin-rail-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
  }

  .chapter-numeral {
    font-size: 38px;
    margin-bottom: 0;
  }

  .chapter-cta {
    margin-top: 0;
  }

  .trio-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .trio-grid:hover .trio-item:not(:hover) {
    opacity: 1;
  }

  .yt-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .yt-carousel:hover .yt-card:not(:hover) {
    opacity: 1;
  }

  .yt-card {
    flex: 0 0 76%;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .nav-brand-divider,
  .nav-brand-name {
    display: none;
  }

  .nav-brand-mark {
    height: 25px;
  }

  .nav-links a.nav-hide-sm {
    display: none;
  }

  .nav-links {
    gap: 16px;
  }

  .index-trigger {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 8px 16px;
    padding: 16px 0;
  }

  .index-kicker {
    grid-column: 1;
    font-size: 12px;
  }

  .index-summary {
    grid-column: 1;
    font-size: 14.5px;
  }

  .index-plus {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .index-panel-content {
    grid-template-columns: 1fr;
    padding-bottom: 18px;
  }

  .index-detail,
  .podcast-links {
    grid-column: 1;
  }

  .yt-card {
    flex: 0 0 84%;
  }

  .yt-carousel-shell::after {
    width: 32px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
