:root {
  --bg: #000000;
  --bg-top: #070707;
  --bg-bottom: #000000;
  --text: #dfdfdf;
  --muted: #8f8f8f;
  --soft: #5f5f5f;
  --accent: #ef3b2d;
  --border: rgba(255, 255, 255, 0.08);
  --title-font: "Space Grotesk", sans-serif;
  --body-font: "IBM Plex Mono", monospace;
}

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

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

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background 500ms ease,
    color 250ms ease;
}

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

button {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

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

.site-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px 72px;
  position: relative;
  perspective: 1800px;
  transform-style: preserve-3d;
}

.screen {
  width: min(100%, 720px);
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.home-screen {
  width: min(100%, 420px);
}

.identity-block {
  text-align: center;
  transform-style: preserve-3d;
  position: relative;
  z-index: 2;
  isolation: isolate;
}

.identity-block::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 680px;
  height: 340px;
  transform: translate3d(-50%, -52%, -20px);
  background:
    radial-gradient(circle at center, rgba(100, 255, 170, 0.08), transparent 56%),
    radial-gradient(circle at 58% 42%, rgba(106, 183, 255, 0.08), transparent 44%);
  filter: blur(26px);
  pointer-events: none;
  z-index: -1;
}

.brand-mark,
.panel-label,
.status-line,
.site-footer,
.contact-form label span,
.character-count {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.identity-float {
  transform-style: preserve-3d;
  animation: stage-breathe 8.5s ease-in-out infinite;
}

.brand-mark {
  margin: 0 0 6px;
  color: var(--muted);
  transform: translateZ(52px);
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

.identity-lockup {
  display: flex;
  justify-content: center;
  width: min(100%, 560px);
  margin: -2px auto 10px;
  transform: translateZ(120px) rotateX(16deg) scale(1.02);
  transform-style: preserve-3d;
}

.identity-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 65px 95px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 24px rgba(142, 255, 196, 0.12))
    drop-shadow(0 0 42px rgba(86, 172, 255, 0.1));
}

.status-line {
  margin: 0 0 26px;
  color: var(--muted);
  transform: translateZ(44px);
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.primary-nav,
.panel-actions,
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.primary-nav {
  gap: 12px;
  transform: none;
}

.nav-link,
.minimal-link,
.scenario-link,
.submit-link,
.site-footer a {
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  transition: color 150ms ease, opacity 150ms ease, transform 200ms ease;
  text-shadow:
    0 16px 30px rgba(0, 0, 0, 0.3),
    0 0 16px rgba(146, 235, 255, 0.06);
}

.nav-link:hover,
.minimal-link:hover,
.scenario-link:hover,
.submit-link:hover,
.site-footer a:hover {
  color: #f7fffd;
  transform: translateZ(16px) translateY(-2px);
  text-shadow:
    0 18px 32px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(143, 255, 195, 0.14);
}

.content-panel {
  width: min(100%, 520px);
  margin: 0 auto;
  transform: translateZ(68px);
  transform-style: preserve-3d;
  animation: panel-breathe 9.5s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.panel-label {
  margin: 0 0 16px;
  color: var(--muted);
  text-transform: lowercase;
}

.content-panel h1 {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-shadow:
    0 24px 46px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(132, 245, 255, 0.05);
}

.panel-copy,
.scenario-output,
.contact-form input,
.contact-form select,
.contact-form textarea {
  margin-top: 16px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.8;
}

.gi-ascii {
  margin: 18px 0 0;
  overflow-x: auto;
  color: var(--text);
  font-size: 0.46rem;
  line-height: 1.15;
  letter-spacing: 0;
  text-shadow:
    0 18px 36px rgba(0, 0, 0, 0.34),
    0 0 14px rgba(132, 245, 255, 0.06);
}

.panel-list,
.work-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.panel-list li,
.work-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.scenario-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 28px;
}

.scenario-link {
  color: var(--soft);
}

.scenario-link.active {
  color: #ffffff;
}

.scenario-output {
  min-height: 86px;
}

.panel-actions {
  align-items: flex-start;
  gap: 12px;
  margin-top: 32px;
}

.minimal-link,
.submit-link {
  color: var(--muted);
}

.contact-form {
  margin-top: 24px;
}

.contact-form label {
  display: block;
  margin-bottom: 18px;
}

.contact-form label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: lowercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 10px;
  outline: none;
  appearance: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--soft);
}

.form-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 10px;
}

.form-status {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-status.is-success {
  color: #ffffff;
}

.form-status.is-error {
  color: #c7c7c7;
}

.site-footer {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  flex-direction: row;
  gap: 24px;
  color: var(--soft);
  text-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
  animation: footer-breathe 10s ease-in-out infinite;
  z-index: 2;
}

.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--soft);
}

.social-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon .icon-fill {
  fill: currentColor;
  stroke: none;
}

.social-icon.is-placeholder {
  opacity: 0.7;
}

.social-icon:hover {
  color: var(--text);
}

@keyframes stage-breathe {
  0%, 100% {
    transform: rotateX(0deg) rotateY(0deg) translateY(0);
  }
  25% {
    transform: rotateX(4deg) rotateY(-3deg) translateY(-6px);
  }
  50% {
    transform: rotateX(0deg) rotateY(2deg) translateY(2px);
  }
  75% {
    transform: rotateX(-3deg) rotateY(3deg) translateY(-4px);
  }
}

@keyframes panel-breathe {
  0%, 100% {
    transform: translateZ(68px) rotateX(0deg) translateY(0);
  }
  50% {
    transform: translateZ(94px) rotateX(3deg) translateY(-6px);
  }
}

@keyframes footer-breathe {
  0%, 100% {
    transform: translateX(-50%) translateZ(42px);
  }
  50% {
    transform: translateX(-50%) translateZ(72px) translateY(-4px);
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 28px 18px 86px;
    align-items: start;
  }

  .home-screen,
  .screen,
  .content-panel {
    width: 100%;
  }

  .identity-block {
    padding-top: 14vh;
  }

  .identity-lockup {
    width: min(100%, 390px);
    margin: 0 auto 8px;
    transform: translateZ(72px) rotateX(12deg) scale(1.01);
  }

  .identity-logo {
    width: 100%;
  }

  .status-line {
    margin-bottom: 22px;
  }

  .content-panel h1 {
    font-size: 1.65rem;
  }

  .gi-ascii {
    font-size: 0.31rem;
  }

  .site-footer {
    gap: 14px;
    font-size: 0.66rem;
    bottom: 18px;
  }

  .footer-socials {
    gap: 12px;
  }

  .identity-block::before {
    width: 420px;
    height: 260px;
  }
}
