/* Base */
:root { 
  --bg: #f8fafc; 
  --card: #ffffff; 
  --text: #0f172a; 
  --muted: #475569; 
  --primary: #f59e0b; 
  --primary-700: #b45309; 
  --accent: #3b82f6; 
  --danger: #ef4444; 
  --cta: #f97316; 
  --cta-2: #fbbf24; 
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Proof bar */
.proofbar { background: #f1f5f9; border-bottom: 1px solid rgba(0,0,0,0.08); font-size: 13px; color: var(--muted); }
.proofbar .container { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; gap: 16px; }
.proofbar a { color: var(--text); text-decoration: none; font-weight: 600; }
.proofbar a:visited { color: var(--text); }
.proofbar a:hover { color: #000000; text-decoration: underline; }

/* Hero */
.hero { padding: 72px 0 48px; background: radial-gradient(1200px 400px at 50% -50px, rgba(59,130,246,0.1), rgba(245,158,11,0.05) 48%, rgba(0,0,0,0) 75%); border-bottom: 1px solid rgba(0,0,0,0.06); scroll-snap-align: center; }
.hero-light { background: radial-gradient(1200px 400px at 50% -50px, rgba(59,130,246,0.1), rgba(245,158,11,0.05) 48%, rgba(0,0,0,0) 75%); }
.hero-center { text-align: center; }
.badge { display: inline-block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid rgba(0,0,0,0.1); padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,0.02); }
.hero h1 { margin: 14px 0 10px; font-size: 44px; line-height: 1.1; font-weight: 800; }

/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 120px;
}

.profile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-img-container {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  background: #eee;
}

.profile-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 27px;
  font-weight: 700;
  color: var(--text);
}

.profile-separator {
  font-size: 36px;
  font-weight: 300;
  color: var(--muted);
  margin-top: -45px; /* Adjust based on icon size */
}

/* Setup Tool */
.setup-tool {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  gap: 10px;
  z-index: 1000;
  border: 1px solid rgba(0,0,0,0.1);
}

.setup-tool input {
  padding: 8px 12px;
  font-size: 14px;
}

.setup-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 5px;
}

@media (max-width: 600px) {
  .profile-header {
    gap: 20px;
  }
  .profile-img-container {
    width: 120px;
    height: 120px;
  }
  .profile-name {
    font-size: 21px;
  }
  .profile-separator {
    margin-top: -30px;
  }
}

.gradient-text { color: var(--primary); display: inline-block; margin-left: 10px; }
.sub { color: var(--muted); max-width: 680px; margin-left: auto; margin-right: auto; }
.hero-actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.checklist { margin: 16px 0 0; padding: 0 0 0 18px; color: var(--muted); }
.checklist li { margin: 6px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.12); color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.2px; }
.btn.primary { background: var(--primary); border: none; color: #ffffff; }
.btn.ghost { background: transparent; }
.btn.cta { background: linear-gradient(90deg, var(--cta), var(--cta-2)); color: #ffffff; border: none; box-shadow: 0 10px 22px rgba(249,115,22,0.2); }
.btn.cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.cta-large { margin-top: 16px; padding: 14px 22px; font-size: 17px; }

/* Services Grid */
.services-grid { 
  display: grid; 
  grid-template-columns: repeat(6, 1fr); 
  gap: 60px 48px; 
  align-items: start; 
  max-width: 1100px;
  margin: 0 auto;
}

.services-grid .step:nth-child(-n+3) {
  grid-column: span 2;
}

.services-grid .step:nth-child(n+4) {
  grid-column: span 3;
  max-width: 450px;
  justify-self: center;
}

.services-grid .step {
  padding: 20px;
}

.services-grid .step h3 {
  font-size: 26px !important;
  margin-bottom: 20px !important;
}

.services-grid .step ul {
  font-size: 16px !important;
  line-height: 2 !important;
}

.services-grid .step .icon-box {
  width: 100px !important;
  height: 100px !important;
  border-radius: 24px !important;
  margin-bottom: 32px !important;
}

.services-grid .step .icon-box svg {
  width: 48px !important;
  height: 48px !important;
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid .step:nth-child(n) { grid-column: auto; max-width: 100%; }
  .services-grid .step { text-align: center !important; }
  .services-grid .step .icon-box { margin-left: auto; margin-right: auto; }
  .services-grid .step ul li { justify-content: center; }
}

/* Sections */
.card { background: var(--card); border: 1px solid rgba(0,0,0,0.08); border-radius: 16px; padding: 22px; margin: 30px auto; box-shadow: 0 10px 30px rgba(0,0,0,0.04); }
.muted { color: var(--muted); }

section.full-height {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
  scroll-snap-align: center;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

/* Two-step */
.two-step-header { text-align: left; }
.step-badge { display: inline-block; background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.08); color: var(--muted); font-size: 12px; padding: 4px 8px; border-radius: 999px; }
.guarantee { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Calculator */
.calc-form .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 13px; color: var(--muted); }
input, select { background: #ffffff; border: 1px solid rgba(0,0,0,0.12); color: var(--text); padding: 12px 12px; border-radius: 10px; font-size: 15px; }
input:focus, select:focus { outline: 2px solid rgba(16,185,129,0.2); border-color: transparent; }

/* Hide arrows for number inputs (only views and price) */
#views, #price { -moz-appearance: textfield; }
#views::-webkit-outer-spin-button, #views::-webkit-inner-spin-button,
#price::-webkit-outer-spin-button, #price::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Ensure selects match input background while keeping native arrows */
select {
  background-color: #ffffff;
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41 0L6 4.59 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  padding-right: 34px;
}

/* Results */
.results { margin-top: 18px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 1100px) { .results { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .results { grid-template-columns: 1fr 1fr; } }

.kpi { background: #ffffff; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; padding: 12px; }
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .value { font-size: 20px; font-weight: 800; margin-top: 6px; }
.kpi.revenue { grid-column: span 2; background: rgba(245, 158, 11, 0.1); }

/* Funnel */
.funnel { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.funnel-header { display: grid; grid-template-columns: 220px 80px 1fr 120px; gap: 10px; color: var(--muted); font-size: 12px; padding: 0 4px; }
.funnel-row { display: grid; grid-template-columns: 220px 80px 1fr 120px; align-items: center; gap: 10px; }
.funnel-row span:first-child { color: var(--muted); font-size: 14px; }
.rate { font-size: 12px; color: var(--muted); }
.bar { height: 14px; background: #f1f5f9; border: 1px solid rgba(0,0,0,0.08); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; width: 0%; background: var(--primary); transition: width .35s ease; }
.funnel-note { margin-top: 6px; font-size: 12px; }

/* Modern Funnel Visualization */
.modern-funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 40px 0;
  max-width: 800px;
  margin: 0 auto;
}

.funnel-axis {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  opacity: 0.2;
  transform: translateX(-50%);
}

.funnel-step-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  height: 34px;
}

.funnel-core {
  background: var(--primary);
  color: #fff;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
  width: calc(400px * var(--scale));
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.funnel-step-row:hover .funnel-core {
  transform: scale(1.05);
}

.funnel-wing {
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.05);
}

.funnel-label {
  display: none;
}

/* YouTube video mockup */
.video-mock { width: 100%; max-width: 400px; aspect-ratio: 16 / 9; margin: 10px auto 10px; background: radial-gradient(800px 300px at 50% -50px, rgba(59,130,246,0.22), rgba(245,158,11,0.08) 48%, rgba(0,0,0,0) 75%), #0e1016; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; box-shadow: 0 16px 34px rgba(0,0,0,0.35); position: relative; overflow: hidden; }
.video-mock::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)); pointer-events: none; }
.video-mock .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; background: #ff0033; box-shadow: 0 12px 24px rgba(255,0,51,0.25); border: 6px solid rgba(0,0,0,0.25); display: grid; place-items: center; }
.video-mock .play::before { content: ""; display: block; width: 0; height: 0; border-top: 16px solid transparent; border-bottom: 16px solid transparent; border-left: 24px solid #ffffff; margin-left: 6px; }

@media (max-width: 860px) {
  /* Mobile fallback: stack content; hide curve markers and absolute labels */
  .snake { position: relative; }
  .curve-markers, .labels, .finish-flag { display: none; }
  .timeline { display: grid !important; grid-template-columns: 80px 1fr; z-index: 3; }
}
@media (max-width: 640px) {
  .timeline { grid-template-columns: 60px 1fr; }
  .timeline-card h3 { font-size: 16px; }
  .timeline-item:nth-child(even) .timeline-card { margin-left: 24px; }
}

/* Responsive */
@media (max-width: 900px) {
  .calc-form .grid { grid-template-columns: repeat(2, 1fr); }
  .results { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 180px 1fr 100px; }
  .funnel-header, .funnel-row { grid-template-columns: 160px 70px 1fr 90px; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 34px; }
  .calc-form .grid { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr 1fr; }
  .kpi.revenue { grid-column: span 2; }
  .funnel-row { grid-template-columns: 150px 1fr 80px; }
  .funnel-header, .funnel-row { grid-template-columns: 130px 60px 1fr 80px; }
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* First section should be visible immediately */
#calculator.scroll-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Footer */
.footer { border-top: 1px solid rgba(0,0,0,0.06); padding: 22px 0; color: var(--muted); }
.footer .container { display: flex; align-items: center; justify-content: space-between; }
.footer .container.footer-center { justify-content: center; }
.footer .container span { font-size: 12px; }
.footer nav { display: none; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Blur Overlay */
.blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  border-radius: 30px; /* Match parent border-radius */
}

.blur-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.question-mark {
  font-size: 80px;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
  transition: transform 0.2s ease;
}

.question-mark:hover {
  transform: scale(1.1);
}

.bouncing-arrow {
  font-size: 44px;
  margin-top: 10px;
  animation: bounce 1.5s infinite ease-in-out;
  user-select: none;
  filter: hue-rotate(0deg); /* Just to ensure it's red if it's a standard emoji, though most are red already or we can use a specific color if needed */
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
