/* ============================================================
   HUBLEE — Shell CSS partagé
   Pour les 7 pages publiques. Tokens, header, footer,
   composants communs (eyebrow, chip, button, card, section).
   ============================================================ */

:root {
  /* Backgrounds */
  --bg:           #102528;
  --bg-elev:      #1a3a40;
  --bg-elev-2:    #224b55;
  --bg-rail:      #07151a;

  /* Text */
  --paper:        #fcf8f5;
  --muted:        #9ab3b2;
  --dim:          #528281;

  /* Borders */
  --border:       rgba(252,248,245,0.10);
  --border-strong:rgba(252,248,245,0.18);

  /* Accents */
  --teal:         #32ccc4;
  --teal-deep:    #2e8a86;
  --green:        #8bca3a;
  --yellow:       #eac800;
  --orange:       #d36705;

  /* Signature gradient */
  --brand-grad:        linear-gradient(135deg, #224b55 0%, #32ccc4 28%, #8bca3a 52%, #eac800 76%, #d36705 100%);
  --brand-grad-warm:   linear-gradient(135deg, #eac800 0%, #d36705 60%, #32ccc4 100%);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Motion */
  --ease:     220ms cubic-bezier(.4,0,.2,1);
  --ease-out: 700ms cubic-bezier(.16,1,.3,1);

  /* Layout */
  --wrap: 1280px;
  --gutter: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--paper);
  font-family: 'Nunito Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

h1, h2, h3, h4, h5 {
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--paper);
  text-wrap: balance;
}

::selection { background: var(--teal); color: var(--bg); }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-feature-settings: "tnum","zero";
}

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

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   Layout primitives
   ============================================================ */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.wrap-narrow {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

section { scroll-margin-top: 96px; }

/* ============================================================
   Ambient — aurora + dotmesh
   ============================================================ */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  overflow: hidden;
}
.ambient .aurora {
  position: absolute;
  inset: -20vh -10vw;
  filter: blur(80px);
  opacity: 0.45;
}
.ambient .aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.ambient .a1 { width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(50,204,196,0.40), transparent 65%); top: -10vh; left: -10vw; animation: drift1 28s ease-in-out infinite; }
.ambient .a2 { width: 44vw; height: 44vw; background: radial-gradient(circle, rgba(211,103,5,0.32), transparent 65%); top: 20vh; right: -12vw; animation: drift2 32s ease-in-out infinite; }
.ambient .a3 { width: 38vw; height: 38vw; background: radial-gradient(circle, rgba(234,200,0,0.22), transparent 65%); bottom: -12vh; left: 18vw; animation: drift3 36s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(6vw,3vh) scale(1.08);} }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(-5vw,6vh) scale(1.05);} }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(3vw,-4vh) scale(0.94);} }

.ambient .dotmesh {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(252,248,245,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 25%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 25%, #000 25%, transparent 75%);
}

/* ============================================================
   Header — sticky, identique sur toutes les pages
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 37, 40, 0.72);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease, background 300ms ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(16, 37, 40, 0.92);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--ease);
}
.nav-logo:hover { transform: translateY(-1px); }
.nav-logo img { height: 32px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 560px) {
  .nav-inner { height: 56px; }
  .nav-logo img { height: 28px; }
  .nav .btn { padding: 9px 14px; font-size: 13px; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
  white-space: nowrap;
  position: relative;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn-primary {
  background: var(--teal);
  color: var(--bg);
  border-color: var(--teal);
}
.btn-primary:hover {
  background: #4ad8d0;
  border-color: #4ad8d0;
  box-shadow: 0 8px 28px -10px rgba(50,204,196,0.6);
}

.btn-grad {
  background: var(--brand-grad-warm);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #1a0c00;
  transition: background-position 600ms ease, transform var(--ease), box-shadow var(--ease);
}
.btn-grad:hover {
  background-position: 100% 50%;
  box-shadow: 0 12px 30px -10px rgba(211,103,5,0.5);
}

.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ============================================================
   Eyebrow + Chip
   ============================================================ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 24px;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow.no-bar::before { display: none; }
.eyebrow.warm { color: var(--orange); }
.eyebrow.yellow { color: var(--yellow); }
.eyebrow.muted { color: var(--muted); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.chip.solid { background: var(--bg-elev-2); color: var(--paper); }
.chip.teal { background: rgba(50,204,196,0.12); border-color: rgba(50,204,196,0.35); color: var(--teal); }
.chip.warm { background: rgba(211,103,5,0.12); border-color: rgba(211,103,5,0.35); color: #ff9344; }
.chip.green { background: rgba(139,202,58,0.12); border-color: rgba(139,202,58,0.35); color: var(--green); }
.chip.yellow { background: rgba(234,200,0,0.12); border-color: rgba(234,200,0,0.35); color: var(--yellow); }

.chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(50,204,196,0.18);
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   Typography helpers
   ============================================================ */

.h-display {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.h-display-xl {
  font-size: clamp(52px, 8.6vw, 116px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 900;
}
.h-section {
  font-size: clamp(30px, 4vw, 56px);
  letter-spacing: -0.015em;
  font-weight: 800;
}
.h-card {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lead {
  font-family: 'Nunito Sans', sans-serif;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
  max-width: 62ch;
  text-wrap: pretty;
}

.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
}
.card-hover-teal:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.card-elev-2 { background: var(--bg-elev-2); }
.card-rail   { background: var(--bg-rail); }
.card-flat   { background: transparent; border-color: var(--border); }

/* ============================================================
   Footer — identique sur toutes les pages
   ============================================================ */

.foot {
  background: var(--bg-rail);
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  margin-top: 80px;
  position: relative;
  z-index: 1;
}
.foot-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.foot-logo img { height: 30px; width: auto; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.foot-links a {
  color: var(--muted);
  transition: color var(--ease);
}
.foot-links a:hover { color: var(--teal); }
.foot-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* ============================================================
   Section utilities
   ============================================================ */

.section {
  padding: 96px 0;
  position: relative;
}
.section-sm { padding: 64px 0; }
.section-lg { padding: 128px 0; }

.section-divider {
  border-top: 1px solid var(--border);
  padding-top: 96px;
}

.hr-grad {
  height: 1px;
  border: 0;
  background: var(--brand-grad);
  opacity: 0.4;
  margin: 0;
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(.16,1,.3,1), transform 700ms cubic-bezier(.16,1,.3,1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section-lg { padding: 80px 0; }
  :root { --gutter: 20px; }
}
