/* ============================================================
 * components.css — Acid Lime Component Library
 * XPlus Technologies Website Redesign
 *
 * Global reset, typography, layout primitives, buttons, cards,
 * badges, navigation, inputs, and decorative utilities.
 * All values reference tokens.css variables.
 * ============================================================ */


/* ==========================================================
 * 1. GLOBAL RESET
 * ========================================================== */

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

html {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100dvh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}


/* ==========================================================
 * 2. TYPOGRAPHY
 * ========================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-strong);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 600; }
h5 { font-size: 1.125rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
  line-height: 1.7;
  color: var(--text-muted);
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

code {
  font-size: 0.875em;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
}

pre {
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
}

pre code {
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
}

kbd {
  font-size: 0.8em;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border-strong);
}


/* ==========================================================
 * 3. FOCUS STATES
 * ========================================================== */

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-glow) 20%, transparent);
}


/* ==========================================================
 * 4. LAYOUT
 * ========================================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

.section {
  padding: 110px 0;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 60px 0;
  }
}

.section-alt {
  background: var(--surface-2);
}


/* ==========================================================
 * 5. BUTTONS
 * ========================================================== */

/* --- Primary Button --- */

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition:
    transform 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

/* Shine sweep pseudo-element */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(190, 242, 100, 0.6) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 600ms var(--ease-out);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(190, 242, 100, 0.4),
    0 0 40px rgba(190, 242, 100, 0.3);
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:active {
  transform: translateY(0);
}

/* --- Secondary Button --- */

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    background 200ms var(--ease-out);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(190, 242, 100, 0.08);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* --- Small variant --- */

.btn-small {
  padding: 10px 18px;
  font-size: 13px;
}


/* ==========================================================
 * 6. CARDS
 * ========================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition:
    transform 350ms var(--ease-out),
    border-color 350ms var(--ease-out),
    box-shadow 350ms var(--ease-out);
}

/* Radial glow that follows mouse position via --mx / --my */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(190, 242, 100, 0.08),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow:
    0 20px 50px rgba(7, 9, 10, 0.08),
    0 0 60px rgba(190, 242, 100, 0.15);
}

.card:hover::before {
  opacity: 1;
}

/* Featured card variant */
.card.featured::before {
  opacity: 0.5;
}

.card.featured {
  border-color: color-mix(in oklab, var(--accent) 53%, transparent);
}


/* ==========================================================
 * 7. BADGES
 * ========================================================== */

.badge {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in oklab, var(--accent) 27%, transparent);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
  animation: pulse 2s ease-in-out infinite;
}


/* ==========================================================
 * 8. EYEBROW LABEL
 * ========================================================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}


/* ==========================================================
 * 9. LINKS & NAVIGATION
 * ========================================================== */

/* Animated underline link */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 300ms var(--ease-out);
}

.link-underline:hover::after {
  width: 100%;
}

/* Navigation link (scale-based underline) */
.nav-link {
  position: relative;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 200ms var(--ease-out);
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}

.nav-link:hover {
  color: var(--text-strong);
}

.nav-link:hover::before {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--text-strong);
}

.nav-link.active::before {
  transform: scaleX(1);
}


/* ==========================================================
 * 10. FORM INPUTS
 * ========================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 100%;
  transition:
    border-color 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-glow) 20%, transparent);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-subtle);
}

textarea {
  resize: vertical;
  min-height: 100px;
}


/* ==========================================================
 * 11. CHIPS / TAGS
 * ========================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition:
    background 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    color 200ms var(--ease-out);
}

.chip:hover {
  background: var(--accent-soft);
  border-color: color-mix(in oklab, var(--accent) 30%, transparent);
  color: var(--accent);
}

.chip-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}


/* ==========================================================
 * 12. FAQ — DETAILS / SUMMARY
 * ========================================================== */

details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 200ms var(--ease-out);
}

details + details {
  margin-top: var(--s-3);
}

details:hover {
  border-color: var(--border-strong);
}

details[open] {
  border-color: var(--accent);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 200ms var(--ease-out);
}

/* Remove default marker */
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }

/* Chevron indicator */
summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 300;
  color: var(--text-subtle);
  transition: transform 300ms var(--ease-out);
  flex-shrink: 0;
  margin-left: var(--s-4);
}

details[open] summary::after {
  content: "\2212"; /* minus sign */
  transform: rotate(180deg);
}

details[open] summary {
  color: var(--accent);
}

/* FAQ content area with animated entry */
.faq-content {
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  animation: acid-fade-up 400ms var(--ease-out);
}


/* ==========================================================
 * 13. GRID BACKGROUND (decorative)
 * ========================================================== */

.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(
    ellipse 70% 50% at 50% 50%,
    black 20%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 70% 50% at 50% 50%,
    black 20%,
    transparent 100%
  );
  animation: acid-grid-pan 40s linear infinite;
}


/* ==========================================================
 * 14. GLOW ORBS (decorative)
 * ========================================================== */

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}


/* ==========================================================
 * 15. UTILITY CLASSES
 * ========================================================== */

/* Visually hidden but accessible */
.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;
}

/* Text truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Flex helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--s-1); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-6 { gap: var(--s-6); }
.gap-8 { gap: var(--s-8); }


/* ==========================================================
 * 16. LANGUAGE TOGGLE
 * ========================================================== */

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.lang-toggle button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-subtle);
  cursor: pointer;
  transition: background var(--dur-base), color var(--dur-base);
}
.lang-toggle button.active {
  background: var(--accent-soft);
  color: var(--accent);
}


/* ==========================================================
 * 17. INTERACTIVE CURSOR — Lime hand (normal + 15% bigger on hover)
 * ========================================================== */

a, button, [role="button"], input[type="submit"],
select, .card, .chip, .nav-link, .btn-primary,
.btn-secondary, .lang-toggle button, details summary {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='%23ECFCCB' stroke='%2365A30D' stroke-width='1.6' stroke-linejoin='round' d='M10 11V8.99c0-.88.59-1.64 1.44-1.86h.05A1.99 1.99 0 0 1 14 9.05V12v-2c0-.88.6-1.65 1.46-1.87h.05A1.98 1.98 0 0 1 18 10.06V13v-1.94a2 2 0 0 1 1.51-1.94h0A2 2 0 0 1 22 11.06V14c0 .6-.08 1.27-.21 1.97a7.96 7.96 0 0 1-7.55 6.48 54.98 54.98 0 0 1-4.48 0 7.96 7.96 0 0 1-7.55-6.48C2.08 15.27 2 14.59 2 14v-1.49c0-1.11.9-2.01 2.01-2.01h0a2 2 0 0 1 2.01 2.03l-.01.97v-10c0-1.1.9-2 2-2h0a2 2 0 0 1 2 2V11Z'/%3E%3C/svg%3E") 10 4, pointer;
}

a:hover, button:hover, [role="button"]:hover, input[type="submit"]:hover,
select:hover, .card:hover, .chip:hover, .nav-link:hover, .btn-primary:hover,
.btn-secondary:hover, .lang-toggle button:hover, details summary:hover {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='37' height='37' viewBox='0 0 24 24'%3E%3Cpath fill='%23ECFCCB' stroke='%2365A30D' stroke-width='1.4' stroke-linejoin='round' d='M10 11V8.99c0-.88.59-1.64 1.44-1.86h.05A1.99 1.99 0 0 1 14 9.05V12v-2c0-.88.6-1.65 1.46-1.87h.05A1.98 1.98 0 0 1 18 10.06V13v-1.94a2 2 0 0 1 1.51-1.94h0A2 2 0 0 1 22 11.06V14c0 .6-.08 1.27-.21 1.97a7.96 7.96 0 0 1-7.55 6.48 54.98 54.98 0 0 1-4.48 0 7.96 7.96 0 0 1-7.55-6.48C2.08 15.27 2 14.59 2 14v-1.49c0-1.11.9-2.01 2.01-2.01h0a2 2 0 0 1 2.01 2.03l-.01.97v-10c0-1.1.9-2 2-2h0a2 2 0 0 1 2 2V11Z'/%3E%3C/svg%3E") 11 4, pointer;
}

[data-theme="dark"] a, [data-theme="dark"] button, [data-theme="dark"] [role="button"],
[data-theme="dark"] input[type="submit"], [data-theme="dark"] select,
[data-theme="dark"] .card, [data-theme="dark"] .chip, [data-theme="dark"] .nav-link,
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-secondary,
[data-theme="dark"] .lang-toggle button, [data-theme="dark"] details summary {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='%231F2908' stroke='%23BEF264' stroke-width='1.6' stroke-linejoin='round' d='M10 11V8.99c0-.88.59-1.64 1.44-1.86h.05A1.99 1.99 0 0 1 14 9.05V12v-2c0-.88.6-1.65 1.46-1.87h.05A1.98 1.98 0 0 1 18 10.06V13v-1.94a2 2 0 0 1 1.51-1.94h0A2 2 0 0 1 22 11.06V14c0 .6-.08 1.27-.21 1.97a7.96 7.96 0 0 1-7.55 6.48 54.98 54.98 0 0 1-4.48 0 7.96 7.96 0 0 1-7.55-6.48C2.08 15.27 2 14.59 2 14v-1.49c0-1.11.9-2.01 2.01-2.01h0a2 2 0 0 1 2.01 2.03l-.01.97v-10c0-1.1.9-2 2-2h0a2 2 0 0 1 2 2V11Z'/%3E%3C/svg%3E") 10 4, pointer;
}

[data-theme="dark"] a:hover, [data-theme="dark"] button:hover,
[data-theme="dark"] [role="button"]:hover, [data-theme="dark"] input[type="submit"]:hover,
[data-theme="dark"] select:hover, [data-theme="dark"] .card:hover,
[data-theme="dark"] .chip:hover, [data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .btn-primary:hover, [data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .lang-toggle button:hover, [data-theme="dark"] details summary:hover {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='37' height='37' viewBox='0 0 24 24'%3E%3Cpath fill='%231F2908' stroke='%23BEF264' stroke-width='1.4' stroke-linejoin='round' d='M10 11V8.99c0-.88.59-1.64 1.44-1.86h.05A1.99 1.99 0 0 1 14 9.05V12v-2c0-.88.6-1.65 1.46-1.87h.05A1.98 1.98 0 0 1 18 10.06V13v-1.94a2 2 0 0 1 1.51-1.94h0A2 2 0 0 1 22 11.06V14c0 .6-.08 1.27-.21 1.97a7.96 7.96 0 0 1-7.55 6.48 54.98 54.98 0 0 1-4.48 0 7.96 7.96 0 0 1-7.55-6.48C2.08 15.27 2 14.59 2 14v-1.49c0-1.11.9-2.01 2.01-2.01h0a2 2 0 0 1 2.01 2.03l-.01.97v-10c0-1.1.9-2 2-2h0a2 2 0 0 1 2 2V11Z'/%3E%3C/svg%3E") 11 4, pointer;
}
