/* UI Heroes gallery — page chrome + tokens */

:root {
  --ink: #1a2332;
  --ink-muted: #5a6578;
  --ink-faint: #8b95a8;
  --surface: #f0f3f7;
  --surface-raised: #ffffff;
  --accent: #0aa392;
  --accent-soft: #d8f3ef;
  --accent-deep: #087a6e;
  --accent-hot: #e85d4c;
  --accent-hot-deep: #d14a3a;
  --accent-warm: #e8a317;
  --motif-ink: #1e3a4c;
  --border: #d5dce6;
  --border-strong: #b8c2d0;
  --hero-radius: 12px;
  --hero-shadow: 0 1px 2px rgb(26 35 50 / 0.06), 0 8px 24px rgb(26 35 50 / 0.06);
  --glass-bg: rgb(255 255 255 / 0.55);
  --blur: 14px;
  --motion: 200ms ease;
  --font-sans: "Outfit", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --max: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #d9ebe8 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #e2e8f2 0%, transparent 50%),
    var(--surface);
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.page {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-block: 2rem 2.5rem;
}

@media (max-width: 40rem) {
  .page {
    width: min(100% - 1.25rem, var(--max));
    padding-block: 1.25rem 2rem;
  }
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.page-header p {
  margin: 0;
  max-width: 44rem;
  color: var(--ink-muted);
}

.technique-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.technique-strip li a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.technique-strip li a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.technique-strip strong {
  color: var(--accent-deep);
  font-weight: 700;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  max-height: none;
}

@media (max-width: 40rem) {
  .toc {
    gap: 0.35rem;
    margin-bottom: 1.25rem;
  }

  .toc a {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
  }
}

.toc a {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-raised);
  font-size: 0.8125rem;
  font-weight: 600;
}

.toc a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pattern {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--hero-radius) + 4px);
  background: rgb(255 255 255 / 0.55);
  backdrop-filter: blur(6px);
}

@media (max-width: 40rem) {
  .pattern {
    padding: 1rem;
  }
}

.pattern__meta {
  margin-bottom: 1.25rem;
}

.pattern__meta h2 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.pattern__meta .slug {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.75rem;
}

.pattern__meta p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.pattern__stage {
  border-radius: var(--hero-radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e8edf3;
  box-shadow: var(--hero-shadow);
}

.pattern__stage--overflow {
  overflow: visible;
  padding-bottom: 2rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pattern__stage--overflow .hero-feature-pills,
.pattern__stage--overflow .hero-trail-texture,
.pattern__stage--overflow .hero-geometric-motif,
.pattern__stage--overflow .hero-cutout-blob,
.pattern__stage--overflow .hero-fluid-mockup,
.pattern__stage--overflow .hero-organic-blob {
  border: 1px solid var(--border);
  border-radius: var(--hero-radius);
  box-shadow: var(--hero-shadow);
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.hero-btn:hover {
  background: var(--accent-deep);
}

.hero-btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}

.hero-btn--ghost:hover {
  background: var(--surface);
}

.hero-btn--light {
  background: #fff;
  color: var(--accent-deep);
}

.hero-btn--hot {
  background: var(--accent-hot);
  color: #fff;
}

.hero-btn--hot:hover {
  background: var(--accent-hot-deep, #d14a3a);
}

.hero-btn--pill {
  border-radius: 999px;
  padding-inline: 1.35rem;
}

.hero-btn--gradient {
  background: linear-gradient(135deg, var(--accent-hot), var(--accent-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 35%, transparent);
}

.hero-btn--gradient:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.hero-outline-word {
  position: absolute;
  z-index: 2;
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.85;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px rgb(255 255 255 / 0.92);
  text-stroke: 2px rgb(255 255 255 / 0.92);
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
