/* ═══════════════════════════════════════
   Nova Globen AB · Stylesheet
   ═══════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --brand-cyan: #00BBCC;
  --brand-cyan-dark: #0099AA;
  --ink: #0F172A;
  --slate: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --soft: #F8FAFC;
  --white: #FFFFFF;
  --success: #0F766E;
  --warning-bg: #FFF7ED;
  --warning-border: #FDBA74;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --t: 0.15s ease;
  --max-w: 1100px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-cyan-dark); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--brand-cyan); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { line-height: 1.2; }

/* ─── Skip link ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: .5rem 1rem;
  background: var(--brand-cyan);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--t);
}
.skip-link:focus { top: 1rem; }

/* ─── Layout ─── */
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: 5rem; }
.section--soft { background: var(--soft); }

.section-header { margin-bottom: 3rem; }
.section-header--center { text-align: center; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-cyan-dark);
  margin-bottom: .5rem;
}

.section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .75rem;
}

.section-body {
  font-size: 1.0625rem;
  color: var(--slate);
  line-height: 1.7;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.375rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
  border: 2px solid transparent;
  line-height: 1.4;
}
.btn:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; }
.btn--primary { background: var(--brand-cyan); color: var(--white); border-color: var(--brand-cyan); }
.btn--primary:hover { background: var(--brand-cyan-dark); border-color: var(--brand-cyan-dark); color: var(--white); }
.btn--outline { background: transparent; color: var(--brand-cyan-dark); border-color: var(--brand-cyan); }
.btn--outline:hover { background: var(--brand-cyan); color: var(--white); }
.btn--disabled { opacity: .55; cursor: not-allowed; pointer-events: none; border-color: var(--line); background: var(--soft); color: var(--muted); }
.btn--lg { padding: .875rem 2rem; font-size: 1.0625rem; }

/* ─── Badges ─── */
.badge {
  padding: .25rem .625rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--slate);
}
.badge--cyan { background: rgba(0,187,204,.08); border-color: rgba(0,187,204,.3); color: var(--brand-cyan-dark); }

/* ─── Focus ─── */
:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; border-radius: 2px; }

/* ─── Visually hidden ─── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: .875rem;
}

.site-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-logo img { height: 34px; width: auto; }

.header-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 1.5rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .125rem;
  flex: 1;
  list-style: none;
}

.nav-link {
  display: block;
  padding: .4375rem .625rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); background: var(--soft); }

.header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .75rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  font-weight: 700;
  color: var(--slate);
  text-decoration: none;
  letter-spacing: .03em;
  transition: background var(--t), color var(--t);
}
.lang-btn:hover { background: var(--line); color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t);
}
.nav-toggle:hover { background: var(--soft); }
.bar { width: 20px; height: 2px; background: var(--slate); border-radius: 2px; transition: all 0.2s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero { padding-block: 6rem 5rem; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: center;
}

.hero-label { margin-bottom: 1.25rem; }

.hero-heading {
  font-size: clamp(1.875rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.hero-heading .accent { color: var(--brand-cyan); }

.hero-body {
  font-size: 1.125rem;
  color: var(--slate);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }

.hero-trust {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--muted);
}
.trust-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }

.hero-visual { display: flex; align-items: center; justify-content: center; }

.logo-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-cyan);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}
.logo-card img { max-width: 200px; }
.logo-card-tagline { font-size: .875rem; color: var(--muted); text-align: center; line-height: 1.55; }
.logo-card-badges { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

/* ═══════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow var(--t), border-color var(--t);
}
.service-card:hover { box-shadow: var(--shadow); border-color: rgba(0,187,204,.4); }

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0,187,204,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.service-card h3 { font-size: 1.0625rem; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.service-card p { font-size: .9375rem; color: var(--muted); margin-bottom: .875rem; line-height: 1.55; }
.service-tags { display: flex; flex-wrap: wrap; gap: .375rem; }

/* ═══════════════════════════════════════
   PROCESS
   ═══════════════════════════════════════ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-cyan);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.process-step h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .375rem; }
.process-step p { font-size: .9rem; color: var(--muted); line-height: 1.55; }

/* ═══════════════════════════════════════
   AI & CLOUD
   ═══════════════════════════════════════ */
.ai-cloud-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.ai-cloud-body { margin-bottom: 1rem; }

.ai-feature-list { display: flex; flex-direction: column; gap: 1.25rem; }

.ai-feature { display: flex; gap: .875rem; align-items: flex-start; }

.ai-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0,187,204,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.ai-feature-text h4 { font-size: .9375rem; font-weight: 700; color: var(--ink); margin-bottom: .125rem; }
.ai-feature-text p { font-size: .875rem; color: var(--muted); line-height: 1.5; }

/* ═══════════════════════════════════════
   WHY
   ═══════════════════════════════════════ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.why-card {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.why-card-icon { font-size: 1.5rem; margin-bottom: .75rem; }
.why-card h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .375rem; }
.why-card p { font-size: .875rem; color: var(--muted); line-height: 1.55; }

/* ═══════════════════════════════════════
   PAYMENTS
   ═══════════════════════════════════════ */
.payment-box {
  max-width: 700px;
  margin-inline: auto;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.75rem;
}
.payment-box h3 { font-size: 1.125rem; font-weight: 700; color: var(--ink); margin-bottom: 1rem; }
.payment-box p { font-size: .9375rem; color: var(--slate); line-height: 1.65; margin-bottom: .875rem; }
.payment-box .btn { margin-top: .375rem; }

/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.contact-details { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .625rem; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .9375rem;
  color: var(--slate);
}
.contact-detail-icon { font-size: 1rem; flex-shrink: 0; }
.contact-detail a { color: var(--brand-cyan-dark); }

.contact-form { display: flex; flex-direction: column; gap: 1.125rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: .375rem; }

.form-label { font-size: .875rem; font-weight: 600; color: var(--slate); }
.form-label .optional { font-weight: 400; color: var(--muted); font-size: .8125rem; }

.form-control {
  padding: .625rem .875rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: .9375rem;
  transition: border-color var(--t), box-shadow var(--t);
  width: 100%;
}
.form-control:focus { outline: none; border-color: var(--brand-cyan); box-shadow: 0 0 0 3px rgba(0,187,204,.15); }
.form-control::placeholder { color: var(--muted); }
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-honeypot { display: none !important; visibility: hidden; position: absolute; left: -9999px; }

.form-check { display: flex; gap: .625rem; align-items: flex-start; }
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  accent-color: var(--brand-cyan);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: .15rem;
}
.form-check-label { font-size: .875rem; color: var(--slate); line-height: 1.5; }
.form-check-label a { color: var(--brand-cyan-dark); }

.cf-turnstile { margin-top: .25rem; }

.form-status {
  padding: .875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 500;
  display: none;
}
.form-status[data-visible="true"] { display: block; }
.form-status--success { background: rgba(15,118,110,.08); border: 1px solid rgba(15,118,110,.25); color: var(--success); }
.form-status--error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25); color: #b91c1c; }

/* ─── Button loading state ─── */
.btn--loading {
  position: relative;
  padding-left: 2.75rem !important;
  pointer-events: none;
}
.btn--loading::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin-top: -.5rem;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .65s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ─── Result popup ─── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fade-in .15s ease;
}
.popup-overlay[hidden] { display: none !important; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.popup {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(0,0,0,.06);
  animation: slide-up .2s ease;
}
@keyframes slide-up { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.popup-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: .25rem .5rem;
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
}
.popup-close:hover { color: var(--ink); background: var(--soft); }
.popup-icon { font-size: 3rem; line-height: 1; margin-bottom: 1rem; }
.popup-title { font-size: 1.25rem; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.popup-message { color: var(--slate); line-height: 1.6; margin-bottom: 1.5rem; }
.popup-message a { color: var(--brand-cyan-dark); }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding-block: 3.5rem 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo { display: inline-block; margin-bottom: 1rem; }
.footer-logo img { height: 30px; filter: brightness(0) invert(1); opacity: .8; }
.footer-tagline { font-size: .875rem; color: rgba(255,255,255,.5); line-height: 1.6; margin-bottom: 1rem; }
.footer-legal { font-size: .8rem; color: rgba(255,255,255,.4); line-height: 1.7; }

.footer-col h4 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: .875rem;
}
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { font-size: .9rem; color: rgba(255,255,255,.6); text-decoration: none; transition: color var(--t); }
.footer-links a:hover { color: var(--brand-cyan); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.35); }

/* ═══════════════════════════════════════
   POLICY PAGES
   ═══════════════════════════════════════ */
.policy-header {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding-block: 3rem;
}

.policy-content { max-width: 760px; margin-inline: auto; padding-block: 3rem 5rem; }
.policy-content h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--ink); margin-bottom: .5rem; }
.policy-content .meta { font-size: .875rem; color: var(--muted); margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.policy-content h2 { font-size: 1.1875rem; font-weight: 700; color: var(--ink); margin-top: 2.25rem; margin-bottom: .75rem; }
.policy-content p { font-size: .9375rem; color: var(--slate); line-height: 1.7; margin-bottom: .875rem; }
.policy-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.policy-content li { font-size: .9375rem; color: var(--slate); line-height: 1.65; margin-bottom: .375rem; }
.policy-content a { color: var(--brand-cyan-dark); }

.policy-todo {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning-border);
  padding: .75rem 1rem;
  font-size: .875rem;
  color: #92400e;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr 360px; gap: 3rem; }
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding-block: 3.5rem; }
  .hero { padding-block: 3.5rem 3rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { display: none; }
  .hero-body { max-width: 100%; }
  .ai-cloud-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }

  /* Mobile nav */
  .nav-toggle { display: flex; margin-left: auto; }
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    padding: 0 1.5rem 1.25rem;
    gap: 0;
    z-index: 99;
  }
  .header-nav.open { display: flex; }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: .875rem;
  }
  .nav-link {
    padding: .75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--soft);
    border-radius: 0;
  }
  .nav-list li:last-child .nav-link { border-bottom: none; }
  .header-actions { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════
   Blog
   ═══════════════════════════════════════ */

/* ─── Blog index grid ─── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t), transform var(--t);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.blog-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--soft);
}
.blog-card-img--placeholder { background-color: var(--soft); }
.blog-card-img-link { display: block; }

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .5rem;
}

.blog-card-meta {
  font-size: .8125rem;
  color: var(--muted);
}

.blog-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.blog-card-title a { color: var(--ink); text-decoration: none; }
.blog-card-title a:hover { color: var(--brand-cyan-dark); }

.blog-card-excerpt {
  font-size: .9375rem;
  color: var(--slate);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-tags { display: flex; flex-wrap: wrap; gap: .375rem; }

.blog-card-read {
  margin-top: auto;
  padding-top: .5rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand-cyan-dark);
  text-decoration: none;
}
.blog-card-read:hover { color: var(--brand-cyan); }

/* ─── Single blog post ─── */
.blog-post-cover-wrap {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}
.blog-post-cover {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.blog-post-inner {
  max-width: 760px;
  margin-inline: auto;
  padding-block: 3rem;
}

.blog-back {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
}
.blog-back:hover { color: var(--brand-cyan-dark); }

.blog-post-header { margin-bottom: 2rem; }

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: .75rem;
}
.blog-post-author { color: var(--brand-cyan-dark); font-weight: 600; }

.blog-post-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1rem;
}

.blog-post-tags { display: flex; flex-wrap: wrap; gap: .375rem; }

/* ─── Article body typography ─── */
.blog-post-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--slate);
}
.blog-post-body h2 { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: 2.5rem 0 1rem; }
.blog-post-body h3 { font-size: 1.1875rem; font-weight: 700; color: var(--ink); margin: 2rem 0 .75rem; }
.blog-post-body h4 { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 1.5rem 0 .5rem; }
.blog-post-body p { margin-bottom: 1.25rem; }
.blog-post-body ul, .blog-post-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; list-style: revert; }
.blog-post-body li { margin-bottom: .375rem; }
.blog-post-body a { color: var(--brand-cyan-dark); }
.blog-post-body a:hover { color: var(--brand-cyan); }
.blog-post-body strong { font-weight: 700; color: var(--ink); }
.blog-post-body em { font-style: italic; }
.blog-post-body blockquote {
  border-left: 4px solid var(--brand-cyan);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--slate);
  font-style: italic;
}
.blog-post-body code {
  font-family: "Cascadia Code", "Fira Mono", Consolas, monospace;
  font-size: .875em;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1em .35em;
}
.blog-post-body pre {
  background: #0F172A;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.blog-post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: #E2E8F0;
  font-size: .875rem;
  line-height: 1.7;
}
.blog-post-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 1.5rem 0; }
.blog-post-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9375rem; }
.blog-post-body th { background: var(--soft); font-weight: 700; text-align: left; padding: .625rem 1rem; border: 1px solid var(--line); }
.blog-post-body td { padding: .625rem 1rem; border: 1px solid var(--line); }
.blog-post-body hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.blog-post-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }

/* ─── Homepage blog teaser ─── */
.blog-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.blog-teaser-link {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand-cyan-dark);
  text-decoration: none;
  margin-top: 1.5rem;
}
.blog-teaser-link:hover { color: var(--brand-cyan); }

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-post-cover { height: 240px; }
  .blog-post-inner { padding-block: 2rem; }
}
