/* ==========================================================================
   PLANETLINK SOLUTIONS — DESIGN SYSTEM
   --------------------------------------------------------------------------
   Brand blue #2ba3cf (taken from assets/css/color.css) on the deep navy the
   site already uses (#04101c / #060b17), modernised into a token set.

   1. Tokens   2. Reset   3. Typography   4. Layout   5. Components
   6. Motion   7. Accessibility
   ========================================================================== */

/* 1. TOKENS ================================================================ */
:root {
  color-scheme: dark;

  /* --- Base: deep navy --------------------------------------------------- */
  --c-bg:            #050b16;
  --c-bg-2:          #08111f;
  --c-elevated:      #0e1a2b;
  --c-surface:       rgb(255 255 255 / 0.04);
  --c-surface-2:     rgb(255 255 255 / 0.07);
  --c-border:        rgb(255 255 255 / 0.09);
  --c-border-strong: rgb(255 255 255 / 0.16);

  /* --- Text (every value ≥ 7:1 on --c-bg) -------------------------------- */
  --c-text:        #e8eef7;   /* 16.9:1 */
  --c-text-muted:  #a8bdd4;   /* 10.2:1 */
  --c-text-subtle: #7ea6c4;   /*  7.6:1 */

  /* --- Brand ------------------------------------------------------------- */
  --c-primary:   #2ba3cf;     /* PlanetLink blue — 6.8:1 on bg */
  --c-primary-2: #4fc3e8;
  --c-accent:    #00e5ff;
  --c-deep:      #14688d;     /* logo's darker globe blue */
  --c-ink:       #03121c;     /* text colour on bright brand fills — 6.5:1+ */
  --c-success:   #34d399;

  --grad-brand: linear-gradient(135deg, var(--c-primary) 0%, #35b8e0 50%, var(--c-accent) 100%);
  --grad-deep:  linear-gradient(135deg, var(--c-deep) 0%, var(--c-primary) 100%);
  --grad-text:  linear-gradient(110deg, #ffffff 0%, #bfe4f4 45%, #6ee7ff 100%);

  /* --- Glass ------------------------------------------------------------- */
  --glass-bg:   rgb(14 26 43 / 0.55);
  --glass-blur: saturate(180%) blur(18px);

  /* --- Typography -------------------------------------------------------- */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   clamp(1.0625rem, 1rem + 0.45vw, 1.25rem);
  --fs-h3:   clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-h2:   clamp(1.9rem, 1.35rem + 2.4vw, 3rem);
  --fs-h1:   clamp(2.4rem, 1.4rem + 4.4vw, 4.75rem);
  --lh-tight: 1.06;
  --lh-snug:  1.2;
  --lh-body:  1.65;
  --tracking-tight: -0.035em;

  /* --- Space & layout ---------------------------------------------------- */
  --gutter:    clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 7.5rem);
  --container: 1200px;
  --header-h:  76px;

  /* --- Radius ------------------------------------------------------------ */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* --- Shadows: soft & diffused ------------------------------------------ */
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3), 0 2px 8px rgb(0 0 0 / .2);
  --shadow-md: 0 12px 32px -12px rgb(0 0 0 / .6), 0 2px 6px rgb(0 0 0 / .25);
  --shadow-lg: 0 40px 80px -24px rgb(0 0 0 / .72), 0 16px 32px -16px rgb(0 0 0 / .45);
  --glow-primary: 0 12px 40px -6px rgb(43 163 207 / .55);
  --glow-accent:  0 0 60px -10px rgb(0 229 255 / .38);

  /* --- Motion ------------------------------------------------------------ */
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 180ms;
  --dur:      320ms;
  --dur-slow: 800ms;

  /* --- Layers ------------------------------------------------------------ */
  --z-menu:   40;
  --z-header: 50;
  --z-skip:   100;
}

/* 2. RESET ================================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100svh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: clip;          /* clip (not hidden) keeps position: fixed working */
}

img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: rgb(43 163 207 / .45); color: #fff; }

/* 3. TYPOGRAPHY ============================================================ */
h1, h2, h3, h4 {
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  font-weight: 700;
  text-wrap: balance;
}
p { text-wrap: pretty; }

.h2   { font-size: var(--fs-h2); }
.h3   { font-size: var(--fs-h3); }
.lead { font-size: var(--fs-lg); color: var(--c-text-muted); }

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* 4. LAYOUT ================================================================ */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}
.section--tint { background: linear-gradient(180deg, transparent, var(--c-bg-2) 18% 82%, transparent); }

.section-head {
  display: grid;
  justify-items: start;     /* keeps the eyebrow pill from stretching */
  gap: 1rem;
  max-width: 760px;
  margin-bottom: 3.25rem;
}
.section-head--center { justify-items: center; text-align: center; margin-inline: auto; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 5. COMPONENTS ============================================================ */

/* --- Eyebrow ------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .8rem;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-primary-2);
  background: rgb(43 163 207 / .1);
  box-shadow: inset 0 0 0 1px rgb(43 163 207 / .25);
}

/* --- Buttons -------------------------------------------------------------
   Bright brand fill carries dark ink (6.5:1+) rather than white (2.9:1).   */
.btn {
  --btn-h: 50px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: var(--btn-h);
  padding-inline: 1.5rem;
  border-radius: var(--r-full);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition:
    transform var(--dur) var(--ease-spring),
    box-shadow var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out),
    background-position .6s var(--ease-out),
    color var(--dur) var(--ease-out);
}
.btn:hover  { transform: translateY(-1px) scale(1.035); }
.btn:active { transform: scale(.98); transition-duration: 90ms; }
.btn .icon  { width: 1.1em; height: 1.1em; transition: transform var(--dur) var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }

.btn--primary {
  color: var(--c-ink);
  background: var(--grad-brand);
  background-size: 180% 180%;
  background-position: 0% 50%;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18), 0 8px 24px -8px rgb(43 163 207 / .55);
}
.btn--primary:hover {
  background-position: 100% 50%;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3), var(--glow-primary), var(--glow-accent);
}
.btn--primary::after {                       /* shine sweep */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost {
  color: var(--c-text);
  background-color: rgb(255 255 255 / .04);
  box-shadow: inset 0 0 0 1px var(--c-border-strong);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  background-color: rgb(255 255 255 / .09);
  box-shadow: inset 0 0 0 1px rgb(79 195 232 / .45), 0 10px 36px -10px rgb(43 163 207 / .5);
}

.btn--sm    { --btn-h: 40px; padding-inline: 1.1rem; font-size: var(--fs-sm); }
.btn--block { width: 100%; }

/* --- Text link with sliding arrow ---------------------------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-primary-2);
  transition: gap var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.link-arrow:hover { gap: .7rem; color: var(--c-accent); }

/* --- Glass surface -------------------------------------------------------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgb(255 255 255 / .06);
}

/* 6. MOTION ================================================================ */
/* Scroll reveal. `--i` staggers siblings (JS sets it on stagger groups).
   The hidden state only applies when JS is running. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* 7. ACCESSIBILITY ========================================================= */
.skip-link {
  position: fixed;
  left: 1rem;
  top: -100px;
  z-index: var(--z-skip);
  padding: .7rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--c-text);
  color: var(--c-bg);
  font-weight: 600;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
