/* =========================================================
   Rizzin Soft — Custom styles
   Modern bento + glass aesthetic. Pairs with Tailwind Play CDN.
   ========================================================= */

:root {
  --ink-950: #05070d;
  --ink-900: #0a0e1a;
  --ink-800: #10162a;
  --ink-700: #1a2240;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --violet: #6e56cf;
  --violet-soft: #9e8cfc;
  --cyan: #22d3ee;
  --cream: #f6f4ee;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6e56cf 60%, #9e8cfc 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(110, 86, 207, 0.10));
}

:root.light {
  --ink-950: #ffffff;
  --ink-900: #fafafb;
  --ink-800: #f1f1f5;
  --ink-700: #e6e6ee;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.16);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  letter-spacing: -0.011em;
  background: var(--ink-900);
  color: #e7e8ee;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root.light body { color: #0b1220; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Background field: gradient orbs + grain ---------- */
.bg-field {
  position: fixed; inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-field::before, .bg-field::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.45;
  will-change: transform;
}
.bg-field::before {
  width: 620px; height: 620px;
  left: -180px; top: -200px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.55), transparent 70%);
  animation: orb-drift-1 22s ease-in-out infinite alternate;
}
.bg-field::after {
  width: 720px; height: 720px;
  right: -220px; top: 30%;
  background: radial-gradient(circle, rgba(110, 86, 207, 0.55), transparent 70%);
  animation: orb-drift-2 28s ease-in-out infinite alternate;
}
:root.light .bg-field::before { opacity: 0.18; }
:root.light .bg-field::after { opacity: 0.16; }

.bg-grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@keyframes orb-drift-1 {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(80px, 120px, 0) scale(1.1); }
}
@keyframes orb-drift-2 {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-60px, -100px, 0) scale(1.08); }
}

/* ---------- Hero shader background ---------- */
.hero-shader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  pointer-events: none;
  opacity: 0.7;
}
.hero-shader-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 65% at 35% 50%, rgba(10, 14, 26, 0.55), rgba(10, 14, 26, 0.15) 80%),
    linear-gradient(180deg, transparent 60%, var(--ink-900) 100%);
}
:root.light .hero-shader-canvas,
:root.light .hero-shader-overlay {
  display: none;
}

/* ---------- Glass surfaces ---------- */
.glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
:root.light .glass {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.08);
}
.glass-strong {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}
:root.light .glass-strong {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.10);
}

/* Hairline gradient border using mask */
.hairline {
  position: relative;
  isolation: isolate;
}
.hairline::before {
  content: '';
  position: absolute; inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(110, 86, 207, 0.0) 50%, rgba(110, 86, 207, 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Typography helpers ---------- */
.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
:root.light .eyebrow { color: #2a64d6; }

.h-display {
  font-size: clamp(2.5rem, 6vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.h-section {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.028em;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  min-height: 44px;
  cursor: pointer;
  will-change: transform;
}
.btn-primary {
  background: var(--grad);
  color: #0a0e1a;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 14px 30px -10px rgba(110, 86, 207, 0.55);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 18px 40px -10px rgba(110, 86, 207, 0.75); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: #e7e8ee;
  border: 1px solid var(--line-strong);
}
:root.light .btn-ghost { background: rgba(255,255,255,0.7); color: #0b1220; border-color: rgba(15,23,42,0.10); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
:root.light .btn-ghost:hover { background: rgba(255,255,255,0.92); }

.btn .arrow {
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover .arrow { transform: translateX(4px); }

/* Magnetic interaction handled via JS, but keep base smooth */
.magnetic { transition: transform 180ms cubic-bezier(0.2, 1.2, 0.4, 1); }

/* ---------- Navbar ---------- */
.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  color: rgba(231, 232, 238, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 200ms ease;
  border-radius: 8px;
}
:root.light .nav-link { color: rgba(11, 18, 32, 0.72); }
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
:root.light .nav-link:hover, :root.light .nav-link[aria-current="page"] { color: #0b1220; }
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-soft { opacity: 0; transition: opacity 700ms ease; }
.reveal-soft.is-in { opacity: 1; }
.reveal-scale { opacity: 0; transform: scale(0.96); transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-scale.is-in { opacity: 1; transform: scale(1); }
.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }
.delay-4 { transition-delay: 320ms; }
.delay-5 { transition-delay: 400ms; }
.delay-6 { transition-delay: 480ms; }

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 200px) auto;
  gap: 1rem;
}
.bento > .cell {
  position: relative;
  padding: 1.75rem;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease, box-shadow 360ms ease;
}
.bento > .cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -20px rgba(110, 86, 207, 0.4);
}
.bento .cell--ai      { grid-column: span 4; grid-row: span 2; }
.bento .cell--quality { grid-column: span 2; grid-row: span 1; }
.bento .cell--digital { grid-column: span 1; grid-row: span 1; }
.bento .cell--biz     { grid-column: span 1; grid-row: span 1; }
.bento .cell--ms      { grid-column: span 6; grid-row: span 1; display: flex; align-items: center; padding-top: 1rem; padding-bottom: 1rem; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .bento .cell--ai,
  .bento .cell--quality,
  .bento .cell--digital,
  .bento .cell--biz,
  .bento .cell--ms { grid-column: span 2; grid-row: auto; min-height: 220px; }
}

/* Cell flourishes */
.cell .icon-tile {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  border: 1px solid var(--line-strong);
}
.cell--ai::after {
  content: '';
  position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(34,211,238,0.25), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.cell--quality::after {
  content: '';
  position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(110,86,207,0.30), transparent 70%);
  filter: blur(20px); pointer-events: none;
}

/* ---------- Orbit (How We Work) ---------- */
.orbit-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 640px;
  margin: 0 auto;
}
.orbit-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  animation: orbit-rotate 60s linear infinite;
}
.orbit-ring--inner {
  inset: 14%;
  border-color: var(--line);
  animation: orbit-rotate 90s linear infinite reverse;
}
.orbit-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 28%; height: 28%;
  border-radius: 50%;
  display: grid; place-items: center;
  text-align: center; padding: 1rem;
}
.orbit-node {
  position: absolute;
  width: 38%;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  text-align: left;
}
.orbit-node--n { top: 3%; left: 50%; transform: translateX(-50%); }
.orbit-node--e { right: -4%; top: 50%; transform: translateY(-50%); }
.orbit-node--s { bottom: 3%; left: 50%; transform: translateX(-50%); }
.orbit-node--w { left: -4%; top: 50%; transform: translateY(-50%); }
.orbit-node .step-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cyan);
}
:root.light .orbit-node .step-no { color: #2a64d6; }

@keyframes orbit-rotate {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .orbit-wrap { aspect-ratio: auto; max-width: 100%; }
  .orbit-ring, .orbit-ring--inner, .orbit-center { display: none; }
  .orbit-node {
    position: relative;
    width: 100%;
    inset: auto !important;
    transform: none !important;
    margin-bottom: 1rem;
  }
  .orbit-node::before {
    content: '';
    position: absolute; left: 1rem; top: -1rem; width: 1px; height: 1rem;
    background: var(--grad);
    opacity: 0.6;
  }
  .orbit-node:first-of-type::before { display: none; }
}

/* ---------- Marquee (credibility strip) ---------- */
.marquee {
  display: flex;
  gap: 3rem;
  animation: marquee 38s linear infinite;
  width: max-content;
}
.marquee-wrap { mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); overflow: hidden; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Service detail rows (services page) ---------- */
.service-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) { .service-row { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Forms ---------- */
.field {
  position: relative;
  display: block;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 1.1rem 1.1rem 0.6rem;
  color: #e7e8ee;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 200ms ease, background 200ms ease;
}
:root.light .field input, :root.light .field textarea, :root.light .field select {
  background: rgba(255,255,255,0.78);
  color: #0b1220;
  border-color: rgba(15,23,42,0.10);
}
.field input::placeholder, .field textarea::placeholder { color: transparent; }
.field label {
  position: absolute;
  left: 1.1rem; top: 1rem;
  color: rgba(231,232,238,0.6);
  font-size: 0.95rem;
  pointer-events: none;
  transition: transform 180ms ease, color 180ms ease, font-size 180ms ease;
}
:root.light .field label { color: rgba(11,18,32,0.55); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(255,255,255,0.06);
}
:root.light .field input:focus, :root.light .field textarea:focus, :root.light .field select:focus {
  background: rgba(255,255,255,0.95);
  border-color: rgba(110, 86, 207, 0.6);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field.has-value label {
  transform: translateY(-12px);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
:root.light .field input:focus + label,
:root.light .field input:not(:placeholder-shown) + label,
:root.light .field textarea:focus + label,
:root.light .field textarea:not(:placeholder-shown) + label,
:root.light .field select:focus + label,
:root.light .field.has-value label { color: #2a64d6; }

.field textarea { min-height: 140px; resize: vertical; }

/* ---------- Focus visible ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Helpers ---------- */
.section { padding: 6rem 0; }
@media (max-width: 768px) { .section { padding: 4rem 0; } }
.container-x { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.text-muted { color: rgba(231, 232, 238, 0.66); }
:root.light .text-muted { color: rgba(11, 18, 32, 0.66); }
.text-faint { color: rgba(231, 232, 238, 0.42); }
:root.light .text-faint { color: rgba(11, 18, 32, 0.45); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

/* Hide scroll bar on marquee */
.marquee-wrap::-webkit-scrollbar { display: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-soft, .reveal-scale { opacity: 1 !important; transform: none !important; }
  .bg-field::before, .bg-field::after { animation: none; }
  .hero-shader-canvas, .hero-shader-overlay { display: none; }
  .orbit-ring, .orbit-ring--inner { animation: none; }
  .marquee { animation: none; }
}
