/* ============================================================
   TradePad — Cal.com design system
   Tokens via DESIGN.md (cal). Inter substitutes Cal Sans on display.
============================================================ */

:root {
  /* Colors */
  --primary: #111111;
  --primary-active: #242424;
  --ink: #111111;
  --body: #374151;
  --muted: #6b7280;
  --muted-soft: #898989;
  --hairline: #e5e7eb;
  --hairline-soft: #f3f4f6;
  --canvas: #ffffff;
  --surface-soft: #f8f9fa;
  --surface-card: #f5f5f5;
  --surface-strong: #e5e7eb;
  --surface-dark: #101010;
  --surface-dark-elevated: #1a1a1a;
  --on-primary: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #a1a1aa;
  --brand-accent: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --badge-orange: #fb923c;
  --badge-pink: #ec4899;
  --badge-violet: #8b5cf6;
  --badge-emerald: #34d399;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  /* Spacing */
  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;
  --s-section: 96px;

  --max-w: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--body);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Typography — Cal Sans substitute (Inter 600, tight tracking)
============================================================ */
h1, h2, h3, h4,
.display-xl, .display-lg, .display-md, .display-sm,
.title-lg, .title-md, .title-sm {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}

.display-xl {
  font-size: clamp(40px, 6.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.display-lg {
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.display-md {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.display-sm {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.title-lg { font-size: 22px; line-height: 1.3; letter-spacing: -0.013em; }
.title-md { font-size: 18px; line-height: 1.4; }
.title-sm { font-size: 16px; line-height: 1.4; }

p { font-size: 16px; line-height: 1.55; color: var(--body); }

.subhead {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  color: var(--body);
  max-width: 560px;
}
.subhead.center { margin: 0 auto; text-align: center; }

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.text-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   Buttons
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 0 20px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover { background: var(--primary-active); }

.btn-secondary {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-secondary:hover { background: var(--surface-card); border-color: var(--surface-strong); }

.btn-primary-on-dark {
  background: var(--canvas);
  color: var(--ink);
}
.btn-primary-on-dark:hover { background: #f0f0f0; }

/* ============================================================
   Top Nav
============================================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2px solid var(--canvas);
}
.brand-name { font-size: 17px; letter-spacing: -0.02em; }

.nav-links {
  display: none;
  gap: 4px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: var(--r-md);
  transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-soft); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

/* ============================================================
   Sections / Layout
============================================================ */
.section { padding: var(--s-section) 0; }
.section-soft {
  background: var(--hairline-soft);
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
@media (max-width: 768px) {
  .section-header { margin-bottom: 40px; }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   Hero
============================================================ */
.hero {
  padding: 64px 0 var(--s-section);
}
.hero-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero { padding-top: 80px; }
  .hero-wrapper {
    grid-template-columns: 1fr 420px;
    gap: 72px;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  width: fit-content;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
  animation: pulse 2.2s infinite;
}
.dot-success { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.25); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.7; }
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  margin-top: 4px;
}
@media (min-width: 480px) {
  .signup-form { flex-direction: row; align-items: stretch; }
}
.signup-form-center { margin-left: auto; margin-right: auto; }

.signup-form input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.signup-form input::placeholder { color: var(--muted-soft); }
.signup-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17,17,17,0.08);
}
.signup-form .btn { height: 44px; }

.privacy-note {
  font-size: 12px;
  color: var(--muted-soft);
}
.privacy-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.form-message {
  font-size: 13px;
  font-weight: 500;
  min-height: 18px;
}
.form-message.success { color: var(--success); }
.form-message.error { color: var(--error); }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-soft);
}
.avatars {
  display: inline-flex;
}
.avatars .avatar {
  margin-left: -10px;
  border: 2px solid var(--canvas);
}
.avatars .avatar:first-child { margin-left: 0; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.hero-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
}
.stars {
  color: var(--badge-orange);
  font-size: 13px;
  letter-spacing: 1px;
}

/* Hero mockup — Cal-style white card holding product UI */
.hero-mockup {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 10px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 18px 40px -16px rgba(17,17,17,0.16);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 380px;
  justify-self: center;
  aspect-ratio: 611 / 1100; /* slightly cropped from native 611/1300 to feel proportional to hero copy */
}
@media (min-width: 1024px) {
  .hero-mockup {
    justify-self: end;
    max-width: 400px;
  }
}
.hero-mockup::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgba(59,130,246,0.04), transparent 50%);
  pointer-events: none;
  z-index: 1;
}
.hero-mockup::after {
  /* soft fade at the bottom so the cropped phone screen feels intentional */
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 80px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%);
  pointer-events: none;
  z-index: 2;
}
.hero-mockup img {
  border-radius: 10px;
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   Feature cards (Problems)
============================================================ */
.feature-card {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(17,17,17,0.18);
}
@media (max-width: 768px) {
  .feature-card { padding: 24px; }
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  color: var(--ink);
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card p { font-size: 15px; color: var(--body); }

.stat {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.stat-number {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1;
}
.stat-unit {
  font-size: 18px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 13px;
  color: var(--muted-soft);
  margin-top: 4px;
}

/* ============================================================
   Pill group (Cal signature) + Step cards
============================================================ */
.pill-group {
  display: inline-flex;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  padding: 6px;
  border-radius: var(--r-pill);
  gap: 4px;
  margin-top: 8px;
}
.pill-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.pill-tab:hover { color: var(--ink); }
.pill-tab.is-active {
  background: var(--canvas);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 1px rgba(0,0,0,0.04);
  background: var(--ink);
  color: var(--on-primary);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }

.step-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(17,17,17,0.18);
  border-color: var(--surface-strong);
}
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.product-mockup {
  margin-top: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
}
.product-mockup img {
  width: 100%;
  display: block;
}

/* ============================================================
   Badge pill
============================================================ */
.badge-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-card);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  letter-spacing: 0.01em;
}
.badge-pill.badge-on-dark {
  background: var(--surface-dark-elevated);
  color: var(--on-dark);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================
   Testimonials
============================================================ */
.testimonial-card {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testimonial-card .stars {
  font-size: 14px;
  letter-spacing: 2px;
}
.quote {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}
.testimonial-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}
.testimonial-name {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
.testimonial-role {
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   Pricing
============================================================ */
.pricing-grid { align-items: stretch; }

.pricing-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pricing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pricing-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: -8px;
}
.pricing-sub.on-dark { color: var(--on-dark-soft); margin-top: 0; }
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}
.pricing-featured .price { border-bottom-color: rgba(255,255,255,0.1); }
.price-amount {
  font-family: 'Inter', sans-serif;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1;
}
.price-unit {
  font-size: 13px;
  color: var(--muted);
}
.price-unit.on-dark { color: var(--on-dark-soft); }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--body);
  flex: 1;
}
.feature-list li {
  position: relative;
  padding-left: 24px;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}
.feature-list.on-dark { color: var(--on-dark-soft); }
.feature-list.on-dark li::before { border-color: var(--on-dark); }
.pricing-card .price-amount,
.pricing-card .title-lg { color: var(--ink); }

/* Featured (dark) tier */
.pricing-featured {
  background: var(--surface-dark);
  border-color: var(--surface-dark);
  color: var(--on-dark);
  box-shadow: 0 24px 60px -28px rgba(17,17,17,0.5);
}
.pricing-featured .title-lg,
.pricing-featured .price-amount {
  color: var(--on-dark);
}

/* ============================================================
   CTA Band
============================================================ */
.cta-band {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: var(--s-xxl) var(--s-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .cta-band { padding: 40px 24px; }
}

/* ============================================================
   Footer (dark — closes the page)
============================================================ */
.footer {
  background: var(--surface-dark);
  color: var(--on-dark-soft);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.brand-on-dark { color: var(--on-dark); }
.brand-on-dark .brand-mark { background: var(--on-dark); }
.brand-on-dark .brand-mark::after { border-color: var(--surface-dark); }
.footer-tagline {
  margin-top: 14px;
  color: var(--on-dark-soft);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.55;
}
.footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--on-dark-soft);
}
.footer-col h4 {
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 14px;
  color: var(--on-dark-soft);
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--on-dark); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--muted-soft);
}
