:root {
  --bg-main: #f6f4ef url('assets/paper-texture.jpg');
  --bg-section: rgba(255,255,255,0.85);
  --text-main: #2f2f2f;
  --accent: #6b8fb3;
  --border-soft: #ddd;
  --radius: 16px;
  --max-width: 1000px;
  --section-padding: 50px;
  --header-height: 70px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: var(--bg-main) repeat;
  line-height: 1.6;
}

/* HEADER - COMPACT */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-main);
  padding: 12px 40px 10px;
  z-index: 100;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

header.hidden {
  transform: translateY(-100%);
}

.site-title {
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text-main);
  line-height: 1;
}

nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
  font-size: 0.95rem;
}

nav a:hover {
  border-bottom-color: var(--accent);
}

/* Anchor points for smooth scrolling */
.anchor {
  display: block;
  position: relative;
  top: calc(-1 * var(--header-height) - 50px);
  visibility: hidden;
}

/* BASE SECTION - CONSISTENT WIDTH WITH SCROLL OFFSET */
section {
  max-width: var(--max-width);
  margin: 60px auto;
  padding: var(--section-padding);
  background: var(--bg-section);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  box-sizing: border-box;
  width: calc(100% - 80px);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

section:first-of-type {
  margin-top: calc(var(--header-height) + 60px);
}

section h2 {
  margin-top: 0;
  font-size: 2rem;
  color: var(--text-main);
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 32px 0;
  line-height: 1.2;
}

.hero img {
  width: 100%;
  height: auto;
  min-height: 300px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;
  background: #ddd;
}

.hero-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 16px 0 20px 0;
  color: var(--accent);
}

.hero-price span {
  font-size: 1rem;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
}

/* Cards Sections - NO background box */
.cards-section {
  max-width: var(--max-width);
  margin: 60px auto;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  box-sizing: border-box;
  width: calc(100% - 80px);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.card {
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card h2 {
  margin-top: 0;
  font-size: 1.75rem;
}

.card p {
  margin: 12px 0;
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.price-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  border: 2px solid var(--border-soft);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.price-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.price-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--text-main);
}

.price-card .price {
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0;
  color: var(--accent);
  display: block;
}

/* Hinnasto Section - Bubbly rectangles */
#hinnasto {
  scroll-margin-top: calc(var(--header-height) + 50px);
}

#hinnasto .pricing {
  background: transparent;
  padding: 0;
  margin-top: 32px;
}

#hinnasto .price-card {
  background: linear-gradient(135deg, rgba(107,143,179,0.08) 0%, rgba(107,143,179,0.04) 100%);
  border: 2px solid rgba(107,143,179,0.3);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(107,143,179,0.1);
}

#hinnasto .price-card:hover {
  background: linear-gradient(135deg, rgba(107,143,179,0.12) 0%, rgba(107,143,179,0.06) 100%);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(107,143,179,0.15);
}

#hinnasto .price-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

#hinnasto .price-card .price {
  color: var(--accent);
  font-size: 2.2rem;
}

#hinnasto .price-card p {
  margin: 8px 0 0 0;
  opacity: 0.85;
}

.pricing-note {
  margin-top: 24px;
  font-size: 0.95rem;
  opacity: 0.8;
  text-align: center;
}

/* CTA */
.cta-section {
  text-align: center;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.cta-section p {
  font-size: 1.1rem;
}

.button {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(107,143,179,0.3);
}

.button:hover {
  background: #5a7a9a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107,143,179,0.4);
}

footer {
  text-align: center;
  padding: 80px 40px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    padding: 10px 20px 8px;
  }

  .site-title {
    font-size: 2rem;
    margin-bottom: 6px;
  }

  nav {
    gap: 12px;
  }

  nav a {
    font-size: 0.85rem;
  }

  section {
    margin: 40px 20px;
    padding: 40px 24px;
    width: calc(100% - 40px);
  }

  .cards-section {
    width: calc(100% - 40px);
    margin: 40px 20px;
  }

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

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 24px;
  }

  .hero-price {
    font-size: 1.25rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card {
    padding: 28px;
  }

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