/* ============================================================
   PERUNKIRJA.FI — Shared Design System
   Branding: Hautaustoimisto Humat Oy
   Navy + Salmon accent. Serif headlines, clean sans body.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

:root {
  --cream:       #FCFBFA;
  --cream-dark:  #f3f6f8;
  --forest:      #193652;
  --forest-mid:  #1e4266;
  --forest-light:#2a5c8a;
  --copper:      #D9AE94;
  --copper-light:#e8c4ae;
  --text:        #393E41;
  --text-muted:  #6b7280;
  --white:       #FFFFFF;
  --border:      #e5e7eb;

  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans:  'Source Sans 3', system-ui, sans-serif;

  --radius: 4px;
  --shadow: 0 2px 20px rgba(25,54,82,0.10);
  --shadow-lg: 0 8px 48px rgba(25,54,82,0.18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

/* ---- NAVIGATION ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--forest);
  border-bottom: 2px solid var(--forest-light);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-logo span { color: var(--copper-light); }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: rgba(248,245,239,0.80);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--copper-light); }
.nav-cta {
  background: var(--copper) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--copper-light) !important; }

/* mobile nav toggle */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: 0.3s;
}

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 60%, #102437 100%);
  color: var(--cream);
  padding: 6rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 80% 20%, rgba(217,174,148,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(42,92,138,0.20) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-block;
  background: rgba(181,118,58,0.25);
  border: 1px solid rgba(181,118,58,0.5);
  color: var(--copper-light);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.hero h1 em {
  color: var(--copper-light);
  font-style: normal;
}
.hero-lead {
  font-size: 1.15rem;
  opacity: 0.88;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.btn-primary {
  display: inline-block;
  background: var(--copper);
  color: var(--white);
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(217,174,148,0.35);
}
.btn-primary:hover {
  background: var(--copper-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(217,174,148,0.45);
}
.btn-secondary {
  display: inline-block;
  border: 1.5px solid rgba(248,245,239,0.45);
  color: var(--cream);
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover {
  border-color: rgba(248,245,239,0.8);
  background: rgba(248,245,239,0.08);
}
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.75;
}
.trust-item svg { flex-shrink: 0; }

/* ---- SECTIONS ---- */
.section {
  padding: 5rem 2rem;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-alt { background: var(--cream-dark); }
.section-dark {
  background: var(--forest);
  color: var(--cream);
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.75rem;
}
.section-dark .section-label { color: var(--copper-light); }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 3rem;
  line-height: 1.7;
}
.section-dark .section-lead { color: rgba(248,245,239,0.70); }

/* ---- CARDS ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-icon {
  width: 48px;
  height: 48px;
  background: var(--cream-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}
.card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---- STEPS ---- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 48px;
  height: 48px;
  background: var(--forest);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.step-body p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---- PRICING TABLE ---- */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}
.pricing-table thead tr {
  background: var(--forest);
  color: var(--cream);
}
.pricing-table th, .pricing-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.pricing-table th { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:nth-child(even) { background: var(--cream); }
.pricing-table .highlight-row {
  background: rgba(217,174,148,0.08) !important;
  font-weight: 600;
}
.pricing-table .highlight-row td:first-child { border-left: 3px solid var(--copper); }
.price-tag {
  display: inline-block;
  background: var(--copper);
  color: var(--white);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---- TESTIMONIALS ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.testimonial {
  background: rgba(248,245,239,0.06);
  border: 1px solid rgba(248,245,239,0.15);
  border-radius: 8px;
  padding: 1.75rem;
}
.testimonial-stars { color: var(--copper-light); font-size: 1rem; margin-bottom: 0.75rem; }
.testimonial p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.88;
  margin-bottom: 1rem;
  font-style: italic;
}
.testimonial-author {
  font-size: 0.85rem;
  opacity: 0.6;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---- FAQ ---- */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.25rem 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--forest-mid); }
.faq-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s;
  color: var(--copper);
}
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.faq-answer-inner {
  padding: 0 0 1.25rem;
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-item.open .faq-answer { max-height: 600px; }

/* ---- CTA BANNER ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-light) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}
.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.cta-banner p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto 2rem;
}
.btn-white {
  display: inline-block;
  background: var(--white);
  color: var(--copper);
  padding: 0.9rem 2.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.2);
}

/* ---- FOOTER ---- */
.footer {
  background: var(--text);
  color: rgba(248,245,239,0.65);
  padding: 3rem 2rem 2rem;
  font-size: 0.88rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
}
.footer-logo span { color: var(--copper-light); }
.footer-desc { line-height: 1.65; margin-bottom: 0; }
.footer-col h4 {
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { color: rgba(248,245,239,0.65); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--copper-light); }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(248,245,239,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---- ARTICLE LAYOUT (alasivut) ---- */
.article-hero {
  background: var(--forest);
  color: var(--cream);
  padding: 4rem 2rem 3rem;
}
.article-hero-inner { max-width: 800px; margin: 0 auto; }
.breadcrumb {
  font-size: 0.82rem;
  opacity: 0.6;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { opacity: 1; }
.article-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.article-hero .lead {
  font-size: 1.1rem;
  opacity: 0.82;
  line-height: 1.65;
  max-width: 640px;
}
.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 2.5rem 0 0.8rem;
  color: var(--forest);
  line-height: 1.25;
}
.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
  color: var(--text);
}
.article-body p { margin-bottom: 1.25rem; line-height: 1.8; }
.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.5rem;
  line-height: 1.8;
}
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--forest); }
.info-box {
  background: rgba(26,51,40,0.06);
  border-left: 4px solid var(--forest-light);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.info-box p { margin: 0; font-size: 0.97rem; }
.warn-box {
  background: rgba(217,174,148,0.08);
  border-left: 4px solid var(--copper);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.warn-box p { margin: 0; font-size: 0.97rem; }

/* ---- UTILITIES ---- */
.text-center { text-align: center; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--forest);
    padding: 1rem 2rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--forest-light);
  }
  .nav-burger { display: flex; }
  .nav { position: relative; }
  .nav-inner { position: relative; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 3.5rem 1.5rem; }
  .hero { padding: 4rem 1.5rem 3.5rem; }
}

/* ---- HUMAT FOOTER BAND ---- */
.footer-humat {
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(248,245,239,0.12);
  padding: 1.5rem 2rem;
}
.footer-humat-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-avainlippu {
  height: 52px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.9;
}
.footer-humat-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: rgba(248,245,239,0.55);
}
.footer-humat-info a {
  color: rgba(248,245,239,0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-humat-info a:hover { color: var(--copper-light); }
