/* ==========================================================================
   Base: font, design tokens, reset, typography, shared controls
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-var.3100e775e8.woff2") format("woff2");
}

:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

  --bg: #000;
  --surface: #040507;
  --surface-raised: #07090c;
  --text: #fff;
  --text-soft: rgba(255, 255, 255, 0.86);
  --muted: #9ba3ad;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);

  --cyan: #5cc8fa;
  --cyan-soft: #8fd8fb;
  --ice: #e4f5ff;
  --blue: #4f8dff;
  --violet: #7c6cf0;
  --error: #ff9b9b;

  --gutter: clamp(1.25rem, 7.4vw, 7.5rem);
  --container: 90rem;
  --radius-pill: 999px;
  --radius-lg: 1.75rem;
  --radius-md: 0.875rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 500;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(92, 200, 250, 0.35);
  color: #fff;
}

/* Focus ------------------------------------------------------------------ */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--cyan-soft);
  outline-offset: 3px;
}

main:focus,
.enquiry:focus {
  outline: none;
}

/* Skip link -------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #000;
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* Layout primitive ------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* Wordmark --------------------------------------------------------------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: clamp(1rem, 1.05vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1;
  color: var(--text);
  /* Visually balance the trailing letter-spacing */
  margin-right: -0.2em;
}

/* Buttons ---------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  min-height: 2.75rem;
  padding: 0.95em 1.65em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.button__arrow {
  flex: none;
  transition: transform var(--dur) var(--ease);
}

.button:hover .button__arrow {
  transform: translateX(3px);
}

.button:hover .button__arrow--down {
  transform: translateY(2px);
}

.button--hero {
  background: #000;
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: clamp(1rem, 1.12vw, 1.125rem);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.button--hero:hover {
  background: #07090d;
  border-color: rgba(143, 216, 251, 0.45);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(92, 200, 250, 0.08);
}

.button--light {
  background: #fff;
  color: #000;
}

.button--light:hover {
  background: var(--ice);
}

/* Section typography ----------------------------------------------------- */

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
  color: var(--cyan-soft);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
}

.section-label::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), rgba(92, 200, 250, 0));
}

.section-title {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.75rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

/* Phrase-level line breaks on wider screens; natural wrapping on phones */
@media (min-width: 600px) {
  .line {
    display: block;
  }
}

/* Flowing white / ice / cyan text. Two repeating layers move at different
   speeds; each layer's travel is a whole number of its own periods, so the
   loop is seamless. The glyphs themselves never move. */
.text-flow {
  color: var(--cyan-soft);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-flow {
    background-image:
      repeating-linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 7%,
        rgba(255, 255, 255, 0.5) 13%,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0) 25%,
        rgba(228, 245, 255, 0.28) 29%,
        rgba(255, 255, 255, 0) 33.333%),
      repeating-linear-gradient(90deg,
        #5cc8fa 0%,
        #8fd8fb 8%,
        #d6efff 15%,
        #ffffff 19%,
        #b3e3fc 26%,
        #6fcdf8 34%,
        #56b9f4 42%,
        #5cc8fa 50%);
    background-size: 300% 100%, 200% 100%;
    background-position: 62% 0, 38% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  @media (prefers-reduced-motion: no-preference) {
    .text-flow {
      animation: text-flow 9s linear infinite;
    }

    .text-flow.is-paused {
      animation-play-state: paused;
    }
  }
}

@keyframes text-flow {
  from { background-position: 100% 0, 100% 0; }
  to { background-position: 0% 0, 0% 0; }
}

.section-intro {
  max-width: 26rem;
  color: var(--muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.175rem);
  line-height: 1.6;
}
