/* ==========================================================================
   SP Secure Messenger — site stylesheet
   Finnish corporate identity: navy + white, minimalism, system fonts.
   Mobile-first responsive layout.
   ========================================================================== */

/* ----- Design tokens ----- */
:root {
  --navy: #0B3D91;
  --navy-dark: #082766;
  --accent: #1E73BE;
  --accent-light: #5BA3E0;
  --slate: #3D4858;
  --slate-light: #6B7785;
  --bg: #FFFFFF;
  --bg-soft: #F5F8FC;
  --bg-panel: #EAF1FA;
  --border: #BFD3EA;
  --border-soft: #E2EBF6;
  --green: #1B8A3F;
  --red: #B33A3A;
  --gold: #C9A227;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 4px rgba(11, 61, 145, 0.06);
  --shadow: 0 6px 18px rgba(11, 61, 145, 0.08);
  --shadow-lg: 0 14px 40px rgba(11, 61, 145, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-display: var(--font);

  --max: 1200px;
  --gap: 1.5rem;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover, a:focus { color: var(--navy); text-decoration: underline; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin-bottom: .35rem; }

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 .6em;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.85rem, 4.4vw, 2.85rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p  { margin: 0 0 1em; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: .6rem;
}
.lead { font-size: 1.15rem; color: var(--slate); }

/* ----- Layout ----- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
section { padding: 4rem 0; }
@media (min-width: 800px) { section { padding: 5.5rem 0; } }

/* Skip link */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { top: 0; }

/* ----- Header / Navigation ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .9rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand img { height: 38px; width: auto; }
.brand-text { font-weight: 700; color: var(--navy); letter-spacing: .01em; }

.nav-links {
  display: none;
  list-style: none; padding: 0; margin: 0;
  gap: 1.6rem; align-items: center;
}
.nav-links a {
  color: var(--slate);
  font-weight: 500;
  padding: .35rem 0;
  position: relative;
}
.nav-links a:hover, .nav-links a:focus, .nav-links a[aria-current="page"] {
  color: var(--navy); text-decoration: none;
}
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 2px; background: var(--accent); border-radius: 1px;
}

.nav-actions { display: flex; align-items: center; gap: .8rem; }

.lang-switch {
  display: inline-flex; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px;
  font-size: .8rem; font-weight: 600;
}
.lang-switch a {
  color: var(--slate-light); padding: .25rem .65rem;
  border-radius: 999px; text-decoration: none;
}
.lang-switch a[aria-current="true"] {
  background: var(--navy); color: #fff;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--navy-dark); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover, .btn-ghost:focus { background: var(--bg-soft); color: var(--navy); text-decoration: none; }
.btn-on-dark { background: #fff; color: var(--navy); }
.btn-on-dark:hover, .btn-on-dark:focus { background: var(--bg-panel); color: var(--navy); text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: var(--bg-soft); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.nav-toggle:hover { background: var(--bg-panel); }
.nav-toggle svg { width: 22px; height: 22px; }

@media (min-width: 980px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed; inset: 64px 0 0 0;
  background: #fff;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid var(--border-soft);
  z-index: 49;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.mobile-menu li { margin: 0; }
.mobile-menu a {
  display: block; padding: 1rem 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--navy); font-weight: 600; font-size: 1.1rem;
}
.mobile-menu a:hover { text-decoration: none; }
.mobile-menu .lang-switch { margin-top: 1rem; }

/* Body scroll lock when mobile menu open */
body.menu-open { overflow: hidden; }

/* ----- Hero ----- */
.hero {
  position: relative; overflow: hidden;
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 90% 10%, rgba(91, 163, 224, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(91, 163, 224, 0.10) 0%, transparent 45%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .accent-word { color: var(--accent-light); }
.hero p.lead { color: rgba(255,255,255,0.88); max-width: 38rem; }
.hero .eyebrow { color: var(--accent-light); }
.hero-grid {
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 900px) {
  .hero { padding: 6rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; }
}
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-pills { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .55rem; }
.hero-pills span {
  display: inline-block; padding: .35rem .75rem;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: #fff; border-radius: 999px;
  font-size: .82rem; font-weight: 500;
}
.hero-image {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  padding: 1rem;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  overflow: hidden;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.hero-image .placeholder {
  font-size: .9rem; color: rgba(255,255,255,0.6);
  text-align: center; padding: 1rem;
}

/* ----- Cards & feature blocks ----- */
.section-head { text-align: left; max-width: 48rem; margin-bottom: 2.5rem; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }

.cards { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .cards.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cards.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border); }
.card.feature { padding-top: 1.4rem; }

.feature-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: var(--bg-panel); color: var(--navy);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.feature-icon svg { width: 24px; height: 24px; }

.card h3 { color: var(--navy); margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

/* Pillars: numbered, large */
.pillars { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.75rem;
  overflow: hidden;
}
.pillar::before {
  content: attr(data-num);
  position: absolute; right: 1rem; top: .25rem;
  font-size: 4.5rem; font-weight: 800;
  color: var(--bg-panel);
  letter-spacing: -0.05em;
  line-height: 1;
  user-select: none;
}
.pillar .feature-icon {
  width: 56px; height: 56px; background: var(--navy);
}
.pillar .feature-icon svg { color: #fff; width: 28px; height: 28px; }

/* Stat row */
.stats { display: grid; gap: 1rem; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.25rem;
  border-radius: var(--radius);
}
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-label { display: block; font-size: .9rem; color: var(--slate); margin-top: .35rem; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.75rem;
  display: grid; gap: 1.25rem;
  text-align: left;
}
.cta-banner h2 { color: #fff; margin-bottom: .35rem; }
.cta-banner p { color: rgba(255,255,255,0.88); margin-bottom: 0; }
.cta-banner .actions { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (min-width: 800px) {
  .cta-banner { grid-template-columns: 1fr auto; align-items: center; padding: 2.5rem; }
}

/* Soft section background */
.section-soft { background: var(--bg-soft); }
.section-navy { background: linear-gradient(135deg, var(--navy), var(--navy-dark)); color: #fff; }
.section-navy h2, .section-navy h3, .section-navy h4 { color: #fff; }
.section-navy .eyebrow { color: var(--accent-light); }
.section-navy p { color: rgba(255,255,255,0.88); }

/* ----- Two-column layout ----- */
.two-col { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.media-frame {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  overflow: hidden;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.media-frame .placeholder { color: var(--slate-light); font-size: .9rem; text-align: center; padding: 1rem; }

/* ----- Pricing ----- */
.price-grid { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.price-card.highlight { border-color: var(--navy); border-width: 2px; }
.price-head {
  background: var(--bg-soft);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.price-card.highlight .price-head { background: var(--navy); color: #fff; }
.price-card.highlight .price-head h3 { color: #fff; }
.price-head .tag {
  display: inline-block; font-size: .75rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.price-card.highlight .price-head .tag { color: var(--accent-light); }
.price-body { padding: 1.5rem; flex: 1; }
.price-amount { font-size: 2.5rem; font-weight: 800; color: var(--navy); line-height: 1; margin: .5rem 0; }
.price-amount small { font-size: 0.95rem; color: var(--slate); font-weight: 500; }
.price-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.price-list li {
  padding: .5rem 0 .5rem 1.6rem;
  position: relative;
  border-bottom: 1px dashed var(--border-soft);
  color: var(--slate);
}
.price-list li:last-child { border-bottom: none; }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 0.85em;
  width: 12px; height: 6px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.price-foot {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border-soft);
  background: var(--bg-soft); font-size: .85rem; color: var(--slate-light);
}

/* Comparison table */
.compare-table {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-table th, .compare-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: var(--navy); color: #fff;
  font-weight: 600; font-size: .9rem;
  border-bottom: none;
}
.compare-table tbody th { font-weight: 600; color: var(--navy); background: #fff; width: 30%; }
.compare-table tbody td.us { background: var(--bg-panel); color: var(--navy); font-weight: 600; }
.compare-table tbody tr:nth-child(even) th,
.compare-table tbody tr:nth-child(even) td { background: #FAFCFE; }
.compare-table tbody tr:nth-child(even) td.us { background: var(--bg-panel); }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ----- Forms ----- */
.form {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.form-row { margin-bottom: 1.1rem; }
.form-row.split { display: grid; gap: 1.1rem; }
@media (min-width: 700px) { .form-row.split { grid-template-columns: 1fr 1fr; } }
.form label {
  display: block; font-weight: 600; color: var(--navy);
  margin-bottom: .35rem; font-size: .9rem;
}
.form .req { color: var(--red); }
.form input, .form textarea {
  width: 100%;
  font: inherit; color: var(--slate);
  padding: .7rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.15);
}
.form textarea { resize: vertical; min-height: 110px; }
.form .help { display: block; margin-top: .35rem; font-size: .8rem; color: var(--slate-light); }
.checkbox-row {
  display: flex; align-items: flex-start; gap: .65rem;
  margin: 1rem 0 1.25rem;
  font-size: .9rem; color: var(--slate);
}
.checkbox-row input[type="checkbox"] {
  width: auto; margin-top: 0.25rem; accent-color: var(--navy);
}
.honeypot { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 1rem 0 0; padding: .85rem 1rem; border-radius: var(--radius); display: none; }
.form-msg.success { display: block; background: #E5F4EC; color: #126A30; border: 1px solid #B6E0C7; }
.form-msg.error   { display: block; background: #FBECEC; color: #8A2727; border: 1px solid #EFC4C4; }

/* ----- Footer ----- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  padding: 3rem 0 1.5rem;
  color: var(--slate);
  font-size: .92rem;
}
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-grid h4 { color: var(--navy); font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .8rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-grid a { color: var(--slate); }
.footer-grid a:hover { color: var(--navy); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  color: var(--slate-light); font-size: .85rem;
}
.footer-legal {
  margin: .85rem 0 0;
  text-align: center;
  font-size: .78rem;
  color: var(--slate-light);
  letter-spacing: .02em;
}

/* ----- Misc ----- */
.callout {
  background: var(--bg-panel);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--navy);
}
.muted { color: var(--slate-light); }
.center { text-align: center; }
.actions-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.divider { height: 1px; background: var(--border-soft); border: 0; margin: 2rem 0; }

/* Use-case industry icons */
.industry-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: var(--bg-panel); color: var(--navy);
  border-radius: 50%;
  margin-bottom: .9rem; flex-shrink: 0;
}
.industry-icon svg { width: 22px; height: 22px; }

/* Privacy / long-form pages */
.prose { max-width: 50rem; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--slate); }
.prose ul { padding-left: 1.4rem; }

/* Contact page layout */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.2fr 1fr; gap: 3rem; } }

.contact-info { background: var(--bg-soft); border-radius: var(--radius-lg); padding: 1.75rem; }
.contact-info dl { margin: 0; }
.contact-info dt {
  font-size: .8rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent);
  font-weight: 700; margin-top: 1rem;
}
.contact-info dd { margin: .25rem 0 0; color: var(--navy); font-weight: 600; }

/* Print */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
