/* ============================================================
   Commission Buddy — Website Styles
   ============================================================ */

/* ── Custom Properties ────────────────────────────────────── */

:root {
  /* Light mode — Eucalyptus theme */
  --color-bg:             #F6F3EC; /* page background base */
  --color-surface:        #FBFAF6; /* paper */
  --color-surface-raised: #F3EFE6; /* bone */
  --color-border:         #E0D8C8; /* sand */
  --color-text-primary:   #161D1A; /* ink */
  --color-text-secondary: #46544C; /* readable sage-dark */
  --color-text-muted:     #8AA89A; /* sage */
  --color-brand:          #1E4A3E; /* eucalyptus — brand / link text */
  --color-brand-hover:    #15332B; /* forest */
  --color-text-accent:    #1E4A3E; /* readable accent foreground */
  --color-accent:         #1F9D57; /* green — success / net */
  --color-pro:            #C77F1C; /* readable amber — Pro foreground */
  --color-gold:           #C77F1C; /* readable amber */
  --page-bg-glow-top-leading:     rgba(203,242,79,0.30);
  --page-bg-glow-bottom-trailing:  rgba(15,163,177,0.18);
  --page-bg-grain:                rgba(22,29,26,0.05);

  /* Gradients */
  --gradient-hero:       155deg, #235446, #1A3A30, #143028, #0E2018;
  /* Pro / CTA gradient — eucalyptus hero greens (mirrors AppTheme.proGradientDiagonal).
     The retired amber→green blend (#F2A93B → #1E4A3E) must not appear anywhere;
     amber stays a foreground/badge fill only, never a gradient highlight. */
  --gradient-pro:        135deg, #235446, #143028;
  --gradient-success:    135deg, #1F9D57, #4FD08A;
  --gradient-commission: 135deg, #143028, #1E4A3E, #1F9D57, #0FA3B1;
}

.dark {
  --color-bg:             #12150F; /* dark base / carbon */
  --color-surface:        #1B211C;
  --color-surface-raised: #232B26;
  --color-border:         #2E3A33;
  --color-text-primary:   #F3EFE6; /* bone */
  --color-text-secondary: #C2CEC6;
  --color-text-muted:     #8AA89A; /* sage */
  --color-brand:          #CBF24F; /* lime — readable accent on dark */
  --color-brand-hover:    #BFE37A;
  --color-text-accent:    #CBF24F; /* readable accent foreground */
  --color-accent:         #4FD08A; /* green (dark) */
  --color-pro:            #F2A93B; /* amber */
  --color-gold:           #F2A93B;
  --page-bg-glow-top-leading:     rgba(110,170,90,0.22);
  --page-bg-glow-bottom-trailing:  rgba(15,163,177,0.20);
  --page-bg-grain:                rgba(255,255,255,0.05);
}

/* ── Base ─────────────────────────────────────────────────── */

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

body {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 72% 58% at 12% 0%, var(--page-bg-glow-top-leading) 0%, transparent 58%),
    radial-gradient(ellipse 58% 48% at 88% 100%, var(--page-bg-glow-bottom-trailing) 0%, transparent 60%),
    radial-gradient(circle, var(--page-bg-grain) 0.55px, transparent 0.75px);
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: auto, auto, 10px 10px;
  background-attachment: fixed, fixed, fixed;
  color: var(--color-text-primary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ── Typography ───────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}

/* Display / big headings */
h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

h4, h5, h6 {
  font-weight: 600;
}

.feature-badge-pro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(var(--gradient-pro));
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Hero gradient background ─────────────────────────────── */

.bg-hero {
  background: linear-gradient(var(--gradient-hero));
  position: relative;
  overflow: hidden;
}

.bg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, var(--page-bg-glow-top-leading) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 30% 70%, var(--page-bg-glow-bottom-trailing) 0%, transparent 55%);
  pointer-events: none;
}

.bg-commission {
  background: linear-gradient(var(--gradient-commission));
}

/* ── Device Frame ─────────────────────────────────────────── */

.device-frame {
  position: relative;
  width: var(--frame-width, 260px);
  aspect-ratio: 1470 / 3000;
  flex-shrink: 0;
  border-radius: 14% / 6.5%;
  overflow: hidden;
  background: transparent;
  filter: drop-shadow(0 25px 50px rgb(0 0 0 / 0.32));
}

.device-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/device-frame.png') center / contain no-repeat;
  z-index: 2;
  pointer-events: none;
}

.device-frame-sm { --frame-width: 200px; }

.device-screen-clip {
  position: absolute;
  top: 2.233%;
  left: 5.102%;
  width: 89.796%;
  height: 95.533%;
  overflow: hidden;
  border-radius: 13% / 6%;
  z-index: 1;
}

.device-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── Carousel ─────────────────────────────────────────────── */

.carousel-wrapper { overflow: hidden; }

.carousel-stack {
  display: grid;
  justify-items: center;
  align-items: center;
  padding: 1rem 0 1.5rem;
  width: 260px;
  aspect-ratio: 1470 / 3000;
}

.carousel-slide {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Coming Soon Buttons ──────────────────────────────────── */

.btn-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.18);
  cursor: default;
  backdrop-filter: blur(4px);
  user-select: none;
}

.dark .btn-coming-soon {
  background-color: var(--color-surface-raised);
  color: var(--color-text-primary);
  border-color: var(--color-brand);
}

.btn-coming-soon-light {
  background-color: var(--color-surface-raised);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  backdrop-filter: none;
}

.dark .btn-coming-soon-light {
  background-color: var(--color-surface-raised);
  color: var(--color-text-primary);
  border-color: var(--color-brand);
}

/* ── Glass surfaces ─────────────────────────────────────────── */

.sticky-glass {
  background: rgba(251, 250, 246, 0.88);
  border-bottom: 1px solid rgba(224, 216, 200, 0.72);
  box-shadow: 0 10px 24px rgba(22, 29, 26, 0.08);
}

.dark .sticky-glass {
  background: rgba(18, 21, 15, 0.86);
  border-bottom-color: rgba(46, 58, 51, 0.82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.glass-panel {
  padding: 2rem;
  border-radius: 1.75rem;
  border: 1px solid rgba(224, 216, 200, 0.8);
  background: rgba(251, 250, 246, 0.86);
  box-shadow:
    0 14px 30px rgba(22, 29, 26, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.dark .glass-panel {
  border-color: rgba(46, 58, 51, 0.86);
  background: rgba(27, 33, 28, 0.82);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pricing-card-glass {
  border: 1px solid rgba(224, 216, 200, 0.84);
  background: rgba(251, 250, 246, 0.9);
  box-shadow:
    0 12px 28px rgba(22, 29, 26, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dark .pricing-card-glass {
  border-color: rgba(46, 58, 51, 0.86);
  background: rgba(27, 33, 28, 0.88);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pricing-card-pro {
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 14px 32px rgba(12, 24, 20, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.glass-overlay-surface {
  background: rgba(251, 250, 246, 0.9);
  border-top: 1px solid rgba(224, 216, 200, 0.82);
  box-shadow: 0 12px 24px rgba(22, 29, 26, 0.08);
}

.dark .glass-overlay-surface {
  background: rgba(27, 33, 28, 0.9);
  border-top-color: rgba(46, 58, 51, 0.84);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sticky-glass {
    background: rgba(251, 250, 246, 0.66);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    backdrop-filter: blur(14px) saturate(1.15);
  }

  .dark .sticky-glass {
    background: rgba(18, 21, 15, 0.62);
  }

  .glass-panel {
    background: rgba(251, 250, 246, 0.64);
    -webkit-backdrop-filter: blur(11px) saturate(1.08);
    backdrop-filter: blur(11px) saturate(1.08);
  }

  .dark .glass-panel {
    background: rgba(27, 33, 28, 0.58);
  }

  .pricing-card-glass {
    background: rgba(251, 250, 246, 0.66);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    backdrop-filter: blur(12px) saturate(1.1);
  }

  .dark .pricing-card-glass {
    background: rgba(27, 33, 28, 0.62);
  }

  .pricing-card-pro {
    background:
      linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03) 62%),
      linear-gradient(var(--gradient-hero));
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .glass-overlay-surface {
    background: rgba(251, 250, 246, 0.62);
    -webkit-backdrop-filter: blur(11px) saturate(1.08);
    backdrop-filter: blur(11px) saturate(1.08);
  }

  .dark .glass-overlay-surface {
    background: rgba(27, 33, 28, 0.62);
  }
}

/* ── SF-style icon circles ────────────────────────────────── */

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.icon-circle-sm  { width: 36px; height: 36px; }
.icon-circle-md  { width: 48px; height: 48px; }
.icon-circle-lg  { width: 56px; height: 56px; }

.icon-orange { background: rgba(30,74,62,0.12);  color: #1E4A3E; }
.icon-green  { background: rgba(31,157,87,0.12);  color: #1F9D57; }
.icon-blue   { background: rgba(30,95,189,0.12);  color: #1E5FBD; }
.icon-teal   { background: rgba(15,163,177,0.12); color: #0FA3B1; }
.icon-purple { background: rgba(110,84,207,0.12); color: #6E54CF; }
.icon-red    { background: rgba(224,70,63,0.12);  color: #E0463F; }
.icon-amber  { background: rgba(199,127,28,0.12); color: #C77F1C; }

.dark .icon-orange { background: rgba(203,242,79,0.15); color: #CBF24F; }
.dark .icon-green  { background: rgba(79,208,138,0.15); color: #4FD08A; }
.dark .icon-blue   { background: rgba(111,168,255,0.15); color: #6FA8FF; }
.dark .icon-teal   { background: rgba(69,203,216,0.15); color: #45CBD8; }
.dark .icon-purple { background: rgba(183,156,242,0.15); color: #B79CF2; }
.dark .icon-red    { background: rgba(255,107,97,0.15);  color: #FF6B61; }
.dark .icon-amber  { background: rgba(242,169,59,0.15);  color: #F2A93B; }

/* ── Focus Visible (Accessibility) ───────────────────────── */

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Feature stat chips ───────────────────────────────────── */

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  white-space: nowrap;
}
