/* Einsundnull.NET - Main Stylesheet */
/* Based on Style Guide v1.0 */

/* ========== Font Faces ========== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-700.woff2') format('woff2');
}

/* ========== CSS Variables ========== */
:root {
  --color-green: #38AE47;
  --color-green-light: #66D57B;
  --color-bg: #191919;
  --color-surface: #111111;
  --color-text: #FFFFFF;
  --color-muted: #BDBDBD;
  --color-outline: rgba(56,174,71,0.12);
  --shadow-green: rgba(56,174,71,0.10);
  --max-width: 1200px;
  --radius: 10px;
  --transition: 240ms cubic-bezier(.2,.8,.2,1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--color-green-light);
}

a:focus-visible {
  outline: 3px solid rgba(102,213,123,0.18);
  outline-offset: 3px;
}

/* ========== Skip Link ========== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-green);
  color: var(--color-text);
  padding: 8px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* ========== Container & Layout ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

/* ========== Header & Navigation ========== */
.header {
  background: var(--color-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

/* Platzhalter für fixed header, damit Content nicht darunter verschwindet */
body {
  padding-top: 60px;
}

@media (min-width: 768px) {
  body {
    padding-top: 80px;
  }
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  height: 40px;
  transition: height 0.3s ease;
}

@media (min-width: 768px) {
  .logo-img {
    height: 60px;
  }
  
  .header.scrolled .logo-img {
    height: 40px;
  }
}

.nav-menu {
  display: none;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--color-text);
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-menu a:hover {
  color: var(--color-green-light);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-green);
  transition: width var(--transition);
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-menu.active {
  display: flex;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Desktop Navigation */
@media (min-width: 769px) {
  .nav-menu {
    display: flex;
  }
  
  .menu-toggle {
    display: none;
  }
}

/* Mobile Slide-in Panel */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  bottom: 0;
  width: 80%;
  max-width: 320px;
  background: var(--color-surface);
  transition: right 0.35s ease-out;
  z-index: 100;
  padding: 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.active {
  right: 0;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}

.mobile-nav-close {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 2rem;
  padding: 0.5rem;
}

.mobile-nav-list {
  list-style: none;
}

.mobile-nav-list li {
  margin-bottom: 1.5rem;
}

.mobile-nav-list a {
  color: var(--color-text);
  font-size: 1.125rem;
  display: block;
  padding: 0.5rem 0;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease-out, visibility 0.35s ease-out;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background: var(--color-green);
  color: var(--color-text);
  box-shadow: 0 6px 18px rgba(56,174,71,0.12);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--shadow-green);
  color: var(--color-text);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-green);
}

.btn-secondary:hover {
  border-color: var(--color-green-light);
  box-shadow: 0 12px 30px var(--shadow-green);
  transform: translateY(-3px);
  color: var(--color-text);
}

.btn:focus-visible {
  outline: 3px solid rgba(102,213,123,0.18);
  outline-offset: 3px;
}

/* ========== Cards ========== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid rgba(102, 213, 123, 0.3);
  padding: 1.25rem;
  transition: transform 400ms ease-out, box-shadow var(--transition), border-color var(--transition);
  position: relative;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* Glow effect layer - sits behind the card content */
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: radial-gradient(
    400px circle at var(--mouse-x) var(--mouse-y),
    rgba(102, 213, 123, 0.9) 0%,
    rgba(56, 174, 71, 0.5) 25%,
    rgba(56, 174, 71, 0.2) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

/* Inner card background to cover the glow except at edges */
.card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  background: var(--color-surface);
  z-index: 0;
  pointer-events: none;
}

/* Ensure card content is above the glow layers */
.card > * {
  position: relative;
  z-index: 1;
}

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

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px var(--shadow-green);
  border-color: transparent;
}

/* Touch devices: disable glow effect, keep press feedback */
@media (hover: none) {
  .card:active {
    transform: scale(0.98);
  }
}

.contact-card{
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid rgba(56,174,71,0.06);
  padding: 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: 0 12px 40px var(--shadow-green);
  border-color: var(--color-green-light);
}

.card-icon {
  width: 58px;
  height: 58px;
  display: block;
  margin: 0 auto 1rem auto;
  color: var(--color-green);
  transition: color var(--transition);
  margin-block-end: 40px;
}

.card:hover .card-icon {
  color: var(--color-green-light);
}

/* ========== Forms ========== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(56,174,71,0.1);
}

.form-input.error,
.form-textarea.error {
  border-color: #ff6b6b;
}

.form-error {
  color: #ff6b6b;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.form-error.active {
  display: block;
}

.form-success {
  border-color: var(--color-green);
}

.form-checkbox {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Honeypot field - hidden from real users, visible to bots */
.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ========== Grid Layouts ========== */
.grid {
  display: grid;
  gap: 2rem;
}

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

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

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== Hero Section ========== */
.hero {
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Binary Rain Canvas */
#binary-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
}

/* ========== Service Cards ========== */
.service-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: auto;
}

/* ========== Portfolio Cards ========== */
.portfolio-card {
  display: flex;
  flex-direction: column;
}

.portfolio-image {
  width: 100%;
  background: var(--color-bg);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  color: var(--color-muted);
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.portfolio-card h3 {
  margin-bottom: 0.5rem;
}

.portfolio-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ========== Footer ========== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
@media (min-width: 600px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--color-green-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ========== Contact Info ========== */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item svg {
  width: 24px;
  height: 24px;
  color: var(--color-green);
}

/* ========== Modal ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ========== Animations ========== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero::before,
  .hero::after {
    animation: none;
  }
}

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
