/* =========================================
   Kante & Kelle — style.css
   Soft Pastel aesthetic, mobile-first, flexbox-only
   ========================================= */

/* ---- CSS Reset & Base Normalize ---- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #1E2E38; background: #FCFCFD; line-height: 1.6; }
img, svg { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
ul, ol { padding-left: 24px; }
a { color: #1E2E38; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px dashed #9E4D1F; outline-offset: 2px; }

/* ---- Design Tokens (with fallbacks) ---- */
:root {
  /* Brand */
  --c-primary: #1E2E38;
  --c-secondary: #9E4D1F;
  --c-accent: #F6F7F9;
  /* Soft pastel supporting palette */
  --p-blush: #FFE9E3;  /* soft peach */
  --p-sky: #F2F7FF;    /* powder blue */
  --p-mint: #F4FBF6;   /* soft mint */
  --p-lilac: #F6F2FA;  /* light lilac */
  --p-cream: #FFF9F2;  /* warm cream */
  --ink: #1E2E38;      /* text dark */
  --ink-soft: #2B3E49; /* slightly softer text */
  --muted: #6A7A84;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(15, 31, 45, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 31, 45, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; color: var(--ink); line-height: 1.25; margin: 0 0 16px; }
h1 { font-size: 32px; letter-spacing: 0.2px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; color: var(--ink-soft); }
p { margin: 0 0 16px; color: var(--ink-soft); }
small, .small { font-size: 14px; }
strong { color: var(--ink); }

/* Responsive typography */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
}

/* ---- Containers & Global Layout (Flex-only) ---- */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; flex-wrap: wrap; }
.content-wrapper > h2, .content-wrapper > h1 { width: 100%; }

/* Mandatory spacing and alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.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; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Text-image responsive rule */
@media (max-width: 768px) { .text-image-section { flex-direction: column; } }

/* ---- Header & Navigation ---- */
header { position: relative; background: var(--white); box-shadow: var(--shadow-sm); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

/* Main nav (hidden on mobile) */
.main-nav { display: none; align-items: center; gap: 14px; }
.main-nav a { padding: 10px 12px; border-radius: 999px; color: var(--ink); transition: background-color 180ms ease, color 180ms ease, transform 180ms ease; }
.main-nav a:hover { background: var(--p-sky); text-decoration: none; }
.main-nav a[aria-current="page"] { background: var(--p-lilac); color: var(--ink); }
.main-nav .cta { background: #EBC4B3; color: var(--ink); font-weight: 700; }
.main-nav .cta:hover { background: #DEAD99; transform: translateY(-1px); }

/* Hamburger */
.mobile-menu-toggle { width: 44px; height: 44px; border-radius: 8px; background: var(--p-sky); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.mobile-menu-toggle:hover { background: #e7f0ff; }

/* Desktop nav switch */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ---- Mobile Menu Overlay ---- */
.mobile-menu { position: fixed; inset: 0 0 0 0; background: rgba(30,46,56,0.08); display: flex; flex-direction: row; justify-content: flex-end; align-items: stretch; transform: translateX(100%); transition: transform 260ms ease; z-index: 9999; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu > nav, .mobile-menu .mobile-nav { display: flex; flex-direction: column; gap: 6px; background: var(--white); width: 86%; max-width: 360px; padding: 20px; box-shadow: var(--shadow-md); }
.mobile-menu-close { align-self: flex-end; margin: 12px 16px 0 0; width: 40px; height: 40px; border-radius: 10px; background: var(--p-blush); color: var(--ink); box-shadow: var(--shadow-sm); }
.mobile-nav a { padding: 14px 12px; border-radius: 10px; background: var(--p-sky); color: var(--ink); text-decoration: none; }
.mobile-nav a:hover { background: #e7f0ff; }
.mobile-nav a[aria-current="page"] { background: var(--p-lilac); }

/* ---- Hero Sections ---- */
.hero { background: var(--p-sky); padding: 40px 0; border-bottom: 1px solid #e8edf3; }
.hero .content-wrapper { gap: 14px; }
.hero p { max-width: 75ch; }

/* Breadcrumbs */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: underline; }

/* ---- Buttons ---- */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; text-decoration: none; }
.button.primary { background: #EBC4B3; color: var(--ink); border-color: #EBC4B3; }
.button.primary:hover { background: #DEAD99; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button.secondary { background: var(--white); color: var(--ink); border-color: #D9E2EA; }
.button.secondary:hover { background: var(--p-cream); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- Reusable Content Blocks ---- */
.text-section { background: var(--white); border: 1px solid #edf1f5; border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; flex: 1 1 260px; }
.text-section a { color: var(--ink); font-weight: 700; text-decoration: underline; }

/* Lists (value props, feature lists, stepper) */
.value-props, .feature-list { display: flex; flex-direction: column; gap: 10px; padding-left: 0; list-style: none; }
.value-props li, .feature-list li { padding: 10px 12px; border-radius: 12px; background: var(--p-mint); color: var(--ink); box-shadow: var(--shadow-sm); }

.stepper { display: flex; flex-direction: column; gap: 10px; padding-left: 0; list-style: none; counter-reset: step; }
.stepper li { background: var(--p-lilac); padding: 12px 14px; border-radius: 12px; position: relative; color: var(--ink); box-shadow: var(--shadow-sm); }

/* Trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 0; list-style: none; }
.trust-badges li { padding: 8px 12px; background: var(--p-cream); border: 1px solid #f2e7d8; border-radius: 999px; color: var(--ink); box-shadow: var(--shadow-sm); }

/* Testimonials — light backgrounds and dark text for contrast */
.testimonial-card { background: var(--white); border: 1px solid #e8edf3; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); color: var(--ink); }
.testimonial-card p { margin: 0; }
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: box-shadow 200ms ease, transform 200ms ease; }

/* Generic Cards (if used) */
.card { background: var(--white); border: 1px solid #edf1f5; border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm); }

/* Section alternation for dreamy, pastel atmosphere */
main section:nth-of-type(odd):not(.hero) { background: var(--p-cream); }
main section:nth-of-type(even):not(.hero) { background: var(--p-blush); }
main section { padding: 32px 0; }

/* In-section content layout for multi-column feel via flex-wrap */
.content-wrapper > .text-section { flex: 1 1 300px; }
@media (min-width: 768px) {
  .content-wrapper { flex-direction: row; align-items: flex-start; }
  .content-wrapper > * { margin: 0; }
}

/* Links inside nav/footers */
nav a { color: var(--ink); }
footer nav a:hover { text-decoration: underline; }

/* ---- Footer ---- */
footer { background: var(--p-sky); border-top: 1px solid #e8edf3; padding: 28px 0; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 20px; }
footer .text-section { background: transparent; border: none; box-shadow: none; padding: 0; flex: 1 1 260px; }
footer h3 { color: var(--ink); }
footer p { color: var(--ink-soft); }

/* ---- 404 specifics (inherits general styles) ---- */
/* No extra required; using existing components ensures consistency */

/* ---- Tables (fallback styling if used) ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #e8edf3; }

/* ---- Forms (if added later) ---- */
input, select, textarea { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #d8e1e8; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: #c9d6e0; box-shadow: 0 0 0 3px rgba(158,77,31,0.15); outline: none; }
label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* ---- Cookie Consent Banner ---- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid #e8edf3; box-shadow: 0 -10px 30px rgba(15,31,45,0.08); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; transform: translateY(100%); transition: transform 260ms ease; z-index: 9998; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 12px; }
.cookie-banner p { margin: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn, .cookie-actions .button { padding: 10px 14px; border-radius: 999px; font-weight: 700; border: 1px solid transparent; }
.cookie-accept { background: #EBC4B3; color: var(--ink); border-color: #EBC4B3; }
.cookie-accept:hover { background: #DEAD99; }
.cookie-reject { background: var(--white); color: var(--ink); border-color: #d9e2ea; }
.cookie-reject:hover { background: var(--p-cream); }
.cookie-settings { background: var(--p-sky); color: var(--ink); border-color: #d9e2ea; }
.cookie-settings:hover { background: #e7f0ff; }

/* Cookie Preferences Modal */
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(30,46,56,0.4); display: none; align-items: center; justify-content: center; z-index: 10000; }
.cookie-modal-backdrop.show { display: flex; }
.cookie-modal { width: 92%; max-width: 640px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-md); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .cookie-groups { display: flex; flex-direction: column; gap: 12px; }
.cookie-group { display: flex; flex-direction: column; gap: 8px; background: var(--p-lilac); padding: 12px; border-radius: 12px; }
.cookie-group .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle input[type="checkbox"] { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #d9e2ea; position: relative; outline: none; transition: background-color 200ms ease; }
.toggle input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform 200ms ease; }
.toggle input[type="checkbox"]:checked { background: #EBC4B3; }
.toggle input[type="checkbox"]:checked::after { transform: translateX(18px); }
.cookie-modal .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---- Utility spacing ---- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-16 { margin-top: 16px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mt-24 { margin-top: 24px !important; }
.mb-24 { margin-bottom: 24px !important; }

/* ---- Page-specific gentle accents via sections ---- */
/* Ensure enough breathing room and no overlaps */
section .container { gap: 20px; }
section .content-wrapper { gap: 20px; }

/* ---- Accessibility tweaks for testimonial/readability ---- */
.testimonial-card em, .testimonial-card strong { color: var(--ink); }

/* ---- Sitemap & legal pages ---- */
.hero + section .content-wrapper { align-items: flex-start; }

/* ---- Hover/focus micro-interactions ---- */
.text-section:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: transform 200ms ease, box-shadow 200ms ease; }

/* ---- Tables/Lists in legal pages ---- */
main ul li { color: var(--ink-soft); }

/* ---- Ensure adequate gaps between elements ---- */
section + section { margin-top: 20px; }

/* ---- Alignment helpers for common components used across pages ---- */
/* Features as flexible rows on larger screens */
@media (min-width: 768px) {
  .value-props, .feature-list { flex-direction: row; flex-wrap: wrap; }
  .value-props li, .feature-list li { flex: 1 1 260px; }
}

/* ---- Readability for emphasized meta lines ---- */
em { color: var(--muted); }

/* ---- Dark-on-light rule for testimonials & review snippets ---- */
.testimonial-card, .testimonial-card p, .testimonial-card em, .testimonial-card strong { color: var(--ink); }

/* ---- Prevent overlaps by enforcing min-gaps ---- */
.content-grid > * { margin: 0; }
.card-container > * { margin: 0; }

/* ---- Ensure flex alignment where needed ---- */
.align-center { display: flex; align-items: center; justify-content: center; }
.align-start { display: flex; align-items: flex-start; }
.align-between { display: flex; align-items: center; justify-content: space-between; }

/* ---- Print basics ---- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  a { text-decoration: underline; color: #000; }
}
