/* ========================================
   idoo.io — Corporate Website Styles
   Dark/Light Theme mit Magenta/Blau-Gradient
   ======================================== */

/* --- Custom Properties (Dark = Default) --- */
:root {
  --color-bg: #0b0b1a;
  --color-bg-light: #111128;
  --color-bg-card: rgba(255, 255, 255, 0.035);
  --color-bg-card-hover: rgba(255, 255, 255, 0.06);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --color-text: #e4e4f0;
  --color-text-secondary: #8e8ea8;
  --color-text-heading: #f4f4ff;
  --color-primary: #2979ff;
  --color-accent: #e040fb;
  --color-accent-soft: rgba(224, 64, 251, 0.15);
  --color-primary-soft: rgba(41, 121, 255, 0.15);
  --gradient-primary: linear-gradient(135deg, #e040fb 0%, #2979ff 100%);
  --gradient-bg: linear-gradient(180deg, #0b0b1a 0%, #0f0f2d 50%, #0b0b1a 100%);
  --glow-accent: 0 0 30px rgba(224, 64, 251, 0.2);
  --glow-primary: 0 0 30px rgba(41, 121, 255, 0.2);
  --color-header-bg: rgba(11, 11, 26, 0.85);
  --color-header-bg-scrolled: rgba(11, 11, 26, 0.95);
  --color-overlay: rgba(0, 0, 0, 0.6);
  --color-card-shadow: rgba(0, 0, 0, 0.3);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Consolas, monospace;
  --max-width: 1200px;
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 80px;
}

/* --- Light Theme --- */
[data-theme="light"] {
  --color-bg: #f5f5fa;
  --color-bg-light: #eeeef5;
  --color-bg-card: rgba(0, 0, 0, 0.03);
  --color-bg-card-hover: rgba(0, 0, 0, 0.06);
  --color-border: rgba(0, 0, 0, 0.1);
  --color-border-hover: rgba(0, 0, 0, 0.18);
  --color-text: #2a2a3d;
  --color-text-secondary: #5c5c7a;
  --color-text-heading: #1a1a2e;
  --color-primary: #1a65e0;
  --color-accent: #c020d8;
  --color-accent-soft: rgba(192, 32, 216, 0.1);
  --color-primary-soft: rgba(26, 101, 224, 0.1);
  --glow-accent: 0 0 30px rgba(192, 32, 216, 0.1);
  --glow-primary: 0 0 30px rgba(26, 101, 224, 0.1);
  --color-header-bg: rgba(245, 245, 250, 0.85);
  --color-header-bg-scrolled: rgba(245, 245, 250, 0.95);
  --color-overlay: rgba(0, 0, 0, 0.3);
  --color-card-shadow: rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-heading);
  line-height: 1.25;
  font-weight: 700;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--color-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: var(--color-header-bg-scrolled);
  box-shadow: 0 4px 30px var(--color-card-shadow);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.header__logo img {
  width: 168px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.nav__cta:hover {
  color: #fff;
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--glow-accent);
}

/* --- Theme Toggle --- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text);
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

/* --- Company Card Link --- */
.company-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: color var(--transition), gap var(--transition);
}

.company-card__link:hover {
  color: var(--color-accent);
  gap: 10px;
}

.company-card__link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Mobile Menu Toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text);
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 64, 251, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(41, 121, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 80px 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--color-accent-soft);
  border: 1px solid rgba(224, 64, 251, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__title .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(224, 64, 251, 0.2);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(224, 64, 251, 0.3);
}

.btn--secondary {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  color: var(--color-text-heading);
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--outline:hover {
  color: var(--color-text-heading);
  border-color: var(--color-border-hover);
  background: var(--color-bg-card);
}

/* --- Section Base --- */
.section {
  padding: 120px 0;
  position: relative;
}

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

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section__label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section__subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  padding: 36px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: all var(--transition);
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px var(--color-card-shadow);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 24px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.service-card:nth-child(even) .service-card__icon {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.service-card__title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.service-card__text {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Values Section --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.value-card {
  text-align: center;
  padding: 48px 32px;
}

.value-card__icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: var(--glow-accent);
}

.value-card__icon svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.5;
}

.value-card__title {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.value-card__text {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto;
}

/* --- Companies / Partners Section --- */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}

.company-card {
  display: flex;
  flex-direction: column;
  padding: 48px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: all var(--transition);
}

.company-card__text {
  flex: 1;
}

.company-card__link {
  align-self: flex-start;
}

.company-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.company-card__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.company-card--tech .company-card__label {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.company-card--consulting .company-card__label {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.company-card__name {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.company-card__role {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.company-card__text {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.companies-summary {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px;
  background: linear-gradient(135deg, rgba(224, 64, 251, 0.05), rgba(41, 121, 255, 0.05));
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
}

.companies-summary__title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.companies-summary__text {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- CTA Section --- */
.cta {
  text-align: center;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(224, 64, 251, 0.08) 0%, rgba(41, 121, 255, 0.05) 40%, transparent 70%);
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 1;
}

.cta__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.cta__text {
  color: var(--color-text-secondary);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer__brand {
  max-width: 280px;
}

.footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
}

.footer__description {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer__heading {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin-bottom: 20px;
}

.footer__list li {
  margin-bottom: 10px;
}

.footer__list a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer__list a:hover {
  color: var(--color-text);
}

.footer__contact-item {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copyright {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.footer__legal a:hover {
  color: var(--color-text);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Legal Pages (Impressum, Datenschutz) --- */
.legal-page {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.legal-page h1 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.legal-page h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

.legal-page h3 {
  font-size: 1.15rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-page p {
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-page a {
  color: var(--color-primary);
}

.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page li {
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-page .company-block {
  padding: 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: 24px;
}

.legal-page .company-block h3 {
  margin-top: 0;
}

/* --- Mobile Menu Overlay --- */
.nav__overlay {
  display: none;
}

/* --- Responsive Design --- */

/* Tablet */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 72px;
  }

  .header__logo img {
    width: 200px;
  }

  .section {
    padding: 80px 0;
  }

  .section__header {
    margin-bottom: 48px;
  }

  /* Mobile Navigation */
  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--color-bg-light);
    border-left: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 80px 24px 24px;
    gap: 16px;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 105;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav__overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 102;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .nav__overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: column;
    gap: 4px;
  }

  .nav__link {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .nav__cta {
    justify-content: center;
    padding: 14px 24px;
    font-size: 1rem;
  }

  /* Hero */
  .hero__content {
    padding: 48px 0;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    text-align: center;
  }

  /* Grids */
  .services-grid,
  .values-grid,
  .companies-grid {
    grid-template-columns: 1fr;
  }

  .value-card {
    padding: 32px 16px;
  }

  .company-card {
    padding: 32px;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__legal {
    flex-wrap: wrap;
    gap: 16px;
  }

  /* CTA */
  .cta__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Small Mobile */
@media (max-width: 400px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .section__title {
    font-size: 1.75rem;
  }
}
