:root {
  --brand: #173F5F;
  --brand-light: #2C5F8A;
  --bg: #F6F8FA;
  --bg-alt: #ffffff;
  --text: #1F2937;
  --muted: #6B7280;
  --border: #E2E8F0;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(23, 63, 95, 0.08);
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

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

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(246, 248, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  color: var(--brand);
  letter-spacing: -0.01em;
}
.brand-icon { width: 30px; height: 30px; flex-shrink: 0; }
.brand-text .accent { color: var(--brand-light); }
.topbar-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text); }
.topbar-nav a:hover { color: var(--brand); }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-cta {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.topbar-cta:hover { background: var(--brand-light); }

.lang-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.lang-switch a { text-decoration: none; color: var(--muted); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { color: var(--brand); }

@media (max-width: 720px) {
  .topbar-nav { display: none; }
  .lang-switch { gap: 6px; font-size: 12px; }
}

/* Bränd "aadressiteenused.ee" (pikem kui vana "aadressiteenus.ee") +
   keelelüliti + CTA-nupp ei mahtunud kitsastel telefonidel enam ära -
   leitud Playwright'i mobiilivaate screenshot'iga. topbar-cta on siin
   üleliigne, kuna sama tegevus on niikuinii .mobile-cta püsiribal. */
@media (max-width: 480px) {
  .brand-text { font-size: 15px; }
  .topbar-cta { display: none; }
}

/* Küpsiseteavitus */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(15, 45, 69, 0.35);
}
/* BUG-FIX (üle võetud intelisoft.ee'lt): ilma selleta jääb author-CSS
   `display:flex` alati ülekaalu brauseri vaikimisi [hidden] reegli üle
   (sama spetsiifilisus, autori CSS võidab UA stiili) - "hidden"
   atribuudi eemaldamine JS-ist ei mõjuks visuaalselt ilma selleta. */
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 13.5px; opacity: 0.92; line-height: 1.5; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner .btn { flex-shrink: 0; padding: 9px 18px; font-size: 13.5px; background: #fff; color: var(--brand); }

/* Hero */
.hero {
  padding: 72px 24px 56px;
  text-align: center;
  max-width: var(--max);
  margin: 0 auto;
}
.hero-eyebrow {
  display: inline-block;
  background: #E8F0F7;
  color: var(--brand);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  color: #0F2D45;
}
.hero .price-line {
  color: var(--brand);
}
.hero-sub {
  font-size: 19px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 30px;
}
.cta-btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 16px 30px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow);
}
.cta-btn:hover { background: var(--brand-light); }
.cta-btn.secondary {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  box-shadow: none;
}

/* Sections */
section.block {
  padding: 64px 24px;
}
section.block.alt { background: var(--bg-alt); }
.block-inner { max-width: var(--max); margin: 0 auto; }
.block h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 14px;
  text-align: center;
  color: #0F2D45;
  letter-spacing: -0.01em;
}
.block .lead {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 17px;
}
.block .cta-row { text-align: center; margin-top: 32px; }

/* Grid cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin: 0 0 8px; font-size: 17px; color: #0F2D45; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Steps */
.steps { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.step p { margin: 4px 0 0; color: var(--muted); }

/* Price card */
.price-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.price-card .amount { font-size: 44px; font-weight: 800; color: var(--brand); margin: 8px 0 4px; }
.price-card .amount span { font-size: 16px; font-weight: 500; color: var(--muted); }
.price-card ul { text-align: left; padding: 0; margin: 20px 0; list-style: none; color: var(--text); font-size: 15px; }
.price-card ul li { padding: 6px 0; padding-left: 26px; position: relative; }
.price-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* Address / trust block */
.trust {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } }
.trust-card {
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
}
.trust-card .addr { font-size: 20px; font-weight: 700; margin: 8px 0 0; }
.trust-card small { opacity: 0.85; }

/* FAQ */
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}
.faq summary { font-weight: 600; cursor: pointer; color: #0F2D45; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
footer {
  background: #0F2D45;
  color: rgba(255,255,255,0.85);
  padding: 40px 24px 90px;
  font-size: 14px;
}
footer .foot-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer h4 { color: #fff; font-size: 14px; margin: 0 0 10px; }

/* Sticky mobile CTA */
.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: none;
  background: var(--brand);
  padding: 12px 16px;
  text-align: center;
}
.mobile-cta a { color: #fff; font-weight: 700; text-decoration: none; display: block; }
@media (max-width: 640px) {
  .mobile-cta { display: block; }
  footer { padding-bottom: 90px; }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Order form (tellimine.php) */
.order-wrap { max-width: 560px; margin: 40px auto 80px; padding: 0 24px; }
.order-progress { display: flex; gap: 8px; margin-bottom: 28px; }
.order-progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.order-progress span.done { background: var(--brand); }
.order-step { display: none; }
.order-step.active { display: block; }
.order-step h2 { font-size: 22px; margin: 0 0 6px; }
.order-step .hint { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px;
  font-family: inherit; background: var(--bg-alt);
}
.field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.radio-row, .check-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label, .check-row label {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 500;
  cursor: pointer; background: var(--bg-alt);
}
.form-nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }
.btn { border: none; border-radius: 10px; padding: 13px 22px; font-weight: 700; font-size: 15px; cursor: pointer; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent-row a { color: var(--brand); text-decoration: underline; }
.honeypot { position: absolute; left: -9999px; top: -9999px; }
.form-msg { margin-top: 16px; font-size: 14px; }
.form-msg.error { color: #B91C1C; }
.form-msg.success { color: #166534; }
.order-summary { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 20px; font-size: 14px; color: var(--muted); }

/* Legal pages */
.legal-wrap { max-width: 720px; margin: 40px auto 80px; padding: 0 24px; }
.legal-wrap h1 { font-size: 30px; color: #0F2D45; }
.legal-wrap h2 { font-size: 20px; color: #0F2D45; margin-top: 32px; }
.legal-wrap p, .legal-wrap li { color: var(--text); }
.draft-notice {
  background: #FEF3C7; border: 1px solid #FDE68A; color: #92400E;
  border-radius: 10px; padding: 14px 18px; font-size: 14px; margin-bottom: 28px;
}
.back-link { display: inline-block; margin-top: 32px; color: var(--brand); text-decoration: none; font-weight: 600; }

/* Blog listing + article pages */
.page-hero {
  padding: 56px 24px 20px;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.page-hero h1 { font-size: clamp(30px, 4.5vw, 44px); color: #0F2D45; margin: 0 0 12px; letter-spacing: -0.01em; }
.page-hero p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 17px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 64px;
}
.blog-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s ease;
}
.blog-card:hover { box-shadow: var(--shadow); }
.blog-card h3 { margin: 0 0 8px; font-size: 17px; color: #0F2D45; }
.blog-card p { margin: 0; color: var(--muted); font-size: 14px; }

.article-wrap { max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; }
.article-wrap .eyebrow-link { color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 600; }
.article-wrap h1 { font-size: clamp(28px, 4vw, 36px); color: #0F2D45; margin: 16px 0 8px; letter-spacing: -0.01em; }
.article-meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.article-body p { margin: 0 0 18px; }
.article-body h2 { font-size: 21px; color: #0F2D45; margin: 32px 0 12px; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 18px; color: var(--text); }
.article-body li { margin-bottom: 6px; }
.article-cta {
  margin-top: 36px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.article-cta p { margin: 0 0 14px; color: var(--muted); }

/* SEO landing (juriidiline-aadress.php) reuse .block styles above */
.compare-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.compare-table th, .compare-table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.compare-table th { background: var(--bg); color: #0F2D45; }
