/* ============================================================
   RAUM IM LEBEN SERVICE UG — main.css
   Design System: Tokens, Reset, Typography, Utilities
   ============================================================ */

/* ------------------------------------------------------------
   GOOGLE FONTS
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

/* ------------------------------------------------------------
   DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
  /* Colors — Backgrounds */
  --color-bg:          #FAF8F4;
  --color-bg-alt:      #F2EDE6;
  --color-surface:     #FFFFFF;

  /* Colors — Brand Green */
  --color-green-dark:  #3D6B52;
  --color-green-mid:   #5A8A6E;
  --color-green-light: #D4E8DB;
  --color-green-xlight:#EEF6F1;

  /* Colors — CTA Terracotta */
  --color-cta:         #C8694A;
  --color-cta-hover:   #A8503A;

  /* Colors — Text */
  --color-text-dark:   #1C2B22;
  --color-text-body:   #3D4A42;
  --color-text-muted:  #7A8A80;
  --color-text-inv:    #FFFFFF;

  /* Colors — Borders */
  --color-border:      #E0D9CF;
  --color-border-light:#EDE8E0;

  /* Colors — Footer */
  --color-footer-bg:   #1C2B22;
  --color-footer-text: #C8D4CC;

  /* Typography — Fonts */
  --font-serif:   'Lora', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;

  /* Typography — Scale */
  --text-xs:   0.8125rem;   /* 13px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 1.125rem;    /* 18px — elderly-friendly base */
  --text-lg:   1.25rem;     /* 20px */
  --text-xl:   1.5rem;      /* 24px */
  --text-2xl:  1.875rem;    /* 30px */
  --text-3xl:  2.25rem;     /* 36px */
  --text-4xl:  2.75rem;     /* 44px */
  --text-5xl:  3.25rem;     /* 52px */

  /* Typography — Weights */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* Typography — Line Heights */
  --lh-tight:  1.25;
  --lh-snug:   1.4;
  --lh-normal: 1.6;
  --lh-relaxed:1.75;

  /* Spacing — 8px base grid */
  --space-1:   0.25rem;  /* 4px  */
  --space-2:   0.5rem;   /* 8px  */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3rem;     /* 48px */
  --space-16:  4rem;     /* 64px */
  --space-20:  5rem;     /* 80px */
  --space-24:  6rem;     /* 96px */
  --space-32:  8rem;     /* 128px */

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card:  0 2px 16px rgba(61, 107, 82, 0.08);
  --shadow-card-hover: 0 6px 28px rgba(61, 107, 82, 0.14);
  --shadow-nav:   0 2px 12px rgba(28, 43, 34, 0.06);
  --shadow-btn:   0 2px 8px rgba(200, 105, 74, 0.25);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Layout */
  --container-max:   1200px;
  --container-pad:   var(--space-6);
  --section-pad-y:   var(--space-20);
  --nav-height:      72px;
}

/* ------------------------------------------------------------
   CSS RESET
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--color-text-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-dark);
  line-height: var(--lh-snug);
  font-weight: var(--fw-bold);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-lg);  font-family: var(--font-sans); font-weight: var(--fw-semi); }
h4 { font-size: var(--text-base); font-family: var(--font-sans); font-weight: var(--fw-semi); }

p {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--color-text-body);
}

.text-muted {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ------------------------------------------------------------
   LAYOUT UTILITIES
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-pad-y);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--green-light {
  background-color: var(--color-green-xlight);
}

.section--dark {
  background-color: var(--color-green-dark);
  color: var(--color-text-inv);
}

.section--dark h2,
.section--dark h3,
.section--dark p {
  color: var(--color-text-inv);
}

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
}

/* Flex utilities */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left;   }

/* Spacing helpers */
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* ------------------------------------------------------------
   SECTION HEADINGS
   ------------------------------------------------------------ */
.section-heading {
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  max-width: 60ch;
}

.section-header {
  margin-bottom: var(--space-12);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin-inline: auto;
}

/* Section label above heading */
.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-green-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

/* ------------------------------------------------------------
   ACCESSIBILITY
   ------------------------------------------------------------ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-green-dark);
  color: white;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semi);
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Focus styles — visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--color-green-dark);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------
   RESPONSIVE BREAKPOINTS
   ------------------------------------------------------------ */

/* Mobile first. Breakpoints:
   sm:  480px  (large phones)
   md:  768px  (tablets)
   lg:  1024px (small laptops)
   xl:  1280px (desktops)
*/

@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.75rem;
    --text-4xl: 2.25rem;
    --text-3xl: 1.875rem;
    --section-pad-y: var(--space-16);
  }

  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 1.875rem;
    --text-3xl: 1.625rem;
    --text-base: 1.0625rem;  /* 17px on mobile */
    --section-pad-y: var(--space-12);
    --container-pad: var(--space-5);
  }

  .grid-2 { grid-template-columns: 1fr; gap: var(--space-8); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  :root {
    --text-4xl: 1.625rem;
    --text-3xl: 1.375rem;
    --section-pad-y: var(--space-10);
  }

  .grid-5 { grid-template-columns: 1fr; }
}
