:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-elevated: #10100f;
  --ink: #f8f5ee;
  --ink-strong: #ffffff;
  --muted: rgba(248, 245, 238, 0.68);
  --muted-strong: rgba(248, 245, 238, 0.82);
  --line: rgba(255, 255, 255, 0.14);
  --footer-bg: transparent;
  --footer-ink: #687083;
  --cta-bg: #f8f5ee;
  --cta-ink: #0a0a0a;
  --shadow: rgba(0, 0, 0, 0.55);
  --accent: #f3c85e;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf6f1;
  --bg-elevated: #fffdf9;
  --ink: #1d2430;
  --ink-strong: #0f151f;
  --muted: rgba(29, 36, 48, 0.62);
  --muted-strong: rgba(29, 36, 48, 0.78);
  --line: rgba(29, 36, 48, 0.12);
  --footer-bg: transparent;
  --footer-ink: #687083;
  --cta-bg: #171717;
  --cta-ink: #fffaf1;
  --shadow: rgba(100, 70, 54, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(244, 187, 214, 0.14), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(132, 194, 218, 0.12), transparent 30%),
    var(--bg);
  overflow-x: hidden;
}

a,
button {
  font: inherit;
}

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

button {
  border: 0;
  color: inherit;
}

.page-shell {
  min-height: calc(100svh - 150px);
  display: grid;
  grid-template-rows: auto 1fr;
}

.legal-shell {
  min-height: calc(100svh - 102px);
  display: grid;
  grid-template-rows: auto 1fr;
}

.contact-shell {
  min-height: calc(100svh - 102px);
  display: grid;
  grid-template-rows: auto 1fr;
}

.site-header {
  width: min(100%, 1260px);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 46px) clamp(18px, 6vw, 70px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink-strong);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 800;
}

.brand img {
  width: clamp(38px, 5vw, 48px);
  height: clamp(38px, 5vw, 48px);
  border-radius: 22%;
}

.brand span {
  white-space: nowrap;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.icon-button,
.download-button,
.hero-cta {
  min-height: 42px;
  border-radius: var(--radius);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.icon-button {
  width: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-theme="dark"] .sun-icon,
:root[data-theme="light"] .moon-icon {
  display: none;
}

.download-button,
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(42px, 8vh, 86px) 0 clamp(46px, 8vh, 92px);
  display: grid;
  gap: clamp(34px, 7vh, 72px);
  align-content: center;
  overflow: hidden;
}

.hero-copy {
  width: min(100% - 36px, 760px);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: var(--ink-strong);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 14vw, 150px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 42ch;
  color: var(--muted);
  font-size: clamp(16px, 2.3vw, 20px);
  line-height: 1.42;
}

.hero-cta {
  min-height: 48px;
  margin-top: 6px;
  padding: 0 22px;
}

.legal-main {
  width: min(100% - 36px, 860px);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 88px) 0 clamp(48px, 8vw, 92px);
}

.contact-main {
  width: min(100% - 36px, 860px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 74px) 0 clamp(48px, 8vw, 88px);
  display: grid;
  gap: clamp(24px, 4vw, 34px);
}

.contact-copy {
  display: grid;
  gap: 12px;
}

.contact-copy h1 {
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.96;
}

.typeform-panel {
  color-scheme: light;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px var(--shadow);
}

.typeform-panel [data-tf-live],
.typeform-panel [data-tf-widget],
.typeform-panel iframe {
  display: block;
  width: 100%;
  min-height: 560px;
  border: 0;
}

.legal-document {
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.72;
}

.legal-document h1 {
  margin-bottom: 20px;
  color: var(--ink-strong);
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.96;
}

.legal-document h2 {
  margin: 34px 0 10px;
  color: var(--ink-strong);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.15;
}

.legal-document p,
.legal-document ul {
  margin: 0 0 16px;
}

.legal-document ul {
  padding-left: 1.2em;
}

.legal-document li + li {
  margin-top: 8px;
}

.legal-document code {
  font-size: 0.92em;
  color: var(--ink);
}

.carousel-section {
  min-height: clamp(370px, 40vw, 520px);
  display: grid;
  place-items: center;
  perspective: 1400px;
  perspective-origin: 50% 42%;
}

.carousel {
  position: relative;
  width: min(100vw, 1220px);
  height: clamp(360px, 39vw, 510px);
  transform-style: preserve-3d;
}

.manifest-card {
  --offset: 0;
  --abs-offset: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(200px, 21vw, 300px);
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: #f9eee5;
  box-shadow: 0 30px 70px var(--shadow);
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--offset) * clamp(178px, 18vw, 262px)))
    translateZ(calc((3 - var(--abs-offset)) * 24px))
    rotateY(calc(var(--offset) * -24deg))
    rotateZ(calc(var(--offset) * -1.2deg))
    scale(calc(1 - (var(--abs-offset) * 0.09)));
  opacity: calc(1 - (var(--abs-offset) * 0.18));
  transition: transform 900ms cubic-bezier(.2, .72, .12, 1), opacity 900ms ease, filter 900ms ease;
  filter: saturate(calc(1 - (var(--abs-offset) * 0.05))) brightness(calc(1 - (var(--abs-offset) * 0.06)));
  will-change: transform, opacity;
}

.manifest-card.is-active {
  opacity: 1;
  filter: none;
}

.manifest-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manifest-card::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(to top, rgba(34, 24, 22, 0.68), rgba(34, 24, 22, 0.24) 54%, transparent);
}

.card-copy {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 14px 22px;
  display: grid;
  gap: 7px;
  color: #fffaf5;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.card-copy h2 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0;
}

.card-copy p {
  max-width: 25ch;
  margin: 0 auto;
  color: rgba(255, 250, 245, 0.9);
  font-size: clamp(10px, 0.82vw, 12px);
  line-height: 1.25;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 18px 20px;
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-size: clamp(10px, 1vw, 12px);
  line-height: 1.25;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 12px;
}

.footer-links a,
.footer-links button {
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.site-footer p {
  color: var(--footer-ink);
}

@media (hover: hover) {
  .icon-button:hover,
  .download-button:hover,
  .hero-cta:hover {
    transform: translateY(-1px);
  }

  .footer-links a:hover,
  .footer-links button:hover {
    color: #4f5667;
  }
}

@media (max-width: 760px) {
  .page-shell {
    min-height: calc(100svh - 188px);
  }

  .site-header {
    padding-top: 16px;
  }

  .brand {
    gap: 9px;
  }

  .download-button {
    min-height: 40px;
    padding: 0 13px;
    font-size: 13px;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-top: 34px;
    gap: 28px;
  }

  .hero-copy {
    width: min(100% - 32px, 560px);
  }

  .hero-subtitle {
    max-width: 30ch;
  }

  .carousel-section {
    min-height: 388px;
    perspective: 1100px;
  }

  .carousel {
    height: 376px;
  }

  .manifest-card {
    width: min(58vw, 226px);
    border-radius: 20px;
    transform:
      translate(-50%, -50%)
      translateX(calc(var(--offset) * min(43vw, 156px)))
      translateZ(calc((3 - var(--abs-offset)) * 18px))
      rotateY(calc(var(--offset) * -27deg))
      rotateZ(calc(var(--offset) * -1.4deg))
      scale(calc(1 - (var(--abs-offset) * 0.1)));
  }

  .card-copy {
    padding: 0 10px 18px;
  }

  .manifest-card:not(.is-active) .card-copy {
    opacity: 0;
  }

  .site-footer {
    padding-top: 16px;
    gap: 8px;
  }

  .footer-links {
    gap: 7px 10px;
  }

  .footer-links span {
    font-size: 10px;
  }

  .typeform-panel,
  .typeform-panel [data-tf-live],
  .typeform-panel [data-tf-widget],
  .typeform-panel iframe {
    min-height: 620px;
  }
}

@media (max-width: 430px) {
  .site-header {
    gap: 10px;
  }

  .hero-cta {
    width: min(100%, 220px);
  }

  .carousel-section {
    min-height: 350px;
  }

  .carousel {
    height: 336px;
  }

  .manifest-card {
    width: min(66vw, 218px);
  }

  .card-copy p {
    max-width: 22ch;
    font-size: 9.5px;
  }
}

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