/* ==========================================================================
   Contuality — Landing page styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */
:root {
  color-scheme: only dark;
  /* Colours */
  --color-bg: #0f172a;
  --color-bg-elevated: #1e293b;
  --color-surface: #334155;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-accent: #38bdf8;
  --color-accent-hover: #7dd3fc;

  /* Typography */
  --font-sans: 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-hero: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-hero: 2.5rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 5rem;

  /* Layout */
  --container-max: 72rem;
  --header-height: 4rem;
  --radius: 0.5rem;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background-color: #0a0f1a;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--color-bg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  background:
    radial-gradient(
      ellipse 100% 100% at 50% 50%,
      transparent 30%,
      rgba(0, 0, 0, 0.25) 100%
    ),
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(56, 189, 248, 0.03) 40%,
      rgba(56, 189, 248, 0.07) 50%,
      rgba(56, 189, 248, 0.03) 60%,
      transparent 100%
    ),
    linear-gradient(
      165deg,
      #0a0f1a 0%,
      var(--color-bg) 15%,
      #0c1222 35%,
      var(--color-bg-elevated) 50%,
      #0f172a 65%,
      var(--color-bg) 85%,
      #0a0f1a 100%
    );
  background-size: 100% 100%, 250% 100%, 100% 100%;
  background-position: 0 0, 0 0, 0 0;
  background-attachment: fixed;
  animation: bgShimmer 28s linear infinite;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 140% 100% at 75% 15%,
    rgba(56, 189, 248, 0.14) 0%,
    rgba(56, 189, 248, 0.04) 35%,
    transparent 60%
  );
  animation: bgGlow 18s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 100% 140% at 15% 85%,
    rgba(30, 41, 59, 0.7) 0%,
    rgba(15, 23, 42, 0.2) 40%,
    transparent 65%
  );
  animation: bgGlow 22s ease-in-out infinite alternate-reverse;
}

@keyframes bgShimmer {
  to { background-position: 0 0, -100% 0, 0 0; }
}

@keyframes bgGlow {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
}

.notranslate {
  translate: no;
}

/* --------------------------------------------------------------------------
   Layout utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 48em) {
  .container {
    padding: 0 var(--space-xl);
  }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 0 0;
  background: transparent;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-height);
  max-width: var(--container-max);
  margin: 0 auto;
  width: min(calc(100% - 1rem), var(--container-max));
  padding: 0.65rem 0.75rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.28);
  backdrop-filter: blur(20px);
}

@media (min-width: 48em) {
  .header__inner {
    width: auto;
    padding: 0.875rem 1.25rem;
    border-radius: 999px;
  }
}

.logo {
  flex: 0 0 auto;
  font-weight: 600;
  margin-left: 0.35rem;
  font-size: 1rem;
  color: var(--color-text);
  letter-spacing: 0.03em;
}

@media (min-width: 48em) {
  .logo {
    font-size: 1.2rem;
  }
}

.logo:hover {
  color: var(--color-text);
  opacity: 0.92;
}

/* Nav */
.nav {
  position: relative;
  margin-left: auto;
}

.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 2.35rem;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav__toggle:hover {
  background-color: rgba(255, 255, 255, 0.07);
  border-color: rgba(125, 211, 252, 0.35);
}

@media (min-width: 48em) {
  .nav__toggle {
    display: none;
  }
}

.nav__menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(calc(100dvw - 1rem), 22rem);
  max-width: calc(100% + 14rem);
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.1rem;
  box-shadow: 0 24px 64px rgba(2, 8, 23, 0.4);
  backdrop-filter: blur(18px);
}

.nav__menu[hidden] {
  display: none;
}

.nav__menu:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

@media (min-width: 48em) {
  .nav__menu {
    position: static;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    width: auto;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .nav__menu[hidden] {
    display: flex;
  }
}

.nav__menu li {
  width: 100%;
}

.nav__menu a {
  display: block;
  width: 100%;
  padding: 0.95rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  border-radius: 0.8rem;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav__menu a:hover {
  color: var(--color-text);
  background-color: rgba(56, 189, 248, 0.12);
}

@media (min-width: 48em) {
  .nav__menu li {
    width: auto;
  }

  .nav__menu a {
    padding: 0.55rem 0.9rem;
    width: auto;
    font-size: 0.76rem;
    border-radius: 999px;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-bg);
  background-color: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-bg);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: var(--space-3xl) 0;
  overflow: hidden;
}

@media (min-width: 48em) {
  .hero {
    padding: var(--space-3xl) 0 var(--space-3xl);
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
  transform: translateY(-8rem);
}

@media (min-width: 48em) {
  .hero__inner {
    padding: var(--space-3xl) var(--space-xl);
  }
}

.hero__content {
  max-width: 42rem;
  width: 100%;
  text-align: center;
}

.hero__headline {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-hero);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: -0.03em;
}

@media (min-width: 48em) {
  .hero__headline {
    font-size: 3rem;
    margin-bottom: var(--space-xl);
  }
}

.hero__subhead {
  margin: 0 0 var(--space-xl);
  font-family: var(--font-hero);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

@media (min-width: 48em) {
  .hero__subhead {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2xl);
  }
}

.hero__content .btn {
  display: inline-block;
}

.hero__visual {
  display: none;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   Section title
   -------------------------------------------------------------------------- */
.section-title {
  margin: 0 0 var(--space-2xl);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (min-width: 48em) {
  .section-title {
    font-size: var(--text-3xl);
  }
}

/* --------------------------------------------------------------------------
   Services / Cards
   -------------------------------------------------------------------------- */
.services {
  padding: var(--space-3xl) 0;
  background: rgba(30, 41, 59, 0.45);
}

.services__grid {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 48em) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: var(--space-xl);
  background-color: var(--color-bg);
  border: 1px solid var(--color-surface);
  border-radius: var(--radius);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-md);
  color: var(--color-accent);
}

.card__title {
  margin: 0 0 var(--space-xs);
  font-size: var(--text-xl);
  font-weight: 600;
}

.card__tagline {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
}

.card__bullets {
  margin: 0;
  padding-left: 1.125rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.card__bullets li {
  margin-bottom: var(--space-xs);
}

.card__bullets li:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Why
   -------------------------------------------------------------------------- */
.why {
  padding: var(--space-3xl) 0;
}

.why__list {
  margin: 0;
  padding-left: 1.25rem;
  max-width: 40rem;
}

.why__list li {
  margin-bottom: var(--space-sm);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.why__list li:last-child {
  margin-bottom: 0;
}

.why__list strong {
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */
.cta {
  padding: var(--space-3xl) 0;
  text-align: center;
  background-color: var(--color-bg-elevated);
}

.cta__text {
  margin: 0 0 var(--space-lg);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-surface);
}

.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 48em) {
  .footer__inner {
    padding: 0 var(--space-xl);
  }
}

.footer .logo {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.footer__contact {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 36rem;
}
