/* MailGenerator 2026 – komponent-CSS med fuld syntaks.
   Deklarationsregler ligger som Etch style records pr. klasse.
   Her: pseudo-elementer, states, responsiv, mobilmenu og reduced motion. */

html { scroll-behavior: smooth; }

/* Kicker-streg */
.mg-kicker::before {
  content: "";
  inline-size: 2.2rem;
  block-size: 2px;
  background: var(--primary);
  flex: none;
}
.mg-kicker--invert::before { background: var(--primary-light); }

/* Flueben (mask, farve via background-color) */
.mg-checkitem::before {
  content: "";
  inline-size: 1rem;
  block-size: 1rem;
  flex: none;
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m2.5 8.5 3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m2.5 8.5 3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mg-checkitem--band::before {
  background-color: var(--primary-light);
  transform: translateY(2px);
}

/* Billede-ikon i editor-mock (følger currentColor) */
.mg-editor-mock__block--image::after {
  content: "";
  inline-size: 26px;
  block-size: 26px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='2' y='4' width='22' height='18' rx='2' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Ccircle cx='9' cy='11' r='2' fill='%23000'/%3E%3Cpath d='m4 20 6-6 4 4 4-4 4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='2' y='4' width='22' height='18' rx='2' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Ccircle cx='9' cy='11' r='2' fill='%23000'/%3E%3Cpath d='m4 20 6-6 4 4 4-4 4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Frimærkekant */
.mg-stamp::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed rgb(255 255 255 / 0.75);
  border-radius: 2px;
  pointer-events: none;
}

/* Kuvert-ikon i afsluttende CTA (følger currentColor) */
.mg-final-cta__icon::before {
  content: "";
  inline-size: 72px;
  block-size: 54px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Crect x='1' y='1' width='32' height='24' rx='2.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M2 3.5 17 14.5 32 3.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Crect x='1' y='1' width='32' height='24' rx='2.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M2 3.5 17 14.5 32 3.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Poststempel-størrelse */
.mg-postmark svg { inline-size: clamp(11rem, 20vw, 13.75rem); block-size: auto; }

/* States (farver/baggrund/border ejes nu af ACSS button-workflow; her kun effekter) */
.mg-button--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--primary) 60%, transparent); }
.mg-button--primary:active { transform: translateY(0); }
.mg-header__menu-link:hover { color: var(--primary-semi-dark); border-bottom-color: var(--primary); }
.mg-footer__menu-link:hover { color: var(--primary-semi-dark); border-bottom-color: var(--primary); }
.mg-feature-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--box-shadow-1); }
.mg-skip-link:focus { inset-block-start: 0; }

/* Burger til kryds */
.mg-nav-toggle[aria-expanded="true"] .mg-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mg-nav-toggle[aria-expanded="true"] .mg-nav-toggle__bar:nth-child(2) { opacity: 0; }
.mg-nav-toggle[aria-expanded="true"] .mg-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Tablet */
@media (max-width: 56rem) {
  .mg-hero__grid { grid-template-columns: 1fr; }
  .mg-hero__visual { max-inline-size: 26rem; }
  .mg-gdpr__grid { grid-template-columns: 1fr; justify-items: start; }
}

/* Mobil + mobilmenu */
@media (max-width: 46rem) {
  .mg-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    min-inline-size: 44px;
    min-block-size: 44px;
    cursor: pointer;
  }
  .mg-header__nav {
    position: absolute;
    inset-block-start: var(--header-height);
    inset-inline: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.8rem 1.25rem 1.4rem;
    background: var(--base);
    border-block-end: var(--border-width) solid var(--neutral-light);
    box-shadow: var(--box-shadow-1);
  }
  .mg-header__nav.open { display: flex; }
  .mg-header__menu { flex-direction: column; gap: 0.2rem; }
  .mg-header__menu-link {
    display: block;
    padding: 0.7rem 0.2rem;
    border-block-end: var(--border-width) solid var(--neutral-light);
    min-height: 44px;
  }
  .mg-header__menu-link:hover { border-bottom-color: var(--primary); }
  .mg-header__cta { margin-block-start: var(--space-xs); }
  .mg-trust__grid { grid-template-columns: 1fr; gap: var(--grid-gap); }
  .mg-feature-grid { grid-template-columns: 1fr; }
  .mg-stamp { inline-size: 5.2rem; block-size: 6.1rem; font-size: 0.8rem; inset-block-start: -1.2rem; inset-inline-end: 0; }
  .mg-editor-mock { transform: none; }
  .mg-button { min-height: 44px; }
}

/* Reduced motion: transition/animation/scroll ejes globalt af ACSS; her kun statiske rotationer */
@media (prefers-reduced-motion: reduce) {
  .mg-editor-mock, .mg-stamp { transform: none; }
}
