/*
  Abox System — Base styles
  - Modern, accessible, responsive
  - No external build step required
*/

:root {
  --bg: #ffffff;
  --surface: #f8fafc;     /* slate-50 */
  --muted: #475569;       /* slate-600 */
  --text: #0f172a;        /* slate-900 */
  --primary: #2563eb;     /* blue-600 */
  --primary-600: #1d4ed8; /* blue-700 */
  --accent: #0ea5e9;      /* sky-500 */
  --ring: #3b82f6;        /* blue-500 */
  --card: #ffffff;        /* white */
  --shadow: rgba(2, 8, 23, 0.08);
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 1px, 1px); white-space: nowrap; border: 0; }

/* Utility */
.no-scroll { overflow: hidden; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 1.25rem;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: inline-block; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; gap: 1rem;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.1) blur(6px);
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid #e2e8f0;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; }
.brand.small { font-weight: 600; }
.brand-logo { height: 28px; width: auto; display: block; }
.brand.small .brand-logo { height: 22px; }

.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a { color: #334155; font-weight: 600; }
.site-nav a:hover { color: #0f172a; }
.site-nav a.active { color: var(--primary); }

/* Dropdown menu */
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 200px;
  box-shadow: 0 10px 30px -12px var(--shadow);
  z-index: 1000;
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #334155;
  font-weight: 500;
  border-radius: 0;
}
.dropdown-menu a:hover {
  background: #f8fafc;
  color: var(--primary);
}
.dropdown-menu a.active {
  color: var(--primary);
  background: #f1f5f9;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 600; color: #fff; background: var(--primary); border: 1px solid transparent; padding: .75rem 1rem; border-radius: var(--radius-sm); box-shadow: 0 8px 20px -10px var(--shadow); }
.btn:hover { background: var(--primary-600); }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn-ghost { background: transparent; border-color: #cbd5e1; color: #0f172a; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-sm { padding: .55rem .8rem; font-size: .95rem; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 2rem; padding: 4rem 0 2rem; }
.hero .product-icon { width: 56px; height: auto; margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.2rem); line-height: 1.12; margin: 0 0 1rem; }
.hero p { margin: 0 0 1.25rem; color: #475569; font-size: 1.05rem; }
.hero .actions { display: flex; gap: .75rem; margin: 1rem 0 1rem; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 1rem; list-style: none; padding: 0; margin: .5rem 0 0; color: #cbd5e1; }
.hero .hero-visual { display: grid; place-items: center; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: .75rem; width: 100%; max-width: 420px; }
.card { background: var(--card); border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.4rem; text-align: center; font-weight: 700; color: #1e293b; box-shadow: 0 8px 20px -16px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.6); }
.hero-cover { width: 100%; max-width: 560px; aspect-ratio: 4 / 3; border-radius: 16px; border: 1px solid #1f2937; background-size: cover; background-position: center; box-shadow: 0 10px 30px -25px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.04); }

/* Sections */
.section { padding: 3.5rem 0; }
.section-title { font-size: 1.6rem; margin: 0 0 1.25rem; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tile, .panel { background: var(--card); border: 1px solid #e2e8f0; border-radius: var(--radius); padding: 1.2rem; box-shadow: 0 10px 30px -25px var(--shadow); }
.tile h3, .panel h3 { margin: 0 0 .5rem; }
.tile p, .panel p { margin: 0; color: var(--muted); }

.checklist { list-style: none; margin: .75rem 0 0; padding: 0; }
.checklist li { position: relative; padding-left: 1.5rem; margin: .25rem 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35rem; width: .9rem; height: .9rem; border-radius: 999px; background: conic-gradient(var(--accent), #38bdf8); box-shadow: 0 0 0 2px #ffffff inset; }

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

/* Contact */
.contact-form { background: var(--card); border: 1px solid #e2e8f0; border-radius: var(--radius-lg); padding: 1.5rem; }
.contact-details p { margin: .25rem 0 .75rem; color: var(--text); }
.contact-form label { display: block; }
.contact-form label span { display: block; font-weight: 600; margin: .35rem 0 .35rem; }
.contact-form input, .contact-form textarea {
  width: 100%; background: #ffffff; color: var(--text); border: 1px solid #cbd5e1; border-radius: 10px; padding: .7rem .8rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--ring); outline-offset: 2px; }
.form-actions { margin-top: .8rem; display: flex; align-items: center; gap: .75rem; }
.form-status { color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer { border-top: 1px solid #e2e8f0; padding: 2rem 0 3rem; margin-top: 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 1rem; }
.muted { color: var(--muted); }

/* Default boxed Gallery (used on subpages) */
.gallery .gitem { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; background: #fff; aspect-ratio: 4 / 3; }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.gallery .gitem:hover img { transform: scale(1.04); }

/* Full-bleed gallery - scoped to .gallery-wrap so boxed galleries are unaffected */
.gallery-wrap { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.gallery-wrap .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 images per row */
  gap: 0; /* no gaps between images */
}
.gallery-wrap .gallery .gitem {
  position: relative;
  display: block;
  overflow: visible; /* allow aura to extend outside the tile */
  border: 0;
  border-radius: 0; /* remove rounded corners */
  background: transparent;
  aspect-ratio: 4 / 3; /* keep images proportional - individual images may vary */
  will-change: transform;
  transition: transform .32s cubic-bezier(.2,.8,.2,1), z-index 0.02s linear;
}
.gallery-wrap .gallery .gitem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit; /* clip image to container corners */
  transition: transform .32s cubic-bezier(.2,.8,.2,1), filter .22s ease;
  position: relative;
  z-index: 2;
}

/* colored aura via pseudo-element underneath the image */
.gallery-wrap .gallery .gitem::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 78%; height: 58%;
  transform: translate(-50%, -50%) scale(0.95);
  background: radial-gradient(circle at center, rgba(37,99,235,0.22), rgba(14,165,233,0.06) 40%, transparent 60%);
  filter: blur(26px);
  opacity: 0;
  z-index: 1; /* beneath the image (img z-index:2) */
  transition: opacity .22s ease, transform .28s ease;
  border-radius: inherit;
  pointer-events: none;
}

.gallery-wrap .gallery .gitem:hover,
.gallery-wrap .gallery .gitem.hover,
.gallery-wrap .gallery .gitem:focus,
.gallery-wrap .gallery .gitem:active,
.gallery-wrap .gallery .gitem:focus-visible {
  transform: translateY(-12px); /* levitate container */
  z-index: 10; /* bring above neighbors */
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); /* additional shadow on container */
}
.gallery-wrap .gallery .gitem:hover img,
.gallery-wrap .gallery .gitem.hover img,
.gallery-wrap .gallery .gitem:focus img,
.gallery-wrap .gallery .gitem:active img,
.gallery-wrap .gallery .gitem:focus-visible img {
  transform: scale(1.15); /* grow 15% */
  filter: brightness(1.03);
  box-shadow: 0 0 30px rgba(255,255,255,0.9); /* very visible white shadow/glow under the image */
}
.gallery-wrap .gallery .gitem:hover::after,
.gallery-wrap .gallery .gitem.hover::after,
.gallery-wrap .gallery .gitem:focus::after,
.gallery-wrap .gallery .gitem:active::after,
.gallery-wrap .gallery .gitem:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.06);
}

/* Laptop-specific: larger tiles and levitate+aura on hover */
@media (min-width: 980px) and (max-width: 1366px) {
  .gallery-wrap .gallery {
    grid-template-columns: repeat(3, 1fr); /* 3 images per row on laptops */
  }
  .gallery-wrap .gallery .gitem img {
    transition: transform .32s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, filter .22s ease;
  }
  .gallery-wrap .gallery .gitem:hover img {
    transform: translateY(-10px) scale(1.02); /* levitate effect */
    box-shadow: 0 30px 60px -18px rgba(2,8,23,0.55), 0 6px 24px -6px rgba(2,8,23,0.25); /* aura + depth */
    filter: brightness(1.03);
  }
  /* lift the whole item slightly to avoid clipping on overflow hidden parents */
  .gallery-wrap .gallery .gitem {
    will-change: transform;
  }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; }
.lightbox.open { display: block; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(2px); }
.lightbox-figure { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; }
.lightbox-img { max-width: 92vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(2,8,23,0.6); background: #fff; }
.lightbox-caption { margin-top: .75rem; color: #e2e8f0; text-align: center; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,0.92); color: #0f172a; border: 1px solid #cbd5e1; border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 20px -10px rgba(2,8,23,0.35); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-close:focus-visible, .lightbox-prev:focus-visible, .lightbox-next:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

@media (max-width: 720px) {
  .lightbox-figure { padding: 1rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .site-nav { display: none; position: absolute; right: 1.25rem; top: 62px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: .6rem; flex-direction: column; width: calc(100% - 2.5rem); box-shadow: 0 20px 40px -24px var(--shadow); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
}

/* Hotspots */
.hotspot-wrap { position: relative; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px -25px var(--shadow); overflow: hidden; }
.hotspot-wrap img { display: block; width: 100%; height: auto; }
.hotspot { position: absolute; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--hotspot-bg, #ffffff); border: 3px solid var(--hotspot-border, var(--primary)); color: var(--hotspot-fg, var(--primary)); cursor: pointer; box-shadow: 0 10px 20px -12px rgba(15, 23, 42, 0.45); font-weight: 600; font-size: 0.875rem; transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease; z-index: 10; user-select: none; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; }
.hotspot::after { content: attr(data-marker-icon); }
.hotspot:not([data-marker-icon])::after,
.hotspot[data-marker-icon=""]::after { content: "i"; }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.08); opacity: 0.95; }
.hotspot:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.hotspot.size-small { width: 32px; height: 32px; font-size: 0.75rem; }
.hotspot.size-large { width: 48px; height: 48px; font-size: 1rem; }
.hotspot.style-circle { border-radius: 50%; }
.hotspot.style-square { border-radius: 10px; }
.hotspot.style-diamond { border-radius: 10px; transform: translate(-50%, -50%) rotate(45deg); }
.hotspot.style-diamond:hover { transform: translate(-50%, -50%) rotate(45deg) scale(1.08); }
.hotspot.style-diamond::after { display: inline-block; transform: rotate(-45deg); }
.hotspot.style-triangle { border-radius: 0; background: transparent; border: none; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 35px solid var(--hotspot-bg, var(--primary)); border-top: none; width: 0; height: 0; box-shadow: none; }
.hotspot.style-triangle::after { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); color: #fff; }
.hotspot.style-triangle.size-small { border-left-width: 16px; border-right-width: 16px; border-bottom-width: 28px; }
.hotspot.style-triangle.size-large { border-left-width: 24px; border-right-width: 24px; border-bottom-width: 42px; }
.hotspot-popover { position: absolute; background: #ffffff; color: #0f172a; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 20px 50px -20px var(--shadow); padding: .9rem 1rem; z-index: 10; display: none; }
.hotspot-popover.open { display: block; }
.hotspot-popover h4 { margin: 0 0 .25rem; font-size: 1rem; }
.hotspot-popover p { margin: 0; color: #334155; font-size: .95rem; opacity: 0.85; }
.hotspot-popover .close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 999px; border: 1px solid #e2e8f0; background: #ffffff; cursor: pointer; display: grid; place-items: center; color: #0f172a; }
.hotspot-popover .close:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.hotspot-error { padding: 0.75rem 1rem; font-size: 0.9rem; color: #b91c1c; background: rgba(254, 226, 226, 0.6); border-top: 1px solid rgba(248, 113, 113, 0.4); }

/* Target details container (when not using balloon) */
.hotspot-target { border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem; background: #fff; box-shadow: 0 8px 24px -20px var(--shadow); }
.hotspot-target h4 { margin: 0 0 .25rem; font-size: 1rem; }
.hotspot-target p { margin: 0; color: #334155; opacity: 0.85; }
