/* ===== Estonian Corporate Design System =====
   Nordic minimalism · Light · Trust · ET/EN bilingual · Accessible
   Inspired by e-Estonia / Estonian enterprise web conventions
*/

:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --bg-dark: #0a1628;
  --ink: #1a2332;
  --muted: #5c6b7f;
  --brand: #003580;
  --brand-light: #0054a6;
  --accent: #00875a;
  --line: #e2e8f0;
  --shadow: 0 4px 24px rgba(26, 35, 50, 0.06);
  --shadow-lg: 0 12px 48px rgba(26, 35, 50, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 em {
  font-family: var(--font-display);
  font-style: normal;
  color: var(--brand);
}

a { color: inherit; text-decoration: none; }

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ===== Bilingual ===== */
.en-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}

.en-inline {
  font-size: 0.72em;
  color: var(--muted);
  font-weight: 400;
  opacity: 0.85;
}

.en-sub.card-en,
.en-sub.office-en,
.en-sub.stat-en {
  margin-top: 2px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-light);
}

.en-sub.hero-en { margin-top: -4px; margin-bottom: 16px; }
.en-sub.lede-en { margin-top: 12px; font-size: 0.9rem; }
.en-sub.about-en { margin-top: 12px; }
.en-sub.quote-en { margin-top: 16px; font-style: italic; max-width: 560px; margin-left: auto; margin-right: auto; }
.footer-en { display: inline; margin-left: 6px; font-size: 0.78rem; }

/* ===== Top bar ===== */
.top-bar {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-contacts { display: flex; gap: 20px; }
.top-contacts a { color: rgba(255,255,255,0.9); transition: color 0.15s; }
.top-contacts a:hover { color: #fff; }
.top-location { opacity: 0.75; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 53, 128, 0.25);
}

.btn-primary:hover {
  background: var(--brand-light);
  box-shadow: 0 4px 16px rgba(0, 53, 128, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--brand);
}

.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.brand-type { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--brand); }

.nav-cta { padding: 10px 20px; font-size: 0.88rem; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 4% 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.mobile-menu a { padding: 10px 6px; color: var(--muted); }
.mobile-menu.open { display: flex; }

/* ===== Hero ===== */
.hero {
  padding: 72px 0 64px;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  margin-top: 8px;
}

.lede {
  margin-top: 20px;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 24px;
}

.panel-stat {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-stat:last-child { padding-bottom: 0; border-bottom: 0; }

.panel-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.panel-label {
  display: block;
  font-weight: 600;
  margin-top: 4px;
  font-size: 0.95rem;
}

/* ===== Trust strip ===== */
.trust-strip {
  background: var(--bg-dark);
  color: #fff;
  padding: 28px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.trust-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.trust-item strong { display: block; font-size: 0.92rem; }
.trust-item .en-sub { color: rgba(255,255,255,0.55); margin-top: 2px; }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-top: 6px;
}

.section-head > p:not(.en-sub) {
  color: var(--muted);
  margin-top: 12px;
  font-size: 1.02rem;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.feature:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: rgba(0, 53, 128, 0.15);
}

.icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  margin-bottom: 16px;
}

.feature h3 { font-size: 1.1rem; margin-bottom: 4px; }
.feature p:not(.en-sub) { color: var(--muted); font-size: 0.92rem; }

/* ===== Process ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.process-step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.step-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 12px;
}

.process-step h3 { font-size: 1.05rem; margin-bottom: 4px; }
.process-step p:not(.en-sub) { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.about-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 6px 0 16px;
}

.about-copy > p:not(.en-sub) { color: var(--muted); }

.checklist {
  list-style: none;
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.checklist li {
  padding-left: 28px;
  position: relative;
  font-size: 0.95rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.info-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.info-card h4 { font-size: 1rem; margin-bottom: 4px; }

.info-card dl { margin-top: 20px; display: grid; gap: 14px; }
.info-card dt { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.info-card dd { font-weight: 500; margin-top: 2px; }

/* ===== Stats ===== */
.stats { background: var(--brand); color: #fff; }
.stats .eyebrow { color: rgba(255,255,255,0.7); }
.stats .section-head h2 { color: #fff; }
.stats .en-sub { color: rgba(255,255,255,0.6); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat {
  text-align: center;
  padding: 28px 16px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
}

.stat .num {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  display: block;
  line-height: 1;
}

.stat p:not(.en-sub) { margin-top: 8px; font-size: 0.9rem; }
.stat .en-sub { color: rgba(255,255,255,0.55); }

/* ===== Quote ===== */
.quote-wrap {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.quote-author {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  text-align: left;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.quote-author strong { display: block; color: var(--brand); }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 6px 0 14px;
}

.contact-copy > p:not(.en-sub) { color: var(--muted); }

.contact-list {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

.contact-list li strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-list a { color: var(--brand); font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-form h3 { font-size: 1.15rem; margin-bottom: 4px; }

.field { margin-bottom: 16px; margin-top: 20px; }
.contact-form .field:first-of-type { margin-top: 16px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 53, 128, 0.1);
}

.form-privacy { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.form-note { margin-top: 12px; font-size: 0.9rem; color: var(--accent); min-height: 1.2em; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
}

.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-type { color: rgba(255,255,255,0.5); }

.footer-tag { margin-top: 12px; font-size: 0.9rem; }
.footer-brand .en-sub { color: rgba(255,255,255,0.45); }

.footer-legal {
  margin-top: 16px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-cols h5 {
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-cols a {
  display: block;
  color: rgba(255,255,255,0.6);
  padding: 4px 0;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer-cols a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid,
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .cards,
  .process-grid { grid-template-columns: 1fr; }
  .stat-grid,
  .trust-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .top-bar-inner { justify-content: center; text-align: center; }
  .top-contacts { flex-direction: column; gap: 4px; }
  .en-inline { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
