/* ===========================================================
   McLaren Studios Ltd — site styles (vibrant dark redesign)
   Theme variables live in :root. To re-skin, start here.
   =========================================================== */

:root {
  /* Dark tokens — used by the hero (and the top bar over it) */
  --dark-bg: #0b0b12;
  --dark-text: #f4f1ea;
  --dark-muted: #a7a3b8;
  --dark-line: rgba(255, 255, 255, 0.10);
  --dark-panel: rgba(255, 255, 255, 0.04);

  /* Light tokens — used by the sections and footer (ROLI-style cream) */
  --light-bg: #faf6ee;       /* warm off-white, primary section bg */
  --light-bg-2: #f1ece0;     /* slightly deeper cream for alternating */
  --light-text: #1a1a1f;     /* near-black ink */
  --light-muted: #6b6760;    /* warm grey */
  --light-line: rgba(0, 0, 0, 0.12);

  /* Vibrant accent set used across gradients (shared on both themes) */
  --c1: #ff5e7e;   /* pink-red   */
  --c2: #ffb547;   /* amber      */
  --c3: #6c8cff;   /* indigo     */
  --c4: #2fd6c4;   /* teal       */

  /* a deeper amber that reads on light backgrounds for small labels */
  --c2-ink: #b9791a;

  --accent: var(--c1);
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--light-bg);
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* ===========================================================
   Animated gradient mesh background
   =========================================================== */

.mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 0%, #14141f, var(--dark-bg) 65%);
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  mix-blend-mode: screen;
  will-change: transform;
}

.blob-1 {
  background: radial-gradient(circle, var(--c1), transparent 65%);
  top: -18%; left: -12%;
  animation: float-1 22s ease-in-out infinite alternate;
}

.blob-2 {
  background: radial-gradient(circle, var(--c3), transparent 65%);
  top: -10%; right: -16%;
  animation: float-2 26s ease-in-out infinite alternate;
}

.blob-3 {
  background: radial-gradient(circle, var(--c4), transparent 65%);
  bottom: -28%; left: 25%;
  animation: float-3 30s ease-in-out infinite alternate;
}

@keyframes float-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12vw, 10vh) scale(1.25); }
}
@keyframes float-2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-10vw, 14vh) scale(0.9); }
}
@keyframes float-3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8vw, -12vh) scale(1.2); }
}

/* subtle grain so the gradients don't band */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===========================================================
   Top bar
   =========================================================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 11, 18, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

/* once scrolled, firm up the dark bar slightly */
.topbar.scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(11, 11, 18, 0.8);
}

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

.bar-brand { display: block; }
.bar-brand img { height: 46px; width: auto; display: block; }

.bar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.bar-cta {
  color: var(--dark-text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.bar-cta:hover { border-color: var(--c1); transform: translateY(-1px); }

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 82vh;
  display: flex;
  align-items: center;
  padding: clamp(100px, 12vh, 150px) 0 clamp(40px, 8vh, 90px);
  background: var(--dark-bg);
  color: var(--dark-text);
}

.hero-inner h1 { max-width: 880px; }

h1 {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}

/* animated gradient text on the highlighted phrase */
.grad {
  background: linear-gradient(100deg, var(--c1), var(--c2), var(--c4), var(--c3), var(--c1));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue 8s linear infinite;
}

@keyframes hue {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ---------- Hero wavetable (subtle, behind the text) ---------- */

.wave {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: clamp(220px, 46vh, 420px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}

.wave-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* keep hero content above the wave */
.hero-inner { position: relative; z-index: 1; }

/* ===========================================================
   Content blocks
   =========================================================== */

.block { padding: clamp(48px, 9vh, 100px) 0; }

/* the services block is the primary light surface */
#services { background: var(--light-bg); }

.section-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

/* two-column: sticky title left, scrolling list right (Nimble-style) */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}

.services-head {
  position: sticky;
  top: 120px;
}

.services-arrow {
  width: 56px;
  height: 56px;
  margin-top: 20px;
  color: var(--c4);
  opacity: 0.8;
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service {
  padding: 40px 0;
  border-top: 1px solid var(--light-line);
}
.service:first-child { border-top: none; padding-top: 0; }
.service:last-child { padding-bottom: 0; }

.service-num {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(100deg, var(--c4), var(--c3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

.service h3 {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.service p {
  margin: 0;
  color: var(--light-muted);
  font-size: 1.05rem;
  max-width: 48ch;
}

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

footer {
  background: var(--light-text);
  padding: 64px 0 40px;
  color: var(--light-bg);
  font-size: 0.95rem;
  scroll-margin-top: 80px;
}

/* soften the non-heading footer text a touch */
.footer-col span,
.footer-col a,
.footer-base { opacity: 0.8; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-col { display: flex; flex-direction: column; gap: 8px; }

.footer-contact { text-align: right; align-items: flex-end; }

.footer-col h4 {
  font-family: "Sora", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c2);
  margin: 0 0 6px;
  font-weight: 600;
}

.footer-col a { transition: color 0.2s ease; }
.footer-col a:hover { color: var(--c1); }

.footer-base {
  text-align: center;
  font-size: 0.88rem;
  color: var(--light-bg);
}

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

@media (max-width: 860px) {
  .services-grid { grid-template-columns: 1fr; gap: 28px; }
  .services-head { position: static; }
  .services-arrow { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  .bar-nav { gap: 16px; }
  .bar-nav a:not(.bar-cta) { display: none; }
}

/* ===========================================================
   Animations — load reveal, scroll reveal, reduced-motion
   =========================================================== */

.reveal-load { opacity: 0; transform: translateY(18px); }

.is-loaded .reveal-load {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0ms);
}

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .grad { animation: none; }
  .reveal-load, .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .button:hover, .card:hover { transform: none; }
  html { scroll-behavior: auto; }
}
