/* ============================================================
   KODREX — Base Styles
   Reset, typography rules, utility classes
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography Scale ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  letter-spacing: 0.03em;
  line-height: 0.95;
  color: var(--text-primary);
}

/* Bebas Neue for all headings — override per section as needed */
.display-xl {
  font-size: clamp(72px, 10vw, 160px);
}
.display-lg {
  font-size: clamp(56px, 7vw, 110px);
}
.display-md {
  font-size: clamp(42px, 5vw, 80px);
}
.display-sm {
  font-size: clamp(32px, 3.5vw, 56px);
}
.display-xs {
  font-size: clamp(24px, 3vw, 40px);
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Layout Utilities ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 5%;
}

.container-sm {
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 5%;
}

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

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

/* ── Section Label ── */
.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--red);
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--red-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

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

.btn-outline-red:hover {
  background: var(--red-dim);
  border-color: var(--red);
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Fade-in scroll animation ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ── Noise texture overlay ── */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Grid line background ── */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}

/* ── Selection ── */
::selection {
  background: var(--red);
  color: #fff;
}

/* ── WhatsApp Float Button ── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.45);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
  :root {
    --section-pad: 90px;
    --section-pad-sm: 64px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 72px;
    --section-pad-sm: 48px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-pad: 56px;
    --section-pad-sm: 40px;
  }
}
