:root {
  color-scheme: dark;
  --background: #141414;
  --text: #f5f3f0;
  --media-background: #242424;
  --control-border: #747474;
  --logo-filter: none;
  --hero-surface: #383838;
  --drip-edge: #2a2a2a;
}
:root[data-theme="light"] {
  color-scheme: light;
  --background: #f6f4ef;
  --text: #202020;
  --media-background: #e9e5de;
  --control-border: #77736e;
  --logo-filter: invert(1);
  --hero-surface: #dcd7ce;
  --drip-edge: #e9e5de;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.6 Sora, system-ui, sans-serif; }
a { color: inherit; }
img, video { display: block; width: 100%; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; background: var(--hero-surface); }
.hero-drip {
  display: flex;
  justify-content: center;
  overflow: hidden;
  margin-top: -1px;
  pointer-events: none;
}
.hero-drip svg { display: block; flex: 0 0 auto; width: 100%; height: auto; }
@media (max-width: 479px) { .hero-drip svg { width: 500px; } }
.drip-front { fill: var(--hero-surface); }
.drip-edge { fill: var(--drip-edge); }
.drip-cutout { fill: var(--background); }
.nav { position: absolute; top: 2rem; right: clamp(1.5rem, 8.5vw, 8rem); }
.nav, .case-header nav { display: flex; align-items: center; gap: clamp(.75rem, 4vw, 1.9rem); }
.nav a, .hero h1, .tabs a { font-size: .9rem; letter-spacing: .045em; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .25rem .65rem;
  border: 1px solid var(--control-border);
  border-radius: 2rem;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: currentColor; }
.theme-toggle::before {
  content: "";
  width: .7rem;
  height: .7rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.theme-toggle[aria-pressed="true"]::before { background: currentColor; }
.hero-logo, .chevron img, .case-header img { filter: var(--logo-filter); }
.hero-logo { width: clamp(10rem, 30vw, 18rem); margin: auto; }
.hero h1 { margin: 1.7rem 0 0; }
.chevron { display: block; width: 1.25rem; margin: 3.9rem auto 0; }
.about, .work, footer, .case { width: min(83%, 1280px); margin-inline: auto; }
.about { min-height: 55vh; display: grid; align-content: center; padding-block: 4rem; }
.intro { font-size: clamp(1.6rem, 4vw, 3.4rem); font-weight: 700; line-height: 1.2; max-width: 25ch; margin: 0 0 1.5rem; }
.contact { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.work { padding-block: 3rem; }
.tabs { display: flex; gap: clamp(1rem, 4vw, 3rem); margin-bottom: 1.6rem; }
.tabs a { padding: .3rem 0; border-bottom: 2px solid transparent; }
.tabs a[aria-selected="true"] { border-color: currentColor; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.gallery[hidden] { display: none; }
.gallery img, .gallery video { background: var(--media-background); }
.project { position: relative; text-decoration: none; display: grid; overflow: hidden; }
.project img { height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project span { position: absolute; inset: auto 0 0; padding: 1.8rem 1rem .75rem; background: linear-gradient(transparent, #000b); color: white; font-weight: 700; }
footer { padding: 3rem 0; font-size: .8rem; }
.message, .case { padding: 3rem 0; }
.message { margin-inline: auto; width: min(83%, 48rem); }
.case-header { width: min(83%, 1280px); margin: auto; padding-top: 2rem; display: flex; align-items: center; justify-content: space-between; }
.case-header img { width: 3rem; }
.case-header nav a { text-transform: uppercase; text-decoration: none; font-weight: 700; }
.case h1 { margin: 0 0 1rem; font-size: clamp(2.1rem, 6vw, 5rem); line-height: 1.1; }
.case-subtitle { margin: -0.25rem 0 2rem; font-size: clamp(1rem, 3vw, 1.5rem); }
.case-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; margin-block: 2.5rem; }
.case-summary dt { font-weight: 700; }
.case-summary dd { margin: 0 0 .75rem; }
.case-section { margin-block: 3rem; }
.video-embed { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.comparison { margin: 0; }
.comparison.active .comparison-images { display: grid; }
.comparison.active img { grid-area: 1 / 1; }
.comparison.active img + img { clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0); }
.comparison input { width: 100%; margin: .6rem 0 0; accent-color: var(--text); }
@media (max-width: 600px) { .gallery, .case-summary { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root[data-ritual] {
  color-scheme: dark;
  --background: #0c0809;
  --text: #f3ded5;
  --media-background: #1a0b0e;
  --control-border: #a65a58;
  --logo-filter: none;
  --ritual-accent: #ff7778;
  --ritual-line: #62232b;
  --hero-surface: #280910;
  --drip-edge: #6f1825;
}
[data-ritual] body {
  padding-bottom: 4.25rem;
  background: radial-gradient(ellipse at 50% 0, #2f0b13, transparent 52rem), var(--background);
}
.ritual-bar[hidden], .ritual-altar[hidden], [data-lucfr-only][hidden], [data-portfolio-only][hidden] { display: none; }
[data-ritual] :is(.theme-toggle, .hero-drip) { display: none; }
[data-ritual] .hero {
  isolation: isolate;
  padding: 6.5rem 1rem 3.25rem;
  background: radial-gradient(ellipse at 50% 43%, #460c1ac7, transparent 65%), var(--hero-surface);
}
[data-ritual] .hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1rem;
  border: 1px solid #85364080;
  background: radial-gradient(#fc9e8d40 .55px, transparent .9px) 0 0 / 5px 5px;
  mask-image: radial-gradient(ellipse, transparent 14%, #000);
  pointer-events: none;
}
[data-ritual] .hero .nav { z-index: 1; }
.ritual-altar {
  width: min(100%, 70rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 6rem);
}
.lucfr-identity {
  position: relative;
  isolation: isolate;
  padding-block: 2.5rem;
}
.lucfr-identity::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2rem 0;
  opacity: .5;
  background: url("/media/ritual-seal.svg") center / min(100%, 35rem) auto no-repeat;
  pointer-events: none;
}
.hero .ritual-title { margin: 0 auto 1.25rem; width: min(100%, 24rem); }
.ritual-title img {
  filter: invert(1) sepia(.18) drop-shadow(0 .2rem 1rem #9e153d88);
}
.lucfr-feature, .lucfr-grid figure { margin: 0; }
.lucfr-feature { width: min(100%, 27rem); margin-inline: auto; }
.lucfr-feature img { height: min(61svh, 32rem); object-fit: contain; background: #070506; }
.lucfr-feature figcaption, .lucfr-grid figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding-block: .75rem;
  border-top: 1px solid var(--ritual-line);
  text-align: left;
  font-weight: 700;
}
.lucfr-feature figcaption span, .lucfr-grid figcaption span {
  color: var(--ritual-accent);
  align-self: center;
}
.lucfr-work { width: min(89%, 70rem); margin-inline: auto; padding-block: clamp(2rem, 7vw, 6rem); }
.lucfr-work h2 { margin: 0 0 1.25rem; font-size: clamp(1.5rem, 4vw, 2.75rem); }
.lucfr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 4vw, 3.5rem); }
.lucfr-wide { grid-column: 1 / -1; }
.lucfr-grid img { aspect-ratio: 1; object-fit: contain; background: #120d0f; }
.lucfr-wide img { aspect-ratio: auto; }
.ritual-descent, .ritual-bar, .lucfr-feature figcaption span, .lucfr-grid figcaption span {
  font: 600 .7rem/1.4 ui-monospace, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.ritual-descent {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: .85rem;
  padding: 0 1.15rem;
  border: 1px solid var(--ritual-line);
  background: #13090b;
  text-decoration: none;
}
.ritual-descent:hover { border-color: var(--ritual-accent); }
.ritual-descent span { color: var(--ritual-accent); font-size: 1.1rem; }
[data-ritual] footer { border-top: 1px solid var(--ritual-line); }
@media (max-width: 600px) {
  [data-ritual] .hero { padding-top: 4.5rem; }
  .ritual-altar, .lucfr-grid { grid-template-columns: minmax(0, 1fr); }
  .lucfr-identity { padding-block: 1rem; }
  .hero .ritual-title { width: min(65%, 15rem); }
  .lucfr-feature { width: min(92%, 21rem); }
  .lucfr-feature img { height: auto; }
}
.ritual-bar {
  position: fixed;
  z-index: 2;
  right: .75rem;
  bottom: .75rem;
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1rem);
  max-width: calc(100% - 1.5rem);
  padding-left: .8rem;
  border: 1px solid var(--ritual-line);
  background: #180b0e;
  box-shadow: 0 4px 20px #0009;
}
.ritual-bar span { color: var(--ritual-accent); }
.ritual-bar button {
  min-height: 44px;
  padding: .4rem .8rem;
  border: 0;
  border-left: 1px solid var(--ritual-line);
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.ritual-bar button:hover { background: #3e101a; }
.ritual-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.ritual-drip {
  position: fixed;
  z-index: 3;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  opacity: 0;
  pointer-events: none;
}
.ritual-drip.is-flowing { animation: ritual-pour 1.65s both; }
@keyframes ritual-pour {
  0% { opacity: 1; transform: translateY(-92%); }
  58% { opacity: 1; transform: translateY(-1%); }
  100% { opacity: 0; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ritual-drip.is-flowing { display: none; }
}
