:root {
  --ink: #171311;
  --paper: #f4efe6;
  --paper-strong: #fffaf3;
  --line: #2f2722;
  --accent: #d23c2b;
  --accent-soft: #f2be59;
  --muted: #665b54;
  --shadow: 0 24px 80px rgba(23, 19, 17, 0.12);
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff7ec 0, var(--paper) 55%, #e8ddcf 100%);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  padding: 1.25rem;
}

.site-legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  margin: 1.5rem auto 0;
  max-width: 1200px;
  padding: 0.9rem 1rem;
  border-top: 1px solid rgba(47, 39, 34, 0.14);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.site-legal-footer__copy {
  white-space: nowrap;
}

.site-legal-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.site-legal-footer__link {
  text-decoration: none;
}

.site-legal-footer__link:hover,
.site-legal-footer__link:focus-visible {
  text-decoration: underline;
}

.page-home {
  background: #f4f5f7;
}

.page-home .site-shell {
  position: relative;
  padding: 0;
}

.page-home .site-shell::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #0052cc 0%, #af59e1 33%, #6a9a23 66%, #0052cc 100%);
  opacity: 0.5;
  content: "";
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 1.5rem;
  max-width: 1200px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(47, 39, 34, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.76);
  backdrop-filter: blur(12px);
}

.topbar-brand {
  font-family: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.topbar-link {
  text-decoration: none;
  color: var(--muted);
}

.page-home .topbar {
  justify-content: center;
  max-width: none;
  margin: 0;
  padding: 0.875rem 1.25rem;
  border: 0;
  border-bottom: 1px solid rgba(240, 192, 64, 0.15);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.page-home .topbar-brand {
  color: #0052cc;
  font-family: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.page-home .topbar-nav {
  display: none;
}

.page-home .site-legal-footer {
  margin-top: 1.35rem;
  padding: 0.95rem 1.25rem 1.65rem;
  border-top: 0;
}

.eyebrow,
.stats-label,
.metadata-label {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.action-primary,
.action-secondary,
.wall-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
}

.action-primary {
  background: var(--ink);
  color: var(--paper-strong);
  box-shadow: var(--shadow);
}

.action-secondary,
.wall-control {
  background: rgba(255, 250, 243, 0.88);
}

.wall-shell {
  display: grid;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
  border-radius: 32px;
  background: rgba(255, 250, 243, 0.88);
  border: 1px solid rgba(47, 39, 34, 0.16);
  box-shadow: var(--shadow);
}

.wall-copy h2,
.metadata-name {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.wall-lead,
.metadata-dimensions,
.metadata-link,
.hero-lead,
.hero-support,
.canvas-lead {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.wall-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wall-stage {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(47, 39, 34, 0.16);
  background:
    linear-gradient(135deg, rgba(210, 60, 43, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 250, 243, 0.86), rgba(236, 227, 214, 0.95));
  touch-action: none;
  user-select: none;
}

.wall-viewport {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  transform-origin: center center;
  transition: transform 180ms ease;
}

.wall-image,
.wall-hit-region {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wall-image {
  display: block;
  image-rendering: pixelated;
}

.wall-hit-target {
  position: absolute;
  border: 1px solid rgba(210, 60, 43, 0.7);
  background: rgba(210, 60, 43, 0.18);
  cursor: pointer;
}

.wall-hit-target:hover,
.wall-hit-target:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 0;
  background: rgba(242, 190, 89, 0.3);
}

.block-metadata {
  padding: 1rem;
  border-radius: 24px;
  background: rgba(23, 19, 17, 0.95);
  color: var(--paper-strong);
}

.block-metadata a {
  color: var(--accent-soft);
}

@media (min-width: 900px) {
  .page-home .topbar-brand {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.03em;
  }

  .wall-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
      "copy copy"
      "toolbar toolbar"
      "stage meta";
  }

  .wall-copy {
    grid-area: copy;
  }

  .wall-toolbar {
    grid-area: toolbar;
  }

  .wall-stage {
    grid-area: stage;
  }

  .block-metadata {
    grid-area: meta;
  }
}

@media (max-width: 720px) {
  .site-legal-footer {
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
  }
}
