@font-face {
  font-family: "Silkscreen";
  src: url("./docs/fonts/silkscreen-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("./assets/fonts/instrument-sans-latin-400-normal.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("./assets/fonts/instrument-sans-latin-500-normal.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("./assets/fonts/instrument-sans-latin-600-normal.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --pix: "Silkscreen", "Courier New", monospace;
  --canvas: #f3f3ef;
  --surface: #fff;
  --text: #1f1f1f;
  --muted: #6c6c66;
  --line: #d9d5d2;
  --accent: #4388a8;
  --accent-soft: #edf6fb;
  --lime: #e4fa8e;
  --lime-hover: #ebfbb3;
  --shadow: 0 12px 40px rgb(31 31 31 / 0.055);
  --text-title: clamp(2.125rem, 4.4vw, 3.5rem);
  --text-lead: 1.1875rem;
  --text-heading: 1rem;
  --text-body: 0.9375rem;
  --text-caption: 0.8125rem;
  --text-wordmark: 0.9375rem;
  font-family: var(--sans);
  color: var(--text);
  background: var(--canvas);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}
.page {
  width: min(100% - 3rem, 1032px);
  margin: 0 auto;
  padding: 1.75rem 0 1.75rem;
}

/* Header */
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.brand img {
  display: block;
}
.wordmark {
  font-family: var(--pix);
  font-size: var(--text-wordmark);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
  margin-top: 1rem;
  padding: 2.5rem 0 2.5rem;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero h1 {
  margin: 0;
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.intro {
  margin: 0;
  max-width: 34rem;
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--muted);
}
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.download {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.375rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--text-heading);
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.download-primary {
  background: var(--lime);
  border-color: rgb(31 31 31 / 0.08);
}
.download:hover {
  background: var(--lime-hover);
  border-color: var(--lime);
  transform: translateY(-2px);
}
.download-status {
  margin: 0;
  font-size: var(--text-caption);
  line-height: 1.5;
  color: var(--muted);
}

/* Companion: the app's own card and mascot (InterventionCard, Avatar) */
.companion {
  --app-accent: #6c5fff;
  --app-accent-hover: #5a4de6;
  --app-raised: #ececec;
  --app-text-body: 0.875rem;
  --app-text-caption: 0.6875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-height: 27rem;
  font-size: var(--app-text-body);
}
.companion-bubble {
  position: relative;
  width: min(100%, 304px);
  min-height: 0;
  filter: drop-shadow(0 2px 3px rgb(31 31 31 / 0.05));
}
.companion-bubble::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  bottom: -4px;
  left: calc(50% - 5px);
  transform: rotate(45deg);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 4px 0;
  background: var(--surface);
  pointer-events: none;
}
.suggestion-card {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: var(--text);
  animation: buddy-arrive 0.3s ease-out;
}
.companion-prompt h2 {
  margin: 0 0 6px;
  font-size: var(--app-text-body);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.companion-prompt p {
  margin: 0;
  font-size: var(--app-text-body);
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.companion-prompt .setting-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font-size: var(--app-text-caption);
  color: var(--muted);
}
.companion-prompt input {
  font: inherit;
  font-size: var(--app-text-body);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
}
.companion-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.companion-prompt-actions button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--app-accent);
  color: #fff;
  font-size: var(--app-text-body);
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.companion-prompt-actions button:hover {
  background: var(--app-accent-hover);
}
.companion-prompt-actions button.secondary {
  background: var(--app-raised);
  border-color: var(--line);
  color: var(--muted);
}
.companion-prompt-actions button.secondary:hover {
  background: var(--line);
}
.mascot {
  width: 15rem;
  height: 15rem;
  margin-bottom: 2rem;
  animation: mascot-float 3.2s ease-in-out infinite;
}
@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
.mascot svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.avatar-idle .avatar-eyes {
  animation: buddy-blink 7s infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes buddy-blink {
  0%,
  44%,
  48%,
  100% {
    transform: scaleY(1);
  }
  46% {
    transform: scaleY(0.1);
  }
}
@keyframes buddy-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Video */
.demo {
  margin: 0;
}
.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #ececec;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}
.video-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.play {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid rgb(31 31 31 / 0.08);
  border-radius: 50%;
  background: var(--lime);
  cursor: pointer;
  box-shadow: 0 4px 20px rgb(31 31 31 / 0.12);
  transition:
    background 0.18s,
    scale 0.18s;
}
.play svg {
  height: 1.65rem;
  width: 1.65rem;
  fill: currentColor;
  margin-left: 0.2rem;
}
.play:hover {
  scale: 1.06;
  background: var(--lime-hover);
}
.video-error {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: var(--text-caption);
  color: var(--muted);
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 3rem;
  font-size: var(--text-caption);
  line-height: 1.5;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 1rem;
}
.footer-links #release-version:empty {
  display: none;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
  color: var(--text);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

/* Consent banner */
.consent {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(100% - 2rem, 40rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.875rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  box-shadow: 0 12px 40px rgb(31 31 31 / 0.12);
  font-size: var(--text-caption);
  line-height: 1.5;
  z-index: 10;
}
.consent p {
  margin: 0;
  flex: 1 1 18rem;
  color: var(--muted);
}
.consent a {
  color: var(--text);
}
.consent-actions {
  display: flex;
  gap: 0.5rem;
}
.consent-actions button {
  min-height: 2.25rem;
  padding: 0.4rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--text-caption);
  font-weight: 500;
  cursor: pointer;
}
.consent-accept {
  background: var(--lime);
  border-color: rgb(31 31 31 / 0.08);
}
.consent-actions button:hover {
  background: var(--lime-hover);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding: 1.5rem 0 2rem;
  }
  .companion {
    min-height: 0;
  }
}
@media (max-width: 620px) {
  .page {
    width: calc(100% - 2rem);
    padding: 1.5rem 0 1.5rem;
  }
  .download-buttons {
    flex-direction: column;
  }
  .download {
    justify-content: center;
    width: 100%;
  }
  .player {
    border-radius: 0.625rem;
  }
  .play {
    width: 3.5rem;
    height: 3.5rem;
  }
  footer {
    justify-content: center;
    text-align: center;
    margin-top: 2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .avatar-idle .avatar-eyes,
  .suggestion-card,
  .mascot {
    animation: none;
  }
}
