/* ============================================================
   Ufyro — style.css  (Design Tokens + Base)
   ============================================================ */

:root {
  /* Palette */
  --color-primary:       #00C853;
  --color-primary-hover: #00E55C;
  --color-primary-dark:  #009940;

  /* Backgrounds */
  --color-bg:            #09090F;
  --color-surface:       #111118;
  --color-surface-alt:   #0D0D14;
  --color-surface-glass: rgba(9, 9, 15, 0.82);

  /* Text */
  --color-text:          #F2F2F8;
  --color-text-muted:    #8E8E9E;
  --color-text-dim:      #62626E;
  --color-text-dark:     #09090F;

  /* Borders */
  --color-border:        rgba(255, 255, 255, 0.07);
  --color-border-strong: rgba(255, 255, 255, 0.13);
  --color-border-accent: rgba(0, 200, 83, 0.3);
  --color-divider:       rgba(255, 255, 255, 0.04);

  /* Status */
  --color-error:         #FF4B4B;
  --color-success:       #22C55E;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Type Scale */
  --text-hero:    5.5vw;
  --text-h1:      3.6vw;
  --text-h2:      2.6vw;
  --text-h3:      1.7vw;
  --text-h4:      1.3vw;
  --text-lg:      1.15vw;
  --text-base:    1vw;
  --text-sm:      0.875vw;
  --text-xs:      0.75vw;

  /* Line Heights */
  --leading-tight:   1.05;
  --leading-snug:    1.25;
  --leading-normal:  1.6;
  --leading-relaxed: 1.8;

  /* Letter Spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.02em;
  --tracking-normal:  0em;
  --tracking-wide:    0.06em;
  --tracking-wider:   0.12em;

  /* Font Weights */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-black:    800;

  /* Spacing */
  --space-section:    10vw;
  --space-section-sm: 6vw;
  --space-xl:   5vw;
  --space-lg:   3vw;
  --space-md:   1.75vw;
  --space-sm:   1vw;
  --space-xs:   0.5vw;

  /* Layout */
  --container-max:     82vw;
  --container-padding: 4vw;

  /* Border Radius — sharper than before */
  --radius-sm:   3px;
  --radius-md:   6px;
  --radius-lg:   10px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.55);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.65);
  --shadow-glow: 0 0 40px rgba(0,200,83,0.18);

  /* Transitions */
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:    120ms;
  --duration-normal:  280ms;
  --duration-slow:    480ms;
  --duration-slower:  800ms;

  /* Z-Index */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   500;
  --z-header:   1000;
  --z-modal:    2000;
  --z-splash:   9999;
}

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

main {
  display: block;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

body.is-loading > *:not(.splash-screen) {
  visibility: hidden;
}

body > *:not(.splash-screen) {
  visibility: visible;
}

/* Top red accent line — always visible, above everything */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  z-index: calc(var(--z-header) + 2);
  pointer-events: none;
}

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

/* ── Layout ── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--space-section);
}

.section-alt {
  background: var(--color-surface-alt);
}

.section-dark {
  background: var(--color-surface);
}

/* ── Eyebrow Label ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7vw;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1.2vw;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 2vw;
  height: 1.5px;
  background: var(--color-primary);
  flex-shrink: 0;
}

/* ── Section Headers ── */
.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  font-weight: var(--weight-black);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text);
  max-width: 55vw;
}

.section-header p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 40vw;
  margin-top: 1.2vw;
}

/* ── Gradient word → now solid red ── */
.gradient-word {
  color: var(--color-primary);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: var(--color-primary);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5vw;
  padding: 0.85vw 2.2vw;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: #FFFFFF;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  flex-shrink: 0;
}

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

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5vw;
  padding: 0.83vw 2.2vw;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
  padding: 1.05vw 2.8vw;
  font-size: var(--text-base);
}

/* ── Splash Screen ── */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-splash);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vw;
}

.splash-logo {
  width: 8vw;
  height: auto;
  opacity: 0.85;
}

/* No spinning loader — minimal splash */
.loader-ring,
.loader-ring div,
.splash-text {
  display: none;
}

/* ── Reveal Animation States (GSAP handles these) ── */
.reveal, .reveal-left, .reveal-right {
  will-change: transform, opacity;
}

/* ── Scroll indicator ── */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5vw;
  opacity: 0.4;
}

.scroll-line {
  width: 1px;
  height: 3.5vw;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

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

/* ── Tablet (≤1023px) ── */
@media (max-width: 1023px) {
  :root {
    --text-hero:    8vw;
    --text-h1:      5.5vw;
    --text-h2:      4vw;
    --text-h3:      2.6vw;
    --text-h4:      2vw;
    --text-lg:      1.8vw;
    --text-base:    1.6vw;
    --text-sm:      1.4vw;
    --text-xs:      1.2vw;
    --space-section:    8vw;
    --space-section-sm: 5vw;
    --space-xl:   4vw;
    --space-lg:   2.5vw;
    --space-md:   2vw;
    --container-max:     90vw;
    --container-padding: 4vw;
  }

  .section-header h2 { max-width: 80vw; }
  .section-header p  { max-width: 65vw; }
}

/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
  :root {
    --text-hero:    12vw;
    --text-h1:      9vw;
    --text-h2:      7vw;
    --text-h3:      5.5vw;
    --text-h4:      4.5vw;
    --text-lg:      4.2vw;
    --text-base:    3.8vw;
    --text-sm:      3.4vw;
    --text-xs:      3vw;
    --space-section:    18vw;
    --space-section-sm: 12vw;
    --space-xl:   8vw;
    --space-lg:   5vw;
    --space-md:   4vw;
    --space-sm:   3vw;
    --space-xs:   2vw;
    --container-max:     100%;
    --container-padding: 6vw;
  }

  .btn-primary,
  .btn-ghost {
    padding: 3.8vw 6vw;
    font-size: 3.5vw;
  }

  .btn-lg {
    padding: 4.5vw 8vw;
    font-size: 4vw;
  }

  .section-header h2 { max-width: 100%; }
  .section-header p  { max-width: 100%; }

  .eyebrow::before { width: 6vw; }
  .splash-logo     { width: 24vw; }
  .scroll-line     { height: 10vw; }
}

/* ── Large (≥1440px) ── */
@media (min-width: 1440px) {
  .container {
    max-width: 1200px;
    padding-inline: 60px;
  }
}
