/* UI Landing Sections gallery — page chrome + shared tokens */

:root {
  --ink: #1a2332;
  --ink-muted: #5a6578;
  --ink-faint: #8b95a8;
  --surface: #f0f3f7;
  --surface-raised: #ffffff;
  --accent: #0d7a6f;
  --accent-soft: #e4f4f2;
  --accent-deep: #085c54;
  --border: #d5dce6;
  --border-strong: #b8c2d0;
  --card-bg: var(--surface-raised);
  --card-border: var(--border);
  --card-radius: 12px;
  --card-shadow: 0 1px 2px rgb(26 35 50 / 0.06), 0 8px 24px rgb(26 35 50 / 0.06);
  --card-shadow-strong: 0 2px 4px rgb(26 35 50 / 0.08), 0 16px 40px rgb(26 35 50 / 0.12);
  --motion: 200ms ease;
  --font-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Semibold", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --max: 72rem;
  --section-pad: clamp(2.5rem, 6vw, 4.5rem);
}

*,
*::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);
}

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

button,
a.btn,
input {
  font: inherit;
}

button,
a.btn {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary: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: var(--space-8) var(--space-10);
}

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

  .pattern {
    padding: var(--space-4);
  }
}

.page-header {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  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);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-8);
  padding: 0;
  list-style: none;
}

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

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

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

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

.pattern__meta {
  margin-bottom: var(--space-5);
}

.pattern__meta h2 {
  margin: 0 0 var(--space-1);
  font-size: 1.125rem;
  font-weight: 700;
}

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

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

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

.section-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
}

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

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

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

.section-btn--light {
  background: #fff;
  color: var(--ink);
}

.section-btn--light:hover {
  background: var(--accent-soft);
}

.section-btn--ghost-light {
  background: transparent;
  border-color: rgb(255 255 255 / 0.45);
  color: #fff;
}

.section-btn--ghost-light:hover {
  background: rgb(255 255 255 / 0.1);
}
