/* ===================================================================
   BASE.CSS — SpeedMaxNet
   Reset · Variables · Typography · Utilities
=================================================================== */

/* ── CSS CUSTOM PROPERTIES ──────────────────────────────────────── */
:root {
  /* Brand Colors */
  --green: #8dc63f;
  --green-dark: #6fa82e;
  --blue: #00d4ff;
  --blue-dark: #00aacc;
  --black: #000000;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-300: #cccccc;
  --gray-500: #888888;
  --gray-700: #444444;
  --gray-900: #1a1a1a;

  /* Typography */
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "Space Mono", monospace;

  /* Type Scale (increased for better readability) */
  --text-xs: 0.8125rem; /* 13px */
  --text-sm: 0.9375rem; /* 15px */
  --text-base: 1.0625rem; /* 17px */
  --text-lg: 1.25rem; /* 20px */
  --text-xl: 1.375rem; /* 22px */
  --text-2xl: 1.75rem; /* 28px */
  --text-3xl: 2.25rem; /* 36px */
  --text-4xl: 2.75rem; /* 44px */
  --text-5xl: 3.5rem; /* 56px */
  --text-6xl: 4.5rem; /* 72px */
  --text-hero: 5.5rem; /* 88px */

  /* Spacing System (4px base unit) */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */
  --space-16: 4rem; /* 64px */
  --space-20: 5rem; /* 80px */
  --space-24: 6rem; /* 96px */

  /* Layout */
  --container-max: 1280px;
  --container-padding: 16px;
  --grid-gap: 16px;
  --section-y: var(--space-16);

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 40px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
  --shadow-glow-green: 0 0 30px rgba(141, 198, 63, 0.5);
  --shadow-glow-blue: 0 0 30px rgba(0, 212, 255, 0.5);
  --shadow-glow-sm-g: 0 0 12px rgba(141, 198, 63, 0.35);
  --shadow-glow-sm-b: 0 0 12px rgba(0, 212, 255, 0.35);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --trans-fast: 180ms var(--ease-out);
  --trans-base: 300ms var(--ease-out);
  --trans-slow: 500ms var(--ease-out);

  /* Z-Index Scale */
  --z-below: -1;
  --z-base: 0;
  --z-raised: 10;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ── RESPONSIVE VARIABLES ────────────────────────────────────────── */
@media (min-width: 768px) {
  :root {
    --container-padding: 24px;
    --grid-gap: 20px;
    --section-y: var(--space-12);
  }
}

@media (min-width: 1024px) {
  :root {
    --container-padding: 40px;
    --grid-gap: 24px;
    --section-y: var(--space-16);
  }
}

@media (max-width: 767px) {
  :root {
    --section-y: var(--space-10);
    --text-hero: 3.5rem;
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}
ul,
ol {
  list-style: none;
}
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  font-weight: 700;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.display-md {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
}

.section-title.light {
  color: var(--white);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-700);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-subtitle.light {
  color: rgba(255, 255, 255, 0.7);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  background: rgba(141, 198, 63, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(141, 198, 63, 0.25);
  margin-bottom: var(--space-4);
}

.section-tag.tag-blue {
  color: var(--blue);
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.25);
}

/* ── UTILITIES ──────────────────────────────────────────────────── */
.text-center {
  text-align: center;
}
.text-green {
  color: var(--green);
}
.text-blue {
  color: var(--blue);
}
.text-dark {
  color: var(--gray-900);
}
.text-white {
  color: var(--white);
}
.text-gray {
  color: var(--gray-700);
}

.section-tagline {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--gray-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: var(--space-2);
}

.bg-dark {
  background: var(--gray-900);
}
.bg-light {
  background: var(--gray-100);
}
.bg-black {
  background: var(--black);
}

.section-pad {
  padding: var(--section-y) 0;
}

/* Flexbox Utilities */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-sm {
  gap: var(--space-2);
}
.gap-md {
  gap: var(--space-4);
}
.gap-lg {
  gap: var(--space-6);
}

.cursor-pointer {
  cursor: pointer;
}
.cursor-default {
  cursor: default;
}

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

/* Loading spinner */
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto var(--space-3);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.packages-loading {
  text-align: center;
  padding: var(--space-10);
  color: var(--gray-500);
  font-size: var(--text-sm);
  width: 100%;
}

/* ── GRID UTILITIES ─────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.col-full {
  grid-column: 1 / -1;
}
.col-2 {
  grid-column: span 2;
}
.col-3 {
  grid-column: span 3;
}

/* ── FORM UTILITIES ──────────────────────────────────────────────── */
.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 16px;
  background: var(--white);
  color: var(--black);
  transition:
    border-color var(--trans-fast),
    box-shadow var(--trans-fast);
}

.form-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.2);
  outline: none;
}

.form-input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.form-input::placeholder {
  color: var(--gray-300);
}

textarea.form-input {
  height: auto;
  min-height: 120px;
  padding: 12px 16px;
  resize: vertical;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--gray-700);
}

.form-group {
  margin-bottom: 16px;
}

.form-success {
  background: rgba(141, 198, 63, 0.1);
  border: 1px solid rgba(141, 198, 63, 0.3);
  color: var(--green-dark);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
}
