:root {
  --ink: #101010;
  --paper: #f5f1ea;
  --metal: #b7b1a6;
  --accent: #c4161c;
  --accent-dark: #8f1116;
  --midnight: #0a0a0c;
  --midnight-soft: #141418;
  --glow: rgba(255, 250, 238, 0.28);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-inner: rgba(255, 255, 255, 0.26);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  color: var(--paper);
  background: radial-gradient(
      circle at center,
      #101013 0%,
      #0a0a0c 55%,
      #050506 100%
    ),
    linear-gradient(130deg, rgba(196, 22, 28, 0.12), transparent 65%);
}

.page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
}

.backdrop {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at center,
      rgba(255, 250, 240, 0.2),
      transparent 60%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 60px
    );
  opacity: 0.18;
  pointer-events: none;
}

.shell {
  width: min(960px, 100%);
  border: 1px solid var(--glass-border);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.07)
  );
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(18px) saturate(175%);
  transition: box-shadow 0.6s ease, border-color 0.6s ease,
    background 0.6s ease;
}

.shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, var(--glow), transparent 60%);
  opacity: 0.12;
  z-index: -1;
  transition: opacity 0.6s ease;
}

.shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 0 0 1px var(--glass-inner);
  pointer-events: none;
}

.panel {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  grid-template-columns: minmax(120px, 180px) 1fr;
}

.brand {
  margin: 0;
  border: none;
  font: inherit;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.32),
    rgba(255, 255, 255, 0.08)
  );
  cursor: pointer;
  transition: box-shadow 0.5s ease, transform 0.5s ease, filter 0.5s ease;
  filter: brightness(0.68);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px) saturate(170%);
}

.brand__logo {
  width: 100%;
  max-width: 160px;
  height: auto;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease, filter 0.8s ease;
  animation: logo-glow 2.4s ease-in-out infinite;
}

.brand::after {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
  opacity: 0.8;
  animation: pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.brand__meta {
  border-left: 3px solid rgba(255, 255, 255, 0.5);
  padding-left: clamp(1rem, 3vw, 2.5rem);
}

.brand__title {
  margin: 0 0 0.5rem;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  letter-spacing: 0.2rem;
  font-weight: 700;
  color: #fefcf7;
}

.brand__tagline {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.72);
}

.contact {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__link {
  font-size: clamp(0.95rem, 2.5vw, 1.3rem);
  font-weight: 500;
  color: #fefcf7;
  text-decoration: none;
  width: fit-content;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0.08)
  );
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px) saturate(170%);
  transition: color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, opacity 0.3s ease;
}

.contact__link:hover,
.contact__link:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.3),
    0 0 18px rgba(196, 22, 28, 0.45);
  opacity: 1;
}

.is-loaded .brand__logo {
  opacity: 1;
  transform: translateY(0);
}

.is-lit .shell {
  border-color: rgba(255, 255, 255, 0.8);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.26),
    rgba(255, 255, 255, 0.08)
  );
  box-shadow: 0 0 60px rgba(255, 250, 238, 0.3),
    0 0 140px rgba(255, 250, 238, 0.16);
}

.is-lit .shell::before {
  opacity: 0.5;
}

.is-lit .brand {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 250, 238, 0.45);
  filter: brightness(1.05);
}

.is-lit .brand::after {
  opacity: 0.2;
  animation: none;
}

.is-lit .brand__logo {
  animation: none;
  filter: none;
}

@media (max-width: 720px) {
  .shell {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  }

  .panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .brand__meta {
    border-left: none;
    border-top: 2px solid rgba(255, 255, 255, 0.35);
    padding-left: 0;
    padding-top: 1rem;
  }

  .brand {
    justify-self: center;
    width: min(220px, 100%);
  }

  .contact {
    align-items: center;
  }

  .contact__link {
    letter-spacing: 0.08em;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.06);
  }
}

@keyframes logo-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.18))
      drop-shadow(0 0 16px rgba(196, 22, 28, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.3))
      drop-shadow(0 0 26px rgba(196, 22, 28, 0.65));
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand__logo,
  .brand::after {
    animation: none;
  }
}
