/* ============================================================
   ARKEO — Design System
   Tokens, Reset, Base styles, Utilities
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800;900&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500&display=swap');

/* ── Color Tokens ── */
:root {
  --color-bg:           #0D0D0D;
  --color-bg-2:         #1A1A1A;
  --color-bg-3:         #2C2C2C;
  --color-accent:       #E24B4A;
  --color-accent-dark:  #A32D2D;
  --color-neutral:      #888780;
  --color-text:         #FFFFFF;
  --color-text-soft:    #D3D1C7;

  /* ── Typography ── */
  --font-display:  'Manrope', sans-serif;
  --font-body:     'DM Sans', sans-serif;

  /* ── Spacing scale (8px base) ── */
  --sp-1:   8px;
  --sp-2:   16px;
  --sp-3:   24px;
  --sp-4:   32px;
  --sp-5:   48px;
  --sp-6:   64px;
  --sp-7:   80px;
  --sp-8:   96px;
  --sp-9:   128px;

  /* ── Border radius ── */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --radius-pill: 9999px;

  /* ── Transitions ── */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --t-fast:   0.2s var(--ease-out-expo);
  --t-base:   0.4s var(--ease-out-expo);
  --t-slow:   0.7s var(--ease-out-expo);

  /* ── Container ── */
  --container-max: 1280px;
  --container-padding: clamp(24px, 5vw, 80px);

  /* ── Section padding ── */
  --section-v: clamp(48px, 6vw, 80px);
}

/* ============================================================
   CSS Reset — Modern
   ============================================================ */

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

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

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

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

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

ul, ol {
  list-style: none;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

p {
  max-width: 65ch;
  line-height: 1.7;
  color: var(--color-text-soft);
}

/* ============================================================
   Grain Texture — Fixed overlay, GPU-safe
   ============================================================ */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ============================================================
   Utility Classes
   ============================================================ */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* Section padding */
.section-padding {
  padding-block: var(--section-v);
}

/* Eyebrow badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-bg-3);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral);
  background: var(--color-bg-2);
  line-height: 1;
}

.badge--accent {
  border-color: rgba(226, 75, 74, 0.3);
  color: var(--color-accent);
  background: rgba(226, 75, 74, 0.08);
}

/* Section eyebrow label */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral);
  margin-bottom: var(--sp-3);
}

/* Section badge — replaces plain eyebrow in all sections */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(226, 75, 74, 0.1);
  border: 1px solid rgba(226, 75, 74, 0.25);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 20px;
}

.section-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E24B4A;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.section-badge__text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  .section-badge__dot { animation: none; }
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: transform var(--t-fast), background var(--t-base), box-shadow var(--t-base);
  text-decoration: none;
  white-space: nowrap;
  transform: translateY(0);
  box-shadow: none;
}

.btn:not(:hover):not(:focus) {
  transform: translateY(0) !important;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #d44140;
  box-shadow: 0 0 0 1px rgba(226, 75, 74, 0.25), 0 8px 32px rgba(226, 75, 74, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-soft);
  border: 1px solid var(--color-bg-3);
}

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

/* Button icon wrapper */
.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--t-fast), background var(--t-fast);
}

.btn-primary:hover .btn-icon {
  transform: translate(1px, -1px) scale(1.05);
  background: rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover .btn-icon {
  transform: translate(1px, -1px) scale(1.05);
  background: var(--color-bg-3);
}

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

/* ── Scroll reveal — GSAP handles opacity/transform via JS ──
   CSS only provides the no-JS fallback via .is-visible class.
   Without .no-js class, elements are visible by default so GSAP
   can correctly read opacity:1 as the animation target. ── */
.reveal {
  will-change: opacity, transform;
}

.no-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.no-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger helpers (used by GSAP delay calc) */
.reveal--d1 { --reveal-delay: 0.08s; }
.reveal--d2 { --reveal-delay: 0.16s; }
.reveal--d3 { --reveal-delay: 0.24s; }
.reveal--d4 { --reveal-delay: 0.32s; }
.reveal--d5 { --reveal-delay: 0.40s; }

/* ── Cursor dot (animated by JS agent) ── */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, opacity 0.3s;
  opacity: 0;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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