/* -------------------------------------------------------------------------- */
/* Shared: tokens, base, controls, site header/footer, interior shells        */
/* -------------------------------------------------------------------------- */
:root {
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --color-bg: #ffffff;
  --color-text: #0a0a0a;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-hero-1: #e3f0dc;
  --color-hero-2: #f7f4d8;
  --color-hero-3: #fdeef2;
  --color-accent: #e85d24;
  --shadow-card: 0 12px 40px rgba(15, 23, 42, 0.06);
  --radius-card: 22px;
  --radius-panel: 28px;
  --space-section: clamp(3rem, 8vw, 6rem);
  --content-max: 1120px;
  --header-pad-y: 1.25rem;
  /* Figma mobile layouts stay single-column below this; header matches mobile until this width */
  --layout-split: 900px;
}

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

html {
  scroll-behavior: smooth;
  /* Avoid full-width chrome shifting when only some pages scroll (classic vs overlay scrollbars). */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-text);
  color: #fff;
  z-index: 1000;
  border-radius: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--color-text);
  color: #fff;
}

.btn--primary:hover {
  background: #262626;
}

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

.btn--lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.link-quiet {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
}

.link-quiet:hover {
  text-decoration: underline;
}

.site-header {
  padding: var(--header-pad-y) clamp(1.25rem, 4vw, 2rem) 1rem;
  background: var(--color-bg);
}

.site-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.site-logo__img {
  width: auto;
  height: clamp(28px, 5vw, 36px);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem clamp(0.75rem, 3vw, 1.25rem);
}

.site-nav__list a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__list a:hover {
  text-decoration: underline;
}

.site-nav__list a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
}

.site-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
}

.site-footer {
  border-top: 1px solid var(--color-line);
  padding: 2rem clamp(1.25rem, 4vw, 2rem) 2.5rem;
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.site-footer__nav {
  order: 1;
}

.site-footer__brand {
  order: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-footer__mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.site-footer__legal {
  font-weight: 600;
  font-size: 0.9375rem;
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.site-footer__list a {
  font-size: 0.9375rem;
  color: var(--color-muted);
  text-decoration: underline;
}

.site-footer__list a:hover {
  color: var(--color-text);
}

/* -------------------------------------------------------------------------- */
/* Simple interior pages (shared layout)                                      */
/* -------------------------------------------------------------------------- */
.page-shell {
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 4vw, 2rem) var(--space-section);
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-shell h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-shell p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  max-width: 40rem;
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.btn--outline:hover {
  background: #fafafa;
}

.btn--block {
  width: 100%;
  max-width: 16rem;
}

/* -------------------------------------------------------------------------- */
/* Marketing inner pages: gradient hero + decorative panels                   */
/* -------------------------------------------------------------------------- */
.m-hero {
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2rem);
  background: linear-gradient(
    135deg,
    var(--color-hero-1) 0%,
    var(--color-hero-2) 45%,
    var(--color-hero-3) 100%
  );
  position: relative;
  overflow: hidden;
}

.m-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 40%);
}

.m-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.m-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 4.2vw, 2.65rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.m-hero__sub {
  margin: 0 0 1.5rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--color-muted);
  max-width: 28rem;
}

/* Marketing visuals: screenshot hidden until load (no pastel flash under lazy images) */
.m-visual__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: inherit;
  z-index: 1;
  opacity: 0;
}

.m-visual--has-img > .m-visual__img {
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* Click/tap to enlarge marketing screenshots */
.m-visual--expandable {
  cursor: zoom-in;
}

.m-visual__expand {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
}

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

.m-visual--expandable::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(15, 23, 42, 0.22) 100%);
  transition: opacity 0.2s ease;
}

.m-visual--expandable:hover::after,
.m-visual--expandable:focus-within::after {
  opacity: 1;
}

.m-visual__expand-icon {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.m-visual__expand-icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.m-visual--expandable:hover .m-visual__expand-icon,
.m-visual--expandable:focus-within .m-visual__expand-icon {
  opacity: 1;
  transform: translateY(0);
}

.m-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.m-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.m-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: zoom-out;
  background:
    radial-gradient(ellipse at center, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.92) 72%),
    rgba(15, 23, 42, 0.88);
}

.m-lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  border-radius: clamp(12px, 2vw, 18px);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 120px rgba(0, 0, 0, 0.35);
}

.m-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  object-position: center;
  background: #0a0a0a;
}

.m-lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.25rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.m-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.m-lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

body.m-lightbox-open {
  overflow: hidden;
}

@media (hover: none) {
  .m-visual--expandable::after,
  .m-visual__expand-icon {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-lightbox,
  .m-visual--expandable::after,
  .m-visual__expand-icon {
    transition: none;
  }
}

.m-visual--has-img::before,
.m-visual--has-img::after {
  display: none;
}

.m-panel {
  border-radius: var(--radius-panel);
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 900px) {
  .site-header__inner {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 1rem 1.5rem;
  }

  .site-nav__list {
    justify-content: flex-start;
  }

  .site-header__actions {
    justify-content: flex-end;
    margin-left: auto;
  }

  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .site-footer__brand {
    order: 1;
  }

  .site-footer__nav {
    order: 2;
  }

  .site-footer__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 1.25rem;
  }

  .site-footer__list a {
    text-decoration: none;
  }

  .site-footer__list a:hover {
    text-decoration: underline;
  }
}

@media (min-width: 1100px) {
  .site-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
