* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--color-text-primary);
  background-color: var(--color-canvas);
  background-image: radial-gradient(var(--texture-color) 0.45px, transparent 0.55px);
  background-size: 5px 5px;
  background-blend-mode: soft-light;
  opacity: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: inherit;
  opacity: var(--texture-opacity);
  content: '';
}

::selection {
  color: var(--color-text-on-accent);
  background: var(--color-accent);
}

img,
video {
  max-width: 100%;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 3px;
}

button,
a,
input,
textarea {
  touch-action: manipulation;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: 100%;
  min-width: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.button,
.app-store-cta,
.cta-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
  cursor: pointer;
}

.button:hover,
.app-store-cta:hover,
.cta-link:hover {
  transform: translateY(-1px);
}

.button:active,
.app-store-cta:active,
.cta-link:active {
  transform: translateY(0);
}

.button--primary,
.app-store-cta--primary,
.cta-link {
  color: var(--color-text-on-accent);
  background: var(--gradient-accent);
  box-shadow: var(--shadow-card);
}

.button--primary:hover,
.app-store-cta--primary:hover,
.cta-link:hover {
  box-shadow: var(--shadow-elevated);
}

.button--primary:active,
.app-store-cta--primary:active,
.cta-link:active {
  background: var(--color-accent-pressed);
}

.button--secondary,
.app-store-cta--secondary {
  color: var(--color-accent);
  border-color: var(--color-border-strong);
  background: var(--color-surface-elevated);
}

.button--secondary:hover,
.app-store-cta--secondary:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.button--secondary:active,
.app-store-cta--secondary:active {
  border-color: var(--color-accent-pressed);
  color: var(--color-text-on-accent);
  background: var(--color-accent-pressed);
}

.button--compact {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
}

.button--quiet,
.app-store-cta--inline {
  min-height: 44px;
  padding-inline: 0;
  color: var(--color-accent-strong);
  background: transparent;
}

.button--quiet:hover,
.app-store-cta--inline:hover {
  color: var(--color-accent-hover);
  box-shadow: none;
}

.button:disabled,
button[disabled],
.is-disabled {
  color: var(--color-disabled);
  background: var(--color-disabled-surface);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
