:root {
  --bg: #0b0b12;
  --bg-accent: radial-gradient(circle at top, rgba(248, 176, 64, 0.2), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(135deg, #10101a 0%, #09090f 100%);
  --card: rgba(17, 17, 27, 0.9);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #f6f2eb;
  --muted: #c9bfb3;
  --gold: #f3b454;
  --gold-strong: #ffbf5f;
  --gold-deep: #8c5a16;
  --success: #2ecc71;
  --error: #ff6b6b;
  --info: #7cc6ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-accent);
}

body.form-mode {
  background: #000;
}

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

body.form-mode .site-shell {
  padding: 0;
}

.app {
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  position: relative;
}

body.form-mode .app {
  min-height: 100vh;
  min-height: 100dvh;
}

.screen {
  display: none;
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
}

.screen--active {
  display: flex;
}

#home-screen,
#complete-screen {
  align-items: center;
  justify-content: center;
}

.hero-card {
  width: min(100%, 840px);
  padding: 48px 40px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(16px);
}

.hero-card--compact {
  width: min(100%, 680px);
}

.eyebrow,
.topbar-label {
  margin: 0 0 12px;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.tagline {
  margin: 18px 0 0;
  font-size: clamp(1.15rem, 2.8vw, 2rem);
  color: var(--gold-strong);
  font-weight: 600;
}

.description,
.helper-text {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.description {
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.helper-text {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.95rem;
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  margin-top: 30px;
  min-width: 260px;
  min-height: 72px;
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--gold) 0%, #ffdf9d 100%);
  color: #18140f;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(243, 180, 84, 0.3);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  min-height: 56px;
  min-width: 110px;
  padding: 12px 20px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.primary-btn:focus-visible,
.ghost-btn:hover,
.ghost-btn:focus-visible {
  transform: translateY(-1px);
}

.primary-btn:focus-visible,
.ghost-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.3);
  outline-offset: 3px;
}

#form-screen {
  flex-direction: column;
  gap: 0;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  z-index: 20;
}

.form-topbar {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  z-index: 40;
  pointer-events: none;
}

.form-topbar > * {
  pointer-events: auto;
}

body.form-mode .form-topbar > div {
  display: none;
}

.status-banner {
  position: fixed;
  top: calc(max(12px, env(safe-area-inset-top)) + 70px);
  left: max(12px, env(safe-area-inset-left));
  z-index: 35;
  max-width: min(520px, calc(100vw - 24px));
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  backdrop-filter: blur(16px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.status-banner--hidden {
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;
}

.status-banner--info {
  background: rgba(124, 198, 255, 0.12);
  color: #d8efff;
  border-color: rgba(124, 198, 255, 0.2);
}

.status-banner--success {
  background: rgba(46, 204, 113, 0.12);
  color: #dff9ea;
  border-color: rgba(46, 204, 113, 0.2);
}

.status-banner--error {
  background: rgba(255, 107, 107, 0.12);
  color: #ffe8e8;
  border-color: rgba(255, 107, 107, 0.2);
}

.form-frame-wrap {
  flex: 1;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.pandadoc-container,
.pandadoc-container iframe {
  display: block;
  width: 100%;
  height: 100%;
}

.pandadoc-container {
  min-height: 100vh;
  min-height: 100dvh;
}

.setup-note {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.setup-note strong {
  color: var(--text);
}

@media (max-width: 900px) {
  .hero-card {
    padding: 36px 24px;
  }

  .ghost-btn {
    width: auto;
  }

  .primary-btn {
    width: 100%;
    min-width: 0;
  }

  .status-banner {
    top: calc(max(12px, env(safe-area-inset-top)) + 62px);
    max-width: calc(100vw - 24px);
  }
}
