/* ============================================
   EISengineering — styles.css
   Linear.app-inspired dark theme
   ============================================ */

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

:root {
  --canvas: #1e2030;
  --surface: #262840;
  --elevated: #2e3148;
  --accent: #ff6600;
  --accent-glow: rgba(255, 102, 0, 0.15);
  --accent-hover: #e65c00;
  --slate: #4a5878;
  --slate-dim: #3a4560;
  --slate-glow: rgba(74, 88, 120, 0.2);
  --text-primary: #e8e8ed;
  --text-secondary: #8a8a9a;
  --border: rgba(74, 88, 120, 0.25);
  --border-hover: rgba(74, 88, 120, 0.5);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.8;
}

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

/* --- Container --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(30, 32, 48, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 32px;
  width: auto;
  max-width: 220px;
  border-radius: 3px;
  object-fit: contain;
}

.nav-logo:hover {
  opacity: 1;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.nav-cta {
  background: rgba(74, 88, 120, 0.15);
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(74, 88, 120, 0.4);
  color: var(--text-primary) !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-cta:hover {
  background: rgba(74, 88, 120, 0.25);
  border-color: var(--slate);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  z-index: 99;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 0 120px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background:
    radial-gradient(ellipse at 40% 50%, rgba(74, 88, 120, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 60% 40%, rgba(255, 102, 0, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-headline {
  font-size: 64px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero-subheadline {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.hero .btn {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px rgba(255, 102, 0, 0.25);
  opacity: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* --- Sections --- */
.section {
  padding: 120px 0;
}

.section-title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--slate-dim);
  display: inline-block;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 64px;
}

/* --- Cards (Services) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: var(--slate);
  background: var(--elevated);
}

.card-icon {
  color: var(--slate);
  margin-bottom: 20px;
}

.card h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* --- Technologies --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.tech-item {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.tech-item:hover {
  border-color: var(--slate);
}

.tech-item h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tech-item p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-block;
  background: var(--slate-glow);
  color: var(--slate);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.01em;
  border: 1px solid rgba(74, 88, 120, 0.3);
}

/* --- Approach --- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.approach-step {
  padding: 32px 0;
}

.approach-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.approach-step h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.approach-step p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- About --- */
.about-content {
  max-width: 680px;
}

.about-content p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

/* --- Contact Form --- */
.section-contact {
  padding-bottom: 160px;
}

.contact-form {
  max-width: 640px;
  margin-top: 48px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.required {
  color: var(--accent);
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238a8a9a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

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

.field-error {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #e53935;
}

.btn-submit {
  margin-top: 8px;
  width: auto;
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  min-height: 20px;
}

.form-status.success {
  color: #4caf50;
}

.form-status.error {
  color: #e53935;
}

.contact-info {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.contact-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.contact-info a {
  color: var(--slate);
  transition: color 0.15s ease;
}

.contact-info a:hover {
  color: var(--accent);
  opacity: 1;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  height: 24px;
  width: auto;
  border-radius: 3px;
}

.footer-location {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.footer-right p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-banner a {
  color: var(--accent);
}

/* --- Reveal Animation --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-headline,
  .hero-subheadline,
  .hero .btn {
    opacity: 1;
    transform: none;
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-headline {
    font-size: 48px;
  }

  .section-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 80px;
    min-height: auto;
  }

  .hero-headline {
    font-size: 38px;
  }

  .hero-subheadline {
    font-size: 17px;
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .section-subtitle {
    font-size: 16px;
    margin-bottom: 40px;
  }

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

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

  .approach-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .approach-step {
    padding: 24px 0;
    border-bottom: 1px solid rgba(74, 88, 120, 0.2);
  }

  .approach-step:last-child {
    border-bottom: none;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .section-contact {
    padding-bottom: 80px;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 32px;
  }

  .container {
    padding: 0 16px;
  }

  .card {
    padding: 24px;
  }
}