/* MailMe.dk - site styles. No external resources: fonts are served from /mm/fonts */

@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/familjen-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/familjen-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/familjen-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #14213D;
  --ink-2: #2B3A5C;
  --muted: #56617A;
  --paper: #F4F6FA;
  --white: #FFFFFF;
  --line: #D8DFEA;
  --red: #C8102E;
  --red-dark: #A00D25;
  --blue: #1F4FA3;
  --blue-dark: #173C7D;
  --focus: #1F4FA3;
  --ok: #1E6B45;

  --font: "Familjen Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);

  --radius-s: 6px;
  --radius-m: 12px;
  --wrap: 72rem;
  --airmail: repeating-linear-gradient(-45deg,
              var(--red) 0 12px, var(--white) 12px 20px,
              var(--blue) 20px 32px, var(--white) 32px 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */

.topstripe { height: 6px; background: var(--airmail); }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }

.nav-toggle { display: none; margin-left: auto; font: inherit; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0.45rem 0.8rem; cursor: pointer; }

.site-nav { margin-left: auto; }
.site-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.site-nav li { position: relative; }
.site-nav a, .site-nav summary { display: block; padding: 0.55rem 0.8rem; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-weight: 600; cursor: pointer; }
.site-nav a:hover, .site-nav summary:hover { background: var(--paper); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav summary { list-style: none; }
.site-nav summary::-webkit-details-marker { display: none; }
.site-nav summary::after { content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin-left: 0.45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.2em) rotate(45deg); }
.site-nav details[open] summary::after { transform: translateY(0.05em) rotate(-135deg); }
.site-nav .sub { list-style: none; margin: 0; padding: 0.4rem; position: absolute; top: calc(100% + 0.35rem); left: 0; min-width: 16rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 12px 32px rgba(20, 33, 61, 0.14); z-index: 20; }
.site-nav .sub a { font-weight: 400; white-space: nowrap; }
.site-nav .webmail-link { background: var(--ink); color: var(--white); margin-left: 0.5rem; }
.site-nav .webmail-link:hover { background: var(--ink-2); color: var(--white); }

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; margin: 0 0 1rem; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li { border-top: 1px solid var(--line); }
  .site-nav a, .site-nav summary { padding: 0.85rem 0.25rem; border-radius: 0; }
  .site-nav .sub { position: static; box-shadow: none; border: 0; padding: 0 0 0.5rem 1rem; min-width: 0; }
  .site-nav .sub a { white-space: normal; padding: 0.55rem 0.25rem; }
  .site-nav .webmail-link { margin: 0.75rem 0 0; text-align: center; border-radius: var(--radius-s); padding: 0.85rem; }
}

/* ---------- buttons & forms ---------- */

.btn { display: inline-block; font: inherit; font-weight: 600; line-height: 1.2; padding: 0.8rem 1.25rem; border-radius: var(--radius-s); border: 2px solid transparent; text-decoration: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.btn-quiet { background: none; color: var(--muted); border-color: var(--line); }
.btn-quiet:hover { color: var(--ink); border-color: var(--muted); }
.btn-danger { background: var(--ink); color: var(--white); }
.btn-danger:hover { background: var(--red-dark); color: var(--white); }
.btn-block { display: block; width: 100%; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field .hint { display: block; color: var(--muted); font-size: var(--step--1); margin-top: 0.3rem; }
input[type=text], input[type=password], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #B9C3D4; border-radius: var(--radius-s); padding: 0.7rem 0.8rem;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31, 79, 163, 0.35); outline-offset: 0; border-color: var(--blue); }

.with-domain { display: flex; align-items: stretch; }
.with-domain input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.with-domain span { display: flex; align-items: center; padding: 0 0.8rem; background: var(--paper); border: 1px solid #B9C3D4; border-left: 0; border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--muted); white-space: nowrap; }

.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }

.captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.captcha img { height: 28px; width: auto; }
.captcha input { width: 6rem; }

/* ---------- hero (front page) ---------- */

.hero { background: var(--white); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; align-items: center; padding-top: 4.5rem; padding-bottom: 4.5rem; }
.hero h1 { max-width: 13ch; }
.hero .lead { font-size: var(--step-1); color: var(--ink-2); max-width: 34rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero .since { margin-top: 2.25rem; color: var(--muted); font-size: var(--step--1); }

/* the envelope: airmail border around the login */
.envelope { background: var(--airmail); padding: 10px; border-radius: var(--radius-m); box-shadow: 0 24px 48px rgba(20, 33, 61, 0.16); transform: rotate(-1.2deg); }
.envelope-inner { background: var(--white); border-radius: 6px; padding: 1.75rem 1.75rem 1.5rem; transform: rotate(1.2deg); position: relative; }
.envelope h2 { font-size: var(--step-2); margin-bottom: 0.25rem; }
.envelope .intro { color: var(--muted); font-size: var(--step--1); margin-bottom: 1.25rem; }
.envelope h2, .envelope .intro { padding-right: 64px; }
.envelope .stamp { position: absolute; top: 1.1rem; right: 1.1rem; width: 52px; height: 60px; border: 2px dashed var(--line); border-radius: 4px; display: grid; place-items: center; color: var(--red); }
.envelope .below { margin: 1rem 0 0; font-size: var(--step--1); color: var(--muted); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2.75rem; padding-bottom: 3rem; }
  .envelope { transform: none; }
  .envelope-inner { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .envelope { animation: drop-in 0.7s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes drop-in { from { opacity: 0; transform: translateY(18px) rotate(-4deg); } to { opacity: 1; transform: rotate(-1.2deg); } }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 900px) {
  @keyframes drop-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* ---------- sections ---------- */

.section { padding: 4rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); font-size: var(--step-1); }

.featurelist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.featurelist li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.25rem 1rem; }
.featurelist svg { grid-row: span 2; color: var(--blue); margin-top: 0.15rem; }
.featurelist h3 { margin: 0; }
.featurelist p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .featurelist { grid-template-columns: 1fr; } }

/* plan comparison */
.plans { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.plans th, .plans td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.plans thead th { font-size: var(--step-1); }
.plans thead th small { display: block; font-weight: 400; color: var(--muted); font-size: var(--step--1); }
.plans thead th.super { background: var(--ink); color: var(--white); }
.plans thead th.super small { color: #C9D2E4; }
.plans tbody th { font-weight: 600; width: 34%; }
.plans td.super { background: #F7F9FD; font-weight: 600; }
.plans tfoot td { border-bottom: 0; }
.yes { color: var(--ok); font-weight: 600; }
.no { color: var(--muted); }
.price { font-size: var(--step-2); font-weight: 700; }
.price small, .price + small { font-size: var(--step--1); font-weight: 400; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .plans { font-size: var(--step--1); }
  .plans th, .plans td { padding: 0.65rem 0.6rem; }
  .plans thead th { font-size: var(--step-0); }
  .plans tbody th { width: 38%; }
  .plans .price { font-size: 1.1rem; }
  .plans .btn { padding: 0.6rem 0.7rem; font-size: var(--step--1); }
  .plans .btn { display: block; }
  .plans tfoot td { padding-top: 1rem; }
}

/* settings block */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.setbox { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem 1.5rem; }
.setbox h3 { margin-bottom: 0.75rem; }
.settings dl { margin: 0; }
.smallprint { margin-top: 1rem; color: var(--muted); font-size: var(--step--1); }
.after-settings { margin-top: 1.25rem; }
.settings .row { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.settings dt { color: var(--muted); }
.settings dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) { .settings { grid-template-columns: 1fr; } .settings .row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- inner pages ---------- */

.page-head { background: var(--white); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 2.5rem; padding-bottom: 2rem; }
.page-head h1 { font-size: var(--step-3); margin: 0; max-width: 30ch; }
.page-head .crumb { color: var(--muted); font-size: var(--step--1); margin-bottom: 0.5rem; }
.page-head .crumb a { color: var(--muted); }
.tag-super { display: inline-block; vertical-align: middle; margin-left: 0.6rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--ink); color: var(--white); font-size: var(--step--1); font-weight: 600; letter-spacing: 0; }

.page-body { padding: 2.5rem 0 4rem; }
.page-body .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 3rem; align-items: start; }
.page-body.single .wrap { grid-template-columns: minmax(0, 46rem); }
.prose { max-width: 40rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose code, .mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.92em; background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.5rem; }
.panel h2 { font-size: var(--step-1); margin-bottom: 1rem; }
.panel + .panel { margin-top: 1.5rem; }
.panel.warn { border-left: 4px solid var(--red); }

.note { background: #EEF3FB; border-left: 4px solid var(--blue); padding: 1rem 1.25rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 1.5rem 0; }
.note p:last-child { margin-bottom: 0; }
.danger-note { background: #FBEFF1; border-left-color: var(--red); }

.kv { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.kv th, .kv td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { font-weight: 400; color: var(--muted); width: 40%; }
.kv td { font-weight: 600; overflow-wrap: anywhere; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

.linkgroups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.linkgroups h2 { font-size: var(--step-1); }
.linkgroups ul { list-style: none; padding: 0; margin: 0; }
.linkgroups li { padding: 0.5rem 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .linkgroups { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .page-body .wrap { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: #C9D2E4; padding: 3rem 0 2rem; font-size: var(--step--1); }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: var(--white); font-size: var(--step-0); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer .fine { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #2E3D60; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer .brand { color: var(--white); margin-bottom: 0.75rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* WebMail login page */
.login-page { padding: 4rem 0 5rem; }
.login-page .envelope { max-width: 28rem; margin: 0 auto; }
.login-page h1 { font-size: var(--step-3); margin-bottom: 0.25rem; }
.login-page .envelope h1 { padding-right: 64px; }
