/* ============================================================
   Erabyte Technology Demo — 3D Website Styles
   ============================================================ */

:root {
  --bg: #060714;
  --bg-soft: #0b0d22;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef0ff;
  --text-dim: #9aa0c3;
  --primary: #6c5ce7;
  --primary-2: #00d2ff;
  --accent: #ff4d8d;
  --gradient: linear-gradient(120deg, #6c5ce7, #00d2ff 55%, #ff4d8d);
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --font-head: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ Animated 3D background ============ */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  perspective: 900px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.orb-1 { width: 480px; height: 480px; background: #6c5ce7; top: -120px; left: -120px; }
.orb-2 { width: 420px; height: 420px; background: #00d2ff; bottom: -140px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 320px; height: 320px; background: #ff4d8d; top: 40%; left: 55%; opacity: 0.3; animation-delay: -9s; }

@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, -50px, 0) scale(1.15); }
}

.grid-floor {
  position: absolute;
  left: -25%;
  bottom: -12%;
  width: 150%;
  height: 55%;
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.22) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, rgba(0,0,0,.7), transparent 85%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.7), transparent 85%);
  animation: gridSlide 3.5s linear infinite;
}

@keyframes gridSlide {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 56px, 0 0; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform;
}
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-primary {
  color: #fff;
  background: var(--gradient);
  background-size: 180% 180%;
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.45);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 210, 255, 0.4);
  background-position: 100% 50%;
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { transform: translateY(-3px); background: var(--surface-strong); }

.btn-outline {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 18px;
  font-size: 0.85rem;
}
.btn-outline:hover { border-color: var(--primary-2); color: var(--primary-2); }

/* ============ Navbar ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(6, 7, 20, 0.8);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.3px;
}
.logo-text em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Spinning 3D logo cube */
.logo-cube {
  position: relative;
  width: 30px;
  height: 30px;
  transform-style: preserve-3d;
  animation: cubeSpin 8s linear infinite;
}
.logo-cube .face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(108,92,231,.9), rgba(0,210,255,.7));
  border: 1px solid rgba(255,255,255,.25);
}
.f-front  { transform: translateZ(15px); }
.f-back   { transform: rotateY(180deg) translateZ(15px); }
.f-right  { transform: rotateY(90deg) translateZ(15px); }
.f-left   { transform: rotateY(-90deg) translateZ(15px); }
.f-top    { transform: rotateX(90deg) translateZ(15px); }
.f-bottom { transform: rotateX(-90deg) translateZ(15px); }

@keyframes cubeSpin {
  from { transform: rotateX(-15deg) rotateY(0deg); }
  to   { transform: rotateX(-15deg) rotateY(360deg); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav-links a:not(.btn) {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 130px 0 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.hero-eyebrow {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { color: var(--text-dim); font-size: 0.85rem; }

/* Hero 3D visual */
.hero-visual {
  position: relative;
  height: 480px;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.float-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  animation: cardBob 6s ease-in-out infinite alternate;
  will-change: transform;
}
.float-card span { font-size: 2rem; }
.float-card p { font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }

.fc-1 { top: 6%;  left: 8%;  animation-delay: 0s; }
.fc-2 { top: 2%;  right: 6%; animation-delay: -1.5s; }
.fc-3 { top: 42%; left: 0;   animation-delay: -3s; }
.fc-4 { top: 40%; right: 2%; animation-delay: -4.5s; }
.fc-5 { bottom: 4%; left: 34%; animation-delay: -2s; }

@keyframes cardBob {
  from { transform: translateY(0) rotateX(6deg) rotateY(-6deg); }
  to   { transform: translateY(-26px) rotateX(-6deg) rotateY(6deg); }
}

.hero-ring {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: ringSpin 30s linear infinite;
}
.ring-1 { inset: 12% 10%; }
.ring-2 { inset: 24% 22%; animation-direction: reverse; animation-duration: 22s; }

@keyframes ringSpin {
  from { transform: rotateX(58deg) rotateZ(0deg); }
  to   { transform: rotateX(58deg) rotateZ(360deg); }
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 9px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--primary-2);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ Sections ============ */
.section { padding: 110px 0; position: relative; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }

.section-eyebrow {
  color: var(--primary-2);
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-sub { color: var(--text-dim); font-size: 1.02rem; }

/* ============ Service cards ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
  perspective: 1400px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%),
              rgba(108, 92, 231, 0.18), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  border-color: rgba(108, 92, 231, 0.55);
  box-shadow: 0 24px 60px rgba(108, 92, 231, 0.25);
}

.card-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(108,92,231,.28), rgba(0,210,255,.18));
  border: 1px solid var(--border);
  transform: translateZ(38px);
}

.service-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  transform: translateZ(28px);
}

.service-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  flex-grow: 1;
  transform: translateZ(18px);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  transform: translateZ(14px);
}
.card-tags span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.12);
  color: var(--primary-2);
  border: 1px solid rgba(0, 210, 255, 0.22);
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  transform: translateZ(30px);
}
.card-actions .btn { flex: 1; }

.btn-demo {
  color: #fff;
  background: var(--gradient);
  background-size: 180% 180%;
  padding: 10px 16px;
  font-size: 0.85rem;
  box-shadow: 0 8px 22px rgba(108, 92, 231, 0.35);
}
.btn-demo:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 12px 28px rgba(0, 210, 255, 0.35);
}

/* ============ Why us ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  perspective: 1200px;
}

.why-card {
  padding: 34px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  text-align: center;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.why-card:hover { border-color: rgba(0,210,255,.5); box-shadow: 0 20px 50px rgba(0,210,255,.18); }
.why-icon { font-size: 2.2rem; display: block; margin-bottom: 14px; transform: translateZ(30px); }
.why-card h3 { font-size: 1.05rem; margin-bottom: 10px; transform: translateZ(22px); }
.why-card p { color: var(--text-dim); font-size: 0.88rem; transform: translateZ(14px); }

/* ============ Contact ============ */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 60px;
  align-items: start;
}

.contact-info .section-title,
.contact-info .section-sub { text-align: left; }
.contact-info .section-sub { margin-bottom: 36px; }

.contact-cards { display: flex; flex-direction: column; gap: 16px; }

.contact-chip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--text);
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.contact-chip:hover { border-color: rgba(255,77,141,.5); box-shadow: 0 16px 40px rgba(255,77,141,.18); }
.chip-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255,77,141,.25), rgba(108,92,231,.2));
  transform: translateZ(26px);
}
.contact-chip strong { display: block; font-family: var(--font-head); font-size: 0.95rem; }
.contact-chip small { color: var(--text-dim); font-size: 0.82rem; }

/* Contact form */
.contact-form {
  padding: 40px 36px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}
.contact-form h3 { font-size: 1.35rem; margin-bottom: 26px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  resize: vertical;
}
.form-group select option { background: var(--bg-soft); color: var(--text); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.18);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(154, 160, 195, 0.55); }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }

.form-status {
  margin-top: 14px;
  text-align: center;
  font-size: 0.9rem;
  min-height: 1.4em;
}
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }

/* ============ Footer ============ */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer-brand .logo-text { font-size: 1.3rem; }
.footer-brand p { color: var(--text-dim); font-size: 0.88rem; margin-top: 8px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-2); }
.footer-copy { color: rgba(154, 160, 195, 0.6); font-size: 0.8rem; }

/* ============ Scroll-reveal initial state (Motion animates in) ============ */
[data-animate] { opacity: 0; }
.no-js [data-animate] { opacity: 1; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-visual { height: 380px; max-width: 560px; margin-inline: auto; width: 100%; }
  .contact-inner { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    background: rgba(6, 7, 20, 0.96);
    backdrop-filter: blur(20px);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 105;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a:not(.btn) { font-size: 1.25rem; }

  .section { padding: 80px 0; }
  .hero { padding-top: 110px; }
  .hero-stats { gap: 26px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 30px 22px; }
  .float-card { padding: 14px 16px; }
  .float-card span { font-size: 1.5rem; }
  .fc-5 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-animate] { opacity: 1; }
}
