/* ============================================================
   mensefulbase.digital — design system
   Palette inspired by Danish flag + AI tech aesthetic
   ============================================================ */

:root {
  /* Brand — Swedish flag palette */
  --red: #006AA7;          /* Swedish flag blue — kept variable name --red for backward compat */
  --red-deep: #00497A;
  --red-glow: rgba(0, 106, 167, 0.35);
  --yellow: #FECC00;       /* Swedish flag yellow — secondary accent */
  --yellow-deep: #D6AA00;

  /* Surfaces */
  --bg: #08101A;
  --bg-elev: #0E1824;
  --bg-card: #13202E;
  --bg-card-hover: #182838;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #F5F5F8;
  --text-dim: #B8B5C2;
  --text-mute: #7E7B88;

  /* Accents */
  --green: #4CDC82;
  --amber: #FFB84D;
  --blue: #78C8FF;

  /* Geometry */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  --shadow-lg: 0 30px 70px rgba(0,0,0,0.55);

  /* Typography */
  --font-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Segoe UI", system-ui, sans-serif;

  --container: 1240px;
}

/* ============================================================
   Reset + base
   ============================================================ */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--red); }
button { font-family: inherit; cursor: pointer; }
ul { padding-left: 1.2rem; }

/* Typography scale */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--text-dim); }
.lead { font-size: 1.15rem; color: var(--text-dim); max-width: 60ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; background: var(--red); display: inline-block;
}

/* ============================================================
   Layout helpers
   ============================================================ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; position: relative; }
.section.tight { padding: 4rem 0; }
.section.dark { background: var(--bg-elev); }
.grid { display: grid; gap: 1.5rem; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 11, 18, 0.78);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; letter-spacing: -0.02em; font-size: 1.15rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--red); position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; background: var(--yellow);
}
.brand-mark::before { left: 36%; top: 0; bottom: 0; width: 18%; transform: translateX(-50%); }
.brand-mark::after { top: 45%; left: 0; right: 0; height: 22%; transform: translateY(-50%); }
.brand-dot { color: var(--red); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: .75rem; }

.nav-toggle { display: none; background: transparent; border: 1px solid var(--border-strong); color: var(--text); border-radius: 8px; padding: .5rem .75rem; }

@media (max-width: 860px) {
  .nav-links { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; padding: 1.25rem 1.5rem; background: var(--bg-elev); border-bottom: 1px solid var(--border); display: none; gap: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-ghost { display: none; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 12px 30px var(--red-glow); }
.btn-primary:hover { background: #d61a3a; color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.btn-arrow::after {
  content: "→"; transition: transform .2s ease; display: inline-block;
}
.btn-arrow:hover::after { transform: translateX(3px); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding: 6rem 0 5rem;
  background:
    radial-gradient(80% 60% at 80% 30%, rgba(0,106,167,0.22), transparent 60%),
    radial-gradient(60% 50% at 10% 80%, rgba(254,204,0,0.06), transparent 70%),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4rem; align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.hero h1 .accent { color: var(--red); }
.hero .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero .trust { margin-top: 3rem; display: flex; gap: 2rem; flex-wrap: wrap; align-items: center; color: var(--text-mute); font-size: .85rem; }
.hero .trust strong { color: var(--text); font-weight: 600; }

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.45));
}
.hero-badge {
  position: absolute; left: 1.25rem; bottom: 1.25rem; z-index: 2;
  background: rgba(20,16,24,0.85); backdrop-filter: blur(10px);
  padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--border);
  display: flex; align-items: center; gap: .8rem; font-size: .85rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ============================================================
   Stats strip
   ============================================================ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-top: 4rem;
}
.stat { padding: 1.75rem 1rem; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat .n { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.stat .n .unit { color: var(--red); }
.stat .l { color: var(--text-mute); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-top: .25rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); } }

/* ============================================================
   Cards / features
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); background: var(--bg-card-hover); border-color: var(--border-strong); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(0,106,167,0.15); color: var(--yellow);
  display: grid; place-items: center; margin-bottom: 1rem;
  font-size: 1.25rem; font-weight: 700;
}
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; color: var(--text-dim); font-size: .95rem; }

/* Feature with image */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.feature.reverse { grid-template-columns: 1fr 1fr; }
.feature.reverse .feature-text { order: 2; }
.feature-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.feature-img img { width: 100%; height: auto; }
.feature ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.feature ul li {
  padding: .55rem 0 .55rem 1.8rem; color: var(--text-dim); position: relative;
  border-top: 1px solid var(--border);
}
.feature ul li:first-child { border-top: 0; }
.feature ul li::before {
  content: "✓"; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  color: var(--red); font-weight: 700;
}
@media (max-width: 920px) {
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 2rem; }
  .feature.reverse .feature-text { order: 0; }
}

/* ============================================================
   Process timeline
   ============================================================ */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; }
.process .step { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; position: relative; }
.process .step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  color: var(--red); font-weight: 700; font-size: .9rem; letter-spacing: .1em;
}
@media (max-width: 920px) { .process { grid-template-columns: 1fr; } }

/* ============================================================
   Pricing
   ============================================================ */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; position: relative; display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--red); box-shadow: 0 30px 60px rgba(0,106,167,0.22); }
.price-card.featured::before {
  content: "MOST POPULAR"; position: absolute; top: -12px; left: 2rem;
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  padding: .35rem .7rem; border-radius: 6px;
}
.price-card .price { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; }
.price-card .price small { font-size: 1rem; color: var(--text-mute); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 1.5rem 0; flex: 1; }
.price-card ul li { padding: .5rem 0 .5rem 1.5rem; color: var(--text-dim); position: relative; }
.price-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
@media (max-width: 920px) { .pricing { grid-template-columns: 1fr; } }

/* ============================================================
   Testimonials
   ============================================================ */
.quote {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; position: relative;
}
.quote::before { content: "“"; position: absolute; top: -10px; left: 1rem; font-size: 5rem; color: var(--red); line-height: 1; font-family: Georgia, serif; }
.quote p { font-size: 1.05rem; color: var(--text); }
.quote .who { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; color: var(--text-mute); font-size: .9rem; }
.quote .who .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--red-deep)); }

/* ============================================================
   FAQ
   ============================================================ */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq details summary {
  cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq details summary::after { content: "+"; color: var(--red); font-size: 1.5rem; line-height: 1; font-weight: 300; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .75rem; color: var(--text-dim); }
.faq details summary::-webkit-details-marker { display: none; }

/* ============================================================
   Forms
   ============================================================ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; color: var(--text-dim); font-weight: 500; }
.field input, .field textarea, .field select {
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: .85rem 1rem; font: inherit; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(0,106,167,0.22); }
.field textarea { min-height: 140px; resize: vertical; }
.checkbox-row { display: flex; align-items: flex-start; gap: .65rem; color: var(--text-dim); font-size: .9rem; margin: .5rem 0 1.5rem; }
.checkbox-row input { margin-top: .25rem; accent-color: var(--red); }
.form-note { font-size: .85rem; color: var(--text-mute); }

/* ============================================================
   CTA banner
   ============================================================ */
.cta-banner {
  background:
    radial-gradient(60% 80% at 80% 50%, rgba(0,106,167,0.5), transparent 60%),
    linear-gradient(135deg, var(--red-deep), #0a1426);
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ""; position: absolute; right: -100px; bottom: -100px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cta-banner h2 { margin: 0; max-width: 28ch; }
@media (max-width: 820px) { .cta-banner { flex-direction: column; align-items: flex-start; padding: 2.5rem 1.75rem; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #0A0810;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  color: var(--text-mute);
  font-size: .9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-grid h4 { color: var(--text); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: .3rem 0; }
.footer-grid a { color: var(--text-mute); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; border-top: 1px solid var(--border); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Page header (sub-pages)
   ============================================================ */
.page-header {
  padding: 4rem 0 2rem;
  background: radial-gradient(60% 50% at 20% 30%, rgba(0,106,167,0.18), transparent 65%), var(--bg);
  border-bottom: 1px solid var(--border);
}
.crumbs { color: var(--text-mute); font-size: .85rem; margin-bottom: 1rem; }
.crumbs a { color: var(--text-mute); }
.crumbs span { color: var(--red); }

/* Long-form content (privacy, terms, cookies) */
.prose { max-width: 76ch; }
.prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.5rem; font-size: 1.15rem; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { padding-left: 1.4rem; }
.prose strong { color: var(--text); }
.toc {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.toc h4 { margin: 0 0 .5rem; color: var(--text); }
.toc ol { color: var(--text-dim); padding-left: 1.25rem; margin: 0; }
.toc a { color: var(--text-dim); }
.toc a:hover { color: var(--red); }

/* ============================================================
   Contact page extras
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); display: flex; gap: 1rem; align-items: flex-start; }
.info-list li:last-child { border-bottom: 0; }
.info-list .label { color: var(--text-mute); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; min-width: 100px; }
.info-list .value { color: var(--text); }
.map-wrap {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-top: 1.5rem;
  aspect-ratio: 16 / 9; background:
    linear-gradient(135deg, #1d1923 25%, #161320 25%, #161320 50%, #1d1923 50%, #1d1923 75%, #161320 75%, #161320);
  background-size: 24px 24px;
  position: relative;
  display: grid; place-items: center; color: var(--text-mute); font-size: .85rem;
}
.map-pin {
  position: absolute; left: 56%; top: 48%;
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  background: var(--red);
  transform: rotate(-45deg);
  box-shadow: 0 8px 16px rgba(0,106,167,0.5);
}
.map-pin::after { background: var(--yellow) !important; }
.map-pin::after { content: ""; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }

/* ============================================================
   Cookie banner
   ============================================================ */
.cookie-banner {
  position: fixed; bottom: 1.25rem; left: 1.25rem; right: 1.25rem;
  max-width: 920px; margin: 0 auto;
  background: rgba(22, 19, 27, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: none; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; color: var(--text-dim); font-size: .9rem; flex: 1; min-width: 240px; }
.cookie-banner .btn { padding: .65rem 1.1rem; font-size: .9rem; }
.cookie-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 1100; padding: 1rem;
}
.cookie-modal-backdrop.show { display: flex; }
.cookie-modal {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-width: 560px; width: 100%; padding: 2rem; max-height: 85vh; overflow-y: auto;
}
.cookie-modal h3 { margin-top: 0; }
.cookie-option { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.cookie-option:first-of-type { border-top: 0; }
.cookie-option h4 { margin: 0 0 .25rem; }
.cookie-option p { margin: 0; color: var(--text-dim); font-size: .9rem; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #2a2632; border-radius: 999px; transition: background .2s ease; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s ease; }
.switch input:checked + .slider { background: var(--red); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:disabled + .slider { opacity: .6; cursor: not-allowed; }
.cookie-modal .actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp .7s ease forwards; }

/* ============================================================
   Utility
   ============================================================ */
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.text-mute { color: var(--text-mute); }
.text-red { color: var(--red); }
.divider { height: 1px; background: var(--border); margin: 3rem 0; }
.tag {
  display: inline-block; padding: .25rem .65rem; background: rgba(254,204,0,0.15);
  color: var(--yellow); font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  border-radius: 999px; text-transform: uppercase;
}

/* Focus accessibility */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}
