/* --- 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;
  box-sizing: border-box;
}
html {
  height: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  background: #FCF6EE; /* warm paper tint background, authentic retro look */
  color: #32332D;
  line-height: 1.6;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

/* --- RETRO COLOR & FONT VARIABLES (FALLBACKS) --- */
:root {
  --primary: #226760;
  --secondary: #85B167;
  --accent: #F6F8EA;
  --retro-yellow: #FFE199;
  --retro-orange: #D6A264;
  --retro-brown: #BFAE98;
  --retro-caramel: #E9D5A1;
  --retro-dark: #40352C;
  --retro-shadow: #C0AF91;
  --body-font: 'Roboto', Arial, Helvetica, sans-serif;
  --display-font: 'Montserrat', 'Arial Rounded MT Bold', Arial, Helvetica, sans-serif;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5 {
  font-family: var(--display-font);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
h1 {
  font-size: 2.4rem;
  letter-spacing: 0.025em;
  text-shadow: 2px 3px 0 var(--retro-yellow), 0 1px 1px rgba(64,53,44,.08);
  margin-bottom: 18px;
}
h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
h3 {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 8px;
  letter-spacing: 0.015em;
}
.subheadline {
  font-family: var(--body-font);
  font-size: 1.1rem;
  color: var(--retro-dark);
  background: var(--retro-yellow);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 14px 14px 14px 2px;
  margin-bottom: 22px;
  box-shadow: 0 4px 0 0 var(--retro-caramel), 0 1px 4px 0 rgba(150,135,90,.09);
  font-style: italic;
}
p, ul, ol, li {
  font-family: var(--body-font);
  font-size: 1rem;
  margin-bottom: 12px;
}
strong {
  font-weight: 700;
}
ul, ol {
  margin-left: 18px;
  padding-left: 9px;
  margin-bottom: 20px;
}
li {
  margin-bottom: 8px;
}
a {
  color: var(--primary);
  text-underline-offset: 2px;
  transition: color .18s;
  text-decoration-thickness: 2px;
}
a:hover, a:focus {
  color: var(--retro-orange);
  text-decoration: underline wavy var(--retro-orange);
}

/* --- GENERAL LAYOUT CONTAINERS --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.section,
main section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 26px -8px var(--retro-shadow), 0 2px 0 0 var(--retro-caramel);
  position: relative;
}
main section:first-child {
  margin-top: 44px;
}
main section:last-child {
  margin-bottom: 0;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* --- FEATURED CARD GRIDS AND FLEX LAYOUTS --- */
.feature-grid,.card-container, .card-grid, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-top: 12px;
}
.feature-grid > div, .card, .content-grid > div {
  background: var(--accent);
  border-radius: 14px;
  border: 2px solid var(--retro-caramel);
  box-shadow: 0 2px 12px -6px var(--retro-shadow), 0 2px 0 0 var(--retro-yellow);
  padding: 24px 20px 20px 20px;
  margin-bottom: 20px;
  flex: 1 1 210px;
  min-width: 210px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  transition: transform .18s, box-shadow .18s;
}
.feature-grid > div:hover, .card:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 28px -6px var(--retro-shadow), 0 4px 0 0 var(--retro-yellow);
}
.feature-grid img, .card img {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  filter: sepia(0.5) saturate(0.7) hue-rotate(-15deg);
}

/* --- FLEX LAYOUTS FROM MANDATORY RULES --- */
.card-container {
  gap: 24px;
  display: flex;
  flex-wrap: wrap;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.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: #fffbe9;
  border: 2px solid var(--retro-yellow);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px -4px var(--retro-shadow);
  transition: box-shadow .15s, border-color .18s;
  flex: 1 1 420px;
  min-width: 210px;
}
.testimonial-card p {
  color: #3d3d29;
  font-family: var(--display-font);
  font-size: 1.1rem;
  line-height: 1.4;
  margin: 0 0 8px 0;
  font-style: italic;
}
.testimonial-card .name {
  font-size: 0.98rem;
  font-family: var(--body-font);
  font-weight: 700;
  color: var(--primary);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* --- BUTTONS & CTAS --- */
.cta, .cta.primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 32px;
  background: var(--primary);
  color: #fff;
  font-family: var(--display-font);
  font-size: 1.15rem;
  font-weight: bold;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  margin-top: 18px;
  box-shadow: 0 2px 0 0 var(--secondary);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background .18s, box-shadow .15s, color .16s, transform .12s;
}
.cta.primary {
  background: var(--secondary);
  color: var(--primary);
  box-shadow: 0 2px 0 0 var(--retro-orange), 0 6px 14px -5px var(--retro-shadow);
}
.cta:hover, .cta:focus, .cta.primary:hover, .cta.primary:focus {
  background: var(--retro-orange);
  color: var(--retro-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px -6px var(--retro-shadow);
  outline: none;
}
button, .mobile-menu-toggle, .mobile-menu-close {
  font-family: var(--display-font);
  font-size: 1.5rem;
  background: var(--retro-yellow);
  color: var(--primary);
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 0 0 var(--retro-shadow);
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s;
}
button:focus, .mobile-menu-toggle:focus, .mobile-menu-close:focus {
  background: var(--retro-orange);
  color: #fff;
  outline: 2px solid var(--primary);
}

/* --- HEADER/NAVIGATION --- */
header {
  background: #fff7e1;
  padding: 0;
  border-bottom: 3px solid var(--retro-yellow);
  box-shadow: 0 2px 8px -5px var(--retro-shadow);
  position: sticky;
  top: 0;
  z-index: 1040;
  width: 100%;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}
header img {
  height: 42px;
  width: auto;
  margin-right: 18px;
}
.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.main-nav a {
  font-family: var(--display-font);
  font-size: 1.06rem;
  color: var(--primary);
  text-decoration: none;
  padding: 7px 0;
  position: relative;
  transition: color .17s;
}
.main-nav a[aria-current="page"] {
  color: var(--retro-orange);
  font-weight: 700;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: var(--retro-yellow);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .18s;
}
.main-nav a:hover::after, .main-nav a:focus::after, .main-nav a[aria-current="page"]::after {
  opacity: 1;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--retro-orange);
  outline: none;
}
.mobile-menu-toggle {
  display: none;
  margin-left: 12px;
}

/* --- MOBILE MENU --- */
.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: 100vw;
  height: 100vh;
  background: #fffbe9;
  transform: translateX(100%);
  transition: transform .36s cubic-bezier(.73,.09,.58,1);
  z-index: 5000;
  box-shadow: -4px 0 36px -14px var(--retro-shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2.1rem;
  margin: 24px 24px 0 0;
  align-self: flex-end;
  background: var(--retro-caramel);
  color: var(--retro-dark);
}
.mobile-nav {
  margin: 38px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  width: 90%;
  max-width: 320px;
}
.mobile-nav a {
  font-size: 1.36rem;
  font-family: var(--display-font);
  color: var(--primary);
  text-decoration: none;
  padding: 12px 0;
  letter-spacing: 0.014em;
  width: 100%;
  border-bottom: 1px dashed var(--retro-yellow);
  transition: color .14s, background .14s, padding-left .14s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--retro-orange);
  background: var(--retro-yellow);
  padding-left: 10px;
}

/* --- FOOTER --- */
footer {
  background: #fff7e1;
  border-top: 3px solid var(--retro-yellow);
  margin-top: 66px;
  padding: 34px 0 30px 0;
  font-size: 0.98rem;
  color: var(--retro-dark);
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  justify-content: space-between;
}
.footer-brand img {
  height: 56px;
  margin-bottom: 6px;
  filter: sepia(0.24) hue-rotate(-10deg) contrast(0.94);
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-nav a {
  color: var(--primary);
  text-decoration: none;
  font-family: var(--display-font);
  font-size: 1.05rem;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--retro-orange);
}
.footer-contact p, .footer-contact a {
  font-size: 0.98rem;
  color: var(--retro-dark);
}
.footer-contact a:hover, .footer-contact a:focus {
  color: var(--primary);
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 7000;
  width: 100vw;
  max-width: 100vw;
  background: #fffbe9;
  border-top: 3px solid var(--retro-yellow);
  box-shadow: 0 -4px 20px -8px var(--retro-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 18px 20px 18px;
  animation: cookie-slide-up .5s cubic-bezier(.76,-0.02,.54,1) 1;
}
@keyframes cookie-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cookie-banner p {
  font-size: 1rem;
  color: var(--primary);
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 18px;
  margin-top: 4px;
}
.cookie-banner button {
  font-family: var(--display-font);
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  background: var(--retro-yellow);
  color: var(--primary);
  box-shadow: 0 2px 0 0 var(--retro-caramel);
  cursor: pointer;
  margin: 0;
  transition: background .16s, color .14s;
}
.cookie-banner button.accept {
  background: var(--secondary);
  color: #fff;
  font-weight: 700;
}
.cookie-banner button.reject {
  background: var(--retro-orange);
  color: #fff;
  font-weight: 700;
}
.cookie-banner button.settings {
  background: var(--primary);
  color: #fff;
}
.cookie-banner button:focus, .cookie-banner button:hover {
  background: var(--retro-brown);
  color: var(--primary);
}

/* --- COOKIE PREFERENCES MODAL --- */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(97, 77, 36, .34);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-modal {
  background: #fffbe9;
  border-radius: 18px;
  box-shadow: 0 8px 32px -10px var(--retro-shadow);
  padding: 38px 22px 26px 22px;
  max-width: 420px;
  min-width: 300px;
  width: 100%;
  position: relative;
  text-align: left;
  animation: cookie-slide-modal .43s cubic-bezier(.78,-0.02,.52,1) 1;
}
@keyframes cookie-slide-modal {
  from { transform: scale(.93) translateY(90px); opacity:0; }
  to { transform: scale(1) translateY(0); opacity:1; }
}
.cookie-modal h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.cookie-modal .cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 1.06rem;
  border-bottom: 1px dashed var(--retro-caramel);
}
.cookie-modal .cookie-switch {
  margin-left: 18px;
  display: inline-flex;
  align-items: center;
}
.cookie-modal .cookie-switch input[type="checkbox"] {
  appearance: none;
  width: 38px;
  height: 22px;
  background: var(--accent);
  border: 2px solid var(--retro-yellow);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background .16s, border-color .18s;
}
.cookie-modal .cookie-switch input[type="checkbox"]:checked {
  background: var(--secondary);
  border-color: var(--secondary);
}
.cookie-modal .cookie-switch input[type="checkbox"]::after {
  content: '';
  display: block;
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--retro-orange);
  transition: transform .18s;
}
.cookie-modal .cookie-switch input[type="checkbox"]:checked::after {
  transform: translateX(16px);
  background: var(--primary);
}
.cookie-modal .category-desc {
  font-size: 0.94rem;
  color: #555;
  margin-left: 8px;
}
.cookie-modal .modal-actions {
  display: flex;
  gap: 18px;
  margin-top: 28px;
  justify-content: flex-end;
}
.cookie-modal button {
  font-family: var(--display-font);
  background: var(--retro-yellow);
  color: var(--primary);
  border-radius: 999px;
  padding: 10px 22px;
  border: none;
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
}
.cookie-modal button.save {
  background: var(--secondary);
  color: #fff;
}
.cookie-modal button:focus, .cookie-modal button:hover {
  background: var(--retro-brown);
  color: var(--primary);
}

/* --- QUOTES / HIGHLIGHT --- */
.quote, blockquote {
  font-family: var(--display-font);
  background: var(--retro-yellow);
  color: var(--primary);
  border-left: 6px solid var(--primary);
  padding: 20px 24px;
  border-radius: 16px 2px 16px 2px;
  margin: 18px 0 14px 0;
  font-style: italic;
  box-shadow: 0 2px 8px -8px #bbb09c;
}

/* --- IMAGES --- */
img {
  max-width: 100%;
  display: block;
  border-radius: 7px;
}

/* --- FORMS --- */
input, select, textarea {
  font-family: var(--body-font);
  font-size: 1rem;
  border: 2px solid var(--retro-caramel);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: #fffbe9;
  color: #333;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  outline: 1.5px solid var(--secondary);
}
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

/* --- MISC COMPONENTS --- */
span, .name {
  font-family: var(--display-font);
  font-size: 1rem;
  color: var(--secondary);
}

/* --- PATTERNS & NOSTALGIC ELEMENTS --- */
section {
  background-image: repeating-linear-gradient(-45deg, rgba(232,206,136,0.11) 0, rgba(232,206,136,0.11) 22px, transparent 22px, transparent 44px);
}

/* --- RESPONSIVE DESIGN / BREAKPOINTS --- */
@media (max-width: 1024px) {
  .container {
    max-width: 840px;
  }
  .feature-grid > div, .card, .content-grid > div {
    min-width: 180px;
    max-width: 100%;
    flex: 1 1 180px;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 96vw;
  }
  .feature-grid, .card-container, .content-grid {
    gap: 16px;
  }
  footer .container {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}
@media (max-width: 768px) {
  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.2rem;
  }
  .section, main section {
    padding: 20px 7px;
    margin-bottom: 38px;
    border-radius: 10px;
  }
  .feature-grid > div, .card, .content-grid > div {
    padding: 16px 10px 14px 10px;
    min-width: 100px;
    font-size: 0.98rem;
  }
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
    font-size: 1rem;
  }
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-brand img {
    height: 38px;
  }
}
@media (max-width: 540px) {
  .container {
    max-width: 100vw;
    padding: 0 4px;
  }
  .section, main section {
    padding: 11px 0px;
    margin-bottom: 20px;
  }
  .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 11px;
    align-items: stretch;
  }
  .feature-grid > div, .card, .content-grid > div {
    min-width: unset;
    max-width: unset;
    width: 100%;
    padding: 11px 4px 11px 11px;
  }
  header .container {
    min-height: 56px;
  }
  .footer-brand img {
    height: 26px;
  }
}

/* --- PRINT STYLES --- */
@media print {
  header, footer, .mobile-menu, .cookie-banner { display: none !important; }
  .section, main section { box-shadow: none !important; border-radius: 0 !important; background: #fff !important; }
}
