/* ---------- Tokens ---------- */
:root{
  --bg: #0a0a0c;
  --bg-raise: #101114;
  --surface: #141519;
  --surface-2: #1b1d22;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #ecedf0;
  --text-muted: #8b929e;
  --text-faint: #5b606b;

  --green: #3ed598;
  --green-dim: rgba(62,213,152,0.14);
  --blue: #5b9dff;
  --blue-dim: rgba(91,157,255,0.14);
  --amber: #f2b84b;
  --amber-dim: rgba(242,184,75,0.14);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --wrap: 1160px;
  --radius: 14px;
  --radius-sm: 8px;
}

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

html{ scroll-behavior: smooth; scroll-padding-top: 84px; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3, h4{
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

p{ margin: 0; color: var(--text-muted); }

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

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

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

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible{
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* faint film-grain / noise overlay for depth */
.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10,10,12,0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

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

.brand-mark{
  border-radius: 10px;
  object-fit: cover;
}

.brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
}

.brand-sub{
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--green);
  margin-top: 2px;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a{
  font-size: 14.5px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover{ color: var(--text); }

.nav-cta{
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
}

.nav-cta:hover{
  border-color: var(--green);
  background: var(--green-dim);
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span{
  display: block;
  height: 2px;
  margin: 0 8px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero::before{
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 700px;
  background: radial-gradient(ellipse at 30% 0%, rgba(62,213,152,0.10), transparent 60%);
  pointer-events: none;
}

.hero-inner{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-title{
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
}

.hero-title .line{
  display: block;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s cubic-bezier(.2,.7,.3,1) forwards;
}

.hero-title .line:nth-child(2){ animation-delay: 0.12s; }

@keyframes rise{
  to{ opacity: 1; transform: translateY(0); }
}

.hero-lede{
  margin-top: 22px;
  max-width: 46ch;
  font-size: 17px;
  color: var(--text-muted);
  opacity: 0;
  animation: rise 0.7s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: 0.24s;
}

.hero-actions{
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 0.7s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: 0.34s;
}

.hero-stats{
  display: flex;
  gap: 36px;
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: rise 0.7s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: 0.44s;
}

.hero-stats dt{
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--green);
}

.hero-stats dd{
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}

.hero-visual{
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-glow{
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62,213,152,0.18), transparent 70%);
  filter: blur(10px);
}

.hero-orbit{
  position: absolute;
  width: 100%;
  height: 100%;
  animation: spin 60s linear infinite;
}

@keyframes spin{ to{ transform: rotate(360deg); } }

.hero-squirrel{
  position: relative;
  width: 78%;
  border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  opacity: 0;
  animation: glide-in 0.9s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: 0.2s;
}

@keyframes glide-in{
  from{ opacity: 0; transform: translate(30px, -20px) scale(0.94); }
  to{ opacity: 1; transform: translate(0,0) scale(1); }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.btn-primary{
  background: var(--green);
  color: #06130d;
}

.btn-primary:hover{ transform: translateY(-2px); background: #4de3a5; }

.btn-ghost{
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover{ border-color: var(--green); color: var(--green); transform: translateY(-2px); }

.btn-large{
  padding: 17px 30px;
  font-size: 16px;
}

/* ---------- Manifesto ---------- */
.manifesto{
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.manifesto p{
  max-width: 62ch;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.65;
  color: #c7cbd2;
  font-family: var(--font-display);
  font-weight: 400;
  text-align: center;
}

/* ---------- Section shared ---------- */
section{ padding: 100px 0; }

.section-title{
  font-size: clamp(26px, 3vw, 34px);
}

.section-lede{
  margin-top: 12px;
  max-width: 56ch;
  font-size: 16px;
}

/* ---------- Expertise (bento) ---------- */
.bento{
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-card{
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.bento-card:hover{
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.bento-card--wide{ grid-column: span 2; }

.bento-card h3{
  font-size: 19px;
  margin-bottom: 12px;
}

.bento-card p{ font-size: 14.5px; }

/* ---------- Réalisations ---------- */
.portfolio-group{ margin-top: 56px; }
.portfolio-group:first-of-type{ margin-top: 48px; }

.portfolio-group-title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 22px;
}

.dot{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.dot--amber{ background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.dot--blue{ background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.dot--green{ background: var(--green); box-shadow: 0 0 12px var(--green); }

.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card{
  position: relative;
  padding: 26px 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card:hover{
  transform: translateY(-4px);
  background: var(--surface-2);
}

.project-card--amber{ border-left-color: var(--amber); }
.project-card--amber:hover{ border-color: var(--amber-dim); border-left-color: var(--amber); }
.project-card--blue{ border-left-color: var(--blue); }
.project-card--blue:hover{ border-color: var(--blue-dim); border-left-color: var(--blue); }
.project-card--green{ border-left-color: var(--green); }
.project-card--green:hover{ border-color: var(--green-dim); border-left-color: var(--green); }

.project-card-head{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card-head h4{
  font-size: 16.5px;
  font-weight: 600;
}

.project-tag{
  align-self: flex-start;
  font-size: 11.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
}

.project-card p{
  font-size: 14px;
  flex: 1;
}

.project-meta{
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.project-meta li{
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--font-display);
}

/* ---------- Stack ---------- */
.stack{
  background: var(--bg-raise);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stack-inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.stack-copy p{ margin-top: 16px; font-size: 15.5px; max-width: 48ch; }

.stack-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-badges li{
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
}

/* ---------- Approche ---------- */
.approche-steps{
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 48px;
}

.approche-steps li{
  display: flex;
  gap: 20px;
}

.step-index{
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--green);
}

.approche-steps h3{
  font-size: 17px;
  margin-bottom: 8px;
}

.approche-steps p{ font-size: 14.5px; }

/* ---------- Contact ---------- */
.contact{
  text-align: center;
}

.contact-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact .section-lede{
  margin-left: auto;
  margin-right: auto;
}

.contact-form{
  margin-top: 40px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.form-row{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label{
  font-size: 13.5px;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea{
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.18s ease;
}

.form-row input:focus,
.form-row textarea:focus{
  border-color: var(--green);
  outline: none;
}

.form-row--hp{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-form .btn{
  align-self: center;
  margin-top: 6px;
  border: none;
  cursor: pointer;
}

.contact-form .btn:disabled{
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.form-status{
  min-height: 20px;
  font-size: 14px;
  text-align: center;
  margin: 0;
}

.form-status.is-ok{ color: var(--green); }
.form-status.is-error{ color: #ff6f6f; }

.contact-alt{
  margin-top: 28px;
  font-size: 14px;
}

.contact-alt a{
  color: var(--green);
}

/* ---------- Footer ---------- */
.site-footer{
  padding: 44px 0;
  border-top: 1px solid var(--border);
}

.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand--footer .brand-name{ font-size: 15px; }
.brand--footer .brand-sub{ font-size: 10px; }

.footer-note, .footer-copy{
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 920px){
  .site-nav{
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  .site-nav.open{ transform: translateX(0); }
  .nav-toggle{ display: flex; }

  .hero-inner{ grid-template-columns: 1fr; }
  .hero-visual{ order: -1; max-width: 340px; margin: 0 auto; }

  .bento{ grid-template-columns: 1fr; }
  .bento-card--wide{ grid-column: span 1; }

  .portfolio-grid{ grid-template-columns: 1fr; }

  .stack-inner{ grid-template-columns: 1fr; }

  .approche-steps{ grid-template-columns: 1fr; }

  .footer-inner{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px){
  .hero-stats{ gap: 22px; flex-wrap: wrap; }
  section{ padding: 72px 0; }
}
