/* Original arcane-fantasy visual theme. All assets and fonts stay local. */
:root {
  --ink: #f2ead9;
  --paper: #0b1220;
  --accent: #dfbd7c;
  --line: #79674680;
  --muted: #bcb9bc;
  --gold-bright: #f2d99e;
  --fantasy-heading:
    "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

body {
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 22%, #122a4533, transparent 65%),
    linear-gradient(180deg, #08172a 0%, #0a1c32 55%, #040b15 100%);
  background-attachment: fixed;
  font-family: "Segoe UI", Tahoma, sans-serif;
  animation: none;
}

/* Original pixel nightscape inspired by the CriticalCounter brand reference. */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-background::before,
.ambient-background::after {
  content: "";
  position: absolute;
  inset: -25%;
  background-repeat: no-repeat;
  transform-origin: center;
}

.ambient-background::before {
  background:
    radial-gradient(ellipse at 22% 30%, #21456d33 0%, transparent 48%),
    radial-gradient(ellipse at 78% 70%, #151b352b 0%, transparent 48%),
    linear-gradient(125deg, #02060d22, #11273e22 52%, #04091433);
  animation: amethyst-current 24s ease-in-out infinite alternate;
}

.ambient-background::after {
  background: linear-gradient(
    115deg,
    transparent 40%,
    #70a9df0d 45%,
    #a4cef52b 49%,
    #deeeff38 50%,
    #a4cef52b 51%,
    #70a9df0d 55%,
    transparent 60%
  );
  opacity: 0;
  animation: amethyst-shine 7s ease-in-out infinite;
}

@keyframes amethyst-current {
  from {
    transform: translate3d(-7%, -4%, 0) rotate(-5deg) scale(1);
  }
  to {
    transform: translate3d(8%, 6%, 0) rotate(6deg) scale(1.08);
  }
}

@keyframes amethyst-shine {
  0% {
    transform: translate3d(-80%, 0, 0);
    opacity: 0;
  }
  10%,
  38% {
    opacity: 0.5;
  }
  50%,
  100% {
    transform: translate3d(80%, 0, 0);
    opacity: 0;
  }
}

.pixel-clouds {
  position: absolute;
  inset: 0 -5%;
  background: url("assets/pixel-clouds.svg") center top / max(1100px, 100vw)
    auto repeat-x;
  image-rendering: pixelated;
  opacity: 0.75;
  animation: pixel-cloud-drift 40s ease-in-out infinite alternate;
}

.pixel-landscape {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: clamp(150px, 28vh, 340px);
  background: url("assets/pixel-landscape.svg") center bottom / auto 100%
    repeat-x;
  image-rendering: pixelated;
  opacity: 0.85;
}

@keyframes pixel-cloud-drift {
  from {
    transform: translate3d(-2%, 0, 0);
  }
  to {
    transform: translate3d(2%, 0, 0);
  }
}

.background-paused .pixel-clouds,
.background-paused .ambient-background::before,
.background-paused .ambient-background::after {
  animation-play-state: paused;
}


header {
  border-bottom: 1px solid var(--line);
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}

.brand {
  font-family: var(--fantasy-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2.2px;
  color: var(--gold-bright);
}

.mark {
  display: grid;
  place-items: center;
  padding: 0;
  width: 43px;
  height: 48px;
  font-size: 19px;
  letter-spacing: -2px;
  background: linear-gradient(150deg, #383322, #111a2a);
  border: 1px solid #a58b57;
  border-radius: 45% 45% 8px 8px;
  box-shadow:
    inset 0 0 0 4px #111827,
    0 0 20px #dfbd7c0a;
}

nav {
  gap: 26px;
  align-items: center;
  font-size: 13px;
}

nav a {
  transition: color 160ms ease;
}

nav a:hover {
  color: var(--gold-bright);
}

nav a:last-child {
  border-color: #a58b57;
  margin-top: 0;
  border-radius: 2px;
  color: var(--gold-bright);
  background: #dfbd7c08;
}

h1,
h2,
h3 {
  font-family: var(--fantasy-heading);
  font-weight: 400;
  color: var(--ink);
}

h1 {
  font-size: clamp(48px, 5.6vw, 80px);
  line-height: 1.1;
  letter-spacing: -1.6px;
  text-shadow: 0 3px 30px #0005;
}

h1 em {
  font-family: var(--fantasy-heading);
  color: var(--gold-bright);
}

h2 {
  letter-spacing: -0.6px;
}

h3 {
  letter-spacing: 0;
}

p {
  color: #c5c2ca;
}

.subtle,
.tile .num,
footer small {
  color: var(--muted);
}

.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.8px;
}

.eyebrow::before {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 0;
  transform: rotate(45deg);
  width: 6px;
  height: 6px;
}

.hero {
  min-height: 680px;
}

.hero .intro {
  max-width: 390px;
}

.hero .homepage-viewer {
  isolation: isolate;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.homepage-viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse, #6fb1e510, transparent 65%);
  animation: celestial-drift 28s ease-in-out infinite alternate;
}

@keyframes celestial-drift {
  from {
    transform: rotate(-4deg);
    opacity: 0.7;
  }
  to {
    transform: rotate(4deg);
    opacity: 1;
  }
}

.view-label {
  color: var(--accent);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  top: 10px;
}

.view-bottom {
  color: var(--muted);
}

button,
a.btn,
.upload-button {
  border-color: #ba9c60;
  border-radius: 2px;
  background: linear-gradient(135deg, #e0c58b, #b99553);
  color: #141925;
  font-weight: 600;
  box-shadow:
    inset 0 0 0 3px #39291416,
    0 4px 18px #0002;
  transition:
    filter 160ms ease,
    border-color 160ms ease;
}

button:hover,
a.btn:hover {
  filter: brightness(1.08);
}

button.secondary,
.view-bottom button {
  background: linear-gradient(135deg, #232839bb, #111a29bb);
  color: var(--gold-bright);
  border-color: #8d7953;
  box-shadow: inset 0 0 0 3px #dfbd7c05;
}

button:disabled {
  opacity: 0.55;
}

.text-link,
.build-action {
  color: var(--gold-bright);
}

.build-action span {
  border-color: #a58b57;
  border-radius: 3px;
  background: #dfbd7c0a;
}

.strip {
  background: linear-gradient(90deg, #0b1424ee, #25283aee, #0b1424ee);
  border-block: 1px solid var(--line);
  color: #dbc797;
  font-family: var(--fantasy-heading);
  letter-spacing: 2px;
}

.tile {
  position: relative;
  padding: 30px 22px 15px;
  background: linear-gradient(180deg, #d4bb8022, transparent 85%);
  border-top: 1px solid #9e8555;
}

.tile::before {
  content: "◇";
  position: absolute;
  top: -12px;
  right: 20px;
  background: #111c2c;
  padding: 0 8px;
  color: var(--accent);
}

.panel,
.product-art,
.screen-preview-stage,
.workspace-viewer {
  background: radial-gradient(ellipse at top, #28314a, #111a2a 70%);
  border: 1px solid #87744c;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 5px #d9bb7b06,
    0 12px 30px #0002;
}

.panel {
  background: linear-gradient(145deg, #20293c, #101827);
}

.theme-card {
  padding: 16px;
  border: 1px solid #87744c;
  background: linear-gradient(160deg, #232a3a, #0c1524);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 5px #d9bb7b06,
    0 12px 30px #0003;
}

.theme-card h3 {
  color: var(--gold-bright);
  font-size: 25px;
  margin: 20px 0 10px;
}

.theme-preview {
  position: relative;
  border-radius: 70px 70px 2px 2px;
  border-color: #c2a46a88;
  box-shadow: inset 0 0 0 5px #0003;
}

.theme-preview strong {
  font-family: var(--fantasy-heading);
  font-weight: 400;
}

.theme-preview > span {
  letter-spacing: 2px;
  font-size: 9px;
}

.theme-preview::after {
  content: "◆";
  display: block;
  font-size: 8px;
  opacity: 0.7;
  margin-top: 18px;
}

.tag {
  background: #111827;
  color: #e0c58b;
  border: 1px solid var(--line);
}

.notice {
  background: linear-gradient(110deg, #37312788, #1b2335cc);
  border-left-color: var(--accent);
  color: #dfd7c9;
}

.field input,
.field select,
.field textarea,
.axis-fields input,
select,
.creator-colors input {
  border-color: #87744c;
  border-radius: 2px;
}

input,
select,
textarea {
  color: #f2ead9;
  background-color: #0b1220;
  accent-color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.scene-caption {
  background: #0b1220ed;
  color: #d6c9ae;
}

.build-option {
  border-top: 2px solid #b89b61;
}

footer {
  padding-block: 36px;
  border-top-color: #87744c;
}

footer p {
  font-family: var(--fantasy-heading);
  font-style: italic;
  font-size: 15px;
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
  }

  .hero h1,
  .page-head h1 {
    letter-spacing: -0.8px;
  }

  .brand {
    font-size: 14px;
  }

  nav {
    gap: 18px;
    font-size: 12px;
  }

  .view-label {
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .strip {
    letter-spacing: 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-clouds,
  .ambient-background::before,
  .ambient-background::after {
    animation: none;
  }


  .homepage-viewer::before {
    animation: none;
  }

  a,
  button {
    transition: none;
  }
}
.home-ui-builder-link {
  display: flex;
  justify-content: center;
  padding: 8px 24px 28px;
}
.home-ui-builder-link img,
.community-ui-builder img {
  display: block;
  width: min(760px, 90vw);
  height: auto;
  filter: drop-shadow(0 12px 26px #0009);
  transition: transform 180ms ease, filter 180ms ease;
}
.home-ui-builder-link a:hover img,
.community-ui-builder:hover img {
  transform: translateY(-3px);
  filter: drop-shadow(0 16px 32px #000b) brightness(1.08);
}
.home-ui-builder-link a:focus-visible,
.community-ui-builder:focus-visible {
  outline: 2px solid #9cddff;
  outline-offset: 5px;
}
.community-ui-builder {
  display: block;
  align-self: center;
}
.community-ui-builder img { width: min(360px, 72vw); }
@media (prefers-reduced-motion: reduce) {
  .home-ui-builder-link img,
  .community-ui-builder img { transition: none; }
}
