:root {
  color-scheme: light;
  --brand-yellow: #fbbf24;
  --brand-orange: #f97316;
  --brand-amber: #f59e0b;
  --brand-bg: #f8fafc;
  --brand-surface: rgba(255, 255, 255, 0.76);
  --brand-border: rgba(15, 23, 42, 0.10);
  --brand-text: #0f172a;
  --brand-muted: rgba(15, 23, 42, 0.68);
}

body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: var(--brand-text);
  background: var(--brand-bg);
}

.floating-actions {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  z-index: 1400;
  display: flex;
  align-items: center;
  gap: 10px;
}

.floating-logo {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: calc(16px + env(safe-area-inset-left));
  z-index: 1400;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.floating-logo img {
  width: min(128px, 18.4vw);
  height: auto;
  display: block;
  image-rendering: auto;
  filter: drop-shadow(0 18px 36px rgba(15, 23, 42, 0.16));
}

.floating-actions__demo {
  text-decoration: none;
  color: var(--brand-text);
  font-weight: 900;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(15, 23, 42, 0.12);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.floating-actions__demo:hover,
.floating-actions__demo:focus-visible {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.floating-actions__login {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(90deg, var(--brand-yellow), var(--brand-orange));
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-actions__login:hover,
.floating-actions__login:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(251, 191, 36, 0.22);
}

#login-hero {
  min-height: 100vh;
  padding: 130px 20px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.22), transparent 55%),
    radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.20), transparent 52%),
    radial-gradient(circle at 55% 100%, rgba(15, 23, 42, 0.06), transparent 56%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f8fafc 100%);
}

#login-hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 26%, rgba(251, 191, 36, 0.12), transparent 48%),
    radial-gradient(circle at 78% 42%, rgba(249, 115, 22, 0.10), transparent 58%),
    radial-gradient(circle at 40% 70%, rgba(15, 23, 42, 0.05), transparent 55%);
  pointer-events: none;
}

#login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/assets/jamcoding-logo.png") center / 860px auto no-repeat;
  opacity: 0.05;
  filter: saturate(1.08) contrast(1.02);
  pointer-events: none;
}

.hero-wrap {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.login-intro-prompt {
  z-index: 1;
}

.hero-content {
  width: 100%;
  max-width: 900px;
  text-align: center;
  padding: 10px 8px;
}

.hero-kicker {
  margin: 0 0 18px;
  font-weight: 900;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(15, 23, 42, 0.78);
  letter-spacing: -0.02em;
}

.hero-title {
  margin: 0;
  font-size: clamp(3.2rem, 6vw, 5.0rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
  font-weight: 1000;
  display: inline-block;
  padding-bottom: 0.12em;
  background: linear-gradient(90deg, #0f172a 0%, var(--brand-orange) 45%, var(--brand-yellow) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
  filter: drop-shadow(0 10px 24px rgba(15, 23, 42, 0.12));
}

.hero-subtitle {
  margin: 22px auto 0;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.75;
  color: var(--brand-muted);
  max-width: 48rem;
  text-wrap: balance;
  word-break: keep-all;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-modal[data-open="true"] {
  display: flex;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.login-modal__panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: 22px;
  padding: 58px 22px 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 40px 120px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.login-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  z-index: 2;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.75);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-modal__close:hover,
.login-modal__close:focus-visible {
  background: rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

body.modal-open {
  overflow: hidden;
}

body.checking-session .floating-actions {
  opacity: 0;
  pointer-events: none;
}

body.checking-session .login-modal {
  display: none !important;
}

.login-intro-prompt {
  color: rgba(15, 23, 42, 0.88);
}

.login-intro-prompt:hover,
.login-intro-prompt:focus-visible {
  color: var(--brand-orange);
}

.login-intro-arrow {
  text-shadow: 0 0 18px rgba(249, 115, 22, 0.18);
}

/* Override legacy login panel styles for modal */
#login-shell {
  width: 100%;
  max-width: none;
  gap: 0;
}

#login-panel {
  padding: 12px 6px 6px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  text-align: left;
}

#login-panel h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

#login-panel input {
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(248, 250, 252, 0.95);
  outline: none;
}

#login-panel input:focus {
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.login-actions {
  justify-content: center;
}

.btn {
  border-radius: 999px;
  min-width: 0;
  font-weight: 800;
}

.btn.primary {
  background: linear-gradient(90deg, var(--brand-yellow), var(--brand-orange));
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.16);
}

.btn.secondary {
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

#demo-link {
  position: static;
  margin-top: 14px;
  font-size: 0.95rem;
}

#demo-link a {
  font-weight: 800;
  color: var(--brand-orange);
}

#login-spinner {
  color: #0f172a;
}

#login-spinner .spinner {
  border: 3px solid rgba(15, 23, 42, 0.14);
  border-top-color: var(--brand-orange);
}

@media (max-width: 980px) {
  .hero-wrap {
    max-width: 900px;
  }
}

@media (max-width: 520px) {
  .floating-actions {
    top: calc(12px + env(safe-area-inset-top));
    right: calc(12px + env(safe-area-inset-right));
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
  }

  .floating-logo {
    top: calc(12px + env(safe-area-inset-top));
    left: calc(12px + env(safe-area-inset-left));
  }

  .floating-logo img {
    width: min(104px, 23.2vw);
  }

  .floating-actions__demo,
  .floating-actions__login {
    padding: 10px 14px;
    font-size: 0.92rem;
  }

  #login-hero {
    padding: 120px 16px 72px;
  }

  .hero-content {
    padding: 4px 2px;
  }

  .login-modal__panel {
    padding: 54px 16px 14px;
    border-radius: 18px;
  }

  #login-panel {
    padding: 10px 2px 2px;
  }
}

/* Orange theme for sections below hero */
#jamtalk-overview {
  background: linear-gradient(140deg, rgba(255, 237, 213, 0.8) 0%, rgba(255, 247, 237, 0.95) 45%, #ffffff 100%);
}

#jamtalk-overview::before {
  background: radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.28), transparent 65%);
}

#jamtalk-overview::after {
  background: radial-gradient(circle at 70% 70%, rgba(249, 115, 22, 0.20), transparent 72%);
}

.overview-inner {
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.data-card .metric,
.data-chip .metric,
.proof-title,
.feedback-content p strong {
  color: var(--brand-orange);
}

.flow-chip {
  background: rgba(249, 115, 22, 0.14);
  color: var(--brand-orange);
}

.data-flow::after {
  border-top-color: rgba(249, 115, 22, 0.45);
}

.data-card.result {
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.20), 0 18px 40px rgba(15, 23, 42, 0.12);
}

.proof-card {
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.14), rgba(255, 255, 255, 0.95));
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.20);
}

.jamtalk-data-proof {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(255, 255, 255, 0.95));
}

.jamtalk-feedback {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(249, 115, 22, 0.12));
}

.chat-bubble.user {
  background: rgba(255, 237, 213, 0.9);
}

.chat-bubble.bot.highlight {
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(255, 255, 255, 0.95));
}

.cta-button {
  background: linear-gradient(90deg, var(--brand-yellow), var(--brand-orange));
  box-shadow: 0 15px 30px rgba(249, 115, 22, 0.18);
}

.cta-button:hover,
.cta-button:focus-visible {
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.22);
}
