/* =========================================================
   Rythm Raumwerk — Professional Corporate Style (Flexbox-only)
   Author: Senior CSS Developer & UI Designer
   Notes:
   - Mobile-first
   - Blue/gray palette with warm accent
   - Business fonts, formal tone
   - ONLY Flexbox for layout (no CSS Grid/Columns)
   - Includes mobile menu + cookie banner
   ========================================================= */

/* -----------------------------
   CSS RESET & NORMALIZE
----------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding-left: 20px; }
ol { margin: 0; padding-left: 22px; }
p, h1, h2, h3, h4, h5, h6 { margin: 0; }
button { font: inherit; border: none; background: none; padding: 0; cursor: pointer; }
:focus { outline: 2px solid #2B66E5; outline-offset: 2px; }

/* -----------------------------
   THEME TOKENS
----------------------------- */
:root {
  --primary: #1B2A41;  /* deep blue */
  --secondary: #D38F3B; /* warm accent */
  --accent: #F3F4F6;   /* light gray */
  --ink: #1A2433;      /* primary text on light */
  --ink-muted: #4B5563;/* secondary text */
  --line: #E5E7EB;     /* subtle borders */
  --bg: #FFFFFF;       /* base light */
  --bg-alt: #F8FAFC;   /* alt background */
  --success: #1E824C;
  --danger: #B91C1C;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, 0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 200ms ease;
}

/* -----------------------------
   TYPOGRAPHY
----------------------------- */
body {
  font-family: Verdana, "Segoe UI", Tahoma, Geneva, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, .display { font-family: "Trebuchet MS", Verdana, Arial, sans-serif; font-weight: 700; letter-spacing: 0.2px; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; margin-bottom: 16px; line-height: 1.3; }
h3 { font-size: 18px; margin-top: 12px; margin-bottom: 8px; }
p { font-size: 16px; color: var(--ink); }
.small { font-size: 14px; color: var(--ink-muted); }
strong { font-weight: 700; }

/* Links */
a { color: var(--primary); transition: color var(--transition); }
a:hover { color: #243754; }

/* -----------------------------
   LAYOUT WRAPPERS (Flex-only)
----------------------------- */
.container { display: flex; width: 100%; justify-content: center; padding: 0 20px; }
.content-wrapper { display: flex; width: 100%; max-width: 1200px; flex-direction: column; gap: 16px; }

/* 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; }

/* Generic section padding for pages */
main section { padding: 40px 0; }

/* -----------------------------
   HEADER / NAVIGATION
----------------------------- */
header { position: sticky; top: 0; background: #FFFFFF; border-bottom: 1px solid var(--line); z-index: 1000; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 700; }
.brand img { height: 36px; width: auto; }
.brand span { display: none; font-size: 16px; }

.main-nav { display: none; align-items: center; gap: 20px; }
.main-nav a { padding: 10px 8px; color: var(--ink); border-radius: 6px; }
.main-nav a:hover { background: var(--accent); color: var(--primary); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius-sm); border: 1px solid var(--primary); color: var(--primary); background: #FFFFFF; transition: all var(--transition); box-shadow: var(--shadow-1); }
.button:hover { background: #F7F9FC; transform: translateY(-1px); }
.button.primary { background: var(--primary); color: #FFFFFF; border-color: var(--primary); }
.button.primary:hover { background: #223554; border-color: #223554; }
.button:active { transform: translateY(0); }
.button:focus-visible { box-shadow: 0 0 0 3px rgba(211, 143, 59, 0.35); }

/* Mobile Menu Toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); color: var(--primary); background: #fff; transition: background var(--transition), color var(--transition); }
.mobile-menu-toggle:hover { background: var(--accent); }

/* Mobile Menu Panel */
.mobile-menu { position: fixed; top: 0; right: 0; height: 100vh; width: 92%; max-width: 360px; background: #FFFFFF; box-shadow: var(--shadow-2); transform: translateX(100%); transition: transform 260ms ease; z-index: 1200; display: flex; flex-direction: column; padding: 16px; gap: 10px; }
.mobile-menu.open, .mobile-menu.active { transform: translateX(0%); }
.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); color: var(--primary); background: #fff; }
.mobile-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mobile-nav a { display: flex; padding: 12px; border-radius: 8px; background: var(--accent); color: var(--ink); }
.mobile-nav a:hover { background: #E8EBF0; }

/* Optional body state when menu open */
body.menu-open { overflow: hidden; }

/* -----------------------------
   HERO SECTION
----------------------------- */
.hero { background: var(--primary); color: #FFFFFF; }
.hero .content-wrapper { padding: 32px 0; gap: 16px; }
.hero h1 { color: #FFFFFF; }
.hero p { color: #E6EAF2; max-width: 800px; }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Trust badges */
.trust-badges ul { display: flex; flex-wrap: wrap; gap: 12px 20px; list-style: none; padding: 0; }
.trust-badges li { display: flex; align-items: center; gap: 8px; color: #E6EAF2; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.06); }
.trust-badges img { width: 18px; height: 18px; }

/* -----------------------------
   TEXT SECTIONS & CONTENT
----------------------------- */
.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section p { max-width: 900px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; }
.text-section li { color: var(--ink); }

/* Alternate section styling (subtle background) */
main section:nth-of-type(2n) { background: var(--bg-alt); }

/* -----------------------------
   TESTIMONIALS (High-contrast, readable)
----------------------------- */
.testimonial-card { background: #FFFFFF; border: 1px solid var(--line); border-left: 4px solid var(--secondary); border-radius: var(--radius-md); box-shadow: var(--shadow-1); max-width: 920px; }
.testimonial-card p { color: var(--ink); }
.testimonial-card strong { color: var(--primary); }

/* -----------------------------
   FOOTER
----------------------------- */
footer { background: var(--primary); color: #DCE3EE; padding: 32px 0; margin-top: 20px; }
footer .content-wrapper { gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 40px; width: auto; }
.footer-brand p { color: #E6EDF7; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-nav > div { display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.footer-nav h3 { color: #FFFFFF; margin-bottom: 4px; font-size: 16px; }
.footer-nav a { color: #DCE3EE; padding: 6px 0; }
.footer-nav a:hover { color: var(--secondary); }

/* -----------------------------
   CARDS (generic, for future components)
----------------------------- */
.card { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-1); padding: 20px; transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* -----------------------------
   COOKIE CONSENT (Banner + Modal)
----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: #FFFFFF; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,0.06); z-index: 1500; transform: translateY(100%); transition: transform 260ms ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .container { padding: 16px 20px; }
.cookie-banner .content-wrapper { flex-direction: column; gap: 12px; }
.cookie-title { font-weight: 700; color: var(--primary); }
.cookie-text { color: var(--ink-muted); }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-accept { background: var(--primary); color: #fff; border: 1px solid var(--primary); padding: 10px 14px; border-radius: 8px; }
.cookie-reject { background: #FFFFFF; color: var(--primary); border: 1px solid var(--primary); padding: 10px 14px; border-radius: 8px; }
.cookie-settings { background: var(--secondary); color: #1B1B1B; border: 1px solid var(--secondary); padding: 10px 14px; border-radius: 8px; }
.cookie-accept:hover { background: #223554; }
.cookie-reject:hover { background: var(--accent); }
.cookie-settings:hover { filter: brightness(0.95); }

/* Cookie Modal */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1600; opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.cookie-modal-overlay.open { opacity: 1; pointer-events: auto; }
.cookie-modal { display: flex; flex-direction: column; gap: 14px; width: 92%; max-width: 560px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: 20px; }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.cookie-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--accent); }

/* -----------------------------
   UTILITIES
----------------------------- */
.muted { color: var(--ink-muted); }
.hidden { display: none !important; }
.hr { display: flex; height: 1px; background: var(--line); width: 100%; margin: 8px 0; }

/* -----------------------------
   RESPONSIVE (Mobile-first)
----------------------------- */
@media (min-width: 576px) {
  h1 { font-size: 36px; }
  .hero .content-wrapper { padding: 40px 0; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .brand span { display: inline; }
  .text-image-section { flex-direction: row; }
  .cookie-banner .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  header .content-wrapper { gap: 24px; }
  .cta-group { gap: 14px; }
}

@media (min-width: 1200px) {
  h1 { font-size: 48px; }
}

/* -----------------------------
   PAGE-SPECIFIC REFINEMENTS
----------------------------- */
/* Index & general headings spacing */
main h2 { margin-bottom: 8px; }

/* Lists appearance for corporate clarity */
.text-section ul { list-style: disc; }
.text-section ol { list-style: decimal; }
.text-section li { padding-left: 0; }

/* Price lists and emphasis */
.text-section h3 + ul { margin-top: 4px; }

/* Buttons within text blocks spacing */
.text-section .button { align-self: flex-start; margin-top: 8px; }

/* Accessibility: hover + focus for nav links */
.main-nav a:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.mobile-nav a:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

/* -----------------------------
   FLEX ENHANCEMENTS FOR CONTENT LAYOUTS
----------------------------- */
/* Use content-grid when placing cards side-by-side */
.content-grid > * { flex: 1 1 280px; min-width: 260px; }

/* Card container children sizing */
.card-container > .card { flex: 1 1 320px; }

/* Ensure adequate spacing between all content blocks */
main section .content-wrapper > * { margin-bottom: 12px; }
main section .content-wrapper > *:last-child { margin-bottom: 0; }

/* -----------------------------
   HIGH CONTRAST IN TESTIMONIAL SECTIONS
----------------------------- */
/* Dark text on light background guarantee */
section .testimonial-card p, section .testimonial-card strong { color: #0F172A; }

/* -----------------------------
   MISC MICRO-INTERACTIONS
----------------------------- */
.button, .mobile-menu-toggle, .mobile-menu-close { transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition); }

/* -----------------------------
   ENSURE FLEX ON COMMON BLOCKS
----------------------------- */
/* Footer columns stack on mobile, spread on desktop via flex already defined */

/* Additional structural flex for non-hero sections */
section .container { display: flex; }
section .content-wrapper { display: flex; flex-direction: column; }

/* Prevent overlap and ensure spacing */
section + section { margin-top: 0; }

/* -----------------------------
   PRINT BASICS
----------------------------- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  a { text-decoration: underline; }
}
