:root {
  color-scheme: dark;
  --bg: #101010;
  --bg-deep: #090909;
  --surface: #181818;
  --surface-2: #22211f;
  --text: #f3efe9;
  --muted: #aaa39a;
  --line: rgba(217, 197, 178, 0.17);
  --sand: #d9c5b2;
  --accent: #d87754;
  --accent-soft: rgba(216, 119, 84, 0.12);
  --header: rgba(13, 13, 13, 0.82);
  --footer: #090909;
  --shadow: rgba(0, 0, 0, 0.54);
  --max: 1380px;
  --header-height: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: color .35s ease, background .55s ease;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f3efe7;
  --bg-deep: #e7e0d5;
  --surface: #faf7f1;
  --surface-2: #eee7dd;
  --text: #211c18;
  --muted: #71675f;
  --line: rgba(70, 52, 42, 0.17);
  --sand: #6e5548;
  --accent: #a8492e;
  --accent-soft: rgba(168, 73, 46, 0.09);
  --header: rgba(243, 239, 231, 0.84);
  --footer: #e9e2d8;
  --shadow: rgba(91, 62, 45, 0.18);
}

body[data-theme="libra"] {
  color-scheme: dark;
  --bg: #05040c;
  --bg-deep: #020107;
  --surface: rgba(20, 16, 38, 0.86);
  --surface-2: rgba(33, 25, 57, 0.88);
  --text: #faf4ff;
  --muted: #b9adc9;
  --line: rgba(221, 196, 255, 0.2);
  --sand: #e5c2ff;
  --accent: #ffb56b;
  --accent-soft: rgba(193, 126, 255, 0.13);
  --header: rgba(5, 4, 12, 0.7);
  --footer: rgba(3, 2, 9, 0.92);
  --shadow: rgba(1, 0, 8, 0.72);
}

a { color: inherit; }
img, iframe, canvas { display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

#libra-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease;
}

body[data-theme="libra"] #libra-canvas { opacity: 1; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,.075), transparent 30rem),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 58%, var(--bg-deep));
  transition: background .55s ease;
}

body[data-theme="light"] .ambient {
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.88), transparent 30rem),
    linear-gradient(180deg, #eee7dd, #f8f4ed 60%, #e9e1d6);
}

body[data-theme="libra"] .ambient {
  background:
    radial-gradient(circle at 22% 20%, rgba(113, 60, 170, .26), transparent 30rem),
    radial-gradient(circle at 78% 36%, rgba(41, 90, 164, .22), transparent 34rem),
    radial-gradient(circle at 50% 72%, rgba(255, 142, 72, .1), transparent 32rem),
    linear-gradient(180deg, #03020a, #09051a 58%, #030208);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--max));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  width: max-content;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
}
.brand { font-size: .82rem; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(15px, 2vw, 30px);
}

.nav a,
.footer-links a,
.email-button,
.eyebrow,
.card-tag,
.card-action,
.scroll-cue,
.social-link,
.site-footer p,
.language-switch,
.theme-switch {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .66rem;
}

.nav a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.nav a:hover,
.nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible { color: var(--text); }

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switch,
.theme-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.language-switch button,
.theme-switch button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.language-switch button + button,
.theme-switch button + button { border-left: 1px solid var(--line); }

.language-switch button[aria-pressed="true"],
.theme-switch button[aria-pressed="true"] {
  color: var(--text);
  background: var(--accent-soft);
}

.email-button {
  padding: 9px 15px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.email-button:hover,
.email-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero {
  min-height: calc(100svh - var(--header-height));
  padding: clamp(48px, 7vh, 84px) 20px 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 20;
  max-width: 1100px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
}

h1, h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.04;
}

h1 {
  font-size: clamp(3rem, 8.7vw, 8.4rem);
  letter-spacing: .075em;
}

.tagline {
  margin: 18px auto 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-style: italic;
}

.floating-gallery {
  width: min(100%, 1260px);
  margin-top: clamp(38px, 6vh, 68px);
  padding: 22px 0 42px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.7vw, 25px);
  align-items: center;
  perspective: 1300px;
}

.video-card {
  --card-y: 0px;
  --card-r: 0deg;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 28px 65px var(--shadow);
  transform: translateY(var(--card-y)) rotate(var(--card-r));
  animation: card-float 8.5s ease-in-out infinite;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease, border-color .25s ease;
}

.card-one { --card-y: 24px; --card-r: -2.8deg; animation-delay: -1s; }
.card-two { --card-y: -10px; --card-r: -.9deg; animation-delay: -3.2s; }
.card-three { --card-y: -10px; --card-r: .9deg; animation-delay: -3.2s; }
.card-four { --card-y: 24px; --card-r: 2.8deg; animation-delay: -1s; }

.video-card:hover,
.video-card:focus-within {
  animation-play-state: paused;
  transform: translateY(calc(var(--card-y) - 13px)) rotate(0deg) scale(1.025);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 40px 88px var(--shadow);
  z-index: 20;
}

.card-frame {
  position: relative;
  aspect-ratio: 9 / 15.6;
  overflow: hidden;
  background: #161414;
}

.card-frame iframe,
.card-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.card-frame iframe {
  z-index: 2;
  opacity: 0;
  background: #111;
  transition: opacity .65s ease;
}
.card-frame.is-loaded iframe { opacity: 1; }

.card-fallback {
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: rgba(255,255,255,.82);
  background:
    radial-gradient(circle at 52% 34%, rgba(255,201,165,.2), transparent 22%),
    linear-gradient(155deg, #704735, #241918 48%, #0a0a0a);
  transition: opacity .5s ease;
}
.card-two .card-fallback { background: radial-gradient(circle at 45% 32%, rgba(218,184,255,.24), transparent 23%), linear-gradient(155deg, #4d365f, #241c35 48%, #09080d); }
.card-three .card-fallback { background: radial-gradient(circle at 54% 32%, rgba(136,199,255,.24), transparent 23%), linear-gradient(155deg, #294c61, #162832 48%, #080a0d); }
.card-four .card-fallback { background: radial-gradient(circle at 46% 32%, rgba(255,180,221,.22), transparent 23%), linear-gradient(155deg, #68384f, #2b1723 48%, #0c080a); }
.card-frame.is-loaded .card-fallback { opacity: 0; }

.card-fallback span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5vw, 5.5rem);
  line-height: 1;
  opacity: .28;
}
.card-fallback strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .7rem;
  letter-spacing: .25em;
}

.card-tag {
  position: absolute;
  top: 13px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 999px;
  color: #f2e5d8;
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(9px);
  white-space: nowrap;
  pointer-events: none;
}

.card-action {
  min-height: 43px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  background: var(--surface-2);
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
.card-action:hover,
.card-action:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
}

@keyframes card-float {
  0%, 100% { transform: translateY(var(--card-y)) rotate(var(--card-r)); }
  50% { transform: translateY(calc(var(--card-y) - 12px)) rotate(var(--card-r)); }
}

.scroll-cue {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  text-decoration: none;
}
.scroll-icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color .2s ease, transform .2s ease;
}
.scroll-cue:hover .scroll-icon,
.scroll-cue:focus-visible .scroll-icon {
  border-color: var(--accent);
  transform: translateY(4px);
}

.section {
  width: min(calc(100% - 40px), 1120px);
  margin: 0 auto;
  padding: clamp(88px, 12vw, 160px) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-heading.compact { margin-bottom: 34px; }

h2 {
  font-size: clamp(2.3rem, 6vw, 5rem);
  letter-spacing: -.025em;
}

.section-heading > p:last-child,
.about-copy {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}
.section-heading a,
.about-copy a { color: var(--sand); }

.tiktok-shell {
  min-height: 360px;
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.tiktok-shell .tiktok-embed { margin: 0 !important; }

.feed-placeholder {
  width: min(100%, 720px);
  min-height: 320px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
}
.feed-placeholder a { color: var(--sand); }
.loader {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .8fr);
  align-items: start;
  gap: clamp(48px, 9vw, 120px);
}
.about-section h2 { max-width: 700px; }
.about-copy p:first-child { margin-top: 0; }
.about-copy p:last-child { margin-top: 30px; }

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.social-link {
  min-height: 86px;
  padding: 26px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.social-link:nth-child(odd) { border-right: 1px solid var(--line); }
.social-link:hover,
.social-link:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
  outline: none;
}

.site-footer {
  min-height: 150px;
  padding: 38px max(20px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  background: var(--footer);
}
.footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}
.footer-links { display: flex; gap: 22px; }
.site-footer p {
  justify-self: end;
  margin: 0;
  color: var(--muted);
}

.noscript-note {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  padding: 14px;
  color: #111;
  background: #f0ede7;
  text-align: center;
}

body[data-theme="libra"] .hero-copy {
  text-shadow: 0 0 34px rgba(220, 181, 255, .16);
}
body[data-theme="libra"] h1 {
  background: linear-gradient(90deg, #fff3e8 0%, #e9d7ff 48%, #ffd0ae 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body[data-theme="libra"] .video-card {
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 90px rgba(19, 5, 42, .72), 0 0 34px rgba(165, 97, 255, .1);
}

@media (max-width: 1050px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
}

@media (max-width: 850px) {
  :root { --header-height: 64px; }
  .header-inner { width: min(calc(100% - 24px), var(--max)); }
  .hero { padding-inline: 0; }
  .hero-copy { padding-inline: 18px; }

  .floating-gallery {
    width: 100%;
    margin-top: 38px;
    padding: 18px 0 32px;
  }
  .cards {
    padding: 18px max(18px, calc((100vw - 305px) / 2)) 34px;
    display: flex;
    gap: 17px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .video-card,
  .card-one,
  .card-two,
  .card-three,
  .card-four {
    --card-y: 0px;
    --card-r: 0deg;
    flex: 0 0 min(76vw, 305px);
    animation: none;
    transform: none;
    scroll-snap-align: center;
  }
  .video-card:hover,
  .video-card:focus-within { transform: translateY(-5px); }
  .scroll-cue { margin-top: 2px; }
  .about-section { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-footer p { justify-self: center; }
}

@media (max-width: 600px) {
  h1 { font-size: clamp(2.15rem, 10.2vw, 3.7rem); letter-spacing: .025em; white-space: nowrap; }
  .hero { min-height: auto; padding-top: 54px; padding-bottom: 58px; }
  .tagline { max-width: 28ch; }
  .section { width: min(calc(100% - 30px), 1120px); }
  .social-grid { grid-template-columns: 1fr; }
  .social-link:nth-child(odd) { border-right: 0; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .language-switch button { min-width: 30px; padding: 0 6px; }
  .theme-switch button { min-width: 30px; padding: 0 6px; }
}

@media (max-width: 430px) {
  .brand { font-size: .72rem; }
  .header-actions { gap: 7px; }
  .theme-switch button { min-width: 27px; }
  .language-switch button { min-width: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
