/* Local Loop IT — local preview site styles
   Palette: near-black #0a0712, gold #d4af37, purples #7e22ce / #974ed7
*/

:root {
  --bg: #0a0712;
  --bg-2: #110b1c;
  --bg-card: #161022;
  --bg-elev: #1b1428;
  --gold: #d4af37;
  --gold-2: #e8c85a;
  --gold-dim: rgba(212, 175, 55, 0.18);
  --purple: #7e22ce;
  --purple-2: #974ed7;
  --purple-deep: #3b1268;
  --cream: #f3ede2;
  --cream-2: #d9d1c3;
  --muted: #9b9388;
  --line: rgba(212, 175, 55, 0.22);
  --line-soft: rgba(243, 237, 226, 0.08);
  --danger: #e06b6b;
  --ok: #7dcca0;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --header-h: 72px;
  --wrap: 1160px;
  --radius: 16px;
  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --lou-clearance: 6.5rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Reserve a bottom-right corner for the Talk to Lou FAB. */
@media (min-width: 801px) {
  .icon-row,
  .steps {
    padding-right: 10rem;
  }
}

@media (max-width: 800px) {
  .hero-visual {
    aspect-ratio: 5 / 3;
    min-height: 200px;
    margin-bottom: 5.25rem; /* gap so Lou sits under the canvas, not on it */
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--cream-2);
  background: var(--bg);
  min-height: 100%;
  padding-bottom: var(--lou-clearance); /* room for Talk to Lou FAB */
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
canvas { height: auto; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--gold-2); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--cream);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); margin: 0 0 0.7em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin: 0 0 0.6em; }
h3 { font-size: 1.2rem; margin: 0 0 0.45em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--gold); color: var(--bg); padding: 0.6rem 1rem;
  font-weight: 600; text-decoration: none; border-radius: 8px;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(10, 7, 18, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(10, 7, 18, 0.94);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.logo {
  display: flex; align-items: center; flex-shrink: 0;
  text-decoration: none;
}
.logo img {
  height: 40px; width: auto;
}
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--cream);
  position: relative;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 1px;
  position: absolute; left: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle .bars { top: 21px; }
.nav-toggle .bars::before { content: ""; top: -6px; }
.nav-toggle .bars::after { content: ""; top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

.site-nav > ul {
  display: flex; align-items: center; gap: 0.15rem 0.15rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a, .site-nav .sub-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--cream);
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  background: none; border: 0; cursor: pointer;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav .sub-toggle:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-2);
  background: var(--gold-dim);
}
.site-nav a:hover { color: var(--gold-2); }
.nav-cta {
  background: var(--purple) !important;
  color: var(--cream) !important;
  margin-left: 0.35rem;
  padding-inline: 1.05rem !important;
}
.nav-cta:hover, .nav-cta[aria-current="page"] {
  background: var(--purple-2) !important;
  color: #fff !important;
}
.has-sub { position: relative; }
.has-sub .sub {
  position: absolute; top: calc(100% + 0.4rem); left: 0;
  min-width: 15.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.45rem;
  list-style: none; margin: 0;
  box-shadow: var(--shadow);
  display: none;
}
.has-sub.is-open .sub, .has-sub:hover .sub { display: block; }
.has-sub .sub a {
  display: block; width: 100%;
  border-radius: 10px;
  white-space: normal;
  padding: 0.55rem 0.75rem;
}
.sub-toggle::after {
  content: "";
  width: 0.45rem; height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: #1a1408; }
.btn-primary:hover { background: var(--gold-2); color: #1a1408; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-2); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--cream);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
  font-weight: 500;
  text-wrap: balance;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Hero */
.hero {
  position: relative;
  padding: 2.5rem 0 2.25rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -10% 0 auto 0; height: 120%;
  background:
    radial-gradient(ellipse 50% 60% at 80% 40%, rgba(126, 34, 206, 0.28), transparent 60%),
    radial-gradient(ellipse 40% 50% at 20% 20%, rgba(212, 175, 55, 0.08), transparent 55%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 2.25rem;
  align-items: center;
}
.hero-copy p.lead {
  font-size: 1.15rem;
  color: var(--cream-2);
  max-width: 38rem;
  margin-bottom: 1.4rem;
}
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  min-height: 280px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(126, 34, 206, 0.16), transparent 60%),
    linear-gradient(180deg, #120b1e, #0a0712);
  overflow: hidden;
  box-shadow: 0 0 80px rgba(126, 34, 206, 0.15);
}
.hero-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
  max-width: none;
}
.hero-visual .fallback-loop {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: none;
}
body.reduce-motion .hero-visual .fallback-loop,
body.reduce-motion #hero-canvas { }
body.reduce-motion #hero-canvas[hidden] { display: none; }
body.reduce-motion .hero-visual .fallback-loop.is-on { display: block; }

/* Service icon row */
.icon-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2.25rem;
  position: relative;
}
.icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 0.95rem 0.5rem 1rem;
  text-decoration: none;
  color: var(--cream);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.icon-link:hover, .icon-link:focus-visible {
  border-color: var(--gold);
  color: var(--cream);
  box-shadow: 0 0 0 1px var(--gold-dim), 0 10px 30px rgba(126, 34, 206, 0.18);
  transform: translateY(-2px);
}
.icon-link svg {
  width: 36px; height: 36px;
  color: var(--gold);
  flex-shrink: 0;
}
.icon-link span {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
}

/* Sections */
.section { padding: 4.25rem 0; }
.section + .section { padding-top: 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section.alt {
  background: linear-gradient(180deg, rgba(126, 34, 206, 0.07), transparent 40%), var(--bg-2);
  border-block: 1px solid var(--line-soft);
  padding: 4.5rem 0;
}
.section.gold-band {
  background: linear-gradient(160deg, #3b1268, #7e22ce 60%, #5b21b6);
  color: #f3ede2;
  padding: 3.5rem 0;
}
.section.gold-band h2, .section.gold-band p { color: #fff; }
.section.gold-band p { color: rgba(243, 237, 226, 0.9); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.card a.card-link {
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 0.55rem; height: 100%;
}
.card:hover, a.card-link:hover { border-color: rgba(151, 78, 215, 0.5); }
.card h3 { margin: 0; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card .more { color: var(--gold); font-weight: 600; font-size: 0.9rem; margin-top: auto; }
.icon-badge {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(126, 34, 206, 0.22);
  color: var(--gold);
  flex-shrink: 0;
}
.icon-badge svg { width: 22px; height: 22px; }

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  min-width: 0;
}
.video-card .frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0a0712;
}
.video-card video, .video-card img.poster {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.video-card .cap {
  padding: 1rem 1.1rem 1.15rem;
}
.video-card h3 { font-size: 1.05rem; }
.video-card p { color: var(--muted); font-size: 0.95rem; }

/* Split / prose pages */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.2rem; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.service-block {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.service-block:first-of-type { border-top: 0; }
.kicker {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.step {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
  border: 1px solid var(--line-soft);
  min-width: 0;
}
.step .num {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

/* Product / UniFi */
.chips {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  list-style: none; margin: 0 0 1rem; padding: 0;
}
.chips a, .chips span {
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--gold-2);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.chips a:hover { background: var(--gold-dim); color: var(--gold-2); }
.spec-list { margin: 0.4rem 0 0; padding: 0 0 0 1.1rem; color: var(--muted); }
.spec-list li { margin: 0.25rem 0; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

/* Contact form layout */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 2rem;
  align-items: start;
}

/* Forms */
.form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
}
.form-grid { display: grid; gap: 1rem; }
.form-grid.two {
  grid-template-columns: 1fr 1fr;
}
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field label { font-weight: 500; color: var(--cream); font-size: 0.95rem; }
.field .hint { color: var(--muted); font-size: 0.85rem; }
.field input, .field textarea, .field select {
  width: 100%;
  background: #0e0a16;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  color: var(--cream);
}
.field input::placeholder, .field textarea::placeholder { color: #6e675e; }
.field textarea { min-height: 8rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  display: none;
}
.form-status.is-ok { display: block; background: rgba(125, 204, 160, 0.15); color: var(--ok); }
.form-status.is-err { display: block; background: rgba(224, 107, 107, 0.12); color: var(--danger); }
.contact-aside {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 1.4rem 1.35rem;
}
.contact-aside a { text-decoration: none; }
.contact-aside li { margin: 0.55rem 0; }
.contact-aside ul { list-style: none; margin: 0; padding: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #080510;
  padding: 3rem 0 1.25rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
}
.site-footer h2 {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 500;
  margin: 0 0 0.8rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.site-footer a { color: var(--cream-2); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-brand p { color: var(--muted); max-width: 22rem; }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.88rem;
}

/* Page hero (inner pages) */
.page-hero { padding: 3rem 0 2rem; }
.page-hero p.lead { font-size: 1.15rem; max-width: 40rem; color: var(--cream-2); }

/* CTA band */
.cta-band {
  display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center;
  justify-content: space-between;
}
.cta-band p { max-width: 36rem; }

/* Table-ish specs */
.notice {
  border-left: 3px solid var(--gold);
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--cream-2);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .split, .service-block, .footer-grid, .form-layout {
    grid-template-columns: 1fr;
  }
  .card-grid.three, .card-grid.four, .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid { gap: 1.75rem; }
}
@media (max-width: 800px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(10, 7, 18, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.25rem 1.1rem;
    max-height: calc(100dvh - var(--header-h));
    overflow: auto;
  }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; }
  .site-nav a, .site-nav .sub-toggle {
    width: 100%;
    justify-content: space-between;
    border-radius: 10px;
    padding: 0.75rem 0.8rem;
  }
  .nav-cta { margin-left: 0; justify-content: center !important; }
  .has-sub .sub {
    position: static;
    display: none;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 0.6rem;
  }
  .has-sub.is-open .sub { display: block; }
  .icon-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .icon-row .icon-link { grid-column: span 2; }
  .icon-row .icon-link:nth-child(4),
  .icon-row .icon-link:nth-child(5) { grid-column: span 3; }
  .hero { padding-top: 1.4rem; }
  .hero-visual {
    min-height: 200px;
    aspect-ratio: 16 / 10;
    margin-bottom: 5.25rem;
  }
  .form-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { width: min(var(--wrap), calc(100% - 1.5rem)); }
  .card-grid, .card-grid.three, .card-grid.four, .video-grid, .steps, .product-grid {
    grid-template-columns: 1fr;
  }
  .icon-row { grid-template-columns: 1fr 1fr; }
  .icon-row .icon-link,
  .icon-row .icon-link:nth-child(4),
  .icon-row .icon-link:nth-child(5) { grid-column: auto; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  /* Keep header CTA and in-nav buttons from stretching awkwardly on desktop only; on mobile full width is ok */
  h1 { font-size: clamp(1.85rem, 8.5vw, 2.4rem); }
  .eyebrow { letter-spacing: 0.08em; }
  .hero-copy h1 { max-width: 12.5ch; }
}

/* Don't let Lou sit on last-line actions: footer already cleared via body padding.
   Keep primary form buttons left-aligned, not bottom-right. */
.form .btn { align-self: start; }
.form-actions { display: flex; justify-content: flex-start; margin-top: 0.25rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
