:root {
  /* Apple-like light system */
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --card-bg: rgba(255, 255, 255, 0.8);
  --text: #0b0d12;
  --text-muted: #4c5566;
  --border-subtle: rgba(10, 14, 24, 0.12);

  /* Bright highlights (use sparingly) */
  --accent: #0a84ff;
  --accent2: #34c759;
  --accent-soft: rgba(10, 132, 255, 0.12);

  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-tight: 0 10px 24px rgba(15, 23, 42, 0.08);
  --max-width: 1120px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% -10%, rgba(10, 132, 255, 0.14), transparent 42%),
    radial-gradient(circle at 80% 0%, rgba(52, 199, 89, 0.12), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfc 60%, #f6f7f9 100%);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.8rem;
  transform: translateY(-140%);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(10, 14, 24, 0.14);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-tight);
  z-index: 999;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.82),
    rgba(255, 255, 255, 0.62),
    transparent
  );
  border-bottom: 1px solid rgba(10, 14, 24, 0.08);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: rgba(10, 14, 24, 0.12);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background-color: #111827;
  background-image: url("data/rayx_beam_logo_rgb.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
  position: relative;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  font-size: 0.9rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

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

.nav-cta {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 14, 24, 0.14);
  background: rgba(255, 255, 255, 0.6);
}

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto 0 50%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.18), transparent 65%);
  filter: blur(8px);
  transform: translate(-60%, 40%);
  z-index: 0;
}

.hero::after {
  inset: 0 auto auto 5%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(52, 199, 89, 0.15), transparent 70%);
  transform: translate(0, -30%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 3.4vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.hero-subtitle {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 32rem;
}

.hero-note {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.7rem 0 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, border-color 0.12s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #62b0ff);
  color: #ffffff;
  box-shadow: var(--shadow-tight);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(10, 14, 24, 0.14);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.95);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.hero-tags span {
  font-size: 0.74rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(10, 14, 24, 0.10);
  color: var(--text-muted);
}

/* Hero visual */
.hero-visual {
  display: grid;
  gap: 2rem;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 247, 249, 0.86));
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(10, 14, 24, 0.10);
  box-shadow: var(--shadow-soft);
}

.hero-badge {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 132, 255, 0.28);
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(10, 132, 255, 0.08);
  margin-bottom: 0.8rem;
}

.hero-card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.7rem;
}

.hero-card p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-metrics {
  display: grid;
  gap: 0.6rem;
  font-size: 0.83rem;
}

.metric-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.metric-value {
  color: var(--text);
}

.hero-flow {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.3rem 1.35rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 247, 249, 0.86));
  border: 1px solid rgba(10, 14, 24, 0.10);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-flow::before {
  content: "";
  position: absolute;
  inset: -40px -40px auto -40px;
  height: 220px;
  background:
    radial-gradient(circle at 18% 38%, rgba(10, 132, 255, 0.18), transparent 60%),
    radial-gradient(circle at 74% 20%, rgba(52, 199, 89, 0.14), transparent 62%),
    radial-gradient(circle at 60% 70%, rgba(124, 58, 237, 0.12), transparent 64%);
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
}

.flow-steps {
  --rail-x: calc(0.7rem + 12px);
  --rail-pad-y: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  position: relative;
  isolation: isolate;
  z-index: 1;
}

.flow-steps::before {
  content: "";
  position: absolute;
  left: var(--rail-x);
  top: var(--rail-pad-y);
  bottom: var(--rail-pad-y);
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.55) 0%, rgba(124, 58, 237, 0.5) 55%, rgba(52, 199, 89, 0.55) 100%);
  opacity: 0.28;
  z-index: 0;
}

.flow-steps::after {
  content: "";
  position: absolute;
  left: var(--rail-x);
  top: var(--rail-pad-y);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(10, 132, 255, 0.95), rgba(10, 132, 255, 0.25) 55%, transparent 70%);
  filter: drop-shadow(0 0 10px rgba(10, 132, 255, 0.25));
  animation: photonTravel 3.6s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  z-index: 1;
}

@keyframes photonTravel {
  0% { top: var(--rail-pad-y); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: calc(100% - var(--rail-pad-y) - 10px); opacity: 0; }
}

.flow-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.7rem;
  border-radius: 18px;
  position: relative;
  z-index: 2;
  transition: background 0.18s ease, transform 0.18s ease;
}

.flow-step:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(2px);
}

.flow-marker {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  justify-self: center;
  margin-top: 0.55rem;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.28);
  color: var(--accent);
  box-shadow: 0 14px 22px rgba(10, 132, 255, 0.12);
}

.flow-step:nth-child(2) .flow-marker {
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.28);
  color: var(--accent2);
  box-shadow: 0 14px 22px rgba(52, 199, 89, 0.12);
}

.flow-step:nth-child(3) .flow-marker {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.26);
  color: #7c3aed;
  box-shadow: 0 14px 22px rgba(124, 58, 237, 0.12);
}

.flow-step:nth-child(4) .flow-marker {
  background: rgba(10, 132, 255, 0.12);
  border-color: rgba(10, 132, 255, 0.22);
  color: var(--accent);
  box-shadow: 0 14px 22px rgba(10, 132, 255, 0.12);
}

.flow-marker svg {
  width: 12px;
  height: 12px;
}

.flow-kicker {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.flow-name {
  margin-top: 0.2rem;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.flow-desc {
  margin: 0.25rem 0 0;
  font-size: 0.87rem;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .flow-steps::after {
    display: none;
    animation: none;
  }
  .flow-step {
    transition: none;
  }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  padding: 3.5rem 0;
  background: linear-gradient(180deg, #f6f7f9 0%, #fbfbfc 100%);
}

.section-header {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.section-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Cards */
.cards {
  display: grid;
  gap: 1.4rem;
}

.cards-wide {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-tight);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2px;
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Tech grid */
.tech-grid {
  display: grid;
  gap: 2rem;
  position: relative;
  padding-left: 2.5rem;
}

/* Timeline line */
.tech-grid::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--accent2) 100%);
  opacity: 0.2;
  border-radius: 99px;
}

.tech-step {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.5rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(10, 14, 24, 0.12);
  box-shadow: var(--shadow-tight);
  transition: transform 0.2s ease;
}

.tech-step:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.9);
}

/* Timeline dot */
.tech-step::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 1.8rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px #f6f7f9; /* Match bg color */
  z-index: 2;
}

.tech-step:nth-child(n+3)::before {
  border-color: var(--accent2);
}

.tech-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.tech-step p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* About */
.about-grid {
  display: grid;
  gap: 2rem;
}

.about-highlight {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(10, 14, 24, 0.12);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-tight);
}

.about-highlight h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.about-highlight ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-highlight li {
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 1rem;
}

.about-highlight li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Contact */
.contact-box {
  max-width: 34rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(10, 14, 24, 0.12);
  padding: 1.7rem 1.8rem;
  box-shadow: var(--shadow-soft);
}

.contact-box p {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(10, 14, 24, 0.08);
  padding: 1.2rem 0 1.8rem;
  background: #ffffff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  gap: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy > * {
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}

.hero-copy .eyebrow { animation-delay: 0.1s; }
.hero-copy h1 { animation-delay: 0.2s; }
.hero-copy .hero-subtitle { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.4s; }
.hero-note { animation-delay: 0.5s; }
.hero-tags { animation-delay: 0.6s; }

.hero-visual {
  animation: fadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  animation-delay: 0.3s;
}

/* Typography refinements */
h1, h2, h3 {
  letter-spacing: -0.02em;
}

p {
  letter-spacing: -0.01em;
}

/* Responsive */
@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-top: 3.5rem;
  }
  .hero-visual {
    order: -1;
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .header-inner {
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-flow {
    padding: 1.1rem 1rem 1.15rem;
  }

  .flow-steps {
    --rail-x: calc(0.6rem + 12px);
    gap: 0.75rem;
  }

  .flow-step {
    padding: 0.6rem;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
