/* ============================================================
   JassScore Landing Page
   ============================================================ */

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

:root {
  --bg-deep: #14171c;
  --bg-mid: #1e2129;
  --bg-card: rgba(255, 255, 255, 0.07);
  --bg-card-hover: rgba(255, 255, 255, 0.11);
  --border-glass: rgba(255, 255, 255, 0.12);
  --accent: #ff4a43;
  --accent-dim: rgba(255, 74, 67, 0.18);
  --gold-start: #f2bf59;
  --gold-end: #e7a93d;
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --text-muted: var(--text-tertiary);
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  --blur: blur(20px);
  --radius-card: 20px;
  --radius-pill: 999px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
  line-height: 1.1;
}

a {
  color: inherit;
}

.text-gradient,
.text-accent {
  background: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--bg-deep) 0%, #12141a 50%, var(--bg-mid) 100%);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.card-symbol,
.card-sym {
  position: absolute;
  font-size: clamp(3rem, 8vw, 7rem);
  opacity: 0;
  animation: float-card 18s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
  translate: var(--px, 0px) var(--py, 0px);
}

.card-symbol.red,
.card-sym.red {
  color: rgba(255, 59, 48, 0.18);
}

.card-symbol.dark,
.card-sym.dark {
  color: rgba(255, 255, 255, 0.08);
}

.card-symbol:nth-child(1),
.card-sym:nth-child(1) { top: 10%; left: 8%; animation-delay: 0s; animation-duration: 16s; font-size: 5rem; }
.card-symbol:nth-child(2),
.card-sym:nth-child(2) { top: 25%; left: 75%; animation-delay: -4s; animation-duration: 20s; font-size: 7rem; }
.card-symbol:nth-child(3),
.card-sym:nth-child(3) { top: 60%; left: 15%; animation-delay: -8s; animation-duration: 14s; font-size: 4rem; }
.card-symbol:nth-child(4),
.card-sym:nth-child(4) { top: 75%; left: 60%; animation-delay: -2s; animation-duration: 18s; font-size: 6rem; }
.card-symbol:nth-child(5),
.card-sym:nth-child(5) { top: 45%; left: 45%; animation-delay: -10s; animation-duration: 22s; font-size: 3.5rem; }
.card-symbol:nth-child(6),
.card-sym:nth-child(6) { top: 5%; left: 50%; animation-delay: -6s; animation-duration: 17s; font-size: 5.5rem; }
.card-symbol:nth-child(7),
.card-sym:nth-child(7) { top: 88%; left: 30%; animation-delay: -14s; animation-duration: 19s; font-size: 4.5rem; }
.card-symbol:nth-child(8),
.card-sym:nth-child(8) { top: 38%; left: 88%; animation-delay: -3s; animation-duration: 15s; font-size: 6.5rem; }

@keyframes float-card {
  0% { opacity: 0; transform: translateY(30px) rotate(-8deg) scale(0.9); }
  15% { opacity: 1; }
  50% { transform: translateY(-20px) rotate(6deg) scale(1.05); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(30px) rotate(-8deg) scale(0.9); }
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

section,
header,
footer {
  position: relative;
  z-index: 1;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.section-eyebrow {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 800;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(20, 23, 28, 0.85);
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.topbar-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  object-fit: cover;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.06);
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.lang-link.is-active,
.lang-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.topbar-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 74, 67, 0.4);
  background: rgba(255, 74, 67, 0.15);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background var(--transition), border-color var(--transition);
}

.topbar-download:hover {
  background: rgba(255, 74, 67, 0.28);
  border-color: rgba(255, 74, 67, 0.7);
}

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 102px 18px 72px;
}

.hero-inner {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-logo img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(255, 74, 67, 0.22);
  object-fit: cover;
}

.pill-live {
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hero-title {
  font-size: clamp(2.6rem, 12vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.96;
}

.hero-subtitle {
  max-width: 530px;
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 100%;
}

.app-store-badge-link {
  display: inline-flex;
  border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.app-store-badge-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.app-store-badge {
  width: min(250px, 82vw);
  height: auto;
  display: block;
}

.hero-store-note {
  font-size: 0.86rem;
  color: var(--text-tertiary);
}

.hero-ctas,
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.btn-app-secondary {
  color: var(--text-primary);
  border-color: var(--border-glass);
  background: rgba(255, 255, 255, 0.08);
}

.btn-app-secondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

#features,
#how,
#preview,
#faq {
  padding: 82px 0;
}

.features-grid,
.steps-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card,
.step-card {
  padding: 26px 22px;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}

.feature-title,
.step-title {
  font-size: 1.06rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc,
.step-desc {
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--text-secondary);
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-end) 100%);
  color: #000;
  font-size: 0.92rem;
  font-weight: 800;
}

.preview-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.preview-phones {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
}

.preview-phones::-webkit-scrollbar {
  height: 7px;
}

.preview-phones::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
}

.iphone-frame {
  position: relative;
  width: 220px;
  height: 476px;
  border-radius: 42px;
  background: #1c1c1e;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 28px 70px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.preview-card {
  flex: 0 0 auto;
  width: 252px;
  padding: 18px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  scroll-snap-align: center;
}

.preview-card-title {
  min-height: 2.6em;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.iphone-screen {
  position: absolute;
  inset: 0;
  border-radius: 33px;
  overflow: hidden;
  background: var(--bg-deep);
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.faq-list {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.faq-item {
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 600;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-tertiary);
  transition: transform var(--transition), color var(--transition);
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  border-top: 1px solid var(--border-glass);
  padding: 14px 20px 18px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

#cta {
  padding: 94px 18px 110px;
  text-align: center;
  overflow: hidden;
}

#cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 560px;
  height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 59, 48, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
}

footer {
  padding: 0 18px 28px;
}

.footer-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 20px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.footer-dot {
  opacity: 0.5;
}

.footer-link,
.footer-link-anchor {
  border: 0;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover,
.footer-link-anchor:hover {
  color: var(--text-primary);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 10, 14, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  background: rgba(20, 23, 28, 0.96);
  border: 1px solid var(--border-glass);
  border-radius: 22px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title-block strong {
  font-size: 1.1rem;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.modal-close {
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font: inherit;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(255, 74, 67, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff6a4f 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(255, 74, 67, 0.28);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.form-message {
  min-height: 1.2em;
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

.form-message.visible.success {
  color: #79e39a;
}

.form-message.visible.error {
  color: #ff8f88;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transition-delay: calc(var(--reveal-delay, 0) * 90ms);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { --reveal-delay: 1; }
[data-reveal-delay="2"] { --reveal-delay: 2; }
[data-reveal-delay="3"] { --reveal-delay: 3; }
[data-reveal-delay="4"] { --reveal-delay: 4; }
[data-reveal-delay="5"] { --reveal-delay: 5; }

@media (min-width: 760px) {
  .features-grid,
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 10px 12px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .lang-switch {
    gap: 2px;
  }

  .lang-link {
    min-width: 28px;
    padding: 6px;
  }

  .topbar-download span {
    display: none;
  }

  #cta {
    padding-bottom: 84px;
  }

  .footer-inner {
    gap: 6px;
  }
}

@media (max-width: 520px) {
  .topbar-brand span {
    display: none;
  }

  .hero-inner {
    gap: 16px;
  }

  .preview-card {
    width: 224px;
    padding: 14px 10px 14px;
  }

  .preview-card-title {
    font-size: 0.92rem;
  }

  .iphone-frame {
    width: 202px;
    height: 438px;
  }

  .iphone-screen {
    border-radius: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
