/* ====================================================
   Fuge & Fläche - style.css
   Vintage Retro aesthetic with brand colors & fonts
   Mobile-first, flexbox-only layouts, accessible contrast
   ==================================================== */

/* ---------------------------
   CSS RESET / NORMALIZE
---------------------------- */
* { box-sizing: border-box; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
h1,h2,h3,h4,h5,h6,p,ul,ol,figure { margin: 0 0 16px 0; }
ul,ol { padding-left: 22px; }
img { max-width: 100%; height: auto; display: block; }
a { background-color: transparent; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px dashed var(--brand-secondary, #C26D3A); outline-offset: 2px; }

/* ---------------------------
   THEME VARIABLES (with fallbacks)
---------------------------- */
:root {
  --brand-primary: #1F2937; /* dark base */
  --brand-secondary: #C26D3A; /* warm accent */
  --brand-accent: #FFF8F0; /* paper cream */

  --ink: #1C232E; /* dark text */
  --ink-soft: #334155; /* softer text */
  --paper: #FFF8F0; /* default background */
  --paper-2: #F8F1E7; /* slightly deeper paper */
  --line: #B68A6A; /* vintage line color (derived from secondary) */
  --muted: #DED2C6; /* muted separator */
  --success: #2F855A;
  --danger: #B00020;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;

  --shadow-1: 0 1px 0 rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-2: 0 2px 0 rgba(0,0,0,0.06), 0 6px 14px rgba(0,0,0,0.12);
  --shadow-inset: inset 0 -2px 0 rgba(0,0,0,0.04);
}

/* ---------------------------
   GLOBAL TYPOGRAPHY
---------------------------- */
body {
  font-family: Verdana, Geneva, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", Verdana, Geneva, sans-serif;
  color: var(--brand-primary);
  letter-spacing: 0.2px; /* subtle retro tightness */
}

h1 { font-size: 32px; line-height: 1.2; margin-bottom: 14px; }
h2 { font-size: 24px; line-height: 1.25; margin-bottom: 10px; }
h3 { font-size: 18px; line-height: 1.3; margin-bottom: 8px; }
.subheadline { color: var(--ink-soft); font-size: 16px; }

p, li { font-size: 16px; color: #7e92b2; }
strong { color: var(--brand-primary); }

/* Vintage accents */
hr { border: 0; height: 2px; background: var(--muted); margin: 24px 0; }
.small-caps { font-variant: small-caps; letter-spacing: 0.6px; }

/* ---------------------------
   LAYOUT STRUCTURE (Flex-only)
---------------------------- */
.container {
  display: flex; /* flex container */
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1120px;
  padding: 0 16px;
  margin: 0 auto;
}

.content-wrapper {
  display: flex; /* flex container */
  flex-direction: column;
  gap: 20px;
}

main > section, footer > section, header > .bar {
  display: flex; /* ensure section is flex container */
  flex-direction: column;
}

/* MANDATORY SPACING PATTERNS */
.section { margin-bottom: 60px; padding: 40px 20px; display: flex; flex-direction: column; gap: 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.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; }

/* Generic text section card styling used across pages */
.text-section {
  display: flex; /* flex container */
  flex-direction: column;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid var(--muted);
  border-radius: var(--radius-m);
  padding: 16px;
  box-shadow: var(--shadow-1);
}

/* ---------------------------
   HEADER & NAVIGATION
---------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--paper-2);
  border-bottom: 3px solid var(--brand-secondary); /* vintage bar */
  box-shadow: var(--shadow-inset);
}

header .container { padding-top: 10px; padding-bottom: 10px; }

header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 36px; width: auto; }

.main-nav {
  display: none; /* hidden on mobile */
  align-items: center;
  gap: 16px;
}

.main-nav a {
  color: var(--brand-primary);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .1s ease;
}

.main-nav a:hover { background: #1C232E; border-color: var(--muted); }
.main-nav a[aria-current="page"] { color: var(--brand-secondary); border-color: var(--brand-secondary); }

.cta-group { display: flex; gap: 10px; align-items: center; }

/* Hamburger */
.mobile-menu-toggle {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--brand-primary);
  background: #fff;
  border: 1px solid var(--muted);
  border-radius: 50%;
  box-shadow: var(--shadow-1);
  transition: transform .1s ease;
}
.mobile-menu-toggle:active { transform: scale(0.96); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; /* full screen */
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
  background: rgba(31,41,55,0.6);
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 1050;
}
.mobile-menu .mobile-nav {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper);
  padding: 20px;
  border-left: 3px solid var(--brand-secondary);
  min-height: 100vh;
  width: 82%;
  max-width: 360px;
}
.mobile-menu a { color: var(--brand-primary); text-decoration: none; padding: 12px 10px; border-radius: var(--radius-s); border: 1px solid var(--muted); background: #fff; }
.mobile-menu a:hover { background: var(--brand-accent); border-color: var(--brand-secondary); color: var(--brand-primary); }

.mobile-menu.open,
.mobile-menu.is-open,
body.menu-open .mobile-menu { transform: translateX(0); }

.mobile-menu-close {
  position: absolute; right: 16px; top: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1px solid var(--muted); color: var(--brand-primary);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-1);
}

/* ---------------------------
   BUTTONS
---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; flex-direction: row; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px; /* vintage pill */
  border: 2px solid var(--brand-primary);
  background: #fff;
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-1);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .1s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--brand-secondary); border-color: var(--brand-secondary); color: #fff; }
.btn-primary:hover { background: #a4592f; color: #fff; border-color: #a4592f; }

.btn-secondary { background: var(--brand-accent); border-color: var(--brand-secondary); color: var(--brand-primary); }
.btn-secondary:hover { background: #FFEFD9; }

/* Inline link style */
a { color: var(--brand-secondary); }
a:hover { color: #a4592f; }

/* ---------------------------
   HERO SECTIONS
---------------------------- */
.hero {
  background: var(--brand-accent);
  border-bottom: 3px solid var(--brand-secondary);
}
.hero .content-wrapper { padding: 20px 0; }
.hero h1 { font-size: 28px; }
.hero .subheadline { max-width: 60ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border: 1px solid var(--muted); border-radius: var(--radius-s); box-shadow: var(--shadow-1); }
.trust-badges img { width: 18px; height: 18px; }

/* ---------------------------
   FEATURE GRID & LISTS
---------------------------- */
.feature-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.feature-grid .text-section { flex: 1 1 260px; }

.usp-list { display: flex; flex-direction: column; gap: 8px; padding-left: 0; list-style: none; }
.usp-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; border: 1px solid var(--muted); border-radius: var(--radius-s); box-shadow: var(--shadow-1); }
.usp-list li::before { content: "✦"; color: var(--brand-secondary); font-size: 14px; }

/* Ordered lists in process sections */
ol.text-section { list-style: decimal; padding-left: 20px; background: #fff; border: 1px solid var(--muted); border-radius: var(--radius-m); box-shadow: var(--shadow-1); }
ol.text-section li { margin: 8px 0; }

/* Icon lines inside contact blocks */
.text-section p img { width: 18px; height: 18px; margin-right: 8px; display: inline-block; vertical-align: middle; }
.text-section p a { text-decoration: underline; }

/* ---------------------------
   TESTIMONIALS (light bg with dark text for contrast)
---------------------------- */
.testimonial-card {
  background: #FFFFFF;
  border: 2px solid var(--brand-secondary);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  flex-direction: column; /* mobile */
}
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--brand-primary); }

/* ---------------------------
   FOOTER
---------------------------- */
footer {
  background: var(--brand-primary);
  color: #F7F2EA;
  border-top: 6px double var(--brand-secondary); /* classic double line */
}
footer .content-wrapper { gap: 14px; }
footer a { color: #F7D6BF; text-decoration: none; }
footer a:hover { color: #FFD4B2; text-decoration: underline; }

.footer-nav, .legal-nav {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.brand-signature { opacity: 0.9; font-size: 14px; margin-top: 4px; }

/* ---------------------------
   UTILITIES
---------------------------- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.center { display: flex; align-items: center; justify-content: center; }

/* ---------------------------
   COOKIE CONSENT BANNER & MODAL
---------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper-2);
  color: var(--ink);
  border-top: 3px solid var(--brand-secondary);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
  padding: 16px;
  transform: translateY(110%);
  transition: transform .35s ease;
  z-index: 1200;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; }
.cookie-actions .btn.reject { background: #fff; color: var(--brand-primary); border-color: var(--brand-primary); }

/* Modal overlay */
.cookie-modal {
  position: fixed; inset: 0;
  display: none; /* hidden by default */
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 1300;
}
.cookie-modal.open { display: flex; }
.cookie-modal .cookie-modal-content {
  display: flex; flex-direction: column; gap: 14px;
  width: 92%; max-width: 640px;
  background: #fff;
  border: 2px solid var(--brand-secondary);
  border-radius: var(--radius-l);
  padding: 18px;
  box-shadow: var(--shadow-2);
}
.cookie-modal .cookie-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--muted); border-radius: var(--radius-m); }
.cookie-note { font-size: 14px; color: var(--ink-soft); }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 26px; display: inline-flex; align-items: center; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: relative; width: 46px; height: 26px; background: #ddd; border-radius: 999px; transition: background .2s ease; border: 1px solid #bbb; }
.slider::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; background: #fff; border: 1px solid #bbb; border-radius: 50%; transition: transform .2s ease; }
.switch input:checked + .slider { background: var(--brand-secondary); border-color: var(--brand-secondary); }
.switch input:checked + .slider::after { transform: translateX(20px); }

/* ---------------------------
   RESPONSIVENESS (Mobile-first)
---------------------------- */
@media (min-width: 480px) {
  h1 { font-size: 34px; }
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }

  .hero h1 { font-size: 40px; }
  .hero .content-wrapper { padding: 30px 0; }

  .testimonial-card { flex-direction: row; justify-content: space-between; }

  .text-image-section { flex-direction: row; }
}

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

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 28px; }
  .container { gap: 24px; }
}

/* ---------------------------
   PAGE-SPECIFIC REFINEMENTS
---------------------------- */
/* Index */
main section > .container > .content-wrapper > h2 { border-left: 6px solid var(--brand-secondary); padding-left: 10px; }

/* Contact details inline icons alignment already covered */

/* Footer blocks as cards on light theme pages */
footer .text-section { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #F7F2EA; }
footer .text-section h3 { color: #FFF; }

/* ---------------------------
   LINKS STATES & MICRO-INTERACTIONS
---------------------------- */
nav a { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.btn, .mobile-menu a { will-change: transform; }

/* ---------------------------
   ACCESSIBILITY & PRINT BASICS
---------------------------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; color: #000; }
  body { background: #fff; }
}

/* ---------------------------
   ENSURE GAPS & NO OVERLAP
---------------------------- */
main section { padding: 30px 0; }
main section + section { margin-top: 10px; }

/* Ensure minimum spacing between all content cards */
.content-wrapper > * { margin-bottom: 20px; }
.content-wrapper > *:last-child { margin-bottom: 0; }

/* ---------------------------
   ARIA & STATE HIGHLIGHTS
---------------------------- */
[aria-current="page"] { font-weight: 700; }

/* ---------------------------
   MISC ELEMENT POLISH
---------------------------- */
blockquote { margin: 0; padding-left: 14px; border-left: 4px solid var(--brand-secondary); color: var(--ink-soft); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 14px; }

/* ---------------------------
   NAV CLUSTERS INSIDE FOOTER & HEADER
---------------------------- */
.footer-nav a, .legal-nav a { padding: 6px 8px; border-radius: var(--radius-s); border: 1px solid transparent; }
.footer-nav a:hover, .legal-nav a:hover { border-color: rgba(255,255,255,0.25); }

/* ---------------------------
   CLASSIC PATTERN EFFECT (subtle lines using borders only)
---------------------------- */
.section.vintage { background: var(--paper); border-top: 6px double var(--line); border-bottom: 6px double var(--line); }

/* ---------------------------
   QUALITY BADGES & INFO STRIPS
---------------------------- */
.info-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--muted); border-radius: var(--radius-m); padding: 12px; }

/* ---------------------------
   FORMS (if added later)
---------------------------- */
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--muted); background: #fff; color: var(--ink);
}
input:focus, textarea:focus { border-color: var(--brand-secondary); box-shadow: 0 0 0 3px rgba(194,109,58,0.25); outline: none; }

/* ---------------------------
   ENSURE FLEX FOR ALL COMMON CONTAINERS
---------------------------- */
nav, header, footer, .hero, .feature-grid, .usp-list, .trust-badges, .cta-group, .footer-nav, .legal-nav, .hero-ctas {
  display: flex; /* already defined but ensures flex-only rule */
}
nav { align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------
   HIGH CONTRAST FOR TESTIMONIALS & REVIEWS
---------------------------- */
.testimonial-card { background: var(--brand-accent); color: var(--brand-primary); }
.testimonial-card p { color: var(--brand-primary); }

/* ---------------------------
   DESKTOP LAYOUT TWEAKS
---------------------------- */
@media (min-width: 992px) {
  .feature-grid .text-section { flex: 1 1 calc(50% - 20px); }
}
