/* ============================================================
   styles.css — yuku.uk
   Layer: Pure CSS supplement to Tailwind utility framework
   Theme: Dark FinTech Premium (#080A0F base)
   Fonts: Syne (headlines) · DM Mono (code/stats) · DM Sans (body)
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES
   ───────────────────────────────────────────────────────────── */
:root {
  /* Palette */
  --color-base:         #080A0F;
  --color-surface:      #0D1117;
  --color-surface-2:    #131920;
  --color-border:       rgba(255, 255, 255, 0.07);
  --color-text:         #E8EAF0;
  --color-muted:        #6B7280;
  --color-gold:         #C9A84C;
  --color-gold-light:   #F0D080;
  --color-blue:         #3B82F6;
  --color-blue-light:   #60A5FA;
  --color-electric:     #00D4FF;

  /* Gradients */
  --gradient-gold:      linear-gradient(135deg, #C9A84C 0%, #F0D080 50%, #C9A84C 100%);
  --gradient-mesh:      radial-gradient(ellipse 80% 60% at 20% 40%, rgba(201, 168, 76, 0.12) 0%, transparent 60%),
                        radial-gradient(ellipse 60% 80% at 80% 60%, rgba(0, 212, 255, 0.08) 0%, transparent 60%),
                        radial-gradient(ellipse 40% 40% at 50% 10%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);

  /* Timing */
  --ease-smooth:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce:        cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-expo:          cubic-bezier(0.16, 1, 0.3, 1);

  /* Typography scale */
  --font-display:       'Syne', sans-serif;
  --font-mono:          'DM Mono', monospace;
  --font-body:          'DM Sans', sans-serif;

  /* Spacing rhythm */
  --section-gap:        clamp(5rem, 10vw, 10rem);
}

/* ─────────────────────────────────────────────────────────────
   2. BASE RESET & GLOBAL
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-base);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* ─────────────────────────────────────────────────────────────
   3. NOISE / GRAIN OVERLAY (SVG-driven, body pseudo-element)
      GPU-composited via will-change: transform — zero repaints
   ───────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: -50%;             /* oversized to prevent edge gaps on scroll */
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.038;
  will-change: transform;
  animation: grain-drift 8s steps(10) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

@keyframes grain-drift {
  0%   { transform: translate(0,    0   ); }
  10%  { transform: translate(-5%,  -7% ); }
  20%  { transform: translate(-12%, 4%  ); }
  30%  { transform: translate(6%,   -8% ); }
  40%  { transform: translate(-3%,  11% ); }
  50%  { transform: translate(-10%, 2%  ); }
  60%  { transform: translate(7%,   -5% ); }
  70%  { transform: translate(-2%,  -9% ); }
  80%  { transform: translate(9%,   6%  ); }
  90%  { transform: translate(-6%,  3%  ); }
  100% { transform: translate(0,    0   ); }
}

/* ─────────────────────────────────────────────────────────────
   4. MESH GRADIENT BACKGROUND LAYER
   ───────────────────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--gradient-mesh);
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────
   5. SCROLL-REVEAL ANIMATIONS
      Uses transform + opacity only → compositor-thread safe
   ───────────────────────────────────────────────────────────── */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform 0.8s var(--ease-expo),
    opacity   0.8s var(--ease-expo);
}

.reveal {
  transform: translateY(2.5rem);
}

.reveal-left {
  transform: translateX(-3rem);
}

.reveal-right {
  transform: translateX(3rem);
}

/* Active state: both JS IntersectionObserver and CSS :target can trigger */
.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger children with CSS custom property injection */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(2rem);
  will-change: transform, opacity;
  transition:
    transform 0.7s var(--ease-expo),
    opacity   0.7s var(--ease-expo);
  transition-delay: calc(var(--stagger-index, 0) * 0.1s);
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────
   6. GRADIENT TEXT SHINE (Heading accent)
   ───────────────────────────────────────────────────────────── */
.text-gradient-gold {
  background: var(--gradient-gold);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 4s linear infinite;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #3B82F6 0%, #00D4FF 50%, #3B82F6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  0%   { background-position: 0%   center; }
  100% { background-position: 200% center; }
}

/* ─────────────────────────────────────────────────────────────
   7. MARQUEE TICKER (horizontal infinite scroll)
      GPU-composited: translateX only, no width-changes
   ───────────────────────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: inline-flex;
  gap: 0;
  will-change: transform;
  animation: marquee-scroll 30s linear infinite;
}

/* Pause on hover / reduced-motion preference */
@media (prefers-reduced-motion: no-preference) {
  .marquee-wrap:hover .marquee-track {
    animation-play-state: paused;
  }
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Reverse direction variant */
.marquee-track--reverse {
  animation-direction: reverse;
}

/* Individual ticker item */
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-right: 1px solid var(--color-border);
}

.marquee-item__label {
  color: var(--color-gold);
}

/* ─────────────────────────────────────────────────────────────
   8. CUSTOM CURSOR
      GPU layer: transform only, no top/left paint
   ───────────────────────────────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear, width 0.3s var(--ease-smooth), height 0.3s var(--ease-smooth), opacity 0.3s;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.4);
  pointer-events: none;
  z-index: 9997;
  will-change: transform;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-smooth), width 0.4s var(--ease-smooth), height 0.4s var(--ease-smooth), border-color 0.3s;
}

/* Expanded state on interactive elements */
body.cursor-hover .cursor {
  width: 8px;
  height: 8px;
  opacity: 0.6;
}

body.cursor-hover .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: rgba(201, 168, 76, 0.7);
}

/* Hide on touch devices */
@media (hover: none) {
  .cursor, .cursor-ring { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   9. SECTION LAYOUT HELPERS
   ───────────────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-gap) 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.25rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--color-gold);
}

/* ─────────────────────────────────────────────────────────────
   10. CARD COMPONENT
   ───────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
  will-change: transform, border-color;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(201, 168, 76, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-smooth);
}

.card:hover {
  border-color: rgba(201, 168, 76, 0.3);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────
   11. BUTTON COMPONENTS
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border-radius: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.25s var(--ease-smooth),
    border-color     0.25s var(--ease-smooth),
    color            0.25s var(--ease-smooth),
    transform        0.2s  var(--ease-smooth),
    box-shadow       0.25s var(--ease-smooth);
  will-change: transform;
  position: relative;
  overflow: hidden;
}

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

.btn-primary {
  background: var(--color-gold);
  color: #000;
  border-color: var(--color-gold);
}

.btn-primary:hover {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  box-shadow: 0 0 24px rgba(201, 168, 76, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: rgba(201, 168, 76, 0.5);
  color: var(--color-gold);
}

/* ─────────────────────────────────────────────────────────────
   12. DIVIDER / SEPARATOR
   ───────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border) 30%, var(--color-border) 70%, transparent);
  margin: 0;
  border: none;
}

/* ─────────────────────────────────────────────────────────────
   13. FORM ELEMENTS
   ───────────────────────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text);
  transition: border-color 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
  outline: none;
}

.input::placeholder {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.input:focus {
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

/* ─────────────────────────────────────────────────────────────
   14. NAVIGATION
   ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  background: rgba(8, 10, 15, 0.7);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s var(--ease-smooth);
  will-change: background;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}

.nav__logo span {
  color: var(--color-gold);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__link {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav__link:hover { color: var(--color-text); }

/* ─────────────────────────────────────────────────────────────
   15. HERO SECTION
   ───────────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 1.5rem;
}

/* ─────────────────────────────────────────────────────────────
   16. REDUCED MOTION OVERRIDES
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .text-gradient-gold,
  .text-gradient-blue { animation: none; }
  .marquee-track { animation: none; }
  .cursor, .cursor-ring { display: none; }
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─────────────────────────────────────────────────────────────
   17. UTILITY OVERRIDES
   ───────────────────────────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-mono    { font-family: var(--font-mono); }
.font-body    { font-family: var(--font-body); }

.text-gold    { color: var(--color-gold); }
.text-muted   { color: var(--color-muted); }
.text-electric{ color: var(--color-electric); }

.border-subtle { border-color: var(--color-border); }

/* ─────────────────────────────────────────────────────────────
   18. SCROLLBAR STYLING (Webkit)
   ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track { background: var(--color-base); }
::-webkit-scrollbar-thumb {
  background: var(--color-surface-2);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-border); }

/* ─────────────────────────────────────────────────────────────
   19. SELECTION COLOR
   ───────────────────────────────────────────────────────────── */
::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--color-gold-light);
}
