/* Mērtelpa — base styles
   Fonts: system stack only (no external requests, no third-party tracking). */

:root {
  --navy-900: #101c31;
  --navy-800: #16293d;
  --navy-700: #253852;
  --navy-100: #e9edf2;
  --accent: #e58b25;
  --accent-dark: #c3761f;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #5b6b7a;
  --border: #dde3ea;
  --success: #1f7a4d;
  --error: #b3261e;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  height: 50px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
.footer-logo {
  height: 46px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-900);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--navy-800);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-cta-mobile {
  display: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
}
.btn-outline {
  background: transparent;
  border-color: var(--navy-800);
  color: var(--navy-800);
}
.btn-outline:hover {
  background: var(--navy-800);
  color: #fff;
}
.btn-light {
  background: #fff;
  color: var(--navy-900);
}
.btn:active {
  transform: scale(0.98);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700) 70%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at top right, black 10%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding: 88px 24px 96px;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-graphic {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin: 0 auto;
}
.hero-graphic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Sections ---------- */
section {
  padding: 80px 0;
}
.section-tight {
  padding: 56px 0;
}
.section-title-group {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.eyebrow {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--navy-900);
}
.lede {
  color: var(--muted);
  font-size: 1.08rem;
}

.bg-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Cards / grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.grid-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.service-card .card-icon {
  width: 44px;
  height: 44px;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.service-card h3 {
  margin: 0 0 10px;
  color: var(--navy-900);
  font-size: 1.2rem;
}
.service-intro {
  color: var(--muted);
  margin: 0 0 22px;
}
.service-meta {
  list-style: none;
  margin: auto 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-meta li {
  font-size: 0.92rem;
}
.service-meta strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}
.service-meta span {
  color: var(--muted);
}
.service-cta {
  margin-top: 22px;
  align-self: flex-start;
}

/* ---------- Price table ---------- */
.price-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.price-table {
  width: 100%;
  border-collapse: collapse;
}
.price-table th,
.price-table td {
  padding: 16px 24px;
  text-align: left;
}
.price-table thead th {
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.price-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}
.price-table td:last-child,
.price-table th:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
}
.price-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .price-table th,
  .price-table td {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.card-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-dark);
  margin-bottom: 18px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--navy-900);
}
.card p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.steps-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.step {
  position: relative;
  padding-left: 4px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 {
  margin: 0 0 8px;
  color: var(--navy-900);
}
.step p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Placeholder / notice ---------- */
.notice {
  border: 1px dashed var(--accent-dark);
  background: #fdf3e6;
  color: var(--navy-900);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.95rem;
  margin: 24px 0;
}
.notice strong {
  color: var(--accent-dark);
}
.placeholder-value {
  font-style: italic;
  color: var(--muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy-900);
  color: #fff;
  text-align: center;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  color: rgba(255,255,255,0.8);
  max-width: 50ch;
  margin: 0 auto 28px;
}

/* ---------- Values list ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.value {
  text-align: center;
  padding: 20px 12px;
}
.value-mark {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--accent-dark);
}
.value h3 {
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--navy-900);
}
.value p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-info-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-info-list .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--accent-dark);
  margin-top: 2px;
}
.contact-info-list strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 2px;
}

form.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.form-row {
  margin-bottom: 20px;
}
.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--bg);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: #fff;
}
.form-row textarea {
  min-height: 140px;
  resize: vertical;
}
.form-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
  min-height: 1.1em;
}
.form-row.invalid input,
.form-row.invalid textarea {
  border-color: var(--error);
}
.required {
  color: var(--error);
}
/* Honeypot field — hidden from real users, visible to naive bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  display: none;
}
.form-status.show {
  display: block;
}
.form-status.success {
  background: #e6f4ec;
  color: var(--success);
}
.form-status.error {
  background: #fbeceb;
  color: var(--error);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-grid a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}
.footer-grid a:hover {
  color: #fff;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page hero (non-home) ---------- */
.page-hero {
  background: var(--navy-900);
  color: #fff;
  padding: 56px 0;
}
.page-hero .eyebrow {
  color: var(--accent);
}
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
.page-hero p {
  color: rgba(255,255,255,0.8);
  max-width: 60ch;
  margin: 0;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

.prose h2 {
  margin-top: 40px;
}
.prose p {
  color: var(--text);
}
.prose ul {
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 56px 24px 64px;
  }
  .hero-graphic {
    max-width: 300px;
  }
  .grid-3,
  .grid-2,
  .steps,
  .values,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .values {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-cta {
    display: none;
  }
  .nav-cta-mobile {
    display: block;
  }
  .nav-toggle {
    display: inline-block;
  }
  .site-header {
    position: sticky;
  }
  section {
    padding: 56px 0;
  }
}
