/*
Theme Name: APH Fiber Solutions
Theme URI: https://aphfiber.com/
Author: Vazio Design Studio
Description: Classic WordPress theme for APH Fiber Solutions (telecom and fiber optic contractor). Direction "Navy Signal".
Version: 0.1.0
Requires PHP: 7.4
Text Domain: aphfiber
*/

/* ==========================================================================
   APH Fiber Solutions - Home (direction: "Navy Signal")
   Palette from client briefing: #013fbb / #35119b / gradient #1c5db4 -> #3d128b
   Background per client follow-up: #efefef
   Shape rule: buttons = full pill, cards = 24px, inputs = 12px.
   Theme lock: light page. Dark navy is used only as contained panels/cards.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #efefef;
  --surface: #fafbfd;
  --ink: #14171c;
  --muted: #5b6270;
  --line: #dadde3;
  --lavender: #eee8ff;

  --blue: #013fbb;
  --violet: #35119b;
  --grad-a: #1c5db4;
  --grad-b: #3d128b;
  --gradient: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  --navy: #0a0f2e;
  --navy-2: #111a4a;
  --glow: #4d8dff;
  --on-dark: #f3f5ff;
  --on-dark-muted: #b4bbdd;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-card: 24px;
  --r-panel: 36px;
  --r-input: 12px;
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 92px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 18px 40px -18px rgba(1, 63, 187, 0.28);
}

/* 2. Reset & base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blue); color: #fff; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip-link:focus { top: 12px; }

/* Icons: Phosphor Icons (regular), used as CSS masks so they follow currentColor */
.i {
  display: inline-block; flex: none; width: 1.25em; height: 1.25em;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}

/* 3. Layout helpers -------------------------------------------------------- */
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(72px, 9vw, 128px); position: relative; }
.eyebrow {
  display: inline-block; margin-bottom: 16px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue);
}
.on-dark .eyebrow, .panel--dark .eyebrow { color: var(--glow); }
.h2 {
  font-size: clamp(1.75rem, 3.6vw, 3.25rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em;
  max-width: 20ch; text-wrap: balance;
}
.lead { font-size: clamp(1rem, 1.25vw, 1.125rem); color: var(--muted); max-width: 62ch; margin-top: 20px; }
.on-dark .lead, .panel--dark .lead { color: var(--on-dark-muted); }
.sec-head { margin-bottom: clamp(40px, 5vw, 64px); }

/* 4. Buttons --------------------------------------------------------------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.25s, background-color 0.25s, border-color 0.25s;
}
.btn .i { transition: transform 0.35s var(--ease); }
.btn:hover .i { transform: translateX(4px); }
.btn:active { transform: scale(0.98) translateY(1px); }
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 26px -10px rgba(53, 17, 155, 0.65); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, var(--blue), var(--violet));
  opacity: 0; transition: opacity 0.35s;
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(1, 63, 187, 0.7); }
.btn--primary:hover::before { opacity: 1; }
.btn--ghost { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--blue); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 0.875rem; }

/* 5. Header ---------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: linear-gradient(90deg, var(--navy), #100b3a 60%, #1a0f4d);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.header.is-scrolled { box-shadow: 0 12px 30px -16px rgba(10, 15, 46, 0.7), 0 1px 0 rgba(255, 255, 255, 0.1); }
.header__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.125rem; }
.brand__logo { height: 70px; width: auto; transition: transform 0.5s var(--ease); /* light outline keeps the dark "APH" lettering readable on navy */ filter: drop-shadow(0 0 0.5px #fff) drop-shadow(0 0 0.5px #fff) drop-shadow(0 0 4px rgba(255, 255, 255, 0.22)); }
.brand:hover .brand__logo { transform: scale(1.04) rotate(-2deg); }
/* Logo hover (header and footer): neon fiber light around the logo. The image itself never moves. */
@property --fiber-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:is(.header, .footer) .brand { position: relative; isolation: isolate; border-radius: 22px; }
:is(.header, .footer) .brand:hover .brand__logo { transform: none; }
:is(.header, .footer) .brand::before, :is(.header, .footer) .brand::after { content: ""; position: absolute; inset: -6px -9px; border-radius: 24px; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease); }
:is(.header, .footer) .brand::before { z-index: -1; background: radial-gradient(closest-side, rgba(77, 141, 255, 0.5), rgba(0, 229, 255, 0.18) 60%, transparent 100%); filter: blur(10px); }
:is(.header, .footer) .brand::after { padding: 2px; background: conic-gradient(from var(--fiber-a), transparent 0 55%, #4d8dff 75%, #9fefff 92%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); filter: drop-shadow(0 0 6px rgba(77, 141, 255, 0.9)) drop-shadow(0 0 14px rgba(0, 229, 255, 0.5)); }
:is(.header, .footer) .brand:hover::before, :is(.header, .footer) .brand:focus-visible::before { opacity: 1; }
:is(.header, .footer) .brand:hover::after, :is(.header, .footer) .brand:focus-visible::after { opacity: 1; animation: fiber-spin 2.4s linear infinite; }
@keyframes fiber-spin { to { --fiber-a: 360deg; } }
@media (prefers-reduced-motion: reduce) { :is(.header, .footer) .brand:hover::after, :is(.header, .footer) .brand:focus-visible::after { animation: none; } }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  position: relative; padding: 10px 16px; font-size: 0.9rem; font-weight: 600; color: var(--on-dark); border-radius: 999px;
  transition: color 0.25s, background-color 0.25s;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 5px; height: 2px; background: var(--gradient);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav a:not(.btn):hover, .nav a.is-active { color: #fff; }
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav .btn { margin-left: 12px; }
/* Google Translate widget, reduced to a compact select */
.lang { margin-left: 8px; min-height: 36px; display: flex; align-items: center; }
.lang .goog-te-gadget { font-size: 0; color: transparent; line-height: 0; }
.lang .goog-te-gadget > span { display: none; }
.lang .goog-te-combo {
  margin: 0; height: 36px; padding: 0 12px; font-family: inherit; font-weight: 600; font-size: 0.8125rem; color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, 0.1); border: 0; border-radius: 999px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
}
.lang .goog-te-combo option { color: #0a0f2e; }
.goog-te-banner-frame, .skiptranslate > iframe { display: none !important; }
body { top: 0 !important; }
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24); place-items: center; font-size: 1.4rem; }

@media (max-width: 1023px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 12px auto 12px; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px; background: var(--surface); border-radius: var(--r-card); box-shadow: 0 30px 60px -20px rgba(10, 15, 46, 0.35), 0 0 0 1px var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { padding: 16px 18px; font-size: 1rem; color: var(--ink); }
  .nav a:not(.btn):hover, .nav a.is-active { color: var(--blue); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin: 8px 0 0; }
  .lang { margin: 8px 0 0; padding: 0 18px; }
  .lang .goog-te-combo { width: 100%; color: var(--ink); background: transparent; box-shadow: 0 0 0 1px var(--line); }
}

/* 6. Hero ------------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; min-height: min(100dvh, 860px); padding-top: calc(var(--header-h) + 24px); padding-bottom: clamp(88px, 10vw, 140px);
  display: flex; align-items: center; overflow: hidden; color: var(--on-dark); background: var(--bg);
}
.hero__bg { position: absolute; inset: 0; z-index: -1; background: var(--navy) url(https://aphfiber.com/wp-content/uploads/2026/10/hero-bg-poster.webp) center / cover no-repeat; }
/* the hero dissolves into the page background instead of ending on a hard edge */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: min(340px, 42%); z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(239, 239, 239, 0) 0%, rgba(239, 239, 239, 0.06) 12%, rgba(239, 239, 239, 0.2) 30%, rgba(239, 239, 239, 0.45) 50%, rgba(239, 239, 239, 0.75) 72%, rgba(239, 239, 239, 0.94) 90%, var(--bg) 100%);
}
.hero__bg video, .hero__bg .hero-poster { width: 100%; height: 100%; object-fit: cover; transform: scale(1.4); transform-origin: 0 45%; }
/* never show native video chrome / play button (iOS low power mode) */
video::-webkit-media-controls, video::-webkit-media-controls-start-playback-button, video::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-panel { display: none !important; -webkit-appearance: none; }
.hero__bg .hero-poster { display: block; object-fit: cover; }
/* navy wash keeps the copy readable and tints the warm dots toward the brand blue */
.hero__bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 15, 46, 0.94) 0%, rgba(10, 15, 46, 0.72) 42%, rgba(10, 15, 46, 0.25) 100%),
    linear-gradient(0deg, rgba(10, 15, 46, 0.35), transparent 30%);
}

.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.6rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.03em;
}
.hero h1 span { display: block; text-wrap: balance; }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--glow); }
.hero .lead { margin-top: 24px; max-width: 46ch; color: var(--on-dark-muted); }
.hero .btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.hero .btn--ghost:hover { background: #fff; color: var(--navy); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__media {
  position: relative; aspect-ratio: 4 / 5; max-height: 60dvh; margin-left: auto; width: 86%;
  border-radius: var(--r-panel); overflow: hidden; background: var(--navy);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.hero__media video, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 92% 50%; }
/* hero carousel: crossfade + slow float */
.hero__slides, .hero__slides img { position: absolute; inset: 0; }
/* hero carousel: HUD-style wipe with a scanning edge (inactive slide stays underneath until the wipe lands) */
.hero__slides img { z-index: 1; opacity: 0; clip-path: inset(0 100% 0 0); filter: saturate(0.92) contrast(1.06); transition: opacity 0s linear 0.8s, clip-path 0s linear 0.8s; }
.hero__slides img.is-active { z-index: 2; opacity: 1; clip-path: inset(0 0 0 0); transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.18, 1); }
/* fine scanlines over the photo */
.hero__slides::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0.5; background: repeating-linear-gradient(0deg, rgba(120, 170, 255, 0.07) 0 1px, transparent 1px 4px); mix-blend-mode: screen; }
/* scan bar that rides the wipe edge */
.hero__media.is-scan .hero__slides::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; z-index: 4; pointer-events: none; background: var(--glow); box-shadow: 0 0 18px 4px rgba(77, 141, 255, 0.85), -40px 0 60px 10px rgba(77, 141, 255, 0.25); animation: scan-bar 0.8s cubic-bezier(0.77, 0, 0.18, 1) both; }
@keyframes scan-bar { from { left: 0; opacity: 1; } 90% { opacity: 1; } to { left: 100%; opacity: 0; } }
/* HUD corner brackets + counter */
.hero__media::before { content: ""; position: absolute; inset: 14px; z-index: 5; pointer-events: none; --b: rgba(168, 202, 255, 0.85);
  background:
    linear-gradient(var(--b), var(--b)) top left / 22px 2px, linear-gradient(var(--b), var(--b)) top left / 2px 22px,
    linear-gradient(var(--b), var(--b)) top right / 22px 2px, linear-gradient(var(--b), var(--b)) top right / 2px 22px,
    linear-gradient(var(--b), var(--b)) bottom left / 22px 2px, linear-gradient(var(--b), var(--b)) bottom left / 2px 22px,
    linear-gradient(var(--b), var(--b)) bottom right / 22px 2px, linear-gradient(var(--b), var(--b)) bottom right / 2px 22px;
  background-repeat: no-repeat; }
.hero__count { position: absolute; top: 24px; left: 26px; z-index: 5; padding: 4px 10px; border-radius: 999px; font: 700 0.72rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.12em; color: #fff; background: rgba(10, 15, 46, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(150, 192, 255, 0.4); }
.hero__dots { position: absolute; left: 50%; bottom: 14px; z-index: 2; display: flex; justify-content: center; gap: 2px; padding: 0 8px; transform: translateX(-50%); border-radius: 999px; background: rgba(10, 15, 46, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero__dots button { width: 28px; height: 28px; display: grid; place-items: center; background: none; cursor: pointer; }
.hero__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.5); transition: width 0.3s var(--ease), background 0.3s; }
.hero__dots button { position: relative; }
.hero__dots button.is-active::before { width: 28px; background: rgba(255, 255, 255, 0.28); }
.hero__dots button.is-active::after { content: ""; position: absolute; left: 0; top: 50%; height: 8px; width: 28px; margin-top: -4px; border-radius: 999px; background: var(--glow); transform-origin: left; animation: dot-fill var(--delay, 3600ms) linear both; }
.hero__media.is-held .hero__dots button.is-active::after { animation-play-state: paused; }
@keyframes dot-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(200deg, rgba(1, 63, 187, 0.0) 40%, rgba(10, 15, 46, 0.55));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  border-radius: inherit;
}

@media (max-width: 899px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 32px); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { aspect-ratio: 16 / 11; max-height: none; order: -1; width: 100%; }
}

/* 7. Dark panels (Services, Why Choose Us) --------------------------------- */
.panel { margin-inline: clamp(8px, 1.6vw, 24px); border-radius: var(--r-panel); overflow: hidden; position: relative; isolation: isolate; }
.panel--dark { background: var(--navy); color: var(--on-dark); }
.panel--dark::before {
  content: ""; position: absolute; inset: -25%; z-index: -1; pointer-events: none; will-change: transform;
  background:
    radial-gradient(33% 40% at 27% 17%, rgba(28, 93, 180, 0.45), transparent 70%),
    radial-gradient(30% 37% at 83% 83%, rgba(61, 18, 139, 0.55), transparent 70%);
  animation: glow-drift 26s ease-in-out infinite alternate; animation-play-state: paused;
}
.panel--dark.is-live::before, .footer.is-live::before { animation-play-state: running; }
@keyframes glow-drift {
  from { transform: translate3d(-5%, -3%, 0) scale(1); }
  to   { transform: translate3d(6%, 4%, 0) scale(1.12); }
}

/* 8. Services carousel ----------------------------------------------------- */
.services .sec-head { text-align: left; }
.services .h2 { color: #fff; }
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; padding-block: 36px 56px; cursor: grab; touch-action: pan-y; }
/* cards fade out near the panel border instead of being cut by it */
.carousel__viewport { --fl: 7%; --fr: 9%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
.carousel.at-start .carousel__viewport { --fl: 0%; }
.carousel.at-end .carousel__viewport { --fr: 0%; }
.carousel__viewport.is-drag { cursor: grabbing; }
.carousel__track { display: flex; align-items: center; gap: 24px; transition: transform 0.7s var(--ease); will-change: transform; }
.slide { flex: 0 0 clamp(260px, 26vw, 340px); }
.scard {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(150, 192, 255, 0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(77, 141, 255, 0.12);
  transform: scale(0.88); transform-origin: center;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), background-color 0.4s, border-color 0.4s, box-shadow 0.6s, min-height 0.6s var(--ease);
}
.scard > * { transition: opacity 0.6s var(--ease); }
.slide:not(.is-active) .scard > * { opacity: 0.68; }
.slide:not(.is-active) .scard:hover > * { opacity: 1; }
.slide:not(.is-active) .scard:hover { transform: scale(0.92) translateY(-6px); border-color: #a8caff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 22px -4px rgba(77, 141, 255, 0.55); }
.slide.is-active .scard {
  min-height: var(--scard-h, 0px); /* opens to the same height on every slide; the parent never resizes */
  transform: scale(1); background: var(--gradient); border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 60px -24px rgba(1, 63, 187, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.scard__ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.75rem; background: rgba(255, 255, 255, 0.1); color: var(--glow); transition: background-color 0.4s, color 0.4s; }
.slide.is-active .scard__ico { background: rgba(255, 255, 255, 0.18); color: #fff; }
.scard h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.scard__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease); }
.slide.is-active .scard__more { grid-template-rows: 1fr; }
.scard__more > div { overflow: hidden; opacity: 0; transition: opacity 0.4s; }
.slide.is-active .scard__more > div { opacity: 1; transition-delay: 0.15s; }
.scard p { font-size: 0.95rem; color: rgba(255, 255, 255, 0.86); }
.scard ul { margin: 16px 0 20px; display: grid; gap: 8px; font-size: 0.875rem; color: rgba(255, 255, 255, 0.92); }
.scard li { display: flex; gap: 10px; align-items: flex-start; }
.scard li .i { margin-top: 2px; font-size: 1rem; }
.scard .btn { align-self: flex-start; }
.carousel__ctrl { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 28px; }
.round {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background-color 0.3s, transform 0.35s var(--ease), border-color 0.3s;
}
.round:hover { background: var(--glow); border-color: var(--glow); transform: scale(1.08); }
.round:disabled { opacity: 0.35; pointer-events: none; }
.carousel.is-measuring .scard { transition: none !important; min-height: 0 !important; }
.dots { display: flex; gap: 8px; }
.dots button { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.3); transition: width 0.4s var(--ease), background-color 0.3s; }
.dots button[aria-current="true"] { width: 28px; background: var(--glow); }
.services .section { padding-bottom: clamp(64px, 8vw, 112px); }

@media (max-width: 599px) {
  .carousel__viewport { --fl: 10%; --fr: 12%; }
  .slide { flex-basis: 76vw; }
  .scard { padding: 24px; }
}

/* 9. About ----------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__img { position: relative; border-radius: var(--r-panel); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -30px rgba(10, 15, 46, 0.5); }
.about__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.about__img:hover img { transform: scale(1.05); }
.about p.body { margin-top: 24px; color: var(--muted); max-width: 60ch; }
@media (max-width: 899px) { .about__grid { grid-template-columns: 1fr; } .about__img { aspect-ratio: 4 / 3; } }

/* 10. Mission, Vision & Values -------------------------------------------- */
.mvv__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mcard {
  position: relative; overflow: hidden; padding: 32px; border-radius: var(--r-card); color: var(--on-dark);
  background: var(--navy); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.mcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(60% 80% at var(--mx, 50%) var(--my, 0%), rgba(77, 141, 255, 0.35), transparent 70%);
}
.mcard:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -28px rgba(1, 63, 187, 0.7); }
.mcard:hover::before { opacity: 1; }
.mcard > * { position: relative; }
.mcard--wide { grid-column: span 2; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; }
.mcard--mission { background: var(--gradient); }
.mcard--vision { background: linear-gradient(160deg, var(--navy-2), var(--navy)); }
.mcard h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.mcard--wide p { margin-top: 14px; font-size: 1.05rem; color: rgba(255, 255, 255, 0.9); max-width: 34ch; }
.mcard .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(255, 255, 255, 0.08); color: var(--glow); margin-bottom: 40px; }
.mcard--wide .ico { position: absolute; top: 32px; left: 32px; margin: 0; background: rgba(255, 255, 255, 0.16); color: #fff; }
.mcard:not(.mcard--wide) h3 { font-size: 1.25rem; }
.mcard:not(.mcard--wide) p { margin-top: 8px; font-size: 0.925rem; color: var(--on-dark-muted); }
@media (max-width: 1023px) { .mvv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .mvv__grid { grid-template-columns: 1fr; }
  .mcard--wide { grid-column: auto; min-height: 0; justify-content: flex-start; }
  .mcard .ico, .mcard--wide .ico { position: relative; top: auto; left: auto; margin-bottom: 28px; }
}

/* 11. Why Choose Us -------------------------------------------------------- */
.why { padding-top: 0; }
.ribbon {
  position: relative; height: 48px; overflow: hidden; display: flex; align-items: center;
  background: linear-gradient(90deg, rgba(28, 93, 180, 0.35), rgba(61, 18, 139, 0.35));
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ribbon::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 22%; left: -30%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(77, 141, 255, 0.55), transparent); animation: sweep 6s linear infinite;
}
@keyframes sweep { to { left: 110%; } }
.ribbon__track { display: flex; flex: none; width: max-content; animation: marquee 48s linear infinite; }
.ribbon:hover .ribbon__track { animation-play-state: paused; }
.ribbon__set { display: flex; flex: none; align-items: center; }
.ribbon__set span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: #fff; }
.ribbon__set span::after { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--glow); }
@keyframes marquee { to { transform: translateX(-50%); } }
.why__body { padding-block: clamp(56px, 7vw, 96px) clamp(64px, 8vw, 112px); }
.why .h2 { color: #fff; max-width: 22ch; }
.wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: clamp(40px, 5vw, 64px); }
.wcard {
  position: relative; overflow: hidden; padding: 28px; border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(150, 192, 255, 0.66); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.5s var(--ease), border-color 0.4s, background-color 0.4s;
}
.wcard:hover { transform: translateY(-6px); border-color: #a8caff; background: rgba(77, 141, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 24px -4px rgba(77, 141, 255, 0.55); }
.wcard--2 { grid-column: span 2; }
.wcard--grad { background: var(--gradient); border-color: rgba(255, 255, 255, 0.62); }
.wcard--grad:hover { background: var(--gradient); border-color: #fff; }
.wcard--light { background: var(--lavender); border-color: #fff; color: var(--ink); }
.wcard--light:hover { background: #fff; border-color: transparent; }
.wcard.wcard--light p { color: var(--muted); }
.wcard--light .wcard__ico { background: rgba(53, 17, 155, 0.1); color: var(--violet); }
.wcard__ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem; background: rgba(255, 255, 255, 0.1); color: var(--glow); margin-bottom: 22px; }
.wcard--grad .wcard__ico { background: rgba(255, 255, 255, 0.2); color: #fff; }
.wcard h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.wcard p { margin-top: 8px; font-size: 0.925rem; color: var(--on-dark-muted); }
.wcard--grad p { color: rgba(255, 255, 255, 0.92); }
.wcard--2 h3 { font-size: 1.3rem; }
@media (max-width: 1023px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wcard--2 { grid-column: span 2; } }
@media (max-width: 599px) { .wgrid { grid-template-columns: 1fr; } .wcard--2 { grid-column: auto; } }

/* 12. Certified & Insured -------------------------------------------------- */
.cert__stage {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(28px, 5vw, 64px); border-radius: var(--r-panel);
  background: linear-gradient(135deg, var(--lavender), #dbe5ff);
}
.cert__stage::before { content: ""; position: absolute; z-index: -1; right: -10%; top: 50%; width: 70%; aspect-ratio: 1; transform: translateY(-50%); background: radial-gradient(closest-side, rgba(28, 93, 180, 0.28), transparent); pointer-events: none; }
.cert__copy .h2 { max-width: 14ch; }
.cert__copy .lead { max-width: 40ch; }
.cert__copy .btn { margin-top: 28px; }
.checks { display: grid; gap: 12px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; transition: background-color 0.3s, transform 0.4s var(--ease); }
.checks li:hover { transform: translateX(6px); }
.checks .i { font-size: 1.4rem; margin-top: 1px; }
.checks b { display: block; font-weight: 700; }
.checks span { font-size: 0.875rem; }
.cert .checks { margin-top: 28px; }
.cert .checks li { background: rgba(255, 255, 255, 0.72); color: var(--ink); box-shadow: 0 0 0 1px rgba(53, 17, 155, 0.1); }
.cert .checks li:hover { background: #fff; }
.cert .checks .i { color: var(--violet); }
.cert .checks span { color: var(--muted); }
.cert__doc {
  display: block; width: 100%; border-radius: 14px; cursor: zoom-in; background: #fff;
  box-shadow: 0 50px 80px -34px rgba(1, 63, 187, 0.6), 0 0 0 1px rgba(20, 23, 28, 0.08);
  transform: perspective(1400px) rotateY(-7deg) rotateZ(-1.2deg); transform-origin: 60% 50%;
  transition: transform 0.9s var(--ease), box-shadow 0.9s var(--ease);
}
.cert__doc img { display: block; width: 100%; height: auto; border-radius: inherit; }
.cert__doc:hover, .cert__doc:focus-visible { transform: perspective(1400px) rotateY(0) rotateZ(0) scale(1.025); box-shadow: 0 60px 90px -34px rgba(1, 63, 187, 0.7), 0 0 0 1px rgba(20, 23, 28, 0.1); }
@media (max-width: 899px) {
  .cert__stage { grid-template-columns: 1fr; }
  .cert__doc { order: -1; transform: none; }
}
/* Lightbox (native <dialog>) */
.lightbox { border: 0; padding: 0; background: transparent; width: min(96vw, 1400px); max-width: none; max-height: 94dvh; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 15, 46, 0.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { width: 100%; height: auto; max-height: 90dvh; object-fit: contain; border-radius: 12px; background: #fff; }
.lightbox__close { position: absolute; top: -18px; right: -6px; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: #fff; color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); transition: transform 0.3s var(--ease); }
.lightbox__close:hover { transform: scale(1.1) rotate(90deg); }

/* 13. Gallery: grabbable sideways carousel (drag with the mouse, swipe on touch, arrows) ---- */
.gal { position: relative; }
.gal__viewport {
  overflow-x: auto; overscroll-behavior-x: contain; cursor: grab; scrollbar-width: none; touch-action: pan-x pan-y;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.gal__viewport::-webkit-scrollbar { display: none; }
.gal__viewport.is-drag { cursor: grabbing; user-select: none; }
.gal__track { display: flex; gap: 16px; width: max-content; }
.gal__item { height: clamp(300px, 34vw, 460px); flex: none; border-radius: var(--r-card); overflow: hidden; background: var(--lavender); }
.gal__item img { height: 100%; width: auto; display: block; user-select: none; -webkit-user-drag: none; filter: saturate(0.9); transition: filter 0.5s, transform 0.9s var(--ease); }
.gal__item:hover img { filter: none; transform: scale(1.03); }
.gal__ctrl { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.gal__bar { flex: 1; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.gal__bar i { display: block; height: 100%; width: 20%; border-radius: inherit; background: var(--gradient); will-change: transform; }
.round--light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.round--light:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (prefers-reduced-motion: reduce) { .gal__item:hover img { transform: none; } }

/* 13b. Gallery, desktop mode: accordion of 7 slices (the JS adds .is-acc on wide screens with a mouse) */
.gal.is-acc .gal__viewport { overflow: visible; margin-inline: 0; padding-inline: 0; cursor: grab; -webkit-mask-image: none; mask-image: none; }
.gal.is-acc .gal__viewport.is-drag { cursor: grabbing; user-select: none; }
.gal.is-acc .gal__track { width: 100%; gap: 12px; height: clamp(420px, 40vw, 540px); }
.gal.is-acc .gal__item {
  position: relative; flex: 1 1 0; min-width: 0; height: auto; cursor: inherit;
  transition: flex-grow 0.7s var(--ease), box-shadow 0.5s;
}
.gal.is-acc .gal__item.is-open { flex-grow: 5; box-shadow: 0 0 0 1.5px rgba(130, 176, 255, 0.95), 0 0 26px -2px rgba(77, 141, 255, 0.6); }
.gal.is-acc .gal__item--wide.is-open { flex-grow: 8; }
.gal.is-acc .gal__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8); transition: filter 0.5s; }
.gal.is-acc .gal__item.is-open img { filter: none; }
.gal.is-acc .gal__item:hover img { transform: none; }
.gal.is-acc .gal__item::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 35%, rgba(10, 15, 46, 0.7)); opacity: 0.75; transition: opacity 0.5s; }
.gal.is-acc .gal__item.is-open::after { opacity: 0; }
.gal.is-acc .gal__item:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .gal.is-acc .gal__item, .gal.is-acc .gal__item img, .gal.is-acc .gal__item::after { transition: none; } }

/* 14. FAQ ------------------------------------------------------------------ */
.faq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.faq__list { display: grid; gap: 12px; }
.qa { border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: box-shadow 0.4s, background-color 0.4s; }
.qa:hover { box-shadow: 0 0 0 1px rgba(1, 63, 187, 0.4); }
.qa.is-open { background: #fff; box-shadow: 0 0 0 1.5px var(--blue), var(--shadow-card); }
.qa__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; text-align: left; font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.qa__q .i { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background-color: var(--lavender); color: var(--violet); -webkit-mask: none; mask: none; position: relative; display: grid; place-items: center; transition: transform 0.5s var(--ease), background-color 0.3s, color 0.3s; }
.qa__q .i::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.qa.is-open .qa__q .i { transform: rotate(135deg); background-color: var(--blue); color: #fff; }
.qa__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.qa.is-open .qa__a { grid-template-rows: 1fr; }
.qa__a > div { overflow: hidden; }
.qa__a p { padding: 0 26px 24px; color: var(--muted); max-width: 62ch; }
@media (max-width: 899px) { .faq__grid { grid-template-columns: 1fr; } .faq__aside { position: static; } }

/* 15. Contact -------------------------------------------------------------- */
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.info { margin-top: 36px; display: grid; gap: 22px; }
.info li { display: flex; gap: 16px; align-items: flex-start; }
.info .i { width: 48px; height: 48px; padding: 12px; border-radius: 14px; background-color: var(--lavender); color: var(--violet); -webkit-mask: none; mask: none; position: relative; }
.info .i::before { content: ""; position: absolute; inset: 12px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.info b { display: block; font-weight: 700; }
.info span { color: var(--muted); font-size: 0.95rem; }
.info a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.info a:hover, .info a:focus-visible { color: var(--blue); text-decoration-color: currentColor; }
.form { padding: clamp(24px, 3.4vw, 44px); border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 30px 60px -34px rgba(10, 15, 46, 0.4), 0 0 0 1px var(--line); }
.form h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 24px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.875rem; font-weight: 700; }
.field label small { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--r-input); border: 1.5px solid #b9bfcb; background: #fff; color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6b7280; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--blue); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(1, 63, 187, 0.16); }
.field .err { display: none; color: #b42318; font-size: 0.85rem; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #b42318; }
.field.has-error .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; margin-top: 8px; }
.form__ok { display: none; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #e8f3ff; color: #0b3a8a; font-weight: 600; }
.form.is-sent .form__ok { display: block; }
@media (max-width: 899px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 559px) { .row2 { grid-template-columns: 1fr; } }

/* 16. Areas ---------------------------------------------------------------- */
.areas { padding-bottom: 0; }
.areas .sec-head { max-width: 760px; }
.areas__card { position: relative; border-radius: var(--r-panel); background: var(--lavender); padding: clamp(20px, 3vw, 40px); overflow: hidden; }
.usmap { width: 100%; max-width: 940px; height: auto; margin-inline: auto; }
.usmap .st { fill: #d9d2f0; stroke: var(--lavender); stroke-width: 1; transition: fill 0.3s; }
.usmap .st--on { fill: var(--blue); cursor: pointer; }
.usmap .st--on:hover, .usmap .st--on.is-hl { fill: var(--violet); }
.usmap .office__dot { fill: #fff; }
.usmap .office__ring { fill: none; stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ring 2.4s ease-out infinite; }
.usmap .office text { font-family: var(--font); font-size: 15px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--lavender); stroke-width: 4px; }
@keyframes ring { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip { padding: 10px 18px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 0.9rem; font-weight: 600; transition: background-color 0.25s, color 0.25s, transform 0.35s var(--ease); }
.chip:hover, .chip.is-hl { background: var(--blue); color: #fff; transform: translateY(-2px); }
.areas__note { margin-top: 24px; color: var(--muted); font-size: 0.95rem; }

/* 17. Footer --------------------------------------------------------------- */
.footer { margin: clamp(48px, 6vw, 96px) clamp(8px, 1.6vw, 24px) clamp(8px, 1.6vw, 24px); border-radius: var(--r-panel); background: var(--navy); color: var(--on-dark); padding: clamp(40px, 5vw, 72px) 0 28px; position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; inset: -25%; pointer-events: none; will-change: transform; background: radial-gradient(33% 47% at 17% 17%, rgba(28, 93, 180, 0.4), transparent 70%), radial-gradient(27% 40% at 83% 83%, rgba(61, 18, 139, 0.5), transparent 70%); animation: glow-drift 30s ease-in-out infinite alternate; animation-play-state: paused; }
.footer .wrap { position: relative; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr; gap: 40px; }
.footer .brand { color: #fff; }
.footer .brand__logo { height: 104px; }
.footer p { color: var(--on-dark-muted); font-size: 0.925rem; margin-top: 16px; max-width: 34ch; }
.footer h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; color: #fff; }
.footer li { margin-bottom: 10px; font-size: 0.925rem; color: var(--on-dark-muted); }
.footer li a { transition: color 0.25s; }
.footer li a:hover { color: #fff; }
.footer__bar { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: var(--on-dark-muted); }
.footer__bar { align-items: center; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__legal a { transition: color 0.25s; }
.footer__legal a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 899px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 559px) { .footer__grid { grid-template-columns: 1fr; } }

/* 18. Motion primitives ---------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Section transition: dark panels grow into place as they enter (progressive enhancement) */
@supports (animation-timeline: view()) {
  .panel, .footer {
    animation: panel-in linear both; animation-timeline: view(); animation-range: entry 0% entry 60%;
  }
  @keyframes panel-in { from { transform: scale(0.94); border-radius: 64px; opacity: 0.6; } to { transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .ribbon__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .ribbon__set[aria-hidden] { display: none; }
  .ribbon { height: auto; padding-block: 12px; }
}

/* 19. Service page --------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.875rem; font-weight: 600; color: var(--on-dark-muted); margin-bottom: 28px; }
.crumbs a { transition: color 0.25s; }
.crumbs a:hover { color: #fff; }
.crumbs .i { font-size: 0.9rem; }
.crumbs [aria-current] { color: #fff; }
.svc-hero h1 { font-size: clamp(2rem, 3.5vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.svc-hero h1 { color: #fff; }
.svc-hero h1 .accent { color: var(--glow); }
.svc-hero .hero__media { aspect-ratio: 1 / 1; max-height: 56dvh; }
.svc-hero .hero__media img { object-position: 50% 0; }
.checklist__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.checklist__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tick {
  display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.5s var(--ease), box-shadow 0.4s, background-color 0.4s, color 0.4s;
}
.tick:hover { transform: translateY(-6px); background: var(--gradient); color: #fff; box-shadow: 0 24px 44px -24px rgba(1, 63, 187, 0.7); }
.tick .i { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background-color: var(--lavender); color: var(--violet); transition: background-color 0.4s, color 0.4s; }
.tick:hover .i { background-color: rgba(255, 255, 255, 0.2); color: #fff; }
.tick b { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.expect__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.xcard { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 48px); border-radius: var(--r-panel); color: #fff; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; }
.xcard--a { background: var(--gradient); }
.xcard--b { background: linear-gradient(160deg, var(--navy-2), var(--navy)); }
.xcard .i { position: absolute; top: clamp(28px, 4vw, 44px); left: clamp(28px, 4vw, 44px); width: 52px; height: 52px; padding: 12px; border-radius: 16px; background-color: rgba(255, 255, 255, 0.16); }
.xcard--b .i { color: var(--glow); background-color: rgba(255, 255, 255, 0.08); }
.xcard small { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.xcard p { margin-top: 10px; font-size: clamp(1.1rem, 1.6vw, 1.35rem); font-weight: 600; line-height: 1.4; max-width: 30ch; }
.xcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 80% at 100% 0%, rgba(77, 141, 255, 0.28), transparent 70%); }
/* Scheduling & What to Expect: hover lift + glow (specific selector beats [data-reveal].is-in transform:none) */
.xcard::after { transform-origin: 100% 0; transition: transform 0.7s var(--ease); }
.xcard .i { transition: transform 0.5s var(--ease), background-color 0.4s; }
.js .xcard[data-reveal].is-in {
  transition: opacity 0.9s var(--ease), transform 0.5s var(--ease), box-shadow 0.4s;
  transition-delay: calc(var(--d, 0) * 90ms), 0s, 0s;
}
.js .xcard[data-reveal].is-in:hover, .js .xcard[data-reveal].is-in:focus-within { transform: translateY(-8px); }
.xcard--a:hover { box-shadow: 0 32px 60px -28px rgba(1, 63, 187, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.35) inset; }
.xcard--b:hover { box-shadow: 0 0 0 1px rgba(168, 202, 255, 0.6), 0 0 32px -4px rgba(77, 141, 255, 0.55); }
.xcard:hover::after { transform: scale(1.35); }
.xcard:hover .i { transform: scale(1.1) rotate(-6deg); background-color: rgba(255, 255, 255, 0.26); }
.xcard--b:hover .i { background-color: rgba(77, 141, 255, 0.22); }
@media (prefers-reduced-motion: reduce) {
  .js .xcard[data-reveal].is-in:hover { transform: none; }
  .xcard:hover::after, .xcard:hover .i { transform: none; }
}
@media (max-width: 899px) {
  .checklist__grid { grid-template-columns: 1fr; }
  .checklist__aside { position: static; }
  .expect__grid { grid-template-columns: 1fr; }
  .xcard { min-height: 240px; }
}
@media (max-width: 559px) { .ticks { grid-template-columns: 1fr; } }
.tick .i { -webkit-mask: none; mask: none; position: relative; }
.xcard .i { -webkit-mask: none; mask: none; }
.tick .i::before, .xcard .i::before { content: ""; position: absolute; inset: 22%; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

/* 20. Credentials strip ---------------------------------------------------- */
.creds { padding-block: clamp(48px, 6vw, 80px); }
.creds__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cred { padding: 8px clamp(16px, 3vw, 40px); border-left: 1px solid var(--line); }
.cred:first-child { padding-left: 0; border-left: 0; }
.cred b { display: block; font-size: clamp(2.25rem, 4vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--blue); }
.cred > span { display: block; margin-top: 10px; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.cred--badge { display: flex; align-items: center; gap: 16px; }
.cred--badge .i { width: 52px; height: 52px; border-radius: 16px; background-color: var(--lavender); color: var(--violet); -webkit-mask: none; mask: none; position: relative; }
.cred--badge .i::before { content: ''; position: absolute; inset: 22%; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.cred.cred--badge b { font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
.cred--badge div span { display: block; margin-top: 6px; font-size: 0.85rem; font-weight: 500; color: var(--muted); }
@media (max-width: 899px) {
  .creds__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .cred--badge { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
}
@media (max-width: 559px) { .cred { padding-inline: 12px; } .cred b { font-size: 2rem; } }
/* US map: keep office labels legible on small screens */
@media (max-width: 640px) { .usmap .office text { font-size: 30px; stroke-width: 6px; } .usmap .office__dot { r: 8; } }

/* 21. Fiber rail (reading progress as light travelling down a fibre) ------- */
.rail { display: none; }
@media (min-width: 1200px) {
  @supports (animation-timeline: scroll()) {
    .rail {
      display: block; position: fixed; z-index: 40; pointer-events: none;
      left: max(14px, calc((100vw - var(--wrap)) / 2 - 64px)); top: calc(var(--header-h) + 24px); bottom: 24px; width: 2px;
      border-radius: 2px; background: rgba(77, 141, 255, 0.22);
    }
    .rail__fill, .rail__head { animation-timing-function: linear; animation-fill-mode: both; animation-timeline: scroll(root block); }
    .rail__fill { position: absolute; inset: 0; border-radius: inherit; transform-origin: top; background: linear-gradient(180deg, var(--grad-a), var(--glow)); animation-name: rail-fill; }
    .rail__head { position: absolute; left: -4px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--glow), 0 0 10px 3px rgba(77, 141, 255, 0.85), 0 0 26px 8px rgba(77, 141, 255, 0.4); animation-name: rail-head; }
    @keyframes rail-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
    @keyframes rail-head { from { transform: translateY(0); } to { transform: translateY(calc(100vh - var(--header-h) - 58px)); } }
  }
}

/* 22. Film grain: one static fixed layer, never on scrolling containers ---- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.07;
  background-image: url("https://aphfiber.com/wp-content/uploads/2026/10/grain.png"); background-size: 128px 128px; /* pre-rendered tile: the live feTurbulence filter cost ~0.4 s of main-thread time */
}

@media (prefers-reduced-motion: reduce) {
  .rail { display: none !important; }
  .panel--dark::before, .footer::before { animation: none !important; }
}

/* 23. Polish ---------------------------------------------------------------- */
/* Values cards: lift from flat navy to a lit glass surface with a gradient edge on hover */
.mcard:not(.mcard--wide) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 60%), var(--navy); border-color: rgba(150, 192, 255, 0.28); }
.mcard:not(.mcard--wide):hover { border-color: rgba(168, 202, 255, 0.7); }
/* Section heads: tighter title/lead rhythm */
.h2 + .lead { margin-top: 16px; }
/* FAQ: clearer open state */
.qa.is-open .qa__q { color: var(--blue); }

/* Language switcher: compact pill (globe + EN/PT), menu opens below. Google's widget stays hidden but mounted. */
.lang__gt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 11px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: #fff;
  background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: background-color 0.25s, box-shadow 0.25s;
}
.lang__btn:hover, .lang.is-open .lang__btn { background: rgba(255, 255, 255, 0.16); box-shadow: 0 0 0 1px rgba(168, 202, 255, 0.55); }
.lang__globe, .lang__caret { flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.lang__globe { width: 15px; height: 15px; --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M3 12h18M12 3c2.6 2.6 3.9 5.6 3.9 9S14.600 18.400 12 21c-2.600-2.600-3.900-5.600-3.900-9S9.400 5.600 12 3z'/></svg>"); }
.lang__caret { width: 9px; height: 9px; opacity: 0.8; transition: transform 0.3s var(--ease); --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1.500l5 5 5-5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>"); }
.lang.is-open .lang__caret { transform: rotate(180deg); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 168px; padding: 6px; display: grid; gap: 2px;
  border-radius: 16px; background: rgba(10, 15, 46, 0.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(150, 192, 255, 0.28), 0 24px 48px -16px rgba(0, 0, 0, 0.6);
  transform-origin: top right; animation: lang-in 0.25s var(--ease);
}
.lang__menu[hidden] { display: none; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.lang__menu button { text-align: left; padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; color: var(--on-dark-muted); transition: background-color 0.2s, color 0.2s; }
.lang__menu button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lang__menu button[aria-pressed="true"] { color: #fff; background: rgba(77, 141, 255, 0.22); }
@media (max-width: 1023px) {
  .lang { margin: 8px 0 0; padding: 0 18px; }
  .lang__btn { color: var(--ink); background: transparent; box-shadow: 0 0 0 1px var(--line); }
  .lang__btn:hover, .lang.is-open .lang__btn { background: var(--lavender); box-shadow: 0 0 0 1px var(--line); }
  .lang__menu { position: static; margin-top: 8px; animation: none; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .lang__menu button { color: var(--muted); }
  .lang__menu button:hover { background: var(--lavender); color: var(--ink); }
  .lang__menu button[aria-pressed="true"] { background: var(--lavender); color: var(--blue); }
}

/* 24. Phase 4: legal pages, 404, cookie notice, form feedback --------------------- */
.legal { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 96px)); }
.legal__in { max-width: 820px; }
.legal__body { margin-top: 28px; color: var(--ink); line-height: 1.75; }
.legal__body > * + * { margin-top: 1.1em; }
.legal__body h2, .legal__body h3 { font-weight: 800; letter-spacing: -0.02em; margin-top: 1.8em; }
.legal__body ul { list-style: disc; padding-left: 1.3em; }
.legal__body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal__back { margin-top: 40px; }

.notfound { padding-top: calc(var(--header-h) + clamp(56px, 8vw, 120px)); min-height: 72dvh; display: flex; align-items: center; }
.notfound__in { text-align: center; display: grid; justify-items: center; }
.notfound__code { font-size: clamp(6rem, 22vw, 14rem); font-weight: 900; line-height: 0.9; letter-spacing: -0.06em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound .lead { margin-inline: auto; }
.notfound__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }

.cookie { position: fixed; z-index: 60; inset: auto 0 0 0; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 14px max(var(--gutter), 16px); background: #fff; color: var(--ink); font-size: 0.875rem; line-height: 1.5; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(10, 15, 46, 0.08); animation: cookie-in 0.4s var(--ease) both; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; max-width: 78ch; color: var(--ink); }
.cookie a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.cookie__btn { flex: none; font: 500 0.875rem/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; padding: 10px 24px; border: 0; border-radius: 4px; background: #1a73e8; color: #fff; cursor: pointer; transition: background-color 0.15s; }
.cookie__btn:hover { background: #1765cc; }
.cookie__btn:active { background: #185abc; }
.cookie__btn:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
@keyframes cookie-in { from { transform: translateY(100%); } }
@media (max-width: 640px) { .cookie { flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; font-size: 0.78rem; line-height: 1.4; } .cookie__btn { padding: 9px 16px; } }
@media (prefers-reduced-motion: reduce) { .cookie { animation: none; } }

.form__fail { display: none; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #fdecea; color: #8a1c13; font-weight: 600; }
.form__fail a { text-decoration: underline; }
.form.is-failed .form__fail { display: block; }
.form.is-sent .form__fail { display: none; }
.form .btn[disabled] { opacity: 0.6; pointer-events: none; }

/* 25. Phase 5: performance + accessibility -------------------------------------- */
.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; }
/* Above-the-fold content animates with CSS only (no wait for JS), so the largest paint is not delayed */
@keyframes reveal-in { from { opacity: 0; transform: translateY(28px); } }
.js .hero [data-reveal] { opacity: 1; transform: none; transition: none; animation: reveal-in 0.9s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) { .js .hero [data-reveal] { animation: none; } }
.areas__note .btn { max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; } /* long label must wrap on small screens */
.hero__media { touch-action: pan-y; } /* horizontal swipes reach the slide script instead of being taken by the browser */

/* 26. Touch screens: bigger tap areas (44 px) without changing how things look ---- */
@media (pointer: coarse) {
  .hero__dots button { box-sizing: content-box; border: 8px solid transparent; margin: -8px; background-clip: padding-box; }
  /* service dots: 44 px tall tap area, the visible dot is drawn by ::before */
  .dots { gap: 0; }
  .dots button { position: relative; width: 24px; height: 44px; border-radius: 0; background: none; transition: width 0.4s var(--ease); }
  .dots button[aria-current="true"] { width: 44px; background: none; }
  .dots button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: rgba(255, 255, 255, 0.3); transition: width 0.4s var(--ease), margin 0.4s var(--ease), background-color 0.3s; }
  .dots button[aria-current="true"]::before { width: 28px; margin-left: -14px; background: var(--glow); }
  .scard .btn { min-height: 44px; }
  .footer li a, .footer__legal a, .info a, .crumbs a { display: inline-block; padding-block: 12px; margin-block: -12px; }
}
