/* ================================================================
   AHC Maui — Aloha Home Cinema & Automation
   Dark island-tech theme: midnight navy + cyan, plumeria accents
   ================================================================ */

:root {
  --bg: #04102a;
  --bg-2: #071a3d;
  --bg-3: #0a2350;
  --ink: #e8f0fc;
  --ink-dim: #9db1d1;
  --line: rgba(120, 165, 230, 0.16);
  --cyan: #38bdf8;
  --cyan-deep: #0ea5e9;
  --orange: #f97316;
  --yellow: #fde047;
  --grad: linear-gradient(92deg, #38bdf8 0%, #7dd3fc 45%, #fde047 100%);
  --radius: 18px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }

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

a { color: var(--cyan); }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(4, 16, 42, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0.9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo {
  font-family: var(--font-head); font-weight: 700; letter-spacing: 0.10em;
  color: var(--ink); text-decoration: none; font-size: 1.05rem;
  display: flex; align-items: center; gap: 0.55rem;
}
.nav-logo em { font-style: normal; color: var(--cyan); }
.logo-mark { display: inline-flex; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 5px 0;
  background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block; padding: 0.72rem 1.5rem; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn-primary {
  background: var(--grad); color: #05203a !important;
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(56, 189, 248, 0.5); }
.btn-ghost {
  color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-nav { padding: 0.5rem 1.15rem; font-size: 0.88rem; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.1rem; }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 9.5rem 1.5rem 5rem; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 480px at 78% 18%, rgba(14, 165, 233, 0.20), transparent 60%),
    radial-gradient(700px 420px at 12% 80%, rgba(249, 115, 22, 0.10), transparent 60%),
    repeating-linear-gradient(0deg, rgba(125, 211, 252, 0.028) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(125, 211, 252, 0.028) 0 1px, transparent 1px 44px);
}
.hero-inner {
  position: relative; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3.5rem; align-items: center;
}
.kicker {
  font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; margin-bottom: 1.2rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.12rem; color: var(--ink-dim); max-width: 34rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.9rem 0 2.4rem; }
.hero-stats { list-style: none; display: flex; gap: 2.2rem; flex-wrap: wrap; }
.hero-stats li { max-width: 12rem; }
.hero-stats strong {
  display: block; font-family: var(--font-head); font-size: 1.9rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { font-size: 0.85rem; color: var(--ink-dim); }
.hero-art { position: relative; text-align: center; }
.hero-glow {
  position: absolute; inset: -12% -8%;
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.22), transparent 72%);
  filter: blur(6px);
}
.hero-art img { position: relative; margin: 0 auto; width: min(100%, 380px); height: auto; }
.hero-art-caption { position: relative; margin-top: 0.9rem; font-size: 0.82rem; color: var(--ink-dim); letter-spacing: 0.04em; }

/* ---------------- Sections ---------------- */
.section { padding: 5.5rem 1.5rem; }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg) 92%); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-tag {
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.9rem;
}
.section-tag span { color: var(--ink-dim); font-weight: 500; letter-spacing: 0.12em; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 1.4rem; max-width: 46rem; }
.section > .section-inner > p { color: var(--ink-dim); max-width: 46rem; }

/* About */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; margin-top: 2.2rem; }
.split p { color: var(--ink-dim); margin-bottom: 1rem; }
.split strong { color: var(--ink); }
.cert-cards { display: grid; gap: 1rem; }
.cert-card {
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem 1.5rem;
  transition: border-color .25s, transform .25s;
}
.cert-card:hover { border-color: rgba(56, 189, 248, 0.5); transform: translateY(-3px); }
.cert-card h3 { color: var(--cyan); letter-spacing: 0.08em; margin-bottom: 0.15rem; }
.cert-org { font-size: 0.8rem; color: var(--ink-dim); margin-bottom: 0.6rem; }
.cert-card ul { list-style: none; }
.cert-card li { font-size: 0.92rem; padding: 0.18rem 0 0.18rem 1.3rem; position: relative; }
.cert-card li::before { content: "✦"; position: absolute; left: 0; color: var(--yellow); font-size: 0.75rem; top: 0.36rem; }

/* Services */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 2.2rem; }
.panel {
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem 2rem;
}
.panel h3 {
  font-size: 1.15rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 1rem;
}
.checklist { list-style: none; columns: 1; }
.checklist li { padding: 0.32rem 0 0.32rem 1.7rem; position: relative; color: var(--ink-dim); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.72rem; width: 0.85rem; height: 0.5rem;
  border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg);
}
.feature-strip {
  margin-top: 2rem; border-radius: var(--radius); padding: 2.2rem 2.4rem;
  background:
    radial-gradient(600px 240px at 90% 0%, rgba(249, 115, 22, 0.16), transparent 65%),
    linear-gradient(120deg, rgba(14, 165, 233, 0.14), rgba(7, 26, 61, 0.6));
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.feature-strip h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
.feature-strip p { color: var(--ink-dim); max-width: 52rem; margin-bottom: 1.4rem; }

/* Automation */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.2rem; }
.card {
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem 1.8rem;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(56, 189, 248, 0.5); transform: translateY(-4px); }
.card-icon { font-size: 1.6rem; margin-bottom: 0.8rem; }
.card h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.94rem; color: var(--ink-dim); }
.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }
.pill-list li {
  padding: 0.45rem 1.1rem; border-radius: 999px; font-size: 0.88rem;
  border: 1px solid var(--line); color: var(--ink-dim); background: rgba(255,255,255,0.03);
}

/* Portfolio */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.4rem;
}
.gallery figure {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 4 / 3; background: var(--bg-2);
}
.gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s ease;
}
.gallery figure:hover img { transform: scale(1.06); }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.quotes blockquote {
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem 1.8rem; display: flex; flex-direction: column;
}
.quotes p { font-size: 0.95rem; color: var(--ink-dim); flex: 1; }
.quotes p::before { content: ""; display: block; width: 2rem; height: 3px; background: var(--grad); border-radius: 2px; margin-bottom: 1rem; }
.quotes cite { margin-top: 1.1rem; font-style: normal; font-family: var(--font-head); font-size: 0.88rem; color: var(--cyan); }

/* Contact */
.section-contact { text-align: center; padding-bottom: 7rem; }
.section-contact .section-tag, .section-contact h2, .section-contact .lede { margin-left: auto; margin-right: auto; }
.contact-actions { margin-top: 2.4rem; }
.contact-note { margin-top: 1.1rem; color: var(--ink-dim); font-size: 0.9rem; letter-spacing: 0.05em; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2.2rem 1.5rem; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  color: var(--ink-dim); font-size: 0.85rem;
}
.footer-nav { display: flex; gap: 0.7rem; align-items: center; }
.footer-nav a {
  color: var(--ink-dim); text-decoration: none; font-family: var(--font-head);
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem;
}
.footer-nav a:hover { color: var(--cyan); }
.footer-nav span { color: var(--line); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-art { order: -1; }
  .hero-art img { width: min(70%, 320px); }
  .split { grid-template-columns: 1fr; }
  .cards-3, .quotes { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links {
    position: fixed; inset: 58px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(4, 16, 42, 0.97); border-bottom: 1px solid var(--line);
    display: none; padding: 0.6rem 0 1.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 1.6rem; width: 100%; text-align: center; }
  .btn-nav { width: auto !important; margin: 0.6rem auto 0; }
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .grid-2, .cards-3, .quotes, .gallery { grid-template-columns: 1fr; }
  .hero { padding-top: 7.5rem; }
  .hero-stats { gap: 1.4rem; }
  .section { padding: 4rem 1.25rem; }
}
