/* ==========================================================================
   MerchOS (MIO) — Tier-Up Calculator Stylesheet
   Signature Dark Obsidian & Emerald Design System
   ========================================================================== */

:root {
  --bg-black: #060a08;
  --bg-obsidian: #080f0c;
  --bg-card: #0d1713;
  --bg-card-hover: #12211b;
  --bg-card-active: #162821;
  --border-subtle: rgba(52, 211, 153, 0.16);
  --border-focus: rgba(52, 211, 153, 0.45);
  --border-glow: #10b981;

  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --red-400: #f87171;

  --text-white: #f8fafc;
  --text-light: #e2ece8;
  --text-muted: #8da096;
  --text-dim: #5c7267;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.18);
  --shadow-glow-intense: 0 0 60px rgba(16, 185, 129, 0.35);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
  background-color: var(--bg-black);
  color: var(--text-light);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% -80px, #0e2920 0%, #060a08 65%);
  background-attachment: fixed;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.calc-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(6, 10, 8, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-img {
  height: 30px;
  width: auto;
}

.brand-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-400);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--emerald-400);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-trial {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.btn-nav-trial:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Hero */
.hero-section {
  padding: 64px 0 32px;
  text-align: center;
}

.trust-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald-300);
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-400);
  box-shadow: 0 0 8px var(--emerald-400);
}

.hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -1.2px;
  color: var(--text-white);
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #34d399 0%, #10b981 60%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(15px, 2.5vw, 17px);
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Calculator Grid */
.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 28px;
  margin: 36px 0 48px;
}

@media (max-width: 860px) {
  .calc-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.mio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mio-card:hover {
  border-color: var(--border-focus);
}

.mio-card-header {
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Form Controls */
.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
}

.form-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-select {
  width: 100%;
  background: #080f0c;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--emerald-400);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  background: #0b1511;
}

.select-arrow {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: var(--emerald-400);
  font-size: 12px;
}

.helper-text {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.4;
}

/* Quick Tier Buttons */
.quick-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quick-tier-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tier-btn:hover {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--emerald-300);
}

.quick-tier-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-400);
  color: var(--emerald-300);
}

/* Results Dashboard Card */
.results-card {
  background: linear-gradient(180deg, #10241b 0%, var(--bg-card) 35%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-box {
  background: #080f0c;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: border-color 0.2s ease;
}

.metric-box:hover {
  border-color: rgba(52, 211, 153, 0.35);
}

.metric-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.1;
}

.metric-value.emerald {
  color: var(--emerald-300);
}

.metric-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Progress Section */
.progress-section {
  background: #080f0c;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-white);
}

.progress-pct {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--emerald-400);
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #059669 0%, #10b981 70%, #34d399 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.progress-caption {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Smart Status Banners */
.smart-banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.smart-banner.eligible {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--emerald-100);
}

.smart-banner.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.smart-banner.info {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
}

.banner-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Share & Action Buttons */
.share-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--emerald-300);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-share:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald-400);
  transform: translateY(-1px);
}

/* Reverse Calculator Section */
.reverse-section {
  margin: 48px 0;
}

.reverse-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}

.reverse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .reverse-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.reverse-result-box {
  background: #080f0c;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.reverse-stat {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 900;
  color: var(--emerald-300);
  margin: 8px 0;
}

/* Trust Disclaimer */
.trust-disclaimer {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 32px 0 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Newsletter Lead Capture */
.newsletter-card {
  background: radial-gradient(circle at 50% 0%, #12281e 0%, var(--bg-card) 75%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-glow);
  margin: 64px 0;
  position: relative;
  overflow: hidden;
}

.newsletter-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 10px;
}

.newsletter-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 24px;
}

.newsletter-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 540px) {
  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }
}

.newsletter-input {
  flex: 1;
  background: #080f0c;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  color: var(--text-white);
  font-size: 14px;
  padding: 13px 18px;
  transition: all 0.2s ease;
  width: 100%;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--emerald-400);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.btn-subscribe {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-subscribe:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-subscribe:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.newsletter-privacy {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 12px;
}

.newsletter-feedback {
  font-size: 13px;
  margin-top: 12px;
  font-weight: 600;
  display: none;
}

.newsletter-feedback.success {
  display: block;
  color: var(--emerald-400);
}

.newsletter-feedback.error {
  display: block;
  color: var(--red-400);
}

/* MerchOS Trial CTA */
.trial-cta-card {
  background: linear-gradient(135deg, #123023 0%, #091712 100%);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-glow-intense);
  margin: 64px 0;
}

@media (max-width: 820px) {
  .trial-cta-card {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
  }
}

.trial-cta-content {
  flex: 1;
}

.trial-cta-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.trial-cta-desc {
  font-size: 14.5px;
  color: var(--text-light);
  line-height: 1.55;
  max-width: 560px;
}

.btn-trial-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  padding: 16px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
  white-space: nowrap;
}

.btn-trial-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
}

/* Educational Content Section */
.edu-section {
  margin: 64px 0;
}

.section-heading {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subheading {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 720px;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.edu-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.edu-box-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--emerald-300);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edu-box-p {
  font-size: 13.5px;
  color: var(--text-light);
  line-height: 1.55;
}

/* Tier Requirement Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin: 28px 0;
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.tier-table th {
  background: #080f0c;
  color: var(--text-muted);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

.tier-table tr:hover td {
  background: rgba(16, 185, 129, 0.04);
}

.tier-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--emerald-300);
  border: 1px solid rgba(52, 211, 153, 0.25);
  display: inline-block;
}

/* FAQ Accordion */
.faq-section {
  margin: 64px 0 80px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-focus);
}

.faq-summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

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

.faq-summary::after {
  content: "+";
  font-size: 22px;
  color: var(--emerald-400);
  font-weight: 400;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px 22px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px;
  background: #040806;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--emerald-400);
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #080f0c;
  border: 1px solid var(--emerald-400);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.4);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}
