/* CSS RESET & NORMALIZE  */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  box-sizing: border-box;
}
ol, ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* ============== NATURE ORGANIC BRAND VARIABLES ============== */
:root {
  --primary: #264653;         /* Mörk maringrön */
  --secondary: #2A9D8F;       /* Frisk bladgrön */
  --accent: #F4A261;          /* Sand/träsvartorange */
  --earth-bg: #fafaf6;        /* Varmt ljus bakgrund */
  --muted-green: #7AC79B;     /* Naturgrön, mild för element */
  --stone: #e3e3d7;           /* Varm ljusgrå-beige */
  --wood: #d2ba99;            /* Träbrun pastell */
  --card-shadow: 0 3px 12px rgba(90, 81, 51, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Open Sans', Arial, Helvetica, sans-serif;
  --focus-outline: 2px solid var(--accent);
}

body {
  background: var(--earth-bg);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 16px;
}

/* TYPOGRAPHY */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.11;
}
h1 { font-size: 2.5rem; margin-bottom: 24px;}
h2 { font-size: 2rem; margin-bottom: 20px;}
h3 { font-size: 1.5rem; margin-bottom: 12px;}
h4 { font-size: 1.2rem; margin-bottom: 10px;}
p, ul, li {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 12px;
}
strong, b { color: var(--primary); font-weight: 700; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.15rem; }
}

/* LINK STYLES */
a {
  color: var(--secondary);
  transition: color 0.2s;
}
a:hover, a:focus {
  color: var(--accent);
  outline: none;
}

/* LAYOUT & CONTAINERS */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  background: transparent;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0;
}

.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 768px) {
  .section, section {
    padding: 30px 10px;
    margin-bottom: 36px;
  }
  .container {
    padding: 0 10px;
  }
}

/* FLEXBOX BASED ALIGNMENTS */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  min-width: 270px;
  max-width: 350px;
  padding: 24px;
  transition: box-shadow 0.22s;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(90, 81, 51, 0.13);
}

.content-grid, .features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.features-grid > div {
  background: var(--stone);
  border-radius: var(--radius-lg);
  padding: 24px;
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 340px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transition: box-shadow 0.2s;
}
.features-grid > div:hover {
  box-shadow: 0 6px 24px rgba(90,81,51,0.15);
}

@media (max-width: 900px) {
  .features-grid, .content-grid {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .features-grid > div, .card {
    max-width: 100%;
    min-width: 0;
  }
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 28px 20px 24px;
  background: #fff;
  border-radius: var(--radius-md) var(--radius-sm) var(--radius-lg) var(--radius-sm);
  box-shadow: 0 3px 12px rgba(42, 157, 143, 0.09);
  margin-bottom: 24px;
  border-left: 5px solid var(--secondary);
  transition: box-shadow 0.22s, border 0.22s;
}
.testimonial-card:hover {
  border-left: 5px solid var(--accent);
  box-shadow: 0 8px 28px rgba(42, 157, 143, 0.14);
}
.testimonial-meta {
  font-size: 0.97rem;
  color: var(--secondary);
  font-weight: 600;
}
.stars {
  color: var(--accent);
  font-size: 1.2rem;
  letter-spacing: 2px;
}
/* Dark text on light background for testimonials (critical contrast) */
.testimonial-card, .testimonial-card * {
  color: var(--primary) !important;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.module-list ul, .faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

/* HERO SECTION */
.hero {
  background: linear-gradient(110deg, var(--wood) 17%, var(--earth-bg) 70%);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 6px 36px rgba(38, 70, 83, 0.08);
  margin-bottom: 68px !important;
  padding: 48px 0 48px 0;
}
.hero .container {
  align-items: center;
  justify-content: center;
}
.hero .content-wrapper {
  align-items: flex-start;
  padding: 0 0 0 0;
  gap: 26px;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero {
    padding: 26px 0 26px 0;
    margin-bottom: 28px !important;
  }
  .hero .content-wrapper {
    text-align: left;
    align-items: flex-start;
  }
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9em 2.2em;
  font-family: var(--font-display);
  font-size: 1.13rem;
  font-weight: 600;
  color: #fff;
  background: var(--secondary);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(42, 157, 143, 0.11);
  cursor: pointer;
  transition: background 0.19s, box-shadow 0.18s, color 0.18s, transform 0.16s;
  margin-top: 8px;
  margin-bottom: 8px;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--accent);
  color: var(--primary);
  box-shadow: 0 5px 16px rgba(244, 162, 97, 0.19);
  outline: var(--focus-outline);
  transform: translateY(-2px) scale(1.03);
}

/* NAVIGATION */
header {
  background: #fff;
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 31;
  box-shadow: 0 2px 16px rgba(38, 70, 83, 0.05);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
header img {
  height: 44px;
}
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--font-display);
  font-size: 1.07rem;
}
nav a {
  color: var(--primary);
  opacity: 0.86;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  transition: background 0.14s, color 0.16s;
}
nav a:hover, nav a:focus {
  background: var(--wood);
  color: var(--secondary);
  opacity: 1;
}
header .btn-primary {
  margin: 0 0 0 20px;
}
.mobile-menu-toggle {
  display: none;
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 2.2rem;
  padding: 8px 18px 8px 18px;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.14s, color 0.20s;
  box-shadow: 0 1px 6px rgba(42,157,143,0.11);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--accent);
  color: var(--primary);
  outline: var(--focus-outline);
}

/* MOBILE MENU STYLES */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(38,70,83,0.96);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transform: translateX(-100%);
  transition: transform 0.36s cubic-bezier(.47,1.64,.41,.8);
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: all;
}
.mobile-menu-close {
  margin: 30px 24px 14px 0;
  background: var(--earth-bg);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 2.2rem;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.18s, color 0.22s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--accent);
  color: #fff;
  outline: var(--focus-outline);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-end;
  width: 100%;
  padding: 10px 34px;
  margin-top:16px;
}
.mobile-nav a {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.33rem;
  font-weight: 700;
  background: none;
  text-align: right;
  border-radius: var(--radius-md);
  padding: 10px 0;
  width: fit-content;
  transition: background 0.15s, color 0.19s;
  outline: none;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--secondary);
  color: var(--primary);
}

@media (max-width: 1050px) {
  nav {
    gap: 12px;
  }
}
@media (max-width: 900px) {
  header .container { flex-wrap: wrap; gap: 12px; }
  nav { gap: 10px; }
}
@media (max-width: 850px) {
  nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
}

/* ========== FOOTER ========== */
footer {
  background: var(--primary);
  color: #fff;
  padding: 56px 0 20px 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: 80px;
  box-shadow: 0 -4px 24px rgba(90,81,51,0.11);
}
footer .container {
  gap: 38px;
}
.footer-nav, .footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
}
.footer-nav a {
  color: var(--stone);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  opacity:0.93;
  transition: background 0.13s, color 0.15s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--accent);
  background: var(--secondary);
  opacity: 1;
}
.footer-contact {
  gap:32px;
  font-size: 1.03rem;
  color: var(--stone);
  align-items: center;
}
.footer-contact img {
  height: 20px;
  margin-right: 7px;
  vertical-align: middle;
  margin-bottom: 2px;
}
.footer-copy {
  font-size: 0.97rem;
  opacity: 0.75;
  margin-top: 8px;
  font-family: var(--font-body);
}

@media (max-width: 700px) {
  footer .container {
    gap:18px;
    padding: 0 4px;
  }
  .footer-nav, .footer-contact {gap:14px;flex-direction:column;align-items: flex-start;}
  .footer-contact {gap:10px;}
}

/* ========== LISTS & FAQ ========== */
ul, .module-list ul {
  padding-left: 0;
  margin-left: 0;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
ul li, .module-list ul li {
  position: relative;
  padding-left: 26px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--primary);
}
ul li:before, .module-list ul li:before {
  content: "";
  display: inline-block;
  position: absolute;
  left: 4px;
  top: 10px;
  width: 10px; height: 10px;
  background: var(--muted-green);
  border-radius: 50%;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
}
.faq-list h2 {
  font-size: 1.22rem;
  margin-bottom: 0px;
  color: var(--secondary);
}
.faq-list p {
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--primary);
}

/* ========== MISC & ORGANIC SHAPES ========== */
/* Organic soft corners, subtle textures */
.features-grid > div, .card, .testimonial-card, .section, section, .content-wrapper {
  border-radius: var(--radius-lg) var(--radius-md) var(--radius-lg) var(--radius-lg);
}

/* Add subtle pattern using CSS bg on cards (for organic/nature feel) */
.features-grid > div {
  background-image: repeating-linear-gradient(120deg, rgba(42, 157, 143, 0.05) 0px, transparent 18px, transparent 28px);
}

/* ========== FORM & INPUTS (generic, for kontakt/thank-you) ========== */
input, textarea, select {
  border: 1.5px solid var(--stone);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  padding: 11px 13px;
  font-size: 1rem;
  margin-bottom: 14px;
  background: #fff;
  color: var(--primary);
  transition: border .15s, box-shadow .17s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--secondary);
  box-shadow: 0 2px 8px rgba(42,157,143,0.12);
  outline: none;
}

/* ========== COOKIE CONSENT BANNER ========== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  background: var(--wood);
  color: var(--primary);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  box-shadow: 0 -2px 16px rgba(38,70,83,0.18);
  gap: 30px;
  font-size: 1rem;
  font-family: var(--font-body);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .4s cubic-bezier(.44,1.19,.66,1),transform .4s cubic-bezier(.44,1.19,.66,1);
}
.cookie-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%);
}
.cookie-banner .cookie-btns {
  display: flex;
  flex-direction: row;
  gap:14px;
}
.cookie-banner button {
  font-family: var(--font-display);
  font-size: 1rem;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-left: 0;
  margin-right: 0;
  transition: background 0.17s, color 0.15s, box-shadow 0.18s;
}
.cookie-accept {
  background: var(--secondary);
  color: #fff;
}
.cookie-accept:hover, .cookie-accept:focus {
  background: var(--accent);
  color: var(--primary);
  outline: var(--focus-outline);
}
.cookie-reject {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--secondary);
}
.cookie-reject:hover, .cookie-reject:focus {
  background: var(--earth-bg);
  color: var(--accent);
  outline: var(--focus-outline);
}
.cookie-settings {
  background: var(--accent);
  color: var(--primary);
}
.cookie-settings:hover, .cookie-settings:focus {
  background: var(--secondary);
  color: #fff;
  outline: var(--focus-outline);
}

/* COOKIE MODAL DIALOG */
.cookie-modal-overlay {
  position: fixed;
  top: 0;left: 0;width: 100vw; height: 100vh;
  z-index: 200;
  background: rgba(38,70,83,0.64);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: all;
  transition: opacity .38s cubic-bezier(.44,1.19,.66,1);
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: var(--earth-bg);
  color: var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(38,70,83,0.16);
  padding: 32px 32px 24px 32px;
  min-width: 320px;
  max-width: 410px;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}
.cookie-modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: transparent;
  color: var(--primary);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  transition: color .2s;
  padding: 4px 8px;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--accent);
  outline: var(--focus-outline);
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.cookie-category input[type=checkbox] {
  accent-color: var(--secondary);
  width: 20px; height: 20px;
}
.cookie-category label {
  font-size: 1rem;
}
.cookie-category.essential label {
  font-weight: 600;
}
.cookie-category.essential input {
  display: none;
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 650px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 10px;
    gap: 16px;
  }
  .cookie-modal {
    min-width: 98vw;
    max-width: 98vw;
    padding: 20px 8px 14px 8px;
  }
}

/* RESPONSIVE: GENERAL */
@media (max-width: 700px) {
  .card, .features-grid > div {
    padding: 16px;
  }
  .section, section {
    padding: 15px 2px;
  }
}

/* MICRO-ANIMATIONS */
.btn-primary, .cookie-banner button, .mobile-menu-toggle, .mobile-menu-close, .mobile-nav a, .card, .testimonial-card, .features-grid > div {
  transition: box-shadow 0.18s, background 0.18s, color 0.18s, transform 0.17s, opacity 0.17s;
}
.btn-primary:active, .cookie-banner button:active, .mobile-menu-toggle:active, .mobile-menu-close:active, .mobile-nav a:active {
  transform: scale(0.97);
}

/* SCROLLBAR STYLING (subtle organic) */
body {
  scrollbar-width: thin;
  scrollbar-color: var(--muted-green) var(--earth-bg);
}
body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-thumb {
  background: var(--muted-green);
  border-radius: 12px;
}
body::-webkit-scrollbar-track {
  background: var(--earth-bg);
}

/* ========== UTILITIES ========== */
.hide { display: none !important; }
.section-heading {margin-bottom:24px;}
.text-section {margin-bottom:18px;}
.stars {user-select: none;pointer-events: none;}

/* ========== FOCUS STYLES ========== */
a:focus, .btn-primary:focus, button:focus {
  outline: var(--focus-outline);
  outline-offset: 3px;
}

/* ========== THANK YOU PAGE STYLES ========== */
.thankyou-message { font-size:1.12rem;margin-bottom:18px;}

/* Overlap PREVENTION (critical) */
.section > *, section > *, .content-wrapper > * {
  margin-bottom: 20px;
}
.section > *:last-child, .content-wrapper > *:last-child { margin-bottom: 0; }

/* Prevent overlapping near bottom nav, on mobile */
@media (max-width: 550px) {
  footer {
    padding-bottom: 60px;
  }
  .cookie-banner { font-size:0.93rem; }
}
