@font-face {
  font-family: Baskervville;
  src: url("baskervville.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Baskervville;
  src: url("baskervville-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("poppins.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --sky: url("venn-night.jpg");
  --sky-size: cover;
  --base: #0b0f17;
  --ink: #f8eee2;
  --body: #d8c9c7;
  --accent: #e8b3ae;
  --line: #f6d9c253;
  --panel: #15131deb;
  --feature: #221827de;
  --button: #fff6e9;
  --button-ink: #302126;
  background: var(--base);
  color: var(--ink);
}

:root[data-theme="light"] {
  color-scheme: light;
  --sky: url("venn-day.jpg");
  --base: #f7f5f3;
  --ink: #2b2227;
  --body: #584749;
  --accent: #894855;
  --line: #66504a64;
  --panel: #fffcfae8;
  --feature: #f8ece8e8;
  --button: #492d38;
  --button-ink: #fff6e9;
}

body {
  isolation: isolate;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background: var(--base) var(--viewport-sky, var(--sky)) center / var(--sky-size) no-repeat;
  pointer-events: none;
}

.hero, .future, footer {
  background: transparent;
  color: var(--ink);
}

.hero-glow { display: none; }

.site-header, .header-cta, .hero-bottom,
.experience-list article, .experience-list article:first-child,
.faq-list details, .faq-list details:first-child, .footer-bottom {
  border-color: var(--line);
}

.site-header, .site-header nav a:hover, .text-link:hover,
.statement, .coming-pill, .language, .skip {
  color: var(--ink);
}

.site-header nav, .hero-lead, .text-link, .hero-note, .hero-bottom,
.intro-copy, .principles p, .experience-head p, .experience-list p,
.future p, .faq-list p, .footer-top p, .footer-bottom,
.mock-disclaimer, .phone-card p {
  color: var(--body);
}

em, .eyebrow, .section-kicker, .brand-dot, .phone-brand span,
.intro h2 em, .experience h2 em, .faq h2 em, .statement em,
.statement .section-kicker, .statement-small, .statement-sun,
.future .section-kicker, .little-star, .principle-icon,
.phone-card small, .step-symbol, .faq-list summary::after, .footer-bottom a {
  color: var(--accent);
}

.principles article, .phone-card, .coming-pill, .skip {
  background: var(--panel);
  border-color: var(--line);
}

.statement, .phone-wrap {
  background: var(--feature);
}

.phone {
  background: var(--base) var(--sky) center / cover no-repeat;
  border-color: var(--panel);
  color: var(--ink);
}

.kicker-line, .phone-bottom span:first-child, .pulse {
  background: var(--accent);
}

.phone-bottom span {
  background: var(--line);
}

.button-light, .button-light:hover, .header-cta:hover {
  background: var(--button);
  color: var(--button-ink);
}

.button-light:hover {
  filter: brightness(.88);
}

.art-orbit, .future-orb {
  border-color: var(--line);
}

.art-circle span, .art-label, .art-center, .mini-core {
  color: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 40px;
  flex-shrink: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 50px;
  color: var(--body);
  background: var(--panel);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.theme-light, .theme-dark {
  padding: 7px 8px;
  border-radius: inherit;
}

.theme-toggle[aria-pressed="true"] .theme-light,
.theme-toggle[aria-pressed="false"] .theme-dark {
  background: var(--button);
  color: var(--button-ink);
}

@media (max-width: 440px) {
  .header-actions { gap: 10px; }
  .header-cta { display: none; }
}

@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  :root {
    --viewport-sky: url("venn-nebula-desktop.jpg");
  }

  :root[data-theme="light"] {
    --viewport-sky: url("venn-day-desktop.jpg");
  }
}

:root {
  font-family: Poppins, sans-serif;
  font-synthesis: weight style;
  --gold: #d4af7a;
  --rings: url("venn-rings-dark.png");
  --wordmark: url("venn-wordmark-dark.png");
}

:root[data-theme="light"] {
  --gold: #775031;
  --rings: url("venn-rings-light.png");
  --wordmark: url("venn-wordmark-light.png");
}

h1, h2, h3, .statement p, .phone-card strong, .faq-list summary {
  font-family: Baskervville, Georgia, serif;
  font-weight: 400;
  letter-spacing: -.025em;
}

.hero h1, .intro h2, .experience h2, .faq h2, .future h2 {
  letter-spacing: -.035em;
}

h1 em, h2 em, .statement em {
  font-style: italic;
}

.step-symbol { font-family: Poppins, sans-serif; }
.eyebrow, .section-kicker, .statement .section-kicker,
.future .section-kicker, .principle-icon, .step-symbol { color: var(--gold); }
.kicker-line { background: var(--gold); }

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.brand-rings, .brand-wordmark {
  display: inline-block;
  height: 40px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.brand-rings {
  width: 42px;
  background-image: var(--rings);
}

.brand-wordmark {
  width: 91px;
  background-image: var(--wordmark);
}

.phone-brand .brand-lockup {
  display: inline-grid;
  justify-items: center;
  gap: 0;
}

.phone-brand .brand-rings { width: 36px; height: 21px; }
.phone-brand .brand-wordmark { width: 79px; height: 32px; }

@media (max-width: 440px) {
  .brand-lockup { gap: 3px; }
  .site-header .brand-rings, .opening-signature .brand-rings { width: 30px; }
  .site-header .brand-wordmark, .opening-signature .brand-wordmark { width: 70px; }
}

.app-preview {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin: 0;
  padding: 26px 0 12px;
}

.app-phone {
  width: min(228px, 70vw, 100%);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: #141116;
  box-shadow: 0 20px 42px #120d1840;
}

.app-capture {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 19px;
}

.capture-light,
:root[data-theme="light"] .capture-night {
  display: none;
}

:root[data-theme="light"] .capture-light {
  display: block;
}

.app-preview figcaption {
  max-width: 29ch;
  color: var(--body);
  font-size: .875rem;
  text-align: center;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
}

.site-header nav {
  grid-column: 1;
  grid-row: 1;
  gap: clamp(12px, 1.8vw, 32px);
}

.site-header .brand {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.site-header .brand-rings, .opening-signature .brand-rings {
  width: 49px;
}

.site-header .brand-wordmark, .opening-signature .brand-wordmark {
  width: 115px;
}

.site-header .brand-lockup, .opening-signature {
  filter: drop-shadow(0 0 .5px var(--gold));
}

.header-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.language { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 8px 18px 8px 6px; }
.language::after { content: ""; position: absolute; right: 4px; top: 17px; width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.language select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font: inherit; }
.language:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* Leave room for longer translations while keeping the menu brand centred. */
@media (min-width: 651px) and (max-width: 1350px) {
  html:not(:is([lang="fr"], [lang="en"])) .header-cta { display: none; }
}

.story h2, .hero-subtitle { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 650px) {
}

@media (max-width: 1100px) {
  .site-header .header-cta { display: none; }
}

@media (max-width: 650px) {
  .site-header { padding-inline: 14px; gap: 4px; }
  .site-header .brand-rings, .opening-signature .brand-rings { width: clamp(28px, 7vw, 42px); }
  .site-header .brand-wordmark, .opening-signature .brand-wordmark { width: clamp(66px, 17vw, 97px); }
  .site-header .brand-lockup, .opening-signature { gap: 3px; }
  .header-actions { display: contents; }
  .header-actions .language { grid-column: 1; grid-row: 1; justify-self: start; }
  .header-actions .theme-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
}

@media (max-width: 460px) {
  .theme-toggle { font-size: .75rem; gap: 1px; }
  .theme-light, .theme-dark { padding-inline: 4px; }
  .theme-toggle .theme-light, .theme-toggle .theme-dark { font-size: 0; min-width: 22px; }
  .theme-light::after { content: "☀"; font-size: 1rem; }
  .theme-dark::after { content: "☾"; font-size: 1rem; }
}

.opening { display: none; }

/* Keep the off-screen skip link on the correct side in a right-to-left layout. */
html[dir="rtl"] .skip { left: auto; right: -9999px; }
html[dir="rtl"] .skip:focus { right: 12px; }

.intro-playing .opening {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
  animation: opening-end 4.25s linear both;
}

.intro-playing .site-header .brand { opacity: 0; }

.opening-curtain {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 52% 44%, #583140 0%, #2d2030 38%, #0b0f17 76%);
  animation: opening-curtain 4.25s cubic-bezier(.65,0,.21,1) both;
}

.opening-signature {
  animation: opening-arrival 4.25s cubic-bezier(.36,.02,.26,1) both;
}

.opening-rings {
  position: relative;
  animation: opening-rings-position .52s cubic-bezier(.3,0,.2,1) 1.36s both;
}

.opening-rings .brand-rings {
  display: block;
  animation: opening-rings-charge 1.2s ease-in-out .12s both;
}
.opening-wordmark {
  animation: opening-write .88s ease 1.92s both;
}

/* Optically align the rings with the letters below the wordmark flourish. */
.site-header .brand-rings,
.opening-signature .brand-rings {
  translate: 0 3px;
}

@keyframes opening-rings-charge {
  0%, 50%, 100% {
    scale: 1;
    filter: brightness(1) drop-shadow(0 0 0 #ffd0ad00);
  }
  25%, 75% {
    scale: 1.09;
    filter: brightness(1.42) drop-shadow(0 0 5px #ffd0ada8);
  }
}

@keyframes opening-rings-position {
  0% { transform: translateX(var(--ring-shift, 60px)); }
  100% { transform: translateX(0); }
}

@keyframes opening-write {
  0% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0); }
}

@keyframes opening-curtain {
  0%, 67% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

@keyframes opening-arrival {
  0%, 67% { transform: translate(0, 0) scale(var(--opening-scale, 1.4)); }
  100% { transform: translate(var(--menu-x, 0px), var(--menu-y, -40vh)) scale(1); }
}

@keyframes opening-end {
  0%, 99% { visibility: visible; }
  100% { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-playing .opening { display: none; }
  .intro-playing .site-header .brand { opacity: 1; }
}
