/* =========================================================
   TECHTAN Consulting — Design System
   Bold & colorful, dark-first. Shared across pages (home, CV…).
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces — built from the logo's dark slate (#203840) */
  --bg:            #0a1417;
  --bg-soft:       #0f1d21;
  --surface:       rgba(255, 255, 255, 0.035);
  --surface-2:     rgba(255, 255, 255, 0.06);
  --surface-3:     rgba(255, 255, 255, 0.09);
  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Text */
  --text:    #eef4f2;
  --muted:   #93aaa6;
  --muted-2: #6f8884;

  /* Brand colors — the two logo colors + tints/shades for depth */
  --ink:         #203840; /* logo dark slate */
  --mint:        #78b0a0; /* logo mint */
  --mint-bright: #9ad6c0; /* lighter mint, pops on dark */
  --mint-deep:   #4f8c7d; /* deeper mint for gradient ends */
  --teal-deep:   #34655c;

  /* Signature gradients (two-tone: mint + slate) */
  --grad-brand: linear-gradient(120deg, #9ad6c0 0%, #4f8c7d 100%);
  --grad-brand-2: linear-gradient(135deg, #78b0a0 0%, #284a48 100%);
  --grad-soft: linear-gradient(120deg, rgba(120,176,160,.16), rgba(32,56,64,.20));
  --grad-text: linear-gradient(100deg, #c4ebdc 0%, #82bda9 65%);

  /* Effects */
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow:    0 24px 60px -28px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 18px 55px -22px rgba(120, 176, 160, 0.5);
  --ring:      0 0 0 1px var(--border);

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Space Grotesk", var(--font-body);

  /* Layout */
  --container: 1160px;
  --gutter: 6vw;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient page background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 12% -5%, rgba(120, 176, 160, 0.16), transparent 60%),
    radial-gradient(55% 45% at 95% 0%, rgba(52, 101, 92, 0.16), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, rgba(120, 176, 160, 0.12), transparent 60%),
    var(--bg);
}
/* Subtle grid texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 70% at 50% 20%, #000 30%, transparent 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}

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

.lead { color: var(--muted); font-size: clamp(16px, 1.5vw, 20px); max-width: 60ch; }

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

.section { padding: clamp(64px, 9vw, 128px) 0; position: relative; }
.section-head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 60px); display: grid; gap: 16px; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 50px); }

.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--btn-bg);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s, background .25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

.btn.primary {
  border: none;
  color: #0a1417;
  font-weight: 700;
  background: var(--grad-brand);
  background-size: 180% 180%;
  background-position: 0% 50%;
  box-shadow: var(--shadow-glow);
  animation: btnShift 8s ease infinite;
}
.btn.primary:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 22px 70px -18px rgba(79, 140, 125, 0.65); }

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

.btn.lg { padding: 16px 28px; font-size: 16px; }

@keyframes btnShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s, background .3s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s;
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mint-bright);
  background: rgba(120, 176, 160, 0.1);
  border: 1px solid rgba(120, 176, 160, 0.24);
  padding: 5px 11px;
  border-radius: 999px;
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
}
/* NB: .nav-inner also carries .container, so it inherits the gutter width.
   Do NOT set width:100% here — it would override the container gutter and
   push the logo/CTA to the screen edges. */
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Logo — real brand asset on a clean chip so it stays legible on dark */
.logo { display: inline-flex; align-items: center; }
.logo-img {
  box-sizing: content-box;
  height: 28px;
  width: auto;
  display: block;
  background: #ffffff;
  padding: 8px 13px;
  border-radius: 12px;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.7);
  transition: transform .25s;
}
.logo:hover .logo-img { transform: translateY(-1px); }
.footer .logo-img { height: 34px; }

/* Language switch */
.lang {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  position: relative;
}
.lang button {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color .25s;
}
.lang button[aria-pressed="true"] { color: #0a1417; }
.lang .pill {
  position: absolute;
  top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--grad-brand);
  transition: transform .3s cubic-bezier(.4,.1,.2,1);
}
.lang.en .pill { transform: translateX(100%); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .3s, opacity .2s;
}
.nav-toggle span::before { transform: translate(-50%, -8px); }
.nav-toggle span::after  { transform: translate(-50%, 6px); }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { transform: translate(-50%, 0) rotate(45deg); }
body.menu-open .nav-toggle span::after  { transform: translate(-50%, 0) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 90px)); padding-bottom: clamp(48px, 8vw, 110px); overflow: hidden; }
.hero-aurora { position: absolute; inset: -20% -10% auto -10%; height: 130%; z-index: -1; filter: blur(70px); opacity: .85; }
.blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.blob.b1 { width: 46vw; height: 46vw; left: -6vw; top: -8vw; background: radial-gradient(circle, rgba(134,205,178,.5), transparent 60%); animation: float1 16s ease-in-out infinite; }
.blob.b2 { width: 42vw; height: 42vw; right: -4vw; top: -4vw; background: radial-gradient(circle, rgba(52,101,92,.55), transparent 60%); animation: float2 19s ease-in-out infinite; }
.blob.b3 { width: 40vw; height: 40vw; left: 30vw; top: 12vw; background: radial-gradient(circle, rgba(159,224,200,.4), transparent 60%); animation: float3 22s ease-in-out infinite; }

@keyframes float1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(6%,8%) scale(1.12)} }
@keyframes float2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-7%,6%) scale(1.1)} }
@keyframes float3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(4%,-7%) scale(1.15)} }

.hero-inner { display: grid; gap: 26px; max-width: 900px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 78px); letter-spacing: -0.03em; }
.hero .lead { font-size: clamp(17px, 1.9vw, 22px); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
  width: max-content;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-bright); box-shadow: 0 0 0 4px rgba(120,176,160,.2); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Trust strip */
.trust { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 8px; }
.trust-item { display: flex; align-items: baseline; gap: 10px; }
.trust-item b { font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 26px); }
.trust-item span { color: var(--muted); font-size: 14px; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 0; width: max-content; animation: scrollX 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 12px; padding: 0 30px; font-family: var(--font-head); font-weight: 600; font-size: clamp(16px, 1.8vw, 22px); color: var(--muted); white-space: nowrap; }
.marquee-item::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grad-brand); }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- Service cards ---------- */
.service { display: grid; gap: 14px; }
.service .ico {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--mint);
}
.service .ico svg { width: 26px; height: 26px; }
.service h3 { font-size: 21px; }
.service p { color: var(--muted); font-size: 15px; }

/* ---------- Process / timeline ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { position: relative; padding-left: 76px; }
.step .num {
  counter-increment: step;
  position: absolute; left: 0; top: 0;
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.step .num::before { content: "0" counter(step); }
.step.active .num { background: var(--grad-brand); color: #0a1417; border: none; }
.step h3 { font-size: 19px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- Work cards ---------- */
.work { display: grid; gap: 14px; min-height: 210px; align-content: start; }
.work .tag { align-self: start; }
.work h3 { font-size: 22px; }
.work p { color: var(--muted); }
.work .glow { position: absolute; inset: auto -30% -50% auto; width: 60%; height: 80%; background: radial-gradient(circle, rgba(120,176,160,.4), transparent 70%); filter: blur(40px); opacity: 0; transition: opacity .4s; pointer-events: none; }
.work:hover .glow { opacity: 1; }

/* ---------- Why / feature list ---------- */
.feature { display: grid; gap: 12px; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border); color: var(--mint); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---------- Team ---------- */
.member { display: grid; gap: 16px; text-align: left; }
.avatar {
  width: 76px; height: 76px;
  border-radius: 20px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 26px;
  color: #0a1417;
  background: var(--grad-brand);
  box-shadow: var(--shadow-glow);
}
.member.android .avatar { background: var(--grad-brand-2); }
.member h3 { font-size: 22px; }
.member .role { color: var(--mint); font-family: var(--font-head); font-weight: 600; font-size: 14px; }
.member p { color: var(--muted); font-size: 15px; }
.member .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.member .chips .tag { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
/* A member card that links to a full CV */
.member.is-link { cursor: pointer; }
.card-cv-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--mint-bright); }
.card-cv-link .arrow { transition: transform .25s; }
.member.is-link:hover .card-cv-link .arrow { transform: translateX(4px); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.contact-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow); }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(120,176,160,.18); }
.contact-card .btn.primary { width: 100%; margin-top: 4px; }
.contact-note { color: var(--muted-2); font-size: 13px; margin-top: 14px; text-align: center; }

.contact-side { display: grid; gap: 22px; }
.contact-side h2 { font-size: clamp(28px, 4.4vw, 48px); }
.contact-direct { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: clamp(17px, 2vw, 22px); color: var(--text); width: max-content; }
.contact-direct:hover .gradient-text { filter: brightness(1.15); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; border-radius: var(--radius-lg); overflow: hidden; padding: clamp(36px, 6vw, 72px); text-align: center; background: var(--surface); border: 1px solid var(--border); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .9; z-index: -1; }
.cta-band h2 { font-size: clamp(26px, 4vw, 46px); margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 54ch; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer .tagline { color: var(--muted); max-width: 34ch; margin-top: 14px; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-col { display: grid; gap: 10px; }
.footer-col h4 { font-family: var(--font-head); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.footer-col a, .footer-col span { color: var(--muted); font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 13px; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Language visibility ---------- */
[data-lang-fr], [data-lang-en] { display: none; }
html[lang="fr"] [data-lang-fr] { display: revert; }
html[lang="en"] [data-lang-en] { display: revert; }

/* ---------- Utilities ---------- */
.only-mobile { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  body.menu-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 13px 16px; font-size: 16px; }
  .nav-links .btn { margin-top: 8px; }
  .only-mobile { display: inline-flex; }
  .nav-toggle { display: block; }
  .nav-cta-desktop { display: none; }
}
@media (max-width: 680px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .logo-word span { letter-spacing: 0.26em; }
  .trust { gap: 12px 26px; }
}

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