/* ==========================================================================
   Ever&Keep - Corporate Website Styles
   Refined institutional minimalism
   ========================================================================== */

/* Local Font: Open Sans */
@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/Open_Sans/static/OpenSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/Open_Sans/static/OpenSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/Open_Sans/static/OpenSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* CSS Custom Properties */
:root {
  /* Brand Colors */
  --color-primary: #1a5a4c;
  --color-accent: #7a2d5c;
  --color-content-bg: #e8ede8;
  --color-text: #333333;
  --color-white: #ffffff;

  /* Typography */
  --font-family: 'Open Sans', 'Segoe UI', sans-serif;
  --font-size-base: 17px;
  --font-size-small: 15px;
  --font-size-h1: 1.5rem;
  --font-size-h2: 17px;
  --line-height: 1.6;

  /* Layout */
  --max-width: 900px;
  --header-height: 140px;
  --spacing-unit: 1rem;
  --content-padding: 3.5rem;
  --content-indent: 1.5rem;
}

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

/* Base Typography */
html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--content-indent);
  padding-right: var(--content-indent);
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  background-color: var(--color-white);
  padding: 2rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.logo {
  display: block;
  height: 90px;
  width: auto;
}

.logo img {
  height: 100%;
  width: auto;
}

/* Text-based logo fallback */
.logo-text {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.logo-text .ampersand {
  color: var(--color-accent);
}

.header__nav {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 1.5rem;
}

.lang-switch a {
  font-size: var(--font-size-small);
  color: var(--color-text);
  text-decoration: none;
}

.lang-switch a.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switch a:hover {
  color: var(--color-accent);
}

.lang-divider {
  color: var(--color-text);
  font-size: var(--font-size-small);
}

.header__nav > a {
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--color-primary);
  position: relative;
}

.header__nav > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width 0.25s ease;
}

.header__nav > a:hover::after,
.header__nav > a.active::after {
  width: 100%;
}

.header__nav > a.active {
  color: var(--color-accent);
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.main {
  flex: 1;
  background-color: var(--color-content-bg);
}

.content {
  padding-top: var(--content-padding);
  padding-bottom: var(--content-padding);
  min-height: 400px;
}

.content h1 {
  font-size: var(--font-size-h1);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.content h2 {
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 0;
}

.content p {
  margin-bottom: 1rem;
}

.content p:last-child {
  margin-bottom: 0;
}

/* Startseite: größere Schrift */
.page-home .content {
  font-size: 22px;
}

/* Brand name in text */
.brand {
  font-weight: 700;
}

/* Contact info styling */
.contact-info {
  margin-top: 0.5rem;
}

.contact-info p {
  margin-bottom: 0.25rem;
}

/* Legal page sections */
.legal-section {
  margin-bottom: 2rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2:first-child {
  margin-top: 0;
}

/* Address block */
address {
  font-style: normal;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--color-white);
  padding: 1.5rem 0;
  border-top: 1px solid #e0e0e0;
}

.footer__inner {
  display: flex;
  gap: 2rem;
}

.footer__nav a {
  font-size: var(--font-size-small);
  color: var(--color-text);
}

.footer__nav a:hover {
  color: var(--color-accent);
}

.footer__nav a.active {
  color: var(--color-accent);
  font-weight: 700;
}

.footer__nav a.active:hover {
  font-weight: 700;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-h1: 1.4rem;
    --content-padding: 2.5rem;
    --header-height: 100px;
  }

  .header {
    padding: 1.5rem 0;
  }

  .logo {
    height: 90px;
  }

  .logo-text {
    font-size: 1.8rem;
  }

  .content {
    min-height: 300px;
  }

  .page-home .content {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-base: 15px;
    --font-size-small: 13px;
    --font-size-h1: 1.3rem;
    --content-padding: 2rem;
  }

  .header {
    padding: 1.25rem 0;
  }

  .logo {
    height: 70px;
  }

  .logo-text {
    font-size: 1.5rem;
  }

  .lang-switch {
    margin-right: 1rem;
  }

  .footer__inner {
    gap: 1.5rem;
  }

  .page-home .content {
    font-size: 18px;
  }
}

@media (max-width: 360px) {
  .logo {
    height: 55px;
  }

  .lang-switch {
    margin-right: 0.75rem;
    gap: 0.15rem;
  }

  .header {
    padding: 1rem 0;
  }
}

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

/* Email link */
a[href^="mailto:"] {
  word-break: break-all;
}

/* Phone link */
a[href^="tel:"] {
  white-space: nowrap;
}
