/* EEGIX home page — sections built on the modern-main.css design tokens */

::selection {
  background: var(--warm-orange);
  color: var(--pure-white);
}

:focus-visible {
  outline: 2px solid var(--warm-orange);
  outline-offset: 3px;
}

section[id] {
  scroll-margin-top: 80px;
}

.accent {
  color: var(--warm-orange);
}

.visually-hidden-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */
.nav-modern ul {
  align-items: center;
}

.nav-modern ul a::after {
  background: var(--warm-orange);
}

.nav-modern ul a.btn-primary::after {
  display: none;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav-header {
  justify-content: flex-end;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--warm-orange);
}

/* Hero */
.hero-modern .hero-content {
  width: 100%;
  max-width: 900px;
  text-align: center;
}

.hero-title {
  text-wrap: balance;
}

.hero-title .accent {
  display: block;
}

.hero-subtitle {
  display: inline-block;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xl);
  text-wrap: pretty;
}

.hero-buttons {
  justify-content: center;
}

.hero-modern .animate-fade-in:nth-child(2) { animation-delay: 0.08s; animation-fill-mode: both; }
.hero-modern .animate-fade-in:nth-child(3) { animation-delay: 0.16s; animation-fill-mode: both; }

/* Section headings */
.section-title {
  text-wrap: balance;
}

.section-header .section-title {
  margin-bottom: var(--space-md);
}

/* Services */
.service-card {
  background: var(--pure-white);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--warm-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--warm-orange);
  background: var(--primary-gradient);
  margin-bottom: var(--space-lg);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--deep-navy);
  margin-bottom: var(--space-sm);
}

.service-card p {
  font-size: 1rem;
  margin: 0;
}

/* About */
.about-modern {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: center;
}

.about-visual {
  position: relative;
  margin: 0 0 var(--space-lg) var(--space-lg);
}

.about-visual::before {
  content: '';
  position: absolute;
  left: calc(var(--space-lg) * -1);
  bottom: calc(var(--space-lg) * -1);
  width: 55%;
  height: 60%;
  background: var(--contrast-gradient);
  border-radius: var(--radius-md);
}

/* tech.svg is a transparent, glowing illustration drawn for a dark ground:
   the panel supplies that ground (and the shadow), not the image itself */
.about-visual img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  padding: var(--space-xl) var(--space-lg);
  background:
    radial-gradient(circle at 50% 42%, rgba(83, 165, 248, 0.18), transparent 62%),
    linear-gradient(160deg, #2a023f, var(--darkest-red));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.about-copy .section-title {
  margin-bottom: var(--space-lg);
}

.about-copy p {
  max-width: 60ch;
  margin-bottom: var(--space-md);
}

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

/* Why choose */
.section-dark {
  background: var(--darkest-gradient);
}

.section-dark .section-title {
  color: var(--pure-white);
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

.feature-tile {
  padding: var(--space-xl) var(--space-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.feature-tile:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(246, 94, 44, 0.5);
}

.feature-tile i {
  display: block;
  font-size: 1.75rem;
  color: var(--warm-orange);
  margin-bottom: var(--space-lg);
}

.feature-tile h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pure-white);
  margin-bottom: var(--space-sm);
}

.feature-tile p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

/* Process */
.step-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--deep-navy);
  margin-bottom: var(--space-sm);
}

.step-card .step-number {
  font-size: 1.25rem;
  color: var(--warm-orange);
}

.step-card p {
  margin: 0;
}

/* Featured projects — title strip, then full-bleed banners stacked edge to edge */
.projects-header {
  padding: var(--space-xl) 0;
  text-align: center;
}

.projects-header .section-title {
  margin: 0;
}

.project-list {
  display: grid;
}

.project-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(280px, 30vw, 460px);
  overflow: hidden;
  background: var(--project-ground);
  color: var(--pure-white);
  text-decoration: none;
}

.project-card:hover {
  color: var(--pure-white);
}

.project-card:focus-visible {
  outline-offset: -4px;
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  transition: transform var(--transition-slow);
}

.project-card:hover img {
  transform: scale(1.03);
}

/* Scrim keeps the copy readable where the artwork runs under it */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--project-ground) 0%, transparent 60%);
  opacity: 0.75;
}

.project-content {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 34rem;
  padding: var(--space-xl) 0;
}

.project-content h3 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pure-white);
  margin-bottom: var(--space-xs);
}

.project-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 1rem;
  font-weight: 700;
}

.project-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--project-accent);
  color: var(--project-ink);
  transition: transform var(--transition-normal);
}

.project-card:hover .project-cta-icon {
  transform: translateX(4px);
}

@media (max-width: 768px) {

  .project-card::after {
    background: linear-gradient(90deg, var(--project-ground) 25%, color-mix(in srgb, var(--project-ground) 60%, transparent) 100%);
    opacity: 1;
  }

  .project-content {
    padding: var(--space-lg) 0;
  }

  .project-content h3 {
    font-size: 1.75rem;
  }
}

/* Contact */
.contact-modern {
  background: var(--primary-gradient);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-2xl);
  align-items: center;
}

.contact-intro .section-title {
  color: var(--pure-white);
}

.contact-intro > p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 46ch;
}

.qr-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding: var(--space-md);
  padding-right: var(--space-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--pure-white);
  text-decoration: none;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.qr-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(246, 94, 44, 0.6);
  color: var(--pure-white);
}

/* White tile doubles as the QR quiet zone — keep the padding */
.qr-link img {
  display: block;
  width: 132px;
  height: 132px;
  padding: 14px;
  background: var(--pure-white);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.qr-link strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.qr-link span span {
  font-size: 1rem;
  color: var(--warm-orange);
}

.qr-link i {
  font-size: 0.8em;
  margin-left: var(--space-xs);
  transition: transform var(--transition-normal);
}

.qr-link:hover i {
  transform: translateX(3px);
}

.contact-form fieldset {
  border: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.contact-form .field-wide {
  grid-column: 1 / -1;
}

.contact-form .form-control {
  color: var(--deep-navy);
  caret-color: var(--warm-orange);
}

.contact-form textarea.form-control {
  resize: vertical;
  min-height: 9rem;
}

/* Honeypot — off-screen rather than display:none so naive bots still fill it */
.contact-form .field-extra {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit {
  justify-content: center;
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: var(--warm-orange);
  color: var(--pure-white);
  font-weight: 700;
}

.btn-submit:hover {
  background: var(--deep-purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(246, 94, 44, 0.3);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

#form-messages {
  display: none;
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

#form-messages.show {
  display: block;
}

#form-messages.success {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

#form-messages.error {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

/* Footer */
.footer-modern .footer-logo img {
  height: 32px;
  width: auto;
}

.footer-section p {
  font-size: 1rem;
  margin: 0 0 var(--space-sm);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom,
.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 991px) {
  .about-modern,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  .about-visual {
    margin: 0 0 var(--space-md) var(--space-md);
  }

  .about-visual::before {
    left: calc(var(--space-md) * -1);
    bottom: calc(var(--space-md) * -1);
  }
}

@media (max-width: 480px) {
  .contact-form fieldset {
    grid-template-columns: 1fr;
  }

  .qr-link {
    gap: var(--space-md);
    padding-right: var(--space-md);
  }

  .qr-link img {
    width: 104px;
    height: 104px;
    padding: 11px;
  }
}
