/* 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;
  box-sizing: border-box;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
}
ol, ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 20%;
  height: auto;
  display: block;
  border: 0;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  box-sizing: border-box;
}

/* Variables */
:root {
  --color-primary: #2D3142;
  --color-secondary: #F08636;
  --color-white: #fff;
  --color-black: #17181b;
  --color-gray-light: #F6F6F6;
  --color-gray-mid: #E1E1E2;
  --color-gray: #A0A1A7;
  --color-gray-dark: #48494F;
  --font-display: 'Merriweather', Georgia, serif;
  --font-body: 'Open Sans', Arial, sans-serif;
  --radius: 16px;
  --radius-small: 8px;
  --shadow: 0 6px 32px rgba(0,0,0,0.09), 0 0.5px 2px rgba(0,0,0,0.04);
  --shadow-card: 0 2px 12px 0 rgba(45,49,66,0.08);
  --transition: 0.2s cubic-bezier(.37,.01,.65,.99);
}

body {
  font-family: var(--font-body);
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 16px;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 16px;
}
h1 {font-size: 2.5rem; line-height: 1.1; margin-bottom: 24px;}
h2 {font-size: 1.8rem; line-height: 1.17; margin-bottom: 20px;}
h3 {font-size: 1.2rem; letter-spacing: .02em; margin-bottom: 16px;}

p, li, span {
  color: var(--color-gray-dark);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.003em;
}
strong {font-weight: 600; color: var(--color-black);}
blockquote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-primary);
  border-left: 4px solid var(--color-secondary);
  padding-left: 18px;
  margin: 0 0 12px 0;
}
.author-signature {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-secondary);
  margin-top: 10px;
  letter-spacing: 2px;
  text-align: right;
}

/* Header & Nav */
header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-mid);
  box-shadow: 0 1px 8px rgba(45,49,66,0.04);
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 999;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 18px 20px;
}
.logo img {
  height: 38px;
  width: auto;
  display: block;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 6px 10px;
  color: var(--color-primary);
  border-radius: var(--radius-small);
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--color-gray-mid);
  color: var(--color-secondary);
}
.cta-btn {
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-left: 22px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  border: 0;
  cursor: pointer;
  letter-spacing: .04em;
}
.cta-btn:hover,
.cta-btn:focus {
  background: var(--color-secondary);
  color: var(--color-black);
  box-shadow: 0 8px 32px 0 rgba(45,49,66,0.13);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-left: 20px;
  border: 0;
  cursor: pointer;
  z-index: 1001;
  transition: color var(--transition);
}
.mobile-menu-toggle:hover { color: var(--color-secondary); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  background: var(--color-white);
  top: 0;
  left: 0;
  height: 100vh;
  width: 92vw;
  max-width: 400px;
  box-shadow: 8px 0 32px rgba(45,49,66,0.08);
  z-index: 1200;
  transform: translateX(-120%);
  transition: transform .33s cubic-bezier(.44,.11,.69,.98);
  flex-direction: column;
  gap: 0;
  display: flex;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  font-size: 2rem;
  color: var(--color-secondary);
  border: 0;
  align-self: flex-end;
  margin: 22px 20px 10px 0;
  cursor: pointer;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 36px;
  margin-top: 20px;
}
.mobile-nav a {
  font-size: 1.1rem;
  color: var(--color-primary);
  padding: 13px 0;
  border-radius: var(--radius-small);
  transition: background var(--transition), color var(--transition);
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-white);
}

@media (max-width: 1000px) {
  .main-nav { gap: 16px; }
  .cta-btn { margin-left: 0; }
}
@media (max-width: 872px) {
  header .container {
    gap: 0;
    padding: 14px 12px;
  }
  .main-nav { gap: 11px; }
  .cta-btn { padding: 8px 18px; font-size: 0.95rem; }
}
@media (max-width: 850px) {
  .main-nav, .cta-btn {
    display: none !important;
  }
  .mobile-menu-toggle { display: block; }
}

/* Main Layout & Spacing */
main {
  min-height: 70vh;
}
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

/* Container and Content-Wrapper */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Cards & Lists */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-gray-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 22px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 210px;
  transition: box-shadow var(--transition), background var(--transition);
}
.card:hover, .card:focus-within {
  box-shadow: 0 10px 32px rgba(45,49,66,0.13);
  background: var(--color-white);
}

ul {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
ul li {
  background: var(--color-gray-light);
  border-radius: var(--radius-small);
  padding: 18px 20px;
  box-shadow: 0 1px 3px 0 rgba(45,49,66,0.04);
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Testimonials */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px 32px;
  margin-bottom: 24px;
  border: 1px solid var(--color-gray-mid);
  flex-direction: column;
  min-width: 250px;
}
.testimonial-card blockquote {
  color: var(--color-black); /* ensure high contrast */
  font-size: 1.12rem;
  border-left: 3px solid var(--color-secondary);
  margin-bottom: 6px;
  padding-left: 14px;
}
.testimonial-card span {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-style: italic;
}

/* Features & Visual Sections */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.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: stretch;
    gap: 18px;
  }
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
@media (max-width: 768px) {
  .content-grid {
    flex-direction: column;
    gap: 18px;
  }
}

/* Table and Filters */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 0 0;
  font-size: 1rem;
}
td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--color-gray-mid);
  color: var(--color-black);
}
.filters, .emotion-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.filters button, .emotion-categories button {
  background: var(--color-white);
  border: 1px solid var(--color-black);
  color: var(--color-black);
  font-size: 1rem;
  border-radius: 8px;
  padding: 7px 20px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border var(--transition);
}
.filters button:hover, .emotion-categories button:hover,
.filters button:focus, .emotion-categories button:focus {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-secondary);
}
input[type=search] {
  border: 1.2px solid var(--color-gray-dark);
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 1rem;
  margin: 6px 0 12px 0;
  background: var(--color-gray-light);
  transition: border var(--transition);
  width: 100%;
}
input[type=search]:focus {
  border: 1.4px solid var(--color-primary);
  background: var(--color-white);
}

/* Author Bio / About */
.author-bio {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  background: var(--color-gray-light);
  border-radius: var(--radius);
  padding: 30px 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}
.author-bio img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 9px;
}

/* Footer */
footer {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 1rem;
  margin-top: 40px;
}
footer .container {
  padding: 40px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
  justify-content: space-between;
  background: none;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 0;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
footer nav a {
  color: var(--color-white);
  opacity: .78;
  font-size: 1rem;
  transition: color var(--transition), opacity var(--transition);
  padding: 4px 0;
}
footer nav a:hover, footer nav a:focus {
  color: var(--color-secondary);
  opacity: 1;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--color-gray);
  font-size: 0.97rem;
}
.footer-contact img {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  vertical-align: middle;
}
.socials {
  display: flex;
  gap: 17px;
  align-items: center;
}
.socials a img {
  width: 25px;
  height: 25px;
  filter: grayscale(90%) brightness(0.96);
  transition: filter var(--transition);
}
.socials a img:hover,
.socials a img:focus { filter: grayscale(0) brightness(1.05); }
.legal {
  display: flex;
  align-items: center;
  border-top: 1.5px solid rgba(255,255,255,0.11);
  padding-top: 16px;
  margin-top: 28px;
  color: #d8d9df;
  font-size: 0.97rem;
  justify-content: center;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1400;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 -2px 24px 0 rgba(31,36,48,0.14);
  border-top: 1px solid var(--color-gray-mid);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  padding: 22px 30px;
}
.cookie-banner p {
  color: var(--color-primary);
  font-size: 1rem;
  margin-right: 16px;
  flex: 1 1 280px;
  line-height: 1.6;
}
.cookie-buttons {
  display: flex;
  gap: 15px;
}
.cookie-btn {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-small);
  padding: 8px 19px;
  font-size: 1rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 5px rgba(45,49,66,0.07);
}
.cookie-btn.settings {
  background: var(--color-gray-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.cookie-btn.accept {
  background: var(--color-secondary);
  color: var(--color-black);
}
.cookie-btn.reject {
  background: #ededed;
  color: var(--color-gray-dark);
  border: 1px solid var(--color-gray-mid);
}
.cookie-btn:focus,
.cookie-btn:hover {
  box-shadow: 0 2px 10px rgba(45,49,66,0.18);
  outline: none;
}

/* Cookie Consent Modal */
.cookie-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%) scale(1);
  z-index: 1500;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 6px 54px rgba(31,36,48,0.23);
  padding: 38px 32px 28px 32px;
  max-width: 97vw;
  width: 100%;
  max-width: 420px;
  opacity: 1;
  visibility: visible;
  transition: opacity .3s, transform .3s;
}
.cookie-modal.closed {
  opacity: 0;
  transform: translate(-50%,-50%) scale(0.88);
  pointer-events: none;
  visibility: hidden;
}
.cookie-modal h3 {
  font-size: 1.36rem;
  margin-bottom: 15px;
  color: var(--color-black);
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 18px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cookie-category label {
  font-size: 1rem;
  color: var(--color-primary);
}
.cookie-toggle {
  width: 40px; height: 22px;
  border-radius: 11px;
  background: var(--color-gray-mid);
  position: relative;
  transition: background .22s;
  cursor: pointer;
}
.cookie-toggle input { display: none; }
.cookie-toggle span {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  transition: left .23s, background .2s;
}
.cookie-toggle input:checked ~ span {
  left: 21px;
  background: var(--color-secondary);
}
.cookie-modal-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 8px;
}
.cookie-modal .close-modal {
  position: absolute;
  right: 22px; top: 18px;
  background: none;
  border: 0;
  font-size: 1.34rem;
  color: var(--color-gray-dark);
  cursor: pointer;
  padding: 5px;
}
.cookie-category .always {
  font-size: 0.91rem;
  color: var(--color-gray-dark);
  margin-left: 7px;
}

/* Utility: Hide */
.hide {
  display: none !important;
}

/* Responsive Typography/Spacing */
@media (max-width: 650px) {
  html {
    font-size: 15px;
  }
  h1 {font-size: 2rem;}
  h2 {font-size: 1.3rem;}
  .container { padding: 0 6px; }
  section { padding: 28px 8px; }
  .cookie-banner { flex-direction: column; align-items: stretch; padding: 18px 5vw; gap: 15px; }
  .cookie-modal { padding: 22px 5vw 14px 5vw; }
}

@media (max-width: 480px) {
  html{ font-size: 14px; }
  .content-wrapper { gap: 13px; }
  .legal { font-size: 0.87rem; }
  .testimonial-card { padding: 16px 9px; font-size: 0.95rem; }
  section { padding: 15px 2px; }
}

/* Animations */
.mobile-menu,
.cookie-modal {
  will-change: transform, opacity;
}
.mobile-menu {
  transition: transform .33s cubic-bezier(.44,.11,.69,.98);
}
.cookie-modal {
  transition: opacity .3s, transform .3s;
}
.mobile-menu.open {
  box-shadow: 8px 0 40px rgba(31,36,48,0.19);
}

/* Miscellaneous */
::-webkit-scrollbar {
  width: 8px;
  background: var(--color-gray-light);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gray);
  border-radius: 10px;
}
a:focus, button:focus {
  outline: 2px solid var(--color-secondary);
}

/* Hero Button Special */
section .cta-btn:first-of-type {
  margin-top: 7px;
}

/* Accessibility */
@media screen and (max-width: 340px) {
  html { font-size: 13px; }
}

/* Section spacing on final child */
section:last-child {
  margin-bottom: 0;
}

/* Modal Overlay styling (ensure modal above backdrop, not included in HTML but for future use) */
.cookie-modal-backdrop {
  position: fixed;
  z-index: 1490;
  left: 0; right: 0; bottom: 0; top: 0;
  background: rgba(45,49,66,0.29);
  pointer-events: all;
}
