/* ---------- Tokens ----------
   The colour set comes from fibre-optic strand colours: every service, step and
   cable on the site gets one, so the network itself carries the colour. */
:root {
  --accent: #4361EE;
  --on-accent: #FFFFFF;
  --ink: #0B1026;
  --navy: #0B1026;
  --navy-2: #161D42;
  --muted: #535B7C;
  --bg: #F4F6FD;
  --paper: #FFFFFF;
  --tint: #E9EDFA;
  --line: #D7DDF0;
  --led: #22C55E;
  --blue: #3D7BFF;
  --violet: #8B5CF6;
  --teal: #10B99B;
  --coral: #FF6B57;
  --sun: #FFB020;
  --pink: #EC4899;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  --radius: 12px;
}
.k-blue, .tile-blue, .num-blue, .dot-blue, .check-blue { --k: var(--blue); }
.k-violet, .tile-violet, .num-violet, .dot-violet, .check-violet { --k: var(--violet); }
.k-teal, .tile-teal, .num-teal, .dot-teal, .check-teal { --k: var(--teal); }
.k-coral, .tile-coral, .num-coral, .dot-coral, .check-coral { --k: var(--coral); }
.k-sun, .tile-sun, .num-sun, .dot-sun, .check-sun { --k: var(--sun); }
.k-pink, .tile-pink, .num-pink, .dot-pink, .check-pink { --k: var(--pink); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.025em; font-weight: 800; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -.03em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; margin-bottom: .35em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
.spectrum {
  height: 4px;
  background: linear-gradient(90deg,
    var(--blue) 0 16.66%, var(--violet) 16.66% 33.33%, var(--teal) 33.33% 50%,
    var(--coral) 50% 66.66%, var(--sun) 66.66% 83.33%, var(--pink) 83.33% 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650;
  padding: .75em 1.4em; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  border: 2px solid var(--accent); text-decoration: none; cursor: pointer;
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn-big { padding: .95em 1.7em; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); filter: none; }
.btn-glass { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-glass:hover { background: rgba(255,255,255,.16); filter: none; }
.btn-small { padding: .5em 1.05em; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { max-height: 46px; width: auto; max-width: 230px; object-fit: contain; }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 550; color: var(--muted); }
.site-nav a:not(.btn):hover { color: var(--ink); }
.nav-toggle { display: none; font: inherit; font-weight: 600; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: .4em 1em; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(900px 500px at 85% -10%, rgba(139,92,246,.35), transparent 60%), var(--navy);
  color: #fff;
  padding: clamp(56px, 7vw, 100px) 0 clamp(150px, 19vw, 270px);
}
.strands { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(120px, 17vw, 240px); pointer-events: none; }
.strands .s { fill: none; stroke-width: 9; stroke-linecap: round; opacity: .9; }
.s-blue { stroke: var(--blue); } .s-violet { stroke: var(--violet); } .s-teal { stroke: var(--teal); }
.s-coral { stroke: var(--coral); } .s-sun { stroke: var(--sun); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy h1 { max-width: 17ch; color: #fff; font-size: clamp(2.4rem, 4.6vw, 4rem); }
.lead { font-size: 1.22rem; color: #C3CAE6; max-width: 46ch; margin-bottom: 2em; }
.hero-points { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #DDE2F6; font-size: .97rem; }
.hero-points li { display: flex; align-items: center; gap: 9px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--k); flex: none; }

.topology {
  position: relative; z-index: 1;
  margin: 0; padding: 26px 20px 20px; border-radius: 28px;
  background: rgba(22,29,66,.72);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 80px rgba(3,6,20,.45);
}
.topology svg { width: 100%; height: auto; display: block; overflow: visible; }
.topology text { font-family: var(--font); font-size: 16px; font-weight: 600; fill: #fff; text-anchor: middle; }
.node rect { fill: #1A2250; stroke: rgba(255,255,255,.2); stroke-width: 1.2; }
.node-switch > rect:first-child { fill: #26307A; }
.node .icon { fill: none; stroke: #7FA8FF; stroke-width: 1.8; stroke-linejoin: round; }
.node .cap { fill: var(--k); stroke: none; }
.port { fill: #3A4485; }
.port.live { fill: var(--k); }
.leaf .led { fill: #3A4485; }
.cable { fill: none; stroke: var(--k); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }

/* One page-load moment: the cables are laid from the internet down, then each device lights up. */
@media (prefers-reduced-motion: no-preference) {
  .cable { stroke-dasharray: 400; stroke-dashoffset: 400; animation: lay .7s cubic-bezier(.5,0,.2,1) forwards; }
  .c1 { animation-delay: .2s; } .c2 { animation-delay: .6s; }
  .c3 { animation-delay: 1s; } .c4 { animation-delay: 1.12s; } .c5 { animation-delay: 1.24s; } .c6 { animation-delay: 1.36s; }
  .port.live { fill: #3A4485; animation: light .2s forwards; }
  .p1 { animation-delay: 1s; } .p3 { animation-delay: 1.12s; } .p5 { animation-delay: 1.24s; } .p7 { animation-delay: 1.36s; }
  .leaf .led { animation: led .3s forwards; }
  .l0 .led { animation-delay: 1.7s; } .l1 .led { animation-delay: 1.82s; } .l2 .led { animation-delay: 1.94s; } .l3 .led { animation-delay: 2.06s; }
}
@media (prefers-reduced-motion: reduce) { .leaf .led { fill: var(--led); } }
@keyframes lay { to { stroke-dashoffset: 0; } }
@keyframes light { to { fill: var(--k); } }
@keyframes led { to { fill: var(--led); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-dark { background: var(--navy); color: #fff; }
.section-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: end; margin-bottom: 52px; }
.section-head h2 { margin: 0; max-width: 18ch; }
.section-head p { margin: 0; color: var(--muted); max-width: 42ch; font-size: 1.1rem; }
.section-dark .section-head p { color: #AEB6D6; }

/* Services: a bento grid, one colour per service */
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: 24px;
  padding: 30px; display: flex; flex-direction: column; gap: 6px; min-height: 230px;
  transition: border-color .2s;
}
.tile:hover { border-color: var(--k); }
.tile p { color: var(--muted); margin: 0; max-width: 52ch; }
.tile-icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: auto;
  background: color-mix(in srgb, var(--k) 14%, white);
}
.tile-icon svg { width: 28px; height: 28px; fill: none; stroke: color-mix(in srgb, var(--k) 80%, black); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { margin-top: 28px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.tile.span-2, .tile.span-3 {
  background: radial-gradient(520px 260px at 100% 0%, color-mix(in srgb, var(--k) 55%, transparent), transparent 70%), var(--navy-2);
  border-color: transparent; color: #fff;
}
.tile.span-2 p, .tile.span-3 p { color: #C3CAE6; }
.tile.span-2 h3, .tile.span-3 h3 { font-size: 1.55rem; }
.tile.span-2 .tile-icon, .tile.span-3 .tile-icon { background: var(--k); }
.tile.span-2 .tile-icon svg, .tile.span-3 .tile-icon svg { stroke: #fff; }

/* Process: a real sequence, so it is numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 28px; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 26px; right: calc(100% / var(--n, 4) - 26px); top: 25px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--teal), var(--coral), var(--sun));
  opacity: .55;
}
.step { position: relative; }
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--k); color: var(--navy); font-weight: 800; font-size: 1.15rem; margin-bottom: 22px;
  box-shadow: 0 0 0 6px var(--navy);
}
.step p { color: #AEB6D6; max-width: 32ch; margin: 0; }

.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-copy p { max-width: 60ch; color: #2B3354; font-size: 1.1rem; }
.why { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 30px; }
.why ul { list-style: none; margin: 8px 0 0; padding: 0; }
.why li { display: flex; gap: 14px; align-items: center; padding: 13px 0; font-weight: 560; }
.why li + li { border-top: 1px solid var(--tint); }
.check { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 16%, white); }
.check svg { width: 18px; height: 18px; fill: none; stroke: color-mix(in srgb, var(--k) 80%, black); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact ---------- */
.contact-section { padding-top: 0; }
.contact-card { background: var(--navy); color: #fff; border-radius: 32px; overflow: hidden; }
.contact-card > .spectrum { height: 6px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 64px); padding: clamp(28px, 5vw, 60px); }
.contact-info > p { color: #AEB6D6; max-width: 40ch; }
.contact a { text-decoration-color: var(--accent); }
.contact-info dl { margin: 34px 0 0; display: grid; gap: 18px; }
.contact-info dt { color: #8F99C2; font-size: .9rem; }
.contact-info dd { margin: 0; font-size: 1.15rem; font-weight: 600; }
.contact-info a { color: #fff; }
.contact-form { background: var(--paper); color: var(--ink); padding: clamp(22px, 4vw, 34px); border-radius: 22px; display: grid; gap: 16px; align-content: start; }
.contact-form .btn { justify-self: start; }

label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input, textarea, select {
  font: inherit; font-weight: 400; color: var(--ink); width: 100%;
  padding: .75em .9em; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 12px 14px; border-radius: var(--radius); margin: 0; font-weight: 550; }
.notice.ok { background: #DCFCE7; color: #14532D; }
.notice.err { background: #FEE2E2; color: #7F1D1D; }

.site-footer { background: var(--navy); color: #8F99C2; font-size: .95rem; margin-top: clamp(72px, 9vw, 120px); }
.contact-section + .site-footer, main + .site-footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1.2fr; gap: 40px; padding-top: 72px; padding-bottom: 56px; }
.footer-name { display: block; color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.footer-brand p { color: #AEB6D6; max-width: 30ch; margin-bottom: 22px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.footer-col h2 { font-size: 1rem; color: #fff; letter-spacing: -.01em; margin: 0 0 6px; }
.footer-col a, .footer-col span { color: #AEB6D6; text-decoration: none; display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere; }
.footer-col a:hover { color: #fff; }
.footer-col .dot { width: 8px; height: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 22px; padding-bottom: 22px; font-size: .9rem; }
.footer-bottom-row a { color: #C3CAE6; }

/* ---------- Installer & admin panels ---------- */
.panel-page { min-height: 100vh; padding: 48px 20px; }
.panel { max-width: 640px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 5vw, 44px); }
.panel-narrow { max-width: 440px; }
.panel-wide { max-width: 820px; }
.panel h1 { font-size: 2rem; }
.panel-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.panel-top h1 { margin: 0; }
.panel-top form { margin: 0; }
.settings { display: grid; gap: 22px; margin-top: 20px; }
.settings .btn { justify-self: start; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 20px 0 0; display: grid; gap: 16px; }
legend { font-weight: 750; font-size: 1.15rem; padding-right: 12px; letter-spacing: -.01em; }
small, .note { color: var(--muted); font-weight: 400; font-size: .88rem; }
code { background: var(--tint); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.errors { background: #FEE2E2; color: #7F1D1D; padding: 12px 14px 12px 32px; border-radius: var(--radius); margin: 16px 0; }
.color-row { display: flex; align-items: center; gap: 12px; font-weight: 400; }
.color-row input[type=color] { width: 56px; height: 42px; padding: 3px; flex: none; cursor: pointer; }
.color-row span { color: var(--muted); font-size: .9rem; }
.logo-field { display: grid; gap: 10px; }
.label-text { font-weight: 600; font-size: .95rem; }
.logo-preview { max-height: 70px; width: auto; padding: 10px; background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius); }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
label.inline input { width: auto; }
.admin-block { margin-top: 48px; padding-top: 28px; border-top: 2px solid var(--ink); }
.message { padding: 16px 0; border-bottom: 1px solid var(--tint); }
.message header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.message time { color: var(--muted); font-size: .88rem; }
.message p { margin: 6px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid, .about-grid, .contact-grid, .section-head { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .span-2, .span-3 { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .steps::before { display: none; }
}
@media (max-width: 780px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; box-shadow: 0 20px 40px rgba(11,16,38,.12); }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--tint); }
  .site-nav .btn { margin-top: 14px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 52px; }
  .bento, .steps { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .tile { min-height: 0; padding: 24px; }
  .tile h3 { margin-top: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .topology { padding: 14px 8px 10px; border-radius: 20px; }
  .actions .btn { flex: 1 1 100%; }
  .contact-card { border-radius: 24px; }
  .contact-grid { padding: 24px 18px; }
}
