/* ============================================================
   ProRoast — landing page styles
   Built on the ProRoast design tokens (css/tokens.css).
   Dark-first, glassmorphic, gold score + AI gradient accents.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-lh);
  color: var(--text-primary);
  background: var(--bg-base);
  background-image: var(--bg-app);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: var(--gutter-screen);
}

.container.narrow {
  max-width: 640px;
}

.overline {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--text-overline-size);
  line-height: var(--text-overline-lh);
  letter-spacing: var(--text-overline-ls);
  text-transform: uppercase;
  color: var(--gold-300);
  margin: 0 0 var(--space-4);
}

.overline.center,
.center {
  text-align: center;
}

.overline.center {
  font-size: 15px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 19, 0.6);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-icon {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--fw-extra);
  font-size: 20px;
  letter-spacing: -0.03em;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.lang-btn.is-active {
  color: #2a1d05;
  background: linear-gradient(135deg, #BF953F, #D9B86A, #B38728, #C9A24E, #AA771C);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px);
  text-align: center;
  overflow: hidden;
}

.hero-aura {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  max-width: 130%;
  height: 560px;
  background: var(--grad-ai-glow);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-weight: var(--fw-extra);
  font-size: 40px;
  line-height: var(--text-display-lh);
  letter-spacing: var(--text-display-ls);
  max-width: 14ch;
  margin: 0 0 var(--space-5);
}

.hero-sub {
  color: var(--text-secondary);
  font-size: clamp(16px, 2.4vw, 18px);
  max-width: 56ch;
  margin: 0 0 var(--space-10);
}

/* ---------- Roast score card ---------- */
.score-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6) var(--space-6);
  margin-bottom: var(--space-10);
  background: var(--surface-glass);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-glass), var(--glow-gold);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  max-width: 420px;
  width: 100%;
}

.score-ring {
  position: relative;
  width: 200px;
  height: 200px;
}

.score-ring svg {
  transform: rotate(-90deg);
  overflow: visible; /* let the gold glow spill past the viewBox instead of being clipped */
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 14;
}

.ring-fill {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 527.8;
  stroke-dashoffset: 63; /* ~88% filled */
  filter: drop-shadow(0 4px 14px rgba(242, 199, 95, 0.45));
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.score-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-score-size);
  line-height: 1;
  letter-spacing: var(--text-score-ls);
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.score-overline {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold-300);
}

.score-roast {
  margin: 0;
  font-size: 15px;
  font-style: italic;
  color: var(--text-primary);
  max-width: 32ch;
}

.score-delta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.delta-up {
  color: var(--success);
  font-weight: 700;
}

/* ---------- Store buttons ---------- */
.hero-store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 22px;
  min-height: var(--hit-min);
  border-radius: var(--radius-lg);
  background: var(--surface-glass-strong);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  transition: transform 0.12s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.store-btn:hover {
  border-color: var(--border-gold);
  box-shadow: var(--glow-soft-ai);
  transform: translateY(-1px);
}

.store-btn.is-soon {
  cursor: default;
}

.store-icon {
  color: var(--text-primary);
  display: inline-flex;
}

.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.store-text small {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
}

.store-text strong {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 17px;
}

.hero-fineprint {
  margin: var(--space-5) 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(40px, 6.5vw, 68px) 0;
}

.section-title {
  text-align: center;
  font-weight: var(--fw-extra);
  font-size: 32px;
  line-height: var(--text-h1-lh);
  letter-spacing: var(--text-h1-ls);
  max-width: 20ch;
  margin: 0 auto var(--space-10);
}

.section-lead {
  color: var(--text-secondary);
  max-width: 48ch;
  margin: calc(-1 * var(--space-6)) auto var(--space-10);
}

.glass {
  background: var(--surface-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  counter-reset: step;
}

.step-card h3::before {
  counter-increment: step;
  content: counter(step) ". ";
}

.step-card {
  padding: var(--space-8) var(--space-6);
}

.step-num {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: var(--space-4);
}

.step-card h3,
.feature-card h3 {
  font-size: var(--text-h3-size);
  font-weight: var(--fw-bold);
  letter-spacing: var(--text-h3-ls);
  margin: 0 0 var(--space-3);
}

.gold-text {
  background: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step-card p,
.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.feature-card {
  padding: var(--space-8) var(--space-6);
}

.feature-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--grad-ai);
  color: var(--text-on-ai);
  box-shadow: var(--glow-soft-ai);
  margin-bottom: var(--space-5);
}

/* ---------- Platforms ---------- */
.platform-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin: var(--space-6) auto 0;
}

.chip-break {
  flex-basis: 100%;
  height: 0;
}

.chip {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 15px;
  color: var(--text-primary);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
}

.privacy-note {
  margin-top: var(--space-8);
  margin-bottom: 0;
  font-size: 14px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  padding: var(--space-10) var(--space-8);
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.stat-num {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 22ch;
}

/* ---------- Feedback form ---------- */
.feedback-form {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field label {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 14px;
  color: var(--text-secondary);
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-tertiary);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--border-ai);
  box-shadow: var(--ring-ai);
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 16px;
  letter-spacing: -0.01em;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.18s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-ai {
  background: var(--grad-ai);
  color: var(--text-on-ai);
  box-shadow: var(--glow-ai);
}

.btn-ai:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--surface-glass-strong);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-10) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-inner p {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--gold-300);
}

/* ---------- Dialog ---------- */
.support-dialog {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  color: var(--text-primary);
  padding: 0;
  max-width: 380px;
  width: calc(100% - 40px);
  box-shadow: var(--shadow-xl);
}

.support-dialog::backdrop {
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(var(--blur-sm));
}

.dialog-inner {
  padding: var(--space-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.dialog-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success);
}

.dialog-inner h3 {
  font-size: var(--text-h3-size);
  font-weight: var(--fw-bold);
  margin: 0;
}

.dialog-inner p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- Scroll animation ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Legal pages ---------- */
.page-main {
  padding: clamp(32px, 6vw, 64px) 0 clamp(48px, 8vw, 88px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--gold-300);
}

/* Language content blocks toggle via the native [hidden] attribute (set in
   markup + managed by JS), so the inactive locale stays hidden even if this
   stylesheet or the script fails to load. No extra CSS needed here. */

.legal {
  max-width: 760px;
  margin: 0 auto;
}

.legal-title {
  font-weight: var(--fw-extra);
  font-size: clamp(28px, 5vw, var(--text-h1-size));
  line-height: var(--text-h1-lh);
  letter-spacing: var(--text-h1-ls);
  margin: 0 0 var(--space-3);
}

.legal-meta {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0 0 var(--space-8);
}

.legal h2 {
  font-size: var(--text-h3-size);
  font-weight: var(--fw-bold);
  letter-spacing: var(--text-h3-ls);
  color: var(--text-primary);
  margin: var(--space-10) 0 var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.legal h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.legal p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 var(--space-4);
}

.legal ul {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-6);
}

.legal li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: var(--space-2);
}

.legal li::marker {
  color: var(--gold-300);
}

.legal strong {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .features {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}
