/* --- CSS RESET & NORMALIZATION --- */
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;
  box-sizing: border-box;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.6;
  font-family: 'Roboto', Arial, sans-serif;
  background: #fff;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, picture {
  max-width: 100%;
  display: block;
}
ul, ol {
  list-style: none;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}


/* --- BRAND TYPOGRAPHY --- */
:root {
  --display-font: 'Montserrat', Arial, Helvetica, sans-serif;
  --body-font: 'Roboto', Arial, sans-serif;
  --primary: #222;
  --secondary: #444;
  --accent: #fff;
  --gray-light: #f6f6f6;
  --gray-med: #e0e0e0;
  --gray-dark: #929292;
  --monochrome-black: #181818;
  --monochrome-white: #fff;
  --monochrome-gray-1: #222;
  --monochrome-gray-2: #444;
  --monochrome-gray-3: #6E6E6E;
  --brand-primary: #224155;
  --brand-secondary: #78C195;
  --brand-accent: #F6F8F3;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--monochrome-black);
}
h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--monochrome-black);
}
h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--monochrome-black);
}
h3 {
  font-size: 1.25rem;
  color: var(--monochrome-gray-2);
}
.subheadline {
  color: var(--monochrome-gray-3);
  font-size: 1.125rem;
  margin-bottom: 24px;
  font-family: var(--body-font);
}
p, li, blockquote, label {
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--monochrome-gray-2);
  margin-bottom: 0.7em;
}
strong {
  color: var(--monochrome-black);
  font-weight: bold;
}

/* --- LAYOUT & CONTAINER --- */
.container {
  max-width: 1200px;
  padding: 0 20px;
  margin: 0 auto;
  width: 100%;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--accent);
  border-radius: 28px;
  box-shadow: 0 1px 8px 0 rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
section.hero {
  background: var(--monochrome-black);
  color: var(--monochrome-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
section.hero h1, section.hero h2, section.hero p, section.hero .subheadline {
  color: var(--monochrome-white);
}
section.hero .btn-primary {
  background: var(--monochrome-white);
  color: var(--monochrome-black);
  border: 2px solid var(--monochrome-white);
}
section.hero .btn-primary:hover {
  background: transparent;
  color: var(--monochrome-white);
  border-color: var(--monochrome-white);
}

@media (max-width: 900px) {
  section, .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 600px) {
  section {
    padding: 28px 8px;
    margin-bottom: 28px;
    border-radius: 14px;
  }
}

/* --- FLEX UTILITIES (MANDATORY CLASSES) --- */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--monochrome-white);
  border-radius: 16px;
  box-shadow: 0 2px 8px 0 rgba(34,34,34,0.08);
  padding: 24px;
  min-width: 260px;
  flex: 1 1 280px;
  transition: box-shadow 0.3s;
}
.card:hover {
  box-shadow: 0 6px 24px 0 rgba(34,34,34,0.16);
  z-index: 2;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--gray-light);
  border-radius: 18px;
  box-shadow: 0 1px 4px 0 rgba(34,34,34,0.08);
  margin-bottom: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--monochrome-white);
  padding: 18px 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 1px 6px 0 rgba(34,34,34,0.07);
}

/* --- RESPONSIVE FLEX ON LAYOUTS --- */
@media (max-width: 900px) {
  .card-container, .content-grid, .feature-grid {
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  .text-image-section, .content-grid, .card-container, .feature-grid {
    flex-direction: column;
    gap: 16px;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- HEADER & NAVIGATION --- */
header {
  background: var(--monochrome-white);
  box-shadow: 0 1px 10px rgba(34,34,34,0.07);
  padding: 0;
  position: relative;
  z-index: 21;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}
nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
nav a {
  font-family: var(--display-font);
  color: var(--monochrome-gray-2);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
nav a:hover,
nav a:focus {
  color: var(--monochrome-black);
  background: var(--gray-light);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--monochrome-black);
  color: var(--monochrome-white);
  border-radius: 40px;
  font-family: var(--display-font);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 10px 38px;
  margin-left: 12px;
  border: 2px solid var(--monochrome-black);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: background 0.2s, color 0.2s, border 0.1s, transform 0.12s;
  cursor: pointer;
  text-align: center;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--monochrome-white);
  color: var(--monochrome-black);
  border: 2px solid var(--brand-secondary);
  transform: translateY(-2px) scale(1.03);
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  margin-left: 18px;
  cursor: pointer;
  color: var(--monochrome-black);
  z-index: 32;
  transition: color 0.2s, transform 0.2s;
}
.mobile-menu-toggle:active {
  color: var(--brand-secondary);
  transform: scale(1.08);
}
@media (max-width: 900px) {
  header nav,
  .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(24,24,24,0.97);
  color: var(--monochrome-white);
  z-index: 1002;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  transform: translateX(-105vw);
  transition: transform 0.35s cubic-bezier(.42,0,.37,1.12);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}
.mobile-menu-close {
  background: none;
  color: var(--monochrome-white);
  font-size: 2.5rem;
  border: none;
  margin: 24px 24px 0 0;
  cursor: pointer;
  align-self: flex-start;
  z-index: 1003;
  transition: color 0.18s, transform 0.14s;
}
.mobile-menu-close:active {
  color: var(--brand-secondary);
  transform: scale(1.12);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 60px 32px 0 32px;
  gap: 30px;
  width: 100vw;
  max-width: 420px;
}
.mobile-nav a {
  font-family: var(--display-font);
  font-weight: 600;
  color: var(--monochrome-white);
  font-size: 1.32rem;
  border-radius: 8px;
  padding: 18px 12px;
  transition: background 0.18s, color 0.18s;
  text-align: left;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--brand-secondary);
  color: var(--monochrome-black);
}
@media (min-width: 901px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --- SECTION CUSTOM CLASSES --- */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: flex-start;
}
.feature-grid > div {
  flex: 1 1 240px;
  background: var(--monochrome-white);
  border-radius: 14px;
  padding: 24px 18px;
  box-shadow: 0 2px 10px rgba(34,34,34,0.06);
  min-width: 220px;
  transition: box-shadow 0.18s, transform 0.18s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.feature-grid > div:hover {
  box-shadow: 0 7px 32px rgba(34,34,34,0.13);
  transform: translateY(-2px) scale(1.03);
}
.feature-grid img {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  filter: grayscale(100%) contrast(1.4);
  opacity: 0.9;
}

.infographic-blocks, .science-fact-blocks, .routine-suggestions, .sleep-hygiene-checklist, .motivation-tips, .mindfulness-practices, .professional-insights {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
}
.infographic-blocks > div, .science-fact-blocks, .routine-suggestions, .sleep-hygiene-checklist, .motivation-tips, .mindfulness-practices, .professional-insights {
  background: var(--gray-light);
  border-radius: 13px;
  box-shadow: 0 1px 8px 0 rgba(34,34,34,0.06);
  padding: 18px 20px;
  flex: 1 1 220px;
  min-width: 200px;
}

blockquote {
  font-style: italic;
  background: var(--accent);
  border-left: 4px solid var(--brand-primary);
  color: var(--monochrome-gray-2);
  padding: 12px 22px 12px 18px;
  margin: 18px 0 18px 0;
  border-radius: 10px;
  box-shadow: 0 1px 4px 0 rgba(34,34,34,0.08);
}
blockquote span {
  display: block;
  font-size: .99em;
  margin-top: 6px;
  color: var(--monochrome-gray-3);
  font-style: normal;
}

.text-section ul li, .content-wrapper ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--monochrome-gray-2);
  font-size: 1.03em;
  line-height: 1.65;
}
.text-section ul li img, .content-wrapper ul li img {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  filter: grayscale(100%) contrast(1.3);
}

/* --- TESTIMONIALS --- */
.testimonial-card {
  background: var(--monochrome-white);
  color: var(--monochrome-black);
  border-left: 4px solid var(--brand-primary);
  box-shadow: 0 2px 18px rgba(34,34,34,0.07);
  margin-bottom: 20px;
  padding: 26px 30px;
}
.testimonial-card p {
  color: var(--monochrome-black);
  font-size: 1.08em;
}
.testimonial-card strong {
  color: var(--brand-primary);
  letter-spacing: 0.01em;
}

/* --- FOOTER --- */
footer {
  background: var(--monochrome-black);
  color: var(--monochrome-white);
  padding: 46px 0 0 0;
  margin-top: 70px;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  box-shadow: 0 -2px 18px rgba(34,34,34,0.05);
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: stretch;
  padding-bottom: 20px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-bottom: 12px;
}
.footer-nav a {
  color: var(--monochrome-gray-3);
  font-size: 1.06rem;
  padding: 8px 0;
  transition: color 0.19s;
  font-family: var(--display-font);
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--brand-secondary);
}
.brand-contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: .98em;
  color: var(--monochrome-gray-3);
  font-family: var(--body-font);
}
.brand-contact img {
  width: 18px;
  height: 18px;
  margin: 0 6px -3px 4px;
  filter: grayscale(100%) contrast(1.4);
}
.brand-contact a {
  color: var(--brand-secondary);
  margin-right: 15px;
  transition: color 0.19s;
  font-weight: 500;
  font-size: 1.03em;
}
.brand-contact a:hover,
.brand-contact a:focus {
  color: var(--brand-primary);
  text-decoration: underline;
}
.copyright {
  color: var(--monochrome-gray-3);
  font-size: .96em;
  text-align: left;
  font-family: var(--body-font);
}
@media (max-width: 768px) {
  footer .container { gap: 12px; }
  .footer-nav { gap: 16px; font-size: 1em; }
  .brand-contact { gap: 3px; }
}

/* --- ANIMATIONS, BUTTONS, MICRO-INTERACTIONS --- */
.btn-primary, .mobile-menu-toggle, .mobile-menu-close, nav a, .footer-nav a, .mobile-nav a {
  transition: color 0.18s, background 0.18s, box-shadow 0.19s, border 0.16s, transform 0.13s;
}
.btn-primary:active, .mobile-menu-toggle:active, .mobile-menu-close:active {
  transform: scale(0.96);
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: var(--monochrome-black);
  color: var(--monochrome-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 16px;
  z-index: 5010;
  box-shadow: 0 -2px 16px rgba(34,34,34,0.14);
  font-size: 1rem;
  animation: fadeInCookie 0.7s;
}
@keyframes fadeInCookie {
  0% { opacity: 0; transform: translateY(80px) }
  100% { opacity: 1; transform: translateY(0) }
}
.cookie-banner .cookie-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: 18px;
}
.cookie-banner button {
  border-radius: 30px;
  border: 2px solid var(--monochrome-white);
  background: transparent;
  color: var(--monochrome-white);
  font-family: var(--display-font);
  padding: 7px 26px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.17s, color 0.17s, border 0.15s;
}
.cookie-banner button.accept {
  background: var(--brand-secondary);
  color: var(--monochrome-black);
  border: 2px solid var(--brand-secondary);
}
.cookie-banner button.accept:hover,
.cookie-banner button.accept:focus {
  background: var(--monochrome-white);
  border-color: var(--brand-secondary);
  color: var(--brand-primary);
}
.cookie-banner button.reject,
.cookie-banner button.settings {
  background: transparent;
  color: var(--monochrome-white);
}
.cookie-banner button.reject:hover,
.cookie-banner button.settings:hover {
  background: var(--monochrome-white);
  color: var(--monochrome-black);
}
.cookie-banner a {
  color: var(--brand-secondary);
  text-decoration: underline;
  font-weight: 500;
}
@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 8px;
    font-size: 0.98em;
  }
  .cookie-banner .cookie-buttons {
    margin-left: 0;
  }
}

/* --- COOKIE MODAL --- */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(25,25,25,0.76);
  z-index: 5012;
  animation: fadeInCookie 0.28s;
}
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--monochrome-white);
  color: var(--monochrome-black);
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(34,34,34,0.19);
  z-index: 5013;
  min-width: 320px;
  max-width: 96vw;
  width: 420px;
  padding: 36px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: modalAppear 0.25s cubic-bezier(.48,0,.36,1.07);
}
@keyframes modalAppear { 
  0% { opacity: 0; transform: translate(-50%, -30%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}
.cookie-modal h2 {
  font-size: 1.29rem;
  margin-bottom: 5px;
  color: var(--monochrome-black);
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-light);
  padding: 14px 15px;
  border-radius: 15px;
  margin-bottom: 14px;
  font-size: 1.01em;
}
.cookie-modal label {
  font-weight: 500;
  color: var(--monochrome-black);
}
.cookie-modal .switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  margin-left: 12px;
}
.cookie-modal .switch input {
  display: none;
}
.cookie-modal .slider {
  position: absolute;
  cursor: pointer;
  background: #ccc;
  border-radius: 22px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .3s;
}
.cookie-modal .slider:before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--monochrome-white);
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(34,34,34,0.09);
}
.cookie-modal .switch input:checked + .slider {
  background: var(--brand-secondary);
}
.cookie-modal .switch input:checked + .slider:before {
  transform: translateX(16px);
  background: var(--brand-primary);
}
.cookie-modal .category-always {
  color: var(--brand-primary);
  font-size: 0.98em;
  font-weight: 600;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}
.cookie-modal .cookie-modal-actions button {
  border-radius: 28px;
  background: var(--monochrome-black);
  color: var(--monochrome-white);
  padding: 10px 28px;
  font-family: var(--display-font);
  font-weight: 600;
  font-size: 1.03em;
  border: 2px solid var(--monochrome-black);
  transition: background 0.17s, color 0.17s, border 0.17s;
  cursor: pointer;
}
.cookie-modal .cookie-modal-actions button.secondary {
  background: var(--brand-secondary);
  color: var(--monochrome-black);
  border: 2px solid var(--brand-secondary);
}
.cookie-modal .cookie-modal-actions button.secondary:hover {
  background: var(--monochrome-white);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
}
.cookie-modal .cookie-modal-actions button:hover {
  background: var(--monochrome-white);
  color: var(--monochrome-black);
  border-color: var(--monochrome-black);
}

@media (max-width: 600px) {
  .cookie-modal {
    width: 98vw;
    min-width: unset;
    padding: 28px 8px 22px 8px;
  }
}

/* --- FORMS (if any in future) --- */
input[type="text"], input[type="email"], textarea {
  border: 1.5px solid var(--gray-med);
  padding: 10px 16px;
  border-radius: 7px;
  width: 100%;
  color: var(--monochrome-black);
  background: var(--gray-light);
  margin-bottom: 18px;
  font-family: var(--body-font);
  font-size: 1em;
  transition: border 0.14s;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--brand-primary);
  background: var(--monochrome-white);
}

button[type="submit"] {
  background: var(--monochrome-black);
  color: var(--monochrome-white);
  font-family: var(--display-font);
  border-radius: 6px;
  padding: 12px 38px;
  font-size: 1.08em;
  border: 2px solid var(--monochrome-black);
  transition: background 0.13s, color 0.13s, border 0.11s;
  cursor: pointer;
  font-weight: 600;
}
button[type="submit"]:hover,
button[type="submit"]:focus {
  background: var(--brand-secondary);
  color: var(--monochrome-black);
  border-color: var(--brand-secondary);
}

/* --- MISCELLANEOUS --- */
::-webkit-scrollbar {
  width: 8px;
  background: var(--gray-light);
}
::-webkit-scrollbar-thumb {
  background: var(--gray-med);
  border-radius: 6px;
}

@media (max-width: 600px) {
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.19rem; }
  .brand-contact, .copyright {
    font-size: .92em;
  }
}

/* --- PRINT OVERRIDE --- */
@media print {
  * {
    background: white !important;
    color: #222 !important;
    box-shadow: none !important;
  }
  section, header, footer {
    page-break-inside: avoid;
  }
  .cookie-banner, .mobile-menu { display: none !important; }
}
