/* ============================================================
   Varauskone – Tuotesivu
   Väripaletti & typografia design-plan.md:n mukaisesti
   ============================================================ */

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

:root {
  /* Colors */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --success: #10B981;
  --heading: #0F172A;
  --body: #334155;
  --muted: #64748B;
  --bg: #FFFFFF;
  --alt-bg: #F8FAFC;
  --border: #E2E8F0;
  --highlight: #F59E0B;

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --container: 1280px;
  --section-pad: 96px;
  --section-pad-md: 64px;
  --section-pad-sm: 48px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--heading);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--alt-bg);
  border-color: var(--muted);
  color: var(--heading);
}

.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.btn-white:hover {
  background: var(--alt-bg);
  color: var(--primary-hover);
}

.btn-white-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.btn-white-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   1. STICKY HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

.logo:hover {
  color: var(--heading);
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  letter-spacing: -0.02em;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   2. HERO
   ============================================================ */
.hero {
  padding: 80px 0 96px;
  background: var(--bg);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  color: var(--heading);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-muted {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

/* Browser Frame */
.browser-frame {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  overflow: hidden;
}

.browser-dots {
  display: flex;
  gap: 6px;
  padding: 14px 16px 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.browser-url {
  margin: 10px 16px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--alt-bg);
  border-radius: 6px;
  font-family: 'SF Mono', monospace;
}

.browser-content {
  padding: 16px;
  background: var(--alt-bg);
  min-height: 320px;
}

/* Mockup Widget */
.mockup-widget {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 20px;
  max-width: 380px;
  margin: 0 auto;
}

.mockup-widget-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.mockup-step {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--alt-bg);
  color: var(--muted);
}

.mockup-step.active {
  background: var(--primary-light);
  color: var(--primary);
}

.mockup-service-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.mockup-service {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  transition: all 0.2s;
}

.mockup-service.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.mockup-service-name {
  font-weight: 600;
  color: var(--heading);
}

.mockup-service-info {
  font-size: 12px;
  color: var(--muted);
}

.mockup-calendar-header {
  text-align: center;
  margin-bottom: 10px;
}

.mockup-month {
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
}

.mockup-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  margin-bottom: 12px;
}

.mockup-day-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}

.mockup-day {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 0;
  border-radius: 6px;
  color: var(--heading);
}

.mockup-day.muted {
  color: var(--border);
}

.mockup-day.selected {
  background: var(--primary);
  color: #fff;
}

.mockup-slots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mockup-slot {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  color: var(--heading);
}

.mockup-slot.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.mockup-btn {
  width: 100%;
  padding: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* ============================================================
   3. FEATURES
   ============================================================ */
.features {
  padding: var(--section-pad) 0;
  background: var(--alt-bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: box-shadow 0.3s, transform 0.3s;
}

.feature-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--primary);
}

.icon-embed { background: #EFF6FF; }
.icon-mobile { background: #F0FDF4; color: #10B981; }
.icon-multi { background: #FEF3C7; color: #F59E0B; }
.icon-brand { background: #EDE9FE; color: #7C3AED; }
.icon-dashboard { background: #FCE7F3; color: #EC4899; }
.icon-notify { background: #E0F2FE; color: #0EA5E9; }

.feature-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

.feature-desc code {
  font-size: 0.85em;
}

/* ============================================================
   4. LIVE DEMO
   ============================================================ */
.demo {
  padding: var(--section-pad) 0;
  background: var(--bg);
}

.browser-frame-lg {
  max-width: 720px;
  margin: 0 auto;
}

.demo-browser-content {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-placeholder {
  text-align: center;
  color: var(--muted);
}

.demo-placeholder-icon {
  margin-bottom: 12px;
  opacity: 0.6;
}

.demo-placeholder-text {
  font-size: 16px;
}

/* ============================================================
   5. PRICING
   ============================================================ */
.pricing {
  padding: var(--section-pad) 0;
  background: var(--alt-bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transition: box-shadow 0.3s, transform 0.3s;
}

.pricing-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.pricing-card-popular {
  border-color: var(--primary);
  box-shadow: 0 8px 40px rgba(37,99,235,0.12);
  transform: scale(1.03);
}

.pricing-card-popular:hover {
  transform: scale(1.03) translateY(-2px);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--highligh, #F59E0B);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-header {
  margin-bottom: 24px;
}

.pricing-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
}

.pricing-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-price {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
}

.pricing-period {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--body);
}

/* ============================================================
   6. FAQ (UKK)
   ============================================================ */
.faq {
  padding: var(--section-pad) 0;
  background: var(--bg);
}

.faq-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  color: var(--heading);
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer p {
  padding: 0 24px 20px;
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

/* ============================================================
   7. BOTTOM CTA
   ============================================================ */
.cta-bottom {
  padding: var(--section-pad) 0;
  background: var(--bg);
}

.cta-bottom-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
  border-radius: 24px;
  padding: 72px 48px;
  text-align: center;
  color: #fff;
}

.cta-bottom-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #fff;
}

.cta-bottom-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.cta-bottom-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  padding: 64px 0 32px;
  background: var(--heading);
  color: rgba(255,255,255,0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  color: #fff;
  margin-bottom: 12px;
}

.footer-logo:hover {
  color: #fff;
}

.footer-tagline {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 1023px) {
  :root {
    --section-pad: 64px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-title {
    font-size: 40px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .pricing-card-popular {
    transform: none;
  }

  .pricing-card-popular:hover {
    transform: translateY(-2px);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-actions {
    display: none;
  }

  /* Mobile nav open */
  .nav.open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
  }

  .nav.open .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .nav.open .nav-link {
    font-size: 20px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 639px) {
  :root {
    --section-pad: 48px;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .section-title {
    font-size: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 24px;
  }

  .cta-bottom-card {
    padding: 48px 24px;
  }

  .cta-bottom-title {
    font-size: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .pricing-amount {
    font-size: 36px;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 15px;
  }
}
