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

:root {
  --bg-main: #14120f;
  --bg-panel: #1f1b16;
  --bg-panel-soft: #262018;
  --accent: #ffb300;
  --accent-soft: rgba(255, 179, 0, 0.18);
  --accent-strong: #ff8a00;
  --text-main: #f7f2e7;
  --text-soft: #c7bcaa;
  --muted: #706655;
  --border-soft: rgba(255, 241, 211, 0.18);
  --shadow-soft: 0 26px 60px rgba(0, 0, 0, 0.78);
  --radius-xl: 22px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}

body {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.app {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 100vh;
  padding: 20px 18px;
  overflow: hidden;
  background: radial-gradient(circle at top left, #2b2419 0, #14120f 55%);
}

/* Background layers */

.bg-layer {
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at center,
    rgba(255, 179, 0, 0.12) 0,
    transparent 60%
  );
  mix-blend-mode: screen;
  opacity: 0.6;
  transform-origin: center;
  pointer-events: none;
}

.bg-layer--one {
  filter: blur(50px);
  animation: driftOne 22s linear infinite;
}

.bg-layer--two {
  filter: blur(80px);
  opacity: 0.35;
  animation: driftTwo 30s linear infinite;
}

@keyframes driftOne {
  0% {
    transform: translate3d(-10px, 10px, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, -10px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-10px, 10px, 0) scale(1);
  }
}

@keyframes driftTwo {
  0% {
    transform: translate3d(10px, -20px, 0) scale(1);
  }
  50% {
    transform: translate3d(-15px, 10px, 0) scale(0.96);
  }
  100% {
    transform: translate3d(10px, -20px, 0) scale(1);
  }
}

/* Brand */

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  z-index: 2;
}

.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
}

.brand-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 179, 0, 0.32);
  box-shadow: 0 0 0 1px rgba(13, 9, 0, 0.8);
}

.brand-core {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #fff0c1, #ffb300);
  box-shadow: 0 0 14px rgba(255, 179, 0, 0.7);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.brand-domain {
  font-size: 11px;
  color: var(--muted);
}

/* Main panel */

.panel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(
      135deg,
      rgba(255, 179, 0, 0.1),
      rgba(20, 18, 15, 0.9)
    ),
    var(--bg-panel);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
  z-index: 2;
}

/* Copy */

.copy {
  margin-bottom: 18px;
}

.copy h1 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* Controls */

.controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

/* Altitude control */

.altitude {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-panel-soft);
  border: 1px solid rgba(255, 241, 211, 0.14);
}

.altitude-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 8px;
}

.altitude-label-main {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-main);
}

.altitude-label-sub {
  font-size: 11px;
  color: var(--muted);
}

.altitude-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.altitude input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent) 0,
    var(--accent-strong) 60%,
    #ff5e2f 100%
  );
  outline: none;
  margin: 0;
}

.altitude input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #14120f;
  border: 2px solid #ffe9b4;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.altitude input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #14120f;
  border: 2px solid #ffe9b4;
}

.altitude input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent) 0,
    var(--accent-strong) 60%,
    #ff5e2f 100%
  );
}

.altitude-value {
  min-width: 60px;
  font-size: 11px;
  text-align: right;
  color: var(--text-soft);
}

/* CTA button */

.cta {
  position: relative;
  border: none;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: radial-gradient(circle at 0 0, #ffe8b3 0, #ffb300 38%, #f06c18);
  color: #20160a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.cta:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.cta-label {
  font-size: 14px;
  font-weight: 600;
}

.cta-sub {
  font-size: 11px;
  opacity: 0.9;
}

.cta-icon {
  position: relative;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
}

.cta-wing {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 20px;
  height: 16px;
  border-radius: 10px 10px 4px 4px;
  background: #20140a;
  transform-origin: 50% 50%;
}

.cta-wing::before,
.cta-wing::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #ffcf6c;
  border-top-width: 1px;
}

.cta-wing::after {
  inset: 3px 6px;
  border-color: rgba(255, 207, 108, 0.7);
}

.cta-trail {
  position: absolute;
  left: 0;
  right: 14px;
  top: 11px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 241, 211, 0.1),
    #ffcf6c,
    #ffffff
  );
}

/* Status bar */

.status {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 241, 211, 0.16);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.status-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.status-value {
  font-size: 12px;
  color: var(--text-soft);
}

/* Launch animation state */

.app.is-launching .bg-layer--one,
.app.is-launching .bg-layer--two {
  animation-duration: 10s;
}

.app.is-launching .cta-wing {
  animation: wingFlight 0.85s ease-out forwards;
}

.app.is-launching .cta-trail {
  animation: trailGlow 0.85s ease-out forwards;
}

@keyframes wingFlight {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  10% {
    transform: translate3d(-2px, -1px, 0) scale(1.02);
  }
  40% {
    transform: translate3d(4px, -3px, 0) scale(1.04);
  }
  80% {
    transform: translate3d(18px, -5px, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(22px, -8px, 0) scale(0.6);
    opacity: 0;
  }
}

@keyframes trailGlow {
  0% {
    opacity: 0.7;
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Small devices */

@media (max-width: 360px) {
  .copy h1 {
    font-size: 22px;
  }

  .panel {
    padding: 14px 12px 14px;
  }

  .cta-label {
    font-size: 13px;
  }
}