/* ============================================================
   JASCO TECH — BASE STYLES
   Reset, global typography, utilities, and foundational styles
   ============================================================ */

/* ---- RESET & BOX MODEL ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
  list-style: none;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- IMAGES ---- */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  object-fit: cover;
}

/* ---- TYPOGRAPHY BASE ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---- CONTAINER ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

/* ---- SECTION BASE ---- */
section {
  position: relative;
  overflow: hidden;
}

.section-py {
  padding: var(--section-py) 0;
}

.section-py-sm {
  padding: var(--section-py-sm) 0;
}

/* ---- GRADIENT TEXT ---- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline;
}

/* ---- GRADIENT LINE DIVIDER ---- */
.gradient-line {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  margin: var(--space-4) 0;
}

.gradient-line-center {
  margin: var(--space-4) auto;
}

/* ---- SECTION LABEL ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
}

/* ---- SECTION HEADING ---- */
.section-heading {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  margin-bottom: var(--space-6);
}

.section-sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 55ch;
  margin-bottom: var(--space-8);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  transition: var(--transition-normal);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

/* Primary Button — brand gradient */
.btn-primary {
  background: var(--gradient-brand);
  color: #FFFFFF;
  font-weight: var(--fw-bold);
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--gradient-brand-hover);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(17, 179, 224, 0.25);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid rgba(0, 0, 0, 0.15);
}

.btn-outline:hover {
  border-color: transparent;
  background: var(--gradient-brand);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ---- BADGE / TAG ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-gradient {
  background: linear-gradient(135deg, rgba(17,179,224,0.08), rgba(73,189,176,0.08));
  border: 1px solid rgba(17,179,224,0.2);
  color: var(--color-blue);
}

/* ---- CARD BASE ---- */
.card-dark {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
  overflow: hidden;
}

.card-dark:hover {
  border-color: rgba(17, 179, 224, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ---- GRADIENT BORDER (top) on card hover ---- */
.card-gradient-top {
  position: relative;
}

.card-gradient-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-gradient-top:hover::before {
  opacity: 1;
}

/* ---- ICON BOX ---- */
.icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(171,210,91,0.15), rgba(17,179,224,0.1));
  border: 1px solid rgba(171,210,91,0.2);
  margin-bottom: var(--space-5);
  flex-shrink: 0;
}

.icon-box i {
  font-size: 1.375rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- GLOW BACKGROUND SPOTS ---- */
.glow-spot {
  position: absolute;
  border-radius: var(--radius-circle);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.glow-lime {
  background: var(--glow-lime);
}

.glow-blue {
  background: var(--glow-blue);
}

.glow-teal {
  background: var(--glow-teal);
}

/* ---- SCROLL REVEAL ANIMATION CLASSES ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for reveal groups */
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.3s; }
.reveal-delay-7 { transition-delay: 0.35s; }
.reveal-delay-8 { transition-delay: 0.4s; }

/* Fade-in from left/right */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ---- UTILITIES ---- */
.text-gradient { 
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-dark-alt    { background-color: var(--color-bg-alt); }
.bg-dark-card   { background-color: var(--color-bg-card); }
.text-muted-custom { color: var(--color-text-secondary); }
.font-display   { font-family: var(--font-display); }

.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }

/* ---- SELECTION COLOR ---- */
::selection {
  background: rgba(17, 179, 224, 0.25);
  color: var(--color-text-primary);
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
}

/* ---- FOCUS STYLES (Accessibility) ---- */
*:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---- MEDIA: Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
  }
}
