/* =========================================================
   Accurays — base styles, design tokens
   ========================================================= */

:root {
  --bg: #08090d;
  --bg-alt: #0d0f16;
  --surface: #12151f;
  --surface-2: #171b28;
  --border: #232838;
  --text: #eef0f7;
  --text-dim: #9aa3ba;
  --text-faint: #6b7286;

  --accent-1: #7c5cff;
  --accent-2: #00e5c7;
  --accent-1-rgb: 124, 92, 255;
  --accent-2-rgb: 0, 229, 199;

  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --gradient-soft: linear-gradient(135deg, rgba(124,92,255,0.15), rgba(0,229,199,0.15));

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container-w: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-dim); }

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

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

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.9em;
}

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

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #06070a;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-glow {
  position: relative;
}

.btn-glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--gradient);
  opacity: 0;
  filter: blur(14px);
  z-index: -1;
  transition: opacity 0.3s var(--ease);
}

.btn-glow:hover::before { opacity: 0.65; }

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

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent-2);
  position: relative;
  padding-bottom: 2px;
}

.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--accent-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover::after { transform: scaleX(1); }

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 9, 13, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.logo-accent { color: var(--accent-2); }

.logo-img { height: 50px; width: auto; display: block; transform: translateY(-4px); }
.footer-logo .logo-img { height: 50px; }

.main-nav ul {
  display: flex;
  gap: 32px;
}

.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}

.main-nav .nav-link {
  color: #ffffff;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--text);
}
.nav-link:hover::after { transform: scaleX(1); }

.main-nav .nav-link:hover {
  color: var(--accent-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  max-height: 0;
  overflow: hidden;
  background: rgba(8, 9, 13, 0.98);
  border-bottom: 1px solid var(--border);
  transition: max-height 0.35s var(--ease);
}

.mobile-nav.open { max-height: 480px; }

.mobile-nav ul {
  padding: 12px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav .nav-link {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
  isolation: isolate;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}

.hero-glow-1 {
  width: 520px; height: 520px;
  background: var(--accent-1);
  top: -120px; left: -120px;
}

.hero-glow-2 {
  width: 480px; height: 480px;
  background: var(--accent-2);
  bottom: -160px; right: -100px;
}

.hero-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon { margin-bottom: 28px; }

.hero-ring-1 { animation: rotate 14s linear infinite; transform-origin: center; }
.hero-ring-2 { animation: rotate 10s linear infinite reverse; transform-origin: center; }
.hero-core { animation: pulseCore 2.4s ease-in-out infinite; transform-origin: center; }

.hero-title {
  font-size: clamp(2.1rem, 5.4vw, 3.8rem);
  max-width: 900px;
  margin: 0 auto 0.5em;
}

.hero-title span { display: block; }

.hero-sub {
  max-width: 620px;
  margin: 0 auto 2.2em;
  font-size: 1.1rem;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-scroll-cue {
  margin-top: 64px;
  width: 22px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.hero-scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-2);
  animation: scrollCue 1.8s ease-in-out infinite;
}

/* =========================================================
   Reveal-on-scroll
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* =========================================================
   Sections (generic)
   ========================================================= */

.section {
  padding: 110px 0;
  position: relative;
}

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

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

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.section-lead {
  font-size: 1.05rem;
}

/* =========================================================
   Cards / grid
   ========================================================= */

.card-grid {
  display: grid;
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.services-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-card { position: relative; overflow: hidden; }

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--accent-2-rgb), 0.4);
  box-shadow: 0 20px 50px -20px rgba(var(--accent-1-rgb), 0.35);
}

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-soft);
  color: var(--accent-2);
  margin-bottom: 20px;
}

.service-card h3 { font-size: 1.15rem; margin-bottom: 0.5em; }
.service-card p { font-size: 0.95rem; margin-bottom: 0; }

/* =========================================================
   Track record stats
   ========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  margin-bottom: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
}

.track-cta { text-align: center; margin-top: 40px; }

/* =========================================================
   Recent work
   ========================================================= */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.work-card { padding: 0; overflow: hidden; }

.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--accent-1-rgb), 0.4);
  box-shadow: 0 20px 50px -20px rgba(var(--accent-2-rgb), 0.3);
}

.work-card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.work-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--accent-1-rgb), 0.18), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(var(--accent-2-rgb), 0.18), transparent 55%);
}

.work-card-placeholder {
  position: relative;
  font-size: 0.85rem;
  color: var(--text-faint);
  font-style: italic;
}

.work-card-media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.work-card-body { padding: 28px 32px 32px; }

.work-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.work-card h3 { font-size: 1.3rem; }

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.work-meta li {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* =========================================================
   Specialties
   ========================================================= */

.specialty-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.specialty-tags {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tag-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.tag-pill:hover {
  border-color: rgba(var(--accent-2-rgb), 0.5);
  transform: translateX(4px);
}

.tag-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(var(--accent-2-rgb), 0.7);
}

/* =========================================================
   Process timeline
   ========================================================= */

.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  position: relative;
}

.process-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

.process-step h3 { font-size: 1.05rem; }
.process-step p { font-size: 0.9rem; margin-bottom: 0; }

/* =========================================================
   Testimonials
   ========================================================= */

.testimonial-grid { grid-template-columns: repeat(3, 1fr); }

.testimonial-card {
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: var(--accent-2);
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.testimonial-quote {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text);
  flex: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 20px;
}

.testimonial-author strong { display: block; font-size: 0.9rem; }
.testimonial-author span { font-size: 0.8rem; color: var(--text-faint); }

/* =========================================================
   Contact
   ========================================================= */

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-alt-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(var(--accent-2-rgb), 0.15);
}

.form-row textarea { resize: vertical; }

.form-note {
  font-size: 0.85rem;
  color: var(--accent-2);
  min-height: 1.2em;
  margin: 0;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.footer-tagline {
  font-size: 0.9rem;
  max-width: 100%;
  white-space: nowrap;
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .footer-tagline {
    white-space: normal;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 8px 0;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}

.footer-nav a:hover { color: var(--accent-2); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 0;
}

/* =========================================================
   Floating action buttons (WhatsApp / scroll-to-top)
   ========================================================= */

.whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #1f2430;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 34px -8px rgba(37, 211, 102, 0.45);
}

.scroll-top-fab {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s, border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.scroll-top-fab.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-fab:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-3px);
}

@media (max-width: 640px) {
  .whatsapp-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .scroll-top-fab { left: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* reCAPTCHA v3 badge hidden per Google's terms — required attribution text
   is shown near the contact form instead (see .recaptcha-disclosure). */
.grecaptcha-badge { visibility: hidden; }

.recaptcha-disclosure {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 14px;
}

.recaptcha-disclosure a {
  color: var(--text-dim);
  text-decoration: underline;
}

.recaptcha-disclosure a:hover { color: var(--accent-2); }

/* =========================================================
   Keyframes
   ========================================================= */

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulseCore {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.25); }
}

@keyframes scrollCue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-timeline { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .specialty-layout { grid-template-columns: 1fr; gap: 40px; }
  .contact-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: block; }
  .header-actions .btn-primary { display: none; }
}

@media (max-width: 640px) {
  .services-grid,
  .work-grid,
  .process-timeline,
  .testimonial-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .section { padding: 76px 0; }
  .hero { padding: 120px 0 60px; }
  .card { padding: 26px; }
  .contact-form { padding: 26px; }
}
