/*
  modern.css – clean, modern overrides and a small design system
  - Loaded AFTER main.css to progressively enhance and simplify visuals
  - Avoids gradients, heavy shadows, and dated skeuomorphism
  - Adds light/dark theming, better spacing, and accessible focus styles
*/

:root {
  --font-sans: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;

  /* Colors (Dark default) */
  --bg: #0f1115;
  --bg-elev: #131722;
  --surface: #161b26;
  --text: #e6e9ef;
  --muted: #a0a7b4;
  --border: rgba(255,255,255,0.08);
  --primary: #5dc264; /* fresh green */
  --primary-600: #42ad4b;
  --accent: #a3a8f0;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.35);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-elev: #f9fafb;
    --surface: #ffffff;
    --text: #0e1320;
    --muted: #4b5563;
    --border: rgba(15,19,32,0.08);
    --primary: #2ca24b;
    --primary-600: #23833e;
    --accent: #4f46e5;
  }
}

/* Resets and base typography (override heavy styles) */
html { scroll-behavior: smooth; }
body,
input,
textarea,
select {
  font-family: var(--font-sans);
  color: var(--text);
}

body {
  background: var(--bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); }

/* Accessible focus */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Container and spacing */
.container { max-width: 1140px; padding-left: 20px; padding-right: 20px; }

/* Navigation – flatten gradient, add subtle border and translucency */
#nav {
  background: rgba(20, 24, 32, 0.7);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.nav-container { height: 64px; }
.nav-logo-img { height: 36px; filter: none; opacity: 1; }
.nav-links { gap: var(--space-4); }
.nav-links a {
  color: var(--text);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav-links a:hover { background: rgba(255,255,255,0.06); color: var(--text) !important; }

.language-selector .current-lang { background: rgba(255,255,255,0.06); }
.language-selector .lang-dropdown { background: var(--surface); border: 1px solid var(--border); }
.language-selector .lang-dropdown a:hover { background: rgba(255,255,255,0.06); }
.language-selector .lang-dropdown a.active { background: rgba(93,194,100,0.15); color: var(--text); }

/* Wrapper sections – remove gradients & heavy shadows */
.wrapper {
  background: transparent;
  box-shadow: none;
  text-shadow: none;
  padding: var(--space-9) 0;
}
.wrapper.style1 { background: var(--bg-elev); }
.wrapper.style2 { background: var(--bg); }
.wrapper.style3 { background: var(--bg-elev); }
.wrapper.style4 { background: var(--bg-elev); color: var(--text); }

/* Hero adjustments */
#top { padding: calc(var(--space-9) + 24px) 0 var(--space-9) 0; }
#top h1 { color: var(--text); -webkit-text-fill-color: initial; background: none; }
#top p { color: var(--muted); }

/* Work section spacing alignment (5px gutters) */
#work header { margin-bottom: var(--space-6); }
#work .row { margin: -5px; }
#work .row > * { padding: 5px; }
/* Explicit padding for requested columns */
#work .row > .col-4.col-12-medium { padding: 5px; }

/* Card component – modernize existing .box.style1 */
.box {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-sm);
}
.box.style1 { padding: var(--space-7); }
.box.style1 h3 { color: var(--text); margin-bottom: var(--space-3); font-weight: 700; }
.box.style1 p { color: var(--muted); margin: 0; }

/* Equal-height service cards */
#work .row > [class^="col-"],
#work .row > [class*=" col-"] { display: flex; }
#work .row > [class^="col-"] > .box,
#work .row > [class*=" col-"] > .box { flex: 1 1 auto; display: flex; flex-direction: column; }

/* Icon treatment – remove gradient badges, use subtle tint */
.icon.featured {
  width: 56px; height: 56px; line-height: 56px; font-size: 28px;
  border-radius: 50%;
  background: rgba(93,194,100,0.15);
  color: var(--primary);
  text-shadow: none;
  box-shadow: none;
  margin-bottom: var(--space-4);
}
.icon.featured:hover { transform: none; box-shadow: none; }

/* Buttons – flat, high-contrast */
input[type="button"],
input[type="submit"],
input[type="reset"],
button,
.button {
  background: var(--primary);
  color: #fff !important;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-weight: 700;
  text-shadow: none;
  box-shadow: none;
}
.button:hover,
button:hover,
input[type="submit"]:hover { background: var(--primary-600); }

/* Forms */
form input[type=text],
form input[type=email],
form input[type=password],
form select,
form textarea {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
}
form input:focus,
form textarea:focus,
form select:focus { background: var(--bg-elev); box-shadow: none; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding-top: var(--space-6);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* Nicer footer layout */
footer.site-footer { background: transparent; }
footer.site-footer .footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
footer.site-footer .footer-left p { margin: 0; color: var(--muted); }
footer.site-footer .footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-4); }
footer.site-footer .footer-links a { color: var(--muted); text-decoration: none; }
footer.site-footer .footer-links a:hover { color: var(--text); }
@media screen and (max-width: 736px) {
  footer.site-footer .footer-content { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}

/* Privacy/Impressum articles */
article.wrapper .container { max-width: 840px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


