/* ============================================================
   Edico site — global styles built on the design-system tokens.
   ============================================================ */

@import url('./tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* The design system declares 56/48/40 px headlines. Those are
   correct for marketing surfaces. We expose CSS vars for density
   so the Tweaks panel can swap "compact" without touching JSX. */
:root {
  --site-max: 1240px;
  --gutter: 32px;

  --section-y: 112px;            /* spacious default */
  --hero-y: 120px;
  --card-pad: 28px;
  --stack-3: 12px;
  --stack-4: 16px;
  --stack-5: 20px;
  --stack-6: 24px;

  --brand-primary: var(--edico-dark-blue);
  --brand-primary-hover: #0C2540;
  --brand-primary-soft: #E7ECF2;
  --brand-accent: var(--edico-red);

  --gradient-primary: linear-gradient(135deg, #123456 0%, #0A1F2E 100%);
  --gradient-accent: linear-gradient(135deg, #E84040 0%, #A80000 100%);
  --gradient-light: linear-gradient(135deg, #E7ECF2 0%, #F0F5FA 100%);
}

[data-density="compact"] {
  --section-y: 72px;
  --hero-y: 88px;
  --card-pad: 20px;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--fg-1);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---- containers ---- */
.container {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; }
.section-tight { padding: calc(var(--section-y) * 0.5) 0; }

.eyebrow {
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-primary);
  opacity: 0.9;
}
.eyebrow.is-onDark { color: rgba(255,255,255,0.78); }

/* ---- typography helpers ---- */
.display {
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0;
  color: var(--fg-1);
  text-wrap: balance;
}
.display-sm {
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 0;
  color: var(--fg-1);
  text-wrap: balance;
}
.title-md {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 0;
}
.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-2);
  text-wrap: pretty;
  max-width: 60ch;
  margin: 0;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              text-shadow var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(18, 52, 86, 0.3);
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 25px rgba(18, 52, 86, 0.4);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}
.btn-secondary {
  background: #fff;
  color: var(--brand-primary);
  border-color: var(--border-2);
  box-shadow: 0 4px 15px rgba(18, 52, 86, 0.1);
}
.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: 0 8px 25px rgba(18, 52, 86, 0.15);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--brand-primary);
  border-color: transparent;
  padding-left: 4px;
  padding-right: 4px;
}
.btn-ghost:hover {
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
  padding-left: 4px;
  padding-right: 4px;
}
.btn-onDark {
  background: #fff;
  color: var(--brand-primary);
  border-color: #fff;
}
.btn-onDark:hover {
  background: #fff;
  color: var(--brand-primary);
  border-color: #fff;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.btn-onDark-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn-onDark-outline:hover {
  background: #fff;
  color: var(--brand-primary);
  border-color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.btn-danger-onDark {
  background: var(--edico-red);
  color: #fff;
  border-color: var(--edico-red);
}
.btn-danger-onDark:hover {
  background: #A80000;
  border-color: #A80000;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-danger {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(232, 64, 64, 0.35);
  font-weight: 700;
}
.btn-danger:hover {
  background: var(--gradient-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 25px rgba(232, 64, 64, 0.45);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* ---- chips / tags ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--brand-primary-soft) 0%, rgba(231, 236, 242, 0.6) 100%);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid rgba(18, 52, 86, 0.08);
}
.chip-red { background: linear-gradient(135deg, #FBE5E5 0%, #FEF1F1 100%); color: var(--edico-red); border: 1px solid rgba(232, 64, 64, 0.1); }
.chip-orange { background: linear-gradient(135deg, #FDF1DC 0%, #FEF7EE 100%); color: #8B5A0B; border: 1px solid rgba(139, 90, 11, 0.1); }
.chip-light { background: #fff; color: var(--brand-primary); border: 1px solid var(--border-1); }

/* ---- tabs (Hjá Edico: Allt / Fréttir / Viðburðir) ---- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 8px 18px;
  border-radius: 99px;
  border: 1px solid var(--border-1);
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.tab.is-active {
  border: 1px solid var(--brand-primary);
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
}
/* Secondary filter row (Flokkur / Vörur) under the main Allt/Fréttir/Viðburðir tabs — same pill, smaller/quieter */
.tab-sm { padding: 5px 14px; font-size: 12px; }

/* Hjá Edico: every 3rd card in the grid is "big" to break up the rhythm — see js/page-edico.jsx HjaEdico() */
.hja-card--big { grid-column: span 2; }
@media (max-width: 900px) {
  .hja-card--big { grid-column: span 1; }
}

/* ---- card ---- */
.card {
  background: #fff;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  pointer-events: none;
}
.card:hover {
  box-shadow: 0 20px 40px rgba(18, 52, 86, 0.15);
  border-color: var(--brand-primary);
  transform: translateY(-4px);
}
.card:hover::before {
  opacity: 1;
}
/* For cards that just hold content/CTAs (not a single clickable target) —
   the whole-card lift/glow reads as a double hover on top of the button's
   own hover state, so this opts a card out of it. */
.card--static:hover {
  box-shadow: none;
  border-color: var(--border-1);
  transform: none;
}
.card--static:hover::before {
  opacity: 0;
}

/* ---- link arrow ---- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.link-arrow .arrow {
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
  opacity: 0.8;
}
.link-arrow:hover { color: var(--brand-accent); }
.link-arrow:hover .arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* ---- grid helpers ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1.05fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- dark band ---- */
.band-dark {
  background: var(--gradient-primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.band-dark .pattern-overlay {
  position: absolute;
  inset: 0;
  background-image: url('../assets/patterns/connection-pattern.svg');
  background-size: 280px;
  background-position: center;
  opacity: var(--pattern-opacity, 0.18);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ---- soft band ---- */
.band-soft { background: linear-gradient(135deg, #E7ECF2 0%, #F0F5FA 100%); }

/* ---- divider ---- */
.hr { height: 1px; background: var(--border-1); border: 0; margin: 0; }

/* ---- focus ring ---- */
:where(a,button,input,textarea,select):focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px) saturate(150%);
  border-bottom: 1px solid rgba(18, 52, 86, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px var(--gutter);
}
.site-header__logo {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.site-header__logo img { height: 30px; }
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-2);
  text-decoration: none;
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
  cursor: pointer;
}
.nav-link:hover { color: var(--brand-primary); background: var(--brand-primary-soft); }
.nav-link[aria-current="page"] { color: var(--brand-primary); font-weight: 600; }
.nav-link--red { background: var(--edico-red); color: #fff; }
.nav-link--red:hover { background: var(--edico-red); color: #fff; }
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -17px;
  height: 2px;
  background: var(--brand-primary);
}
.nav-link--has-menu::after {
  content: '▾';
  margin-left: 4px;
  font-size: 9px;
  opacity: 0.6;
}

.site-header__cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
}
.lang-toggle button {
  background: #fff;
  border: 0;
  padding: 7px 10px;
  color: var(--fg-2);
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--edico-red);
  color: #fff;
}
.lang-toggle button[aria-pressed="true"]:hover {
  background: var(--edico-red);
  color: #fff;
}

/* ---- service portal dropdown (compact, unlike the full-width megamenu) ---- */
.service-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: #fff;
  border: 1px solid var(--border-1);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  z-index: 40;
}
.service-dropdown-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.service-dropdown-menu__item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.service-dropdown-menu__item:hover {
  background: var(--brand-primary-soft);
}
.service-dropdown-menu__item strong {
  display: block;
  font-size: 14px;
  color: var(--brand-primary);
}
.service-dropdown-menu__item span {
  display: block;
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 2px;
}

/* ---- mega-menu dropdown ---- */
.megamenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-1);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  z-index: 40;
}
.megamenu[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.megamenu__inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 36px 0 40px;
}
.megamenu__title {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 700;
}
.megamenu__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.megamenu__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  text-decoration: none;
  color: inherit;
}
.megamenu__card:hover {
  border-color: var(--brand-primary);
  background: linear-gradient(135deg, #fff 0%, var(--brand-primary-soft) 100%);
  box-shadow: 0 8px 20px rgba(18, 52, 86, 0.1);
  transform: translateY(-2px);
}
.megamenu__card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-primary);
}
.megamenu__card-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 600;
}
.megamenu__card-desc {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #0A2238;
  color: rgba(255,255,255,0.78);
  padding: 80px 0 36px;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}
.site-footer__pattern {
  position: absolute; inset: 0;
  background: url('../assets/patterns/connection-pattern.svg');
  background-size: 320px;
  opacity: 0.08;
}
.site-footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 900px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
.site-footer h5 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.78); }
.site-footer a {
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.site-footer a:hover { color: #fff; }
.site-footer__brand-row {
  display: flex; align-items: center; gap: 14px;
}
.site-footer__brand-row img { height: 30px; filter: brightness(0) invert(1); opacity: 0.92; }
.site-footer__bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  color: rgba(255,255,255,0.56);
}

/* Búnaður category cards: translucent product photo behind the text */
.bunadur-card { position: relative; overflow: hidden; isolation: isolate; min-height: 120px; }
/* Image lives only in the right ~45% of the card and fades out to the left via a mask,
   so the text column stays on clean white. */
.bunadur-card::before {
  content: ""; position: absolute; top: 0; left: 52%; right: 0; bottom: 0; z-index: -1;
  background: var(--card-img) center / cover no-repeat;
  opacity: 0.22; filter: grayscale(0.35);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.bunadur-card:hover::before { opacity: 0.4; filter: none; }

/* Footer partners (text wordmarks) */
.footer-partners { text-align: right; }
.footer-partners__row { display: flex; gap: 28px; justify-content: flex-end; align-items: center; flex-wrap: wrap; min-height: 75px; }
.footer-partner { display: inline-flex; align-items: center; opacity: 0.9; transition: opacity var(--dur-fast) var(--ease-out); }
.footer-partner img { height: var(--h); width: auto; display: block; }
.footer-partner:hover { opacity: 1; }

/* Footer: space between the contact/opening-hours block and the divider above the awards */
.footer-certs { margin-top: 56px; }
.footer-newsletter + .footer-certs { margin-top: 0; }

/* "Okkur er treyst af" logo rows */
.trust-bar { padding: 40px 0 44px; }
.trust-bar + .section { padding-top: 56px; }
.trust-bar__rows { display: grid; gap: 36px; }
.trust-bar__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.trust-bar__row img { opacity: 0.9; max-width: 100%; }
@media (max-width: 1100px) { .trust-bar__row { flex-wrap: wrap; justify-content: center; gap: 28px 48px; } }
.trust-bar__marquee { display: none; }
@keyframes trustScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Búnaður popup: clickable supplier chips + info panel */
.brand-chip { cursor: pointer; font: inherit; font-size: inherit; border: 1px solid var(--border-1); transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.brand-chip:hover, .brand-chip.is-active { border-color: var(--brand-primary); background: #fff; }
.brand-chip__chev { display: inline-block; margin-left: 4px; font-size: 10px; transition: transform var(--dur-fast) var(--ease-out); }
.brand-chip.is-active .brand-chip__chev { transform: rotate(180deg); }
.supplier-panel { margin-top: 14px; padding: 18px 20px; background: #f4f5f7; border-radius: 12px; border-left: 3px solid var(--brand-primary); }
.supplier-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin-top: 14px; }
.supplier-gallery figure { margin: 0; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-1); }
.supplier-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.supplier-gallery figcaption { padding: 0 6px 6px; text-align: center; font-size: 11px; font-weight: 600; color: var(--fg-3); }
.supplier-panel__status { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-1); }
.supplier-panel__label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }

/* October easter egg: pink ribbon in the footer */
.pink-ribbon { position: relative; display: inline-flex; }
.pink-ribbon__btn {
  background: none; border: 0; padding: 2px; cursor: pointer; line-height: 0;
  transition: transform var(--dur-base) var(--ease-out);
}
.pink-ribbon__btn:hover { transform: rotate(-12deg) scale(1.2); }
.pink-ribbon__note {
  position: absolute; right: 0; bottom: calc(100% + 10px);
  width: 240px; padding: 10px 12px; border-radius: 10px;
  background: #fff; color: var(--brand-primary); font-size: 12px; line-height: 1.45;
  border: 1px solid #F8BBD0; box-shadow: var(--shadow-md);
  animation: pinkNoteIn 0.25s var(--ease-out);
}
.pink-ribbon__note--below { right: 0; left: auto; bottom: auto; top: calc(100% + 12px); z-index: 60; }
@keyframes pinkNoteIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Tweaks panel positioning
   ============================================================ */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  z-index: 100;
}

/* ============================================================
   Page-specific shared bits
   ============================================================ */
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--gray-100);
  color: var(--fg-2);
  border: 1px solid var(--border-1);
  font-family: var(--font-mono);
}

/* tiny rounded badge for prices, IDs, etc */
.price {
  font-weight: 700;
  font-size: 22px;
  color: var(--brand-primary);
  letter-spacing: -0.01em;
}
.price small { font-weight: 500; font-size: 12px; color: var(--fg-3); display: block; }

/* nice numeric stat */
.stat-num {
  font-size: clamp(40px, 4.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* table-of-contents link list */
.list-clean { list-style: none; padding: 0; margin: 0; }

/* product hero shape */
.shape-arc {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   Blog post markdown content
   ============================================================ */
.blog-content {
  font-size: 16px;
  line-height: 1.7;
}
.blog-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--brand-primary);
}
.blog-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--brand-primary);
}
.blog-content p {
  margin-bottom: 16px;
}
.blog-content figure { margin: 0; }
.blog-content img { max-width: 100%; height: auto; }
.blog-content .video-embed { position: relative; aspect-ratio: 16 / 9; margin: 32px 0; }
.blog-content .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-lg); }
.blog-content img[data-lb] { cursor: zoom-in; }
.blog-content img {
  margin: 32px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.blog-content ul, .blog-content ol {
  margin: 16px 0 16px 24px;
  line-height: 1.8;
}
.blog-content li {
  margin-bottom: 8px;
}
.blog-content blockquote {
  padding: 24px;
  margin: 32px 0;
  border-left: 4px solid var(--brand-accent);
  background: var(--brand-primary-soft);
  border-radius: var(--radius-md);
  font-style: italic;
}
.blog-content code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--gray-800);
}
.blog-content pre {
  background: var(--gray-100);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
}

/* ============================================================
   Animations & entrance effects
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.card {
  animation: fadeInUp 0.6s var(--ease-out) backwards;
}

.section:nth-child(n) .card:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(n) .card:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(n) .card:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(n) .card:nth-child(4) { animation-delay: 0.4s; }

/* ============================================================
   Mobile / Tablet Responsiveness
   ============================================================ */
.site-header__ribbon-mobile { display: none; margin-left: auto; }
.site-header__search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent;
  color: var(--fg-2); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.site-header__search:hover { background: var(--bg-soft, #f4f5f7); color: var(--brand-primary); }
.site-header__search--mobile { display: none; }
.site-header__search--mobile + .site-header__hamburger { margin-left: 0; }

/* Site search overlay */
body.search-open { overflow: hidden; }
.search-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(18, 52, 86, 0.55); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: searchFade 0.15s ease; }
@keyframes searchFade { from { opacity: 0; } to { opacity: 1; } }
.search-panel { width: 100%; max-width: 640px; background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); overflow: hidden; max-height: 76vh; display: flex; flex-direction: column; }
.search-panel__bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-1); color: var(--fg-3); }
.search-panel__bar input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 17px; color: var(--fg-1); background: transparent; min-width: 0; }
.search-panel__close { font: inherit; font-size: 11px; font-weight: 700; color: var(--fg-3); background: #f4f5f7; border: 1px solid var(--border-1); border-radius: 6px; padding: 3px 7px; cursor: pointer; }
.search-panel__body { overflow-y: auto; padding: 8px; }
.search-panel__label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); padding: 8px 8px 6px; }
.search-panel__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px 10px; }
.search-panel__empty { padding: 28px 16px; text-align: center; color: var(--fg-2); font-size: 15px; }
.search-panel__list { list-style: none; margin: 0; padding: 0; }
.search-result { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; }
.search-result.is-active { background: #eef3f9; }
.search-result__type { grid-row: 1 / span 2; align-self: start; margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-primary); background: #e3ebf5; border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
.search-result__title { font-weight: 700; color: var(--fg-1); font-size: 15px; }
.search-result__text { font-size: 13px; color: var(--fg-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.site-header__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-1);
  font-size: 24px;
  padding: 8px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  flex-direction: column;
  padding: 0;
  z-index: 10000;
  overflow-y: auto;
  padding-top: 72px;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.is-open {
  display: flex;
}

body.mobile-nav-open {
  overflow: hidden;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 28px;
  padding: 4px;
  color: var(--brand-primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav-close:active {
  transform: scale(0.95);
  opacity: 0.8;
}

.mobile-nav a {
  display: block;
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(18, 52, 86, 0.1);
  transition: all 0.2s ease-out;
}

.mobile-nav .mobile-nav__cta { display: grid; gap: 10px; padding: 20px 24px 4px; }
.mobile-nav .mobile-nav__cta a {
  margin: 0; padding: 14px 18px; border-radius: 10px; text-align: center;
  font-size: 15px; font-weight: 700; border: 1.5px solid var(--brand-primary);
}
.mobile-nav .mobile-nav__cta a.is-filled { background: var(--brand-primary); color: #fff; }
.mobile-nav .mobile-nav__cta a.is-outline { background: #fff; color: var(--brand-primary); }
.mobile-nav__group { border-bottom: 1px solid rgba(18, 52, 86, 0.1); }
.mobile-nav__group > .mobile-nav__row a { border-bottom: 0; flex: 1; }
.mobile-nav__row { display: flex; align-items: center; }
.mobile-nav__chev {
  background: none; border: 0; cursor: pointer; color: var(--brand-primary);
  padding: 18px 24px; line-height: 0;
}
.mobile-nav__chev svg { transition: transform 0.2s ease-out; }
.mobile-nav__chev.is-open svg { transform: rotate(180deg); }
.mobile-nav__sub { padding: 0 0 8px 12px; background: rgba(18, 52, 86, 0.03); }
.mobile-nav__desc { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--fg-3); }
.mobile-nav__sub a { padding: 12px 24px; font-size: 15px; font-weight: 500; border-bottom: 0; }

.mobile-nav a:hover,
.mobile-nav a:active {
  background: rgba(18, 52, 86, 0.08);
  padding-left: 28px;
}

@media (max-width: 900px) {
  /* section vertical padding */
  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .section-tight {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  /* 2-column inline grids that collapse */
  .col-2-to-1 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .col-2-to-1 > * { min-width: 0; }

  /* sidebar layouts */
  .sidebar-layout {
    grid-template-columns: 1fr !important;
  }

  /* hero sections */
  .hero-section {
    min-height: unset !important;
  }
}

@media (max-width: 640px) {
  /* hide desktop header elements */
  .site-header__nav {
    display: none;
  }

  .site-header__cta {
    display: none;
  }

  .site-header__ribbon-mobile { display: inline-flex; }
  .site-header__search--mobile { display: inline-flex; }

  /* "Okkur er treyst af" is desktop-only */
  .trust-bar { padding: 28px 0 30px; }
  .trust-bar + .section { padding-top: 40px; }
  .trust-bar__rows { display: none; }
  .trust-bar__marquee { display: block; overflow: hidden; margin: 0 calc(var(--gutter) * -1); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
  .trust-bar__track { display: flex; align-items: center; gap: 44px; width: max-content; padding-right: 44px; animation: trustScroll 55s linear infinite; }
  .trust-bar__track img { height: calc(var(--h) * 0.72); width: auto; opacity: 0.9; flex: none; }
  @media (prefers-reduced-motion: reduce) { .trust-bar__marquee { overflow-x: auto; } .trust-bar__track { animation: none; } }

  /* homepage hero: shorter on phones */
  .hero-dark {
    padding-top: 40px !important;
    padding-bottom: 48px !important;
  }
  .hero-dark .col-2-to-1 {
    gap: 28px !important;
  }
  .hero-dark .lede {
    font-size: 16px;
    margin-top: 16px !important;
  }
  .hero-dark .hero-visual {
    max-width: 250px !important;
  }

  /* tighter side gutters on phones */
  :root { --gutter: 20px; --hero-y: 40px; }

  /* consistent top spacing: every page's intro band starts 40px under the header */
  main > section.band-soft:first-child {
    padding-top: 40px !important;
    padding-bottom: 36px !important;
  }

  /* header: slimmer bar */
  .site-header__inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .site-header__logo img { height: 26px; }

  /* footer: compact — drop duplicated shortcuts (the drawer already has them) and the tagline */
  .site-footer {
    padding: 44px 0 24px;
  }
  .site-footer__inner {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .footer-tagline,
  .footer-shortcuts {
    display: none;
  }
  .site-footer h5 { margin-bottom: 10px; }
  .site-footer ul { gap: 6px; }
  .footer-newsletter { margin-top: 28px !important; }
  .footer-certs { padding-top: 28px !important; }
  .footer-certs { margin-top: 36px; }
  .footer-certs > div > div > div:first-child { margin-bottom: 14px !important; }
  .footer-certs__row { gap: 14px !important; }
  .footer-certs > div { flex-direction: column; align-items: flex-start !important; gap: 22px !important; }
  .footer-partners { text-align: left; }
  .footer-partners__row { justify-content: flex-start; gap: 22px; min-height: 0; }
  .footer-partner img { height: calc(var(--h) * 0.85); }
  .footer-cert-img { max-height: 48px !important; }
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 28px;
    padding-top: 18px;
  }

  /* EdicoVisit demo: let the frame grow with its content instead of clipping at 16:10 */
  .visit-mock-frame {
    aspect-ratio: auto !important;
    min-height: 380px;
  }
  .visit-mock-backdrop {
    inset: 8px -8px -8px 8px !important;
  }

  /* homepage stats: tidy 2x2 grid instead of ragged wrapping */
  .stats-band__items {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 32px 16px !important;
  }
  .stats-band__items .stat-num {
    font-size: 34px;
    white-space: nowrap;
  }

  /* mega-menus are desktop-only; the drawer replaces them on phones */
  .megamenu {
    display: none;
  }

  /* show hamburger */
  .site-header__hamburger {
    display: flex;
  }

  /* trust bar names */
  .trustbar-names {
    font-size: 16px !important;
  }

  /* reduce display heading minimum */
  .display {
    font-size: clamp(32px, 8vw, 72px) !important;
  }

  /* hide decorative shape blobs */
  .shape-arc {
    display: none !important;
  }

  /* footer layout */
  .site-footer__inner {
    grid-template-columns: 1fr !important;
  }
}
