/* ========== Tokens ========== */
:root {
  /* Pulled from the RaraByte logo */
  --brand-grad: linear-gradient(120deg, #0A84FF 0%, #3B4FE8 50%, #6D28D9 100%);
  --cobalt: #1A5FE8;
  --cobalt-deep: #4B22C4;
  --navy: #070C2B;
  --ink: #0B1033;
  --focus: #7DB4FF;
  --ice: #F2F4FB;
  --white: #FFFFFF;
  --muted: #5B6285;
  --line: #D9DDEE;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 3.5vw, 2.8rem);
  --step-4: clamp(3rem, 9vw, 7.5rem);

  --wrap: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8rem);
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--ice);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--cobalt); color: var(--white); padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--body);
  padding: 1rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--brand {
  background: var(--brand-grad); background-size: 160% 100%; background-position: 0% 0;
  color: var(--white); box-shadow: 0 8px 24px -8px rgba(109,40,217,.6);
  transition: background-position .4s ease, transform .15s ease;
}
.btn--brand:hover { background-position: 100% 0; }
.btn--ghost { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn--primary { background: var(--cobalt); color: var(--white); }
.btn--primary:hover { background: var(--cobalt-deep); }
.btn--small { padding: .65rem 1.1rem; font-size: .95rem; background: var(--brand-grad); color: var(--white); }

/* ========== Nav ========== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--white);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.nav.is-scrolled {
  background: rgba(242,244,251,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo__img { height: 42px; width: auto; }
@media (max-width: 720px) { .logo__img { height: 34px; } }
.logo__img--dark { display: none; }
.nav.is-scrolled .logo__img--light { display: none; }
.nav.is-scrolled .logo__img--dark { display: block; }

.nav__menu { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav__menu a:not(.btn) { text-decoration: none; font-weight: 500; opacity: .85; }
.nav__menu a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav__toggle {
  display: none; font: 600 1rem var(--body); color: inherit;
  background: none; border: 2px solid currentColor; border-radius: 999px; padding: .5rem 1rem; cursor: pointer;
}

/* ========== Hero ========== */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; align-items: center;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(109,40,217,.45), transparent 70%),
    radial-gradient(50% 60% at 60% 90%, rgba(10,132,255,.28), transparent 70%),
    var(--navy);
  color: var(--white);
  padding: 120px 0 90px;
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__content { position: relative; width: 100%; pointer-events: none; }
.hero__content a { pointer-events: auto; }
.hero__title {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .92;
  max-width: 11ch;
}
.hero__title .line { display: block; }
.hero__lede {
  margin-top: 2rem; max-width: 38ch;
  font-size: var(--step-1); line-height: 1.5; color: rgba(255,255,255,.86);
}
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__hint {
  position: absolute; right: var(--pad); bottom: 1.75rem;
  font-size: var(--step--1); color: rgba(255,255,255,.6);
}

/* Page-load sequence (the one orchestrated moment) */
.js .hero__title .line,
.js .hero__lede,
.js .hero__actions { opacity: 0; transform: translateY(24px); }
.is-loaded .hero__title .line,
.is-loaded .hero__lede,
.is-loaded .hero__actions {
  opacity: 1; transform: none;
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.is-loaded .hero__title .line:nth-child(2) { transition-delay: .12s; }
.is-loaded .hero__lede { transition-delay: .3s; }
.is-loaded .hero__actions { transition-delay: .42s; }

/* ========== Section basics ========== */
.section-title {
  font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; max-width: 18ch;
}
.section-lede { margin-top: .9rem; color: var(--muted); }

/* ========== Services ========== */
.services { padding: var(--section) 0; background: var(--white); }
.svc {
  margin-top: 3rem;
  display: grid; grid-template-columns: minmax(260px, 5fr) 7fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.svc__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.svc__list button {
  position: relative;
  text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 1.15rem 2.5rem 1.15rem 0;
  font: 600 var(--step-1)/1.25 var(--display); letter-spacing: -.01em;
  color: var(--muted); cursor: pointer;
  transition: color .2s ease, padding-left .25s ease;
}
.svc__list button::after {
  content: ""; position: absolute; right: .25rem; top: 50%;
  width: 12px; height: 12px; margin-top: -6px; border-radius: 3px;
  background: var(--line); transition: background-color .2s ease, transform .25s ease;
}
.svc__list button:hover { color: var(--ink); }
.svc__list button[aria-selected="true"] { color: var(--cobalt); padding-left: .75rem; }
.svc__list button[aria-selected="true"]::after { background: var(--brand-grad); transform: rotate(45deg); }

.svc__panels {
  background: var(--ice); border-radius: 28px;
  padding: clamp(1.75rem, 4vw, 3rem);
  position: sticky; top: 100px;
}
.svc__panels h3 { font-size: var(--step-2); letter-spacing: -.02em; max-width: 20ch; }
.svc__panels p { margin-top: 1rem; color: var(--muted); max-width: 52ch; }
.svc__panels ul { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .8rem; }
.svc__panels li { display: flex; gap: .8rem; align-items: baseline; }
.svc__panels li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--cobalt);
  transform: translateY(-2px);
}
.svc__panels article:not([hidden]) { animation: panelIn .35s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ========== Process ========== */
.process { padding: var(--section) 0; background: var(--ink); color: var(--white); }
.process .section-title { color: var(--white); }
.steps {
  list-style: none; padding: 0; margin: 3.5rem 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 3.5rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border-radius: 8px; background: var(--brand-grad);
  font: 800 1rem var(--display);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.1rem; left: 3rem; right: -1rem; height: 2px;
  background: rgba(255,255,255,.15);
}
.steps h3 { font-size: var(--step-1); }
.steps p { margin-top: .6rem; color: rgba(255,255,255,.72); font-size: .98rem; }

/* ========== About ========== */
.about { padding: var(--section) 0; }
.about__grid { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.about__text { margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.55; max-width: 44ch; }
.facts { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.facts div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

/* ========== Contact ========== */
.contact { padding: var(--section) 0; background: var(--white); }
.contact__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2rem, 6vw, 6rem); }
.contact__lede { margin-top: 1.25rem; color: var(--muted); max-width: 36ch; }
.contact__direct { margin-top: 2rem; }
.contact__direct a { color: var(--cobalt); font-weight: 600; text-underline-offset: 4px; }

.form { display: grid; gap: 1.4rem; }
.field { display: grid; gap: .45rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.field legend { margin-bottom: .6rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--ice); border: 2px solid transparent; border-radius: 14px;
  padding: .9rem 1rem; transition: border-color .2s ease, background-color .2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); background: var(--white); }
.field.has-error input, .field.has-error textarea { border-color: #D6334C; }
.field__error { color: #C02540; font-size: .88rem; min-height: 0; }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px;
  border: 2px solid var(--line); font-weight: 500; font-size: .95rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chips input:checked + span { background: var(--brand-grad); border-color: transparent; color: var(--white); }
.chips input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.form .btn { justify-self: start; }
.form__status { font-weight: 600; color: var(--cobalt); }

/* ========== Footer ========== */
.footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 2.5rem 0; font-size: var(--step--1); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.logo--small .logo__img { height: 30px; }

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .svc, .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .svc__panels { position: static; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .steps li::after { display: none; }
}
@media (max-width: 720px) {
  .nav__toggle { display: inline-block; }
  .nav__menu {
    position: absolute; top: 76px; left: var(--pad); right: var(--pad);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); color: var(--ink);
    border-radius: 20px; padding: .75rem; box-shadow: 0 20px 40px rgba(20,26,61,.18);
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { display: block; padding: .9rem 1rem; }
  .nav__menu .btn { margin-top: .5rem; width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .hero__hint { display: none; }
  .facts div { flex-direction: column; gap: .2rem; }
  .facts dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .hero__title .line, .js .hero__lede, .js .hero__actions { opacity: 1; transform: none; }
}

/* ========== Cloud support (Azure & AWS) ========== */
.svc__more {
  display: inline-block; margin-top: 1.5rem;
  color: var(--cobalt); font-weight: 600; text-underline-offset: 5px;
}
.cloud { padding: var(--section) 0; background: var(--ice); }
.cloud__head { max-width: 640px; }
.cloud__platforms {
  margin-top: 3rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.platform {
  position: relative; overflow: hidden;
  background: var(--white); border-radius: 28px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--line);
}
.platform::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
}
.platform--azure::before { background: linear-gradient(90deg, #0A84FF, #3B4FE8); }
.platform--aws::before { background: linear-gradient(90deg, #3B4FE8, #6D28D9); }
.platform h3 { font-size: var(--step-2); letter-spacing: -.02em; }
.platform > p { margin-top: .75rem; color: var(--muted); max-width: 46ch; }
.platform__stack {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.platform__stack li {
  font-size: .88rem; font-weight: 500;
  padding: .35rem .75rem; border-radius: 8px;
  background: var(--ice); color: var(--ink);
}
.platform--azure .platform__stack li { box-shadow: inset 3px 0 0 #0A84FF; }
.platform--aws .platform__stack li { box-shadow: inset 3px 0 0 #6D28D9; }
.platform__list { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .75rem; }
.platform__list li { display: flex; gap: .8rem; align-items: baseline; }
.platform__list li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px;
  background: var(--brand-grad); transform: translateY(-2px);
}

.coverage {
  margin-top: 1.5rem;
  background: var(--ink); color: var(--white);
  border-radius: 28px; padding: clamp(1.75rem, 4vw, 2.75rem);
}
.coverage__title { font-size: var(--step-1); }
.coverage__grid {
  margin: 1.75rem 0 2rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem;
}
.coverage__grid dt { font: 600 1.05rem var(--display); }
.coverage__grid dd { margin: .4rem 0 0; color: rgba(255,255,255,.72); font-size: .95rem; }
.coverage .btn--primary { background: var(--brand-grad); }

@media (max-width: 900px) {
  .cloud__platforms { grid-template-columns: 1fr; }
  .coverage__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .coverage__grid { grid-template-columns: 1fr; }
}

section[id] { scroll-margin-top: 76px; }
