/* ==========================================================================
   Resilient Finland Oy — site stylesheet
   Plain CSS, no build step, no external font/CDN requests by design.
   ========================================================================== */

:root {
  --bg: #0a0e14;
  --bg-alt: #0e141d;
  --bg-card: #131a25;
  --bg-card-hover: #172030;
  --border: #232d3d;
  --border-soft: #1a2331;
  --text: #e8eef5;
  --text-dim: #97a5b8;
  --text-faint: #64738a;
  --accent: #3fe0c5;
  --accent-strong: #5df2d8;
  --accent-2: #5b8cff;
  --accent-contrast: #06130f;
  --brand-red: #dc0400;
  --radius: 10px;
  --max-width: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(63, 224, 197, 0.07) 1px, transparent 0);
  background-size: 28px 28px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--text-dim); }
.lede { font-size: 1.15rem; color: var(--text-dim); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px rgba(63, 224, 197, 0.7);
}

.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 14, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 26px;
  width: auto;
  display: block;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
nav.main-nav a {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
nav.main-nav a:hover, nav.main-nav a[aria-current="page"] { color: var(--text); }
nav.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
nav.main-nav a.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
}
nav.main-nav a.lang-switch:hover { color: var(--accent); border-color: var(--accent); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(63, 224, 197, 0.16) 0%, rgba(63, 224, 197, 0) 70%);
  pointer-events: none;
}
.hero-inner { max-width: 720px; position: relative; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { max-width: 560px; margin-bottom: 36px; }

/* ---------- Sections ---------- */

section { padding: 84px 0; }
section.tight { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 12px; }

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

/* ---------- Pillars / cards grid ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.card:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: rgba(63, 224, 197, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; font-size: 0.95rem; }
.card .step-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-red);
  margin-bottom: 8px;
  display: block;
}

/* ---------- About / two-col ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--bg-card);
}

/* ---------- CTA band ---------- */

.cta-band {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(63, 224, 197, 0.05), rgba(63, 224, 197, 0) 60%),
    var(--bg-alt);
  text-align: center;
}
.cta-band .container { max-width: 720px; }
.cta-band h2 { margin-bottom: 30px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Services page ---------- */

.services-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}
.service-card-head .subtitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 6px;
}
.service-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.service-card ul li {
  font-size: 0.92rem;
  color: var(--text-dim);
  padding-left: 20px;
  position: relative;
}
.service-card ul li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}
.services-closing {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

/* ---------- Contact page ---------- */

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  max-width: 560px;
}
.contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.contact-row:last-of-type { border-bottom: none; }
.contact-row .label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-row .value {
  font-size: 1.15rem;
  font-weight: 600;
}
.contact-row .value:hover { color: var(--accent); }
.contact-note {
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 36px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand { max-width: 320px; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 0.92rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 36px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .service-card { grid-template-columns: 1fr; gap: 14px; }
  section { padding: 56px 0; }
  .hero { padding: 64px 0 48px; }
}

@media (max-width: 640px) {
  .site-header .container { height: 64px; }
  .nav-toggle { display: flex; }
  nav.main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    padding: 8px 24px 18px;
    display: none;
  }
  nav.main-nav.is-open { display: flex; }
  nav.main-nav a { padding: 12px 0; width: 100%; }
  .lang-switch { margin-top: 8px; }
  .header-actions { gap: 10px; }
}
