:root {
  --brand-sun: #f0c030;
  --brand-coral: #f07828;
  --brand-berry: #d1387c;
  --brand-night: #0f0f0f;
  --bg: #f7f4ef;
  --surface: #fffdfa;
  --text: #121212;
  --text-muted: #3d3d3d;
  --border: #cfc4b6;
  --accent: #9b2860;
  --accent-hover: #7a1f4c;
  --accent-gradient: linear-gradient(
    105deg,
    var(--brand-sun) 0%,
    var(--brand-coral) 48%,
    var(--brand-berry) 100%
  );
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
  --max: 44rem;
  --wide: 56rem;
  --focus-color: #9b2860;
  --target-min: 1.5rem; /* 24px — WCAG 2.2 AA 2.5.8 */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  body {
    background-attachment: scroll !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(
      120% 80% at 10% -10%,
      color-mix(in srgb, var(--brand-sun) 28%, transparent),
      transparent 55%
    ),
    radial-gradient(
      90% 70% at 100% 0%,
      color-mix(in srgb, var(--brand-berry) 18%, transparent),
      transparent 50%
    ),
    linear-gradient(165deg, #fbf7f0 0%, var(--bg) 45%, #f3ebe3 100%);
  background-attachment: fixed;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  min-height: var(--target-min);
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--brand-night);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: underline;
  transform: translateY(-250%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--target-min);
  text-decoration: none;
  color: var(--brand-night);
}

.brand:hover {
  color: var(--brand-night);
  text-decoration: underline;
}

.brand__mark {
  width: 3.25rem;
  height: 3.25rem;
  display: block;
  animation: brand-settle 0.7s ease-out both;
}

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  min-width: var(--target-min);
  padding: 0.35rem 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 3px solid transparent;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--brand-night);
  color: var(--brand-night);
  text-decoration: none;
}

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.hero {
  max-width: var(--max);
  margin: 1.5rem 0 2.5rem;
  animation: rise 0.65s ease-out both;
}

.hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--brand-night);
}

.hero__lede {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--brand-night);
}

.hero__lede--solo {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
}

.hero__note {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  max-width: 36rem;
}

.figure {
  margin: 0 0 2.75rem;
  animation: rise 0.8s ease-out 0.08s both;
}

.figure__zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 4px;
  min-height: var(--target-min);
}

.figure__zoom:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}

.figure img,
.figure picture {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.figure picture img {
  width: 100%;
  height: auto;
}

.figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--brand-night) 82%, transparent);
  color: #fff;
}

.lightbox::backdrop {
  background: color-mix(in srgb, var(--brand-night) 82%, transparent);
}

.lightbox[open] {
  display: grid;
  place-items: center;
  overflow: auto;
}

.lightbox__close-form {
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  box-sizing: border-box;
}

.lightbox__hit {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
  line-height: 0;
  min-height: var(--target-min);
}

.lightbox__hit:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.lightbox__hit img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1536px);
  max-height: 92vh;
  aspect-ratio: 1536 / 1024;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 4px;
}

.lightbox__hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  max-width: var(--max);
  margin: 0 0 2.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.section h2 {
  margin: 1.5rem 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-night);
}

.section p,
.section li {
  color: var(--text);
}

.section p + p {
  margin-top: 0.75rem;
}

.section ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.section li + li {
  margin-top: 0.35rem;
}

.faq {
  max-width: var(--max);
}

.faq-group {
  margin: 2rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-night);
}

.faq-group:first-of-type {
  margin-top: 0.5rem;
}

.faq details {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-night);
  list-style: none;
  min-height: var(--target-min);
  padding: 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "";
  display: inline-block;
  flex: 0 0 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--brand-night);
  border-bottom: 2px solid var(--brand-night);
  transform: rotate(-45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.faq details[open] summary::before {
  transform: rotate(45deg) translateY(-2px);
}

.faq details p {
  margin: 0 0 0.95rem;
  color: var(--text-muted);
}

.faq details p + p {
  margin-top: -0.35rem;
}

.demo-list {
  display: grid;
  gap: 2rem;
  max-width: var(--max);
}

.demo h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--brand-night);
}

.demo p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
}

.demo__media {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--brand-sun) 16%, var(--surface)),
      color-mix(in srgb, var(--brand-berry) 12%, var(--surface))
    );
  border: 2px dashed color-mix(in srgb, var(--brand-night) 28%, var(--border));
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}

.demo__media--soon {
  border-style: solid;
  font-weight: 600;
  color: var(--text);
}

.demo__media video {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: #000;
}

.contact-person {
  display: grid;
  gap: 1.35rem;
  max-width: var(--max);
  margin: 1.5rem 0 1.75rem;
  animation: rise 0.65s ease-out both;
}

@media (min-width: 40rem) {
  .contact-person {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }
}

.contact-person__photo {
  display: block;
  width: min(12rem, 56vw);
  height: auto;
  aspect-ratio: 434 / 443;
  object-fit: cover;
  border-radius: 6px;
  animation: brand-settle 0.75s ease-out both;
}

.contact-person__copy .hero__lede,
.contact-person__copy .hero__brand {
  margin: 0;
}

.contact-person__welcome {
  margin: 0.85rem 0 0;
  color: var(--text);
  max-width: 36rem;
}

.contact-ways {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-ways--page {
  max-width: var(--max);
  margin: 0 0 2.5rem;
  animation: rise 0.8s ease-out 0.1s both;
}

.contact-ways li {
  margin: 0;
  color: var(--text);
}

.contact-ways__action {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0.15rem 0;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contact-ways__action:hover {
  color: var(--accent-hover);
}

.contact-ways__handle {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-weight: 700;
  color: var(--brand-night);
  user-select: all;
}

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.site-footer__inner {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  max-width: var(--max);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0.2rem 0.15rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--target-min);
  color: var(--text);
  text-decoration: underline;
  font-weight: 600;
  line-height: 1.2;
}

.footer-link:hover {
  color: var(--accent-hover);
}

.footer-link__icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex: 0 0 16px;
  display: block;
  fill: currentColor;
}

.footer-link--license {
  font-weight: 600;
}

.accent-rule {
  display: block;
  width: 4.5rem;
  height: 3px;
  margin: 1rem 0 0;
  border: 0;
  background: var(--accent-gradient);
  border-radius: 999px;
  animation: rule-grow 0.55s ease-out 0.15s both;
  transform-origin: left center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes brand-settle {
  from {
    opacity: 0;
    transform: scale(0.92) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rule-grow {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
