/* --- 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;outline:0;font:inherit;vertical-align:baseline;box-sizing: border-box;}
html {box-sizing: border-box;scroll-behavior: smooth;}
*, *::before, *::after {box-sizing: inherit;}
body {min-height:100%;background: #fff;color: #15171B;font-family: 'Roboto', Arial, Helvetica, sans-serif;font-size: 16px;line-height: 1.7;-webkit-font-smoothing:antialiased;}
img {max-width: 100%;display: block;height: auto;border: 0;}
ul, ol {list-style: none;}
a {text-decoration: none;color: inherit;transition: color .2s;}
button, input, select, textarea {font: inherit;background: none;border: none;outline: none;}
::-webkit-input-placeholder {color: #888;}
::-moz-placeholder {color: #888;}
:-ms-input-placeholder {color: #888;}
::placeholder {color: #888;}

/* --- BRAND VARIABLES (with fallbacks) --- */
:root {
  --primary: #15171B;
  --primary-dark: #101114;
  --brand-blue: #22314A;
  --gray90: #222326;
  --gray80: #44464B;
  --gray60: #8A8E96;
  --gray40: #B3B5B9;
  --gray20: #E4E6EA;
  --gray10: #F5F6F8;
  --secondary: #8DB59C;
  --accent: #F5F6F8;
  --white: #fff;
  --error: #C54141;
  --focus: #222326;
  --radius: 14px;
  --shadow: 0 2px 24px 0 rgba(34,49,74,0.08), 0 1.5px 8px 0 rgba(34,49,74,0.06);
  --focus-ring: 0 0 0 2px var(--secondary);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #fff;
    --gray90: #1E2024;
    --gray80: #313236;
    --gray60: #7C7E84;
    --gray40: #B3B5B9;
    --gray20: #E4E6EA;
    --gray10: #F5F6F8;
    --accent: #222326;
  }
  body {background: #15171B; color: #fff;}
}

/* --- TYPOGRAPHY --- */
h1, .h1 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height:1.1;
  margin-bottom: 24px;
  color: var(--gray90);
  letter-spacing: -1px;
}
h2, .h2 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 2rem;
  line-height:1.2;
  margin-bottom: 16px;
  color: var(--gray90);
}
h3, .h3 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height:1.25;
  margin-bottom: 8px;
  color: var(--gray80);
}
h4, .h4 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  margin-bottom: 5px;
  color: var(--gray60);
}
p, li {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-weight: 400;
  color: var(--gray80);
  font-size: 1rem;
}
strong, b {font-weight: 600;color: var(--gray90);}
em, i {font-style: italic;color: var(--gray60);}

@media (max-width:800px) {
  h1, .h1 {font-size:2rem;}
  h2, .h2 {font-size:1.5rem;}
}
@media (max-width:500px){
  h1, .h1 {font-size:1.4rem;}
  h2, .h2 {font-size:1.1rem;}
}

/* --- BASE LAYOUT CONTROLS --- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
}
.content-wrapper {
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom:0;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

/* --- HEADER & NAVIGATION --- */
header {
  background: var(--white);
  box-shadow: 0 2px 12px 0 rgba(34,49,74,0.04);
  border-bottom: 1px solid var(--gray20);
  padding:0;
  position: sticky;
  top:0;
  z-index: 60;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height:70px;
}
header img {
  height: 38px;
  margin-right: 20px;
}
.main-nav {
  display:flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  margin-left: 10px;
}
.main-nav a {
  font-family: 'Montserrat',Arial, Helvetica, sans-serif;
  font-weight: 400;
  color: var(--gray60);
  font-size:1rem;
  padding: 4px 4px 4px 2px;
  position: relative;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--brand-blue);
}
.button-primary,
.button-secondary {
  display:inline-block;
  min-width: 140px;
  text-align: center;
  font-family: 'Montserrat',Arial, Helvetica, sans-serif;
  font-weight: 500;
  font-size:1rem;
  border-radius: var(--radius);
  padding: 11px 30px;
  margin-left: 16px;
  transition: background .22s, color .22s, box-shadow .22s;
  cursor:pointer;
}
.button-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  box-shadow: var(--shadow);
  letter-spacing:0.02em;
}
.button-primary:hover, .button-primary:focus {
  background: var(--brand-blue);
  color: var(--secondary);
  box-shadow: 0 4px 24px 0 rgba(34,49,74,0.12);
}
.button-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
  letter-spacing: 0.01em;
}
.button-secondary:hover, .button-secondary:focus {
  background: var(--accent);
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
  display: none;
}
@media (max-width: 992px) {
  .main-nav { display: none; }
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    padding: 10px 14px;
    background: none;
    color: var(--primary);
    border: none;
    border-radius: 7px;
    margin-left: auto;
    transition: background .2s;
    z-index: 102;
  }
  .mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
    background: var(--accent);
    color: var(--brand-blue);
  }
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--white);
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 105;
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.67,.09,.32,.93);
  width: 100vw;
  height: 100vh;
  box-shadow: 0 6px 48px 0 rgba(34,49,74,0.13);
  padding: 0 0 0 0;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  display: inline-flex;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--primary);
  padding: 16px 18px;
  margin: 12px 0 0 14px;
  border-radius: 7px;
  align-self: flex-end;
  transition: background .16s;
  z-index: 110;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--accent);
  color: var(--brand-blue);
}
.mobile-nav {
  display:flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 26px 0 32px;
  margin-top: 10px;
}
.mobile-nav a {
  font-family: 'Montserrat',Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary);
  padding: 10px 6px;
  border-radius: 7px;
  width:100%;
  transition: background .2s, color .2s;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  background: var(--accent);
  color: var(--brand-blue);
}

@media (max-width:480px) {
  .mobile-nav {
    padding-left:16px; padding-right:6px;
  }
}

/* --- HERO & SECTION SPACING --- */
.hero {
  background: var(--accent);
  padding: 60px 0 38px 0;
  margin-bottom:44px;
  box-shadow: 0 2px 16px 0 rgba(34,49,74,0.05);
}
.hero .container {
  align-items: center;
}
.hero .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 720px;
  margin: 0 auto;
  text-align:left;
}
.hero h1 {color: var(--primary);margin-bottom:10px;}
.hero p {font-size:1.12rem; color: var(--gray80);margin-bottom:18px;}
@media (max-width:767px) {
  .hero { padding: 36px 0 22px 0;}
  .section {padding: 24px 8px; margin-bottom: 38px;}
}

/* --- FLEX LAYOUTS FOR CONTENT --- */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 28px 26px 22px 26px;
  min-width: 240px;
  max-width: 340px;
  flex: 1 1 260px;
  transition: box-shadow .18s, transform .22s;
  margin-bottom: 20px;
  border: 1px solid var(--gray20);
}
.feature-item:hover, .feature-item:focus-within {
  box-shadow: 0 6px 34px -3px rgba(34,49,74,.16);
  transform: translateY(-4px) scale(1.02);
}
.feature-item h3 {margin-top: 0;}
.feature-item img {width:42px;height:auto; margin-bottom:9px; opacity:0.82;}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0 28px 0;
}
.service-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 260px;
  padding: 24px 24px 18px 24px;
  background: var(--gray10);
  border-radius: var(--radius);
  box-shadow: 0 1.5px 8px 0 rgba(34,49,74,0.06);
  border: 1px solid var(--gray20);
  margin-bottom:20px;
  min-width: 220px;
  transition: box-shadow .16s, border .17s;
}
.service-block:hover {border-color:var(--brand-blue); box-shadow:0 4px 24px 0 rgba(34,49,74,.08);}

.blog-featured {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 16px 0 18px 0;
}
.blog-article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray20);
  flex: 1 1 240px;
  min-width: 220px;
  padding: 22px 20px 18px 20px;
  margin-bottom: 20px;
}

/* Testimonial card (clear readability & contrast) */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px 0 rgba(34,49,74,0.07);
  border: 1px solid var(--gray20);
  padding: 20px;
  margin-bottom: 20px;
  max-width:700px;
  color: var(--gray90);
  font-size:1.08rem;
  transition: box-shadow .18s, border .16s;
}
.testimonial-card:hover, .testimonial-card:focus-within {
  box-shadow: 0 6px 34px -3px rgba(34,49,74,.13);
  border-color: var(--brand-blue);
}
.testimonial-info strong {color: var(--brand-blue);display:block;margin-bottom:2px;}
.testimonial-info span {color: #F9BA46;letter-spacing:1.2px;font-size:1.1rem; display:inline-block; margin-top:3px;}

@media (max-width: 1024px) {
  .features-grid, .services-list, .blog-featured {flex-direction: column; gap: 20px;}
  .feature-item, .service-block, .blog-article {max-width: unset;}
}

/* --- Universal card container (for gallery, blog etc) --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray20);
  position: relative;
  transition: box-shadow .16s, border .14s;
  padding: 24px 18px;
  min-width: 220px;
  flex: 1 1 240px;
}
.card:hover {
  box-shadow: 0 8px 38px -4px rgba(34,49,74,0.14);
  border-color: var(--brand-blue);
}

/* Generic content grid helper */
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.text-section, .next-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

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

/* --- LISTS AND LINKS --- */
ul, ol {
  padding-left: 1.4em;
  margin-bottom: 12px;
}
ul li {
  margin-bottom: 6px;
  position: relative;
  color: var(--gray80);
}
ul li::before {
  content: '\2022';
  display: inline-block;
  margin-right: 9px;
  color: var(--secondary);
  font-weight: bold;
}
ul li strong {margin-right: 2px; color: var(--gray90);}

.text-section ul, .content-wrapper ul {padding-left: 1.2em;}
.text-section li {margin-bottom: 6px;}

/* --- FOOTER --- */
footer {
  background: var(--primary);
  color: var(--accent);
  padding: 36px 0 12px 0;
  border-top: 2px solid var(--gray20);
}
footer .container {flex-direction: column; align-items: center;gap: 16px;}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--gray40);
}
.footer-brand img {height:36px;filter:brightness(96%);}
.footer-nav {
  display:flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1rem;
}
.footer-nav a {
  color: var(--gray40);
  transition: color .14s;
}
.footer-nav a:hover, .footer-nav a:focus {color: var(--secondary);text-decoration: underline;}

/* --- FORMS & INPUTS (for contact page/forms) --- */
input, textarea, select {
  background: var(--gray10);
  border: 1.5px solid var(--gray40);
  color: var(--primary);
  border-radius: 8px;
  padding: 10px 13px;
  margin-bottom: 12px;
  font-size: 1rem;
  transition: border .18s, box-shadow .16s;
}
input:focus, textarea:focus, select:focus {
  border:1.5px solid var(--brand-blue);
  box-shadow: var(--focus-ring);
  outline:none;
}
label {font-size: 1rem; font-family: 'Montserrat',sans-serif; font-weight:500; color:var(--gray90); margin-bottom:6px;}

/* --- Cookie Consent Banner --- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3000;
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 -2px 16px 0 rgba(34,49,74,0.09);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
  padding: 24px 32px;
  font-size:1rem;
  opacity: 0; pointer-events: none; transform: translateY(50px); transition: opacity .23s, transform .26s;
}
.cookie-banner.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.cookie-banner .cookie-buttons {
  display:flex;
  flex-direction: row;
  gap:16px;
  align-items: center;
}
.cookie-banner button {
  padding: 8px 22px;
  font-family:'Montserrat',sans-serif;
  font-size: 1rem;
  border-radius: 7px;
  border: none;
  cursor:pointer;
  font-weight: 500;
  transition: background .16s, color .16s;
}
.cookie-banner .accept-btn {
  background: var(--secondary);
  color: var(--primary);
}
.cookie-banner .accept-btn:hover, .cookie-banner .accept-btn:focus {
  background: var(--brand-blue);
  color: var(--white);
}
.cookie-banner .reject-btn {
  background: var(--gray10);
  color: var(--primary);
  border: 1px solid var(--gray20);
}
.cookie-banner .reject-btn:hover, .cookie-banner .reject-btn:focus {
  background: var(--white);
}
.cookie-banner .settings-btn {
  background: none;
  color: var(--secondary);
  text-decoration: underline;
  border: none;
}
.cookie-banner .settings-btn:hover, .cookie-banner .settings-btn:focus {
  color: var(--white);
}
@media (max-width:600px){
  .cookie-banner{flex-direction:column;align-items:flex-start;gap:12px;padding:18px 10px;}
  .cookie-banner .cookie-buttons{gap:7px;}
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  left: 50%; top:50%;
  transform: translate(-50%,-50%) scale(0.96);
  z-index: 3100;
  background: var(--white);
  color: var(--primary);
  min-width: 320px;
  max-width:420px;
  border-radius: var(--radius);
  box-shadow: 0 4px 50px 0 rgba(34,49,74,0.12);
  opacity:0;
  pointer-events:none;
  transition: opacity .17s, transform .22s;
  padding:36px 28px 26px 28px;
  display:flex; flex-direction:column; gap:22px;
}
.cookie-modal.active {
  opacity:1; pointer-events:auto; transform:translate(-50%,-50%) scale(1);
}
.cookie-modal h2 {margin-bottom:10px; color:var(--brand-blue);}
.cookie-categories {
  display: flex; flex-direction: column; gap: 16px;
}
.cookie-category {
  display: flex; flex-direction: row; align-items: center; gap: 13px;
  padding: 8px 0;
}
.cookie-category label {
  flex:1; font-size:1rem; color: var(--primary);
}
.cookie-toggle {
  width: 38px; height: 20px;
  background: var(--gray20);
  border-radius:14px; position:relative;
  cursor:pointer; display:inline-block;
  transition: background .13s;
}
.cookie-toggle input {
  display:none;
}
.cookie-toggle span {
  position:absolute; top:2px; left:2px;
  width:16px;height:16px;
  border-radius:50%;
  background: var(--gray60);
  transition: left .16s, background .13s;
}
.cookie-toggle input:checked + span {
  left:20px;
  background: var(--secondary);
}
.cookie-modal .modal-actions {
  display:flex; gap:14px; align-items:center; justify-content:flex-end; margin-top:18px;
}
.cookie-modal button {
  padding: 8px 22px;
  border-radius: 7px;
  font-family:'Montserrat',sans-serif;
  font-size: 1rem;
  font-weight: 500;
}
.cookie-modal .save-btn {
  background: var(--secondary);
  color: var(--primary);
}
.cookie-modal .cancel-btn {
  background: var(--gray10);
  color: var(--primary);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 800px) {
  header .container{padding:0 10px;gap:13px;}
  .footer-brand img{height:26px;}
  .section {margin-bottom: 38px;}
}
@media (max-width: 680px) {
  .container{padding:0 7px;}
  header img {height: 30px;}
}

div[role="dialog"], .cookie-modal {outline: 3px solid var(--secondary); outline-offset: 2px;}

/* --- MICRO INTERACTIONS --- */
a, .button-primary, .button-secondary, button, .feature-item, .card, .testimonial-card, .service-block, .mobile-nav a {
  transition: all .17s cubic-bezier(.65,.05,.47,.88);
}

/* --- HELPER CLASSES --- */
.hide {display: none;}
.visually-hidden {position: absolute;white-space: nowrap;width: 1px;height: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);border: 0;padding: 0;margin: -1px;}

/* --- OVERLAY backdrop for modal --- */
.overlay-backdrop {
  content: '';
  position: fixed; left:0;top:0;right:0;bottom:0;
  z-index: 3099;
  background:rgba(22,26,30,0.47);
  opacity:0; pointer-events:none;
  transition: opacity .22s;
}
.overlay-backdrop.active {opacity:1; pointer-events:auto;}

/* --- Misc Elements --- */
.next-steps ul {margin-bottom:12px;}
.next-steps li {color:var(--gray80);}

/* --- Highlighted links in content --- */
.text-section a, .content-wrapper a:not(.button-primary):not(.button-secondary) {
  color: var(--brand-blue);
  text-decoration: underline;
  transition: color .13s;
}
.text-section a:hover, .content-wrapper a:hover {
  color: var(--secondary);
}

/* --- Icon List (for contact sections etc.) --- */
.text-section ul img, ul img {
  width: 1.3em; height:1.3em; margin-right:8px; vertical-align:middle; display:inline-block;
  filter:grayscale(1) contrast(1.3);
}

/* --- Accessibility Focus Styles --- */
a:focus, button:focus, input:focus, [tabindex]:focus {
  outline:2px solid var(--secondary);
  outline-offset: 1.5px;
}

/* --- Prevent accidental overlaps: ensure minimum margins between cards/sections --- */
.section, .card-container, .features-grid, .card, .testimonial-card, .service-block, .feature-item, .blog-article {margin-bottom: 20px !important;}

/* --- Prevent overlapping on mobile --- */
@media (max-width:500px){
  .feature-item, .service-block, .card, .testimonial-card, .blog-article {padding: 12px 7px 10px 7px;}
  h1, .h1 {font-size: 1.3rem;}
}
