/* ================================
   Adhithya Electronics — Futuristic Theme
   Author: Cline
   ================================ */

/* CSS Reset + Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #070814;
  --bg-2: #0a0b1a;
  --panel: rgba(19, 22, 45, 0.6);
  --panel-strong: rgba(19, 22, 45, 0.85);
  --text: #e7e9ff;
  --muted: #aab0d5;
  --line: rgba(255, 255, 255, 0.07);

  --primary: #7a5cff;
  --primary-2: #00e5ff;
  --accent: #ff2cdf;

  --shadow-neon: 0 0 20px rgba(122, 92, 255, 0.45), 0 0 40px rgba(0, 229, 255, 0.25);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;

  --container: 1200px;
  --pad: 24px;

  --font-display: "Orbitron", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  --font-sans: "Poppins", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
}

html,
body {
  height: 100%;
  background: radial-gradient(1200px 800px at 70% -20%, rgba(122, 92, 255, 0.18), transparent 60%),
              radial-gradient(800px 600px at 10% 20%, rgba(0, 229, 255, 0.18), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  scroll-behavior: smooth;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  padding-left: var(--pad);
  padding-right: var(--pad);
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 96px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section h2 {
  font-family: var(--font-display);
  letter-spacing: 0.6px;
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 36px);
  margin: 0 0 12px 0;
}

.section p {
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto;
}

/* Background canvas */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(10, 11, 26, 0) 0%, rgba(10, 11, 26, 0.5) 100%),
    radial-gradient(600px 300px at 80% 10%, rgba(255, 44, 223, 0.08), transparent 60%),
    radial-gradient(300px 400px at 10% 40%, rgba(0, 229, 255, 0.08), transparent 60%),
    var(--bg-2);
  pointer-events: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(10px);
  background: linear-gradient(180deg, rgba(10, 11, 26, 0.75), rgba(10, 11, 26, 0.35));
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand .brand-text {
  font-family: var(--font-display);
  font-size: 16px;
}

.brand-mark {
  filter: drop-shadow(0 2px 10px rgba(122, 92, 255, 0.55));
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-list a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #0c0f26;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 60%, var(--accent) 120%);
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(122, 92, 255, 0.75), 0 0 42px rgba(0, 229, 255, 0.45);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-cta {
  margin-left: 8px;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  cursor: pointer;
}

.hamburger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

.hamburger span:nth-child(1) { top: 10px; }
.hamburger span:nth-child(2) { top: 18px; }
.hamburger span:nth-child(3) { top: 26px; }

.hamburger[aria-expanded="true"] span:nth-child(1) {
  top: 18px;
  transform: rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  top: 18px;
  transform: rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(10, 11, 26, 0.9);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--pad) 20px;
}

.mobile-menu a {
  display: block;
  padding: 12px 10px;
  color: var(--muted);
  border-radius: 10px;
}

.mobile-menu a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Honor [hidden] attribute to truly hide menu on mobile */
.mobile-menu[hidden] {
  display: none !important;
}

/* HERO */
.hero {
  padding-top: 72px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero .eyebrow {
  display: inline-block;
  color: var(--primary-2);
  font-weight: 600;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.12), rgba(122, 92, 255, 0.12));
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.08) inset;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5.6vw, 54px);
  line-height: 1.1;
  margin: 0 0 12px 0;
  letter-spacing: 0.7px;
  text-shadow: 0 2px 30px rgba(122, 92, 255, 0.24);
}

.hero .sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  margin: 18px 0 12px;
}

.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--primary-2);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.28);
}

/* Orb + specs */
.hero-artwork {
  position: relative;
}

.orb {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 40px rgba(0, 229, 255, 0.4));
}

.glass {
  background: var(--panel);
  border: 1px solid rgba(122, 92, 255, 0.25);
  box-shadow: 0 10px 30px rgba(5, 8, 25, 0.5), inset 0 0 40px rgba(122, 92, 255, 0.06);
  backdrop-filter: blur(10px) saturate(1.1);
  border-radius: var(--radius);
}

.spec-list {
  position: absolute;
  right: 10%;
  bottom: 6%;
  padding: 16px 16px;
  font-size: 14px;
  color: var(--muted);
  min-width: 220px;
}

.spec-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  margin-bottom: 8px;
}

/* Cards / Services */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.card {
  padding: 18px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 229, 255, 0.12), 0 10px 30px rgba(122, 92, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.3);
}

.card .icon {
  font-size: 26px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-sans);
}

.card p {
  color: var(--muted);
  margin: 0 0 10px 0;
  font-size: 14px;
}

.card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

/* Industries chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.05) inset;
}

/* About / Stats */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.about-copy p {
  color: var(--muted);
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
}

.ticks li {
  margin: 8px 0;
  padding-left: 26px;
  position: relative;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  border-radius: var(--radius);
  padding: 16px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.stat .num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

.stat .label {
  color: var(--muted);
  font-size: 12px;
}

/* Testimonials */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.quote {
  padding: 18px;
  border-radius: var(--radius);
}

.quote blockquote {
  margin: 0 0 10px 0;
  color: var(--text);
  font-size: 16px;
}

.quote figcaption {
  color: var(--muted);
  font-size: 13px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 26px;
  align-items: start;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0 0 0;
}

.mini-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  /* Allow text to wrap within grid item on small screens */
  min-width: 0;
}

/* Ensure long emails/phones wrap instead of overflowing */
.mini-card a {
  display: inline-block;
  max-width: 100%;
  /* Only break at safe points (we'll insert <wbr> via JS) */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
}

.mini-title {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.contact-form {
  padding: 18px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 11, 26, 0.35);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8d93b8;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
  background: rgba(10, 11, 26, 0.55);
}

.field.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(10, 11, 26, 0.85), rgba(10, 11, 26, 0.6));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  padding: 32px 0 18px;
}

.footer-brand .brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.footer-cols .foot-title {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.footer-cols a {
  display: block;
  color: var(--text);
  opacity: 0.8;
  margin: 6px 0;
  font-size: 14px;
}

.footer-cols a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-bar {
  border-top: 1px solid var(--line);
  background: rgba(10, 11, 26, 0.5);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.socials a:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.18);
  transform: translateY(-1px);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Tilt baseline (JS will update transforms) */
.tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.12s ease;
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 60%, var(--accent) 120%);
  color: #0c0f26;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-neon);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
  z-index: 60;
}
.back-to-top:hover {
  box-shadow: 0 0 20px rgba(122, 92, 255, 0.75), 0 0 42px rgba(0, 229, 255, 0.45);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (max-width: 480px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}

/* Utilities */
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quotes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-cards {
    /* Auto-fit columns to available width for better wrapping */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-list {
    display: none;
  }
  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-menu {
    display: block;
  }
  /* Hide oversized desktop CTA on mobile; use the CTA inside mobile menu instead */
  .nav-cta {
    display: none;
  }
  /* Make mobile menu CTA full-width and well aligned */
  .mobile-menu .btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    margin-top: 8px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .quotes {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-cards {
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    /* Slightly tighter padding on very small screens */
    --pad: 18px;
  }
  .contact-cards {
    grid-template-columns: 1fr;
  }
  .field.two {
    grid-template-columns: 1fr;
  }
  .hero .sub {
    font-size: 16px;
  }
}
/* Accessibility focus styles */
:focus-visible {
  outline: 3px solid rgba(0, 229, 255, 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Subtle animated grid overlay (optional decorative) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  mask-image: radial-gradient(600px 400px at 50% 25%, rgba(0,0,0,0.6), rgba(0,0,0,0.1) 60%, transparent 80%);
  z-index: -1;
}

/* Helper: make sure the year in footer sits nicely */
.footer .bar-inner span {
  color: var(--muted);
}

/* Small fix for inline SVG icons */
.footer .brand-mark {
  filter: drop-shadow(0 2px 8px rgba(122, 92, 255, 0.35));
}
