/* ═══════════════════════════════════════════════════════════════
   say.work — CSS Reset
   Modern reset based on Andy Bell's reset + custom additions.
   ═══════════════════════════════════════════════════════════════ */

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  min-height: 100vh;
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

ul, ol {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* High-quality rendering for screenshots (sharp text, UI elements) */
.hero__screenshot,
.feature-row__image img,
.feature-highlight__image img,
.feature-highlight__screenshot,
img[src*="screenshots/"] {
  image-rendering: -webkit-optimize-contrast; /* Chrome/Safari: sharper downscaling */
  image-rendering: high-quality;              /* Standard: best quality */
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

textarea:not([rows]) {
  min-height: 10em;
}

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

a:not([class]) {
  text-decoration-skip-ink: auto;
  color: var(--color-primary);
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

table {
  border-collapse: collapse;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ── Screenshot Lightbox ─────────────────────────────────────── */

img[src*="screenshots/"] {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: pinch-zoom;
}

.lightbox.active .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 200ms ease;
  line-height: 1;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}
