/* ============================================================
   SPIDER SAFETY NETS — GLOBAL DESIGN SYSTEM
   Logo palette: Bright Red #E31515, Chrome Silver, White
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   DESIGN TOKENS — Logo-accurate palette
   Logo colors: Bright Red #E31515, Chrome Silver #C8CDD8, Dark #1A1A1A
   ============================================================ */
:root {
  /* === DARK SECTION COLORS === */
  --black:       #111111;   /* softer than pure black — less harsh */
  --charcoal:    #1a1a1a;   /* main dark bg — matches logo bg */
  --graphite:    #242424;
  --graphite-2:  #2e2e2e;
  --graphite-3:  #3a3a3a;

  /* === LIGHT SECTION COLORS === */
  --light-bg:    #f7f8fa;   /* off-white — main light section bg */
  --light-card:  #ffffff;   /* pure white cards on light sections */
  --light-border:#e2e5ea;   /* subtle borders on light bg */
  --light-text:  #1a1a1a;   /* dark text on light bg */
  --light-sub:   #555a66;   /* secondary text on light bg */

  /* === BRAND COLORS (from logo) === */
  --red:         #E31515;   /* Exact logo red — bold, vivid */
  --red-dark:    #B50F0F;   /* Hover / darker red */
  --red-light:   #FF3B3B;   /* Brighter red accent */
  --red-bg:      #FFF0F0;   /* Very light red tint for light sections */
  --red-bg-dark: rgba(227,21,21,0.12); /* Tint for dark sections */

  /* === SILVER / CHROME (from logo text) === */
  --silver:      #9DA8BE;
  --silver-light:#C8CDD8;   /* Logo chrome text colour */
  --silver-dark: #6B7280;

  /* === TEXT === */
  --white:       #f5f5f5;
  --white-pure:  #ffffff;
  --dim:         #888;
  --dim-2:       #5a5f6b;

  /* === ACCENT === */
  --orange:      #E07B39;   /* Kept for variety — not in logo but warm accent */

  /* Spider line gradient — logo red to brighter red */
  --spider-line:   linear-gradient(90deg, var(--red-dark), var(--red), var(--red-light));
  --spider-line-v: linear-gradient(180deg, var(--red-dark), var(--red));

  /* Typography */
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Section padding */
  --section-pad-mobile:  4rem 1.25rem;
  --section-pad-tablet:  5rem 2rem;
  --section-pad-desktop: 7rem 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.3s ease;
  --transition-slow:   0.6s ease;
  --transition-slower: 1s ease;

  /* Shadows */
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.10);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.14);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.18);
  --shadow-red:   0 4px 20px rgba(227,21,21,0.28);
  --shadow-red-lg:0 8px 40px rgba(227,21,21,0.35);
  --shadow-card:  0 2px 12px rgba(0,0,0,0.08);

  /* Mobile bottom bar height */
  --bottom-bar: 60px;
}

/* ============================================================
   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);
  background-color: var(--light-bg);  /* Default to LIGHT background */
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: var(--bottom-bar);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: inherit; /* inherits from section — dark on light, white on dark */
}

/* Display sizes — mobile first */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: 0.03em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.display-sm {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  letter-spacing: 0.04em;
}

.text-lg { font-size: clamp(1rem, 2.5vw, 1.25rem); }
.text-md { font-size: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.text-silver { color: var(--silver); }
.text-dim    { color: var(--dim); }
.text-red    { color: var(--red); }
.text-orange { color: var(--orange); }
.text-white  { color: var(--white); }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

.weight-300 { font-weight: 300; }
.weight-400 { font-weight: 400; }
.weight-500 { font-weight: 500; }
.weight-600 { font-weight: 600; }
.weight-700 { font-weight: 700; }

.tracking-wide  { letter-spacing: 0.08em; }
.tracking-wider { letter-spacing: 0.15em; }
.tracking-widest{ letter-spacing: 0.25em; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px)  { .container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container { padding-inline: 3rem; } }
@media (min-width: 1440px) { .container { padding-inline: 4rem; } }

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

@media (min-width: 768px)  { .section { padding: var(--section-pad-tablet); } }
@media (min-width: 1024px) { .section { padding: var(--section-pad-desktop); } }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm  { gap: 0.5rem; }
.gap-md  { gap: 1rem; }
.gap-lg  { gap: 1.5rem; }
.gap-xl  { gap: 2rem; }

/* ============================================================
   SPIDER LINE — Brand signature
   ============================================================ */
.spider-line {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--spider-line);
  border-radius: 2px;
}

.spider-line-full {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), transparent);
}

.spider-line-v {
  display: block;
  width: 2px;
  height: 60px;
  background: var(--spider-line-v);
  border-radius: 2px;
}

/* Section label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--orange);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--transition-base);
  min-height: 48px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.05);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--red);      /* Logo exact red #E31515 */
  color: #ffffff;
  box-shadow: var(--shadow-red);
  border: none;
}

.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: var(--shadow-red-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

/* On light backgrounds, override secondary to use dark border */
.bg-light .btn-secondary,
.bg-white .btn-secondary,
.bg-grey .btn-secondary,
.nav .btn-secondary {
  color: var(--light-text);
  border-color: var(--light-border);
}

.bg-light .btn-secondary:hover,
.bg-white .btn-secondary:hover,
.bg-grey .btn-secondary:hover,
.nav .btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}

.btn-ghost {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
}

.btn-ghost:hover {
  background: var(--red);
  color: #fff;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 16px rgba(37,211,102,0.25);
}

.btn-whatsapp:hover {
  background: #20b858;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.75rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--charcoal);
  border: 1px solid var(--graphite-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--graphite-3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.25rem;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.relative { position: relative; }
.absolute { position: absolute; }

.overflow-hidden { overflow: hidden; }

.mt-sm  { margin-top: 0.5rem; }
.mt-md  { margin-top: 1rem; }
.mt-lg  { margin-top: 1.5rem; }
.mt-xl  { margin-top: 2rem; }
.mt-2xl { margin-top: 3rem; }

.mb-sm  { margin-bottom: 0.5rem; }
.mb-md  { margin-bottom: 1rem; }
.mb-lg  { margin-bottom: 1.5rem; }
.mb-xl  { margin-bottom: 2rem; }

.pt-md  { padding-top: 1rem; }
.pt-lg  { padding-top: 1.5rem; }

.hidden { display: none !important; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================================
   SECTION BACKGROUNDS
   Alternate light and dark sections for a non-dull, colorful feel
   ============================================================ */

/* === DARK sections (hero, CTA, footer-like) === */
.bg-black    { background-color: var(--black);    color: var(--white); }
.bg-dark     { background-color: var(--charcoal); color: var(--white); }
.bg-charcoal { background-color: var(--charcoal); color: var(--white); }
.bg-graphite { background-color: var(--graphite); color: var(--white); }

/* === LIGHT sections (features, benefits, about) === */
.bg-white  { background-color: var(--white-pure); color: var(--light-text); }
.bg-light  { background-color: var(--light-bg);   color: var(--light-text); }
.bg-grey   { background-color: #eef0f4;            color: var(--light-text); }

/* === RED accent section === */
.bg-red    {
  background: var(--red);
  color: #fff;
}
.bg-red-gradient {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 60%, var(--red-light) 100%);
  color: #fff;
}

/* Light section overrides: headings & paragraphs go dark */
.bg-white h1, .bg-white h2, .bg-white h3,
.bg-light h1, .bg-light h2, .bg-light h3,
.bg-grey  h1, .bg-grey  h2, .bg-grey  h3 {
  color: var(--light-text);
}

.bg-white p, .bg-light p, .bg-grey p {
  color: var(--light-sub);
}

/* Dark section overrides */
.bg-black h1, .bg-black h2, .bg-black h3,
.bg-dark  h1, .bg-dark  h2, .bg-dark  h3,
.bg-charcoal h1, .bg-charcoal h2, .bg-charcoal h3 {
  color: var(--white);
}

.bg-black p, .bg-dark p, .bg-charcoal p {
  color: var(--silver);
}

/* Quote strip */
.quote-strip {
  background: var(--charcoal);
  border-top: 1px solid var(--graphite-2);
  border-bottom: 1px solid var(--graphite-2);
  padding: 2.5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quote-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--spider-line);
}

/* ============================================================
   IMAGES — lazy loading
   ============================================================ */
img[loading="lazy"] {
  transition: opacity 0.4s ease;
}

img[loading="lazy"]:not([src]) {
  opacity: 0;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
}

.breadcrumb a:hover { color: var(--orange); }

.breadcrumb-sep {
  display: inline-block;
  width: 12px;
  height: 1px;
  background: var(--red);
  margin: 0 0.25rem;
  vertical-align: middle;
}

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--spider-line);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   DESKTOP ONLY / MOBILE ONLY
   ============================================================ */
.desktop-only { display: none; }
.mobile-only  { display: block; }

@media (min-width: 768px) {
  .desktop-only { display: block; }
  .mobile-only  { display: none; }
  body { padding-bottom: 0; }
}
