@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500&display=swap');

:root {
  --bg: #0E0E0E;
  --bg-alt: #161616;
  --text: #F4F1EA;
  --text-secondary: #B8B5AC;
  --accent: #FF3B30;
  --border: rgba(244, 241, 234, 0.12);
  --maxw: 1100px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  font-size: 16px;
  animation: page-fade-in 0.5s ease forwards;
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
body.page-exit { opacity: 0; transition: opacity 0.25s ease; }

h1, h2, h3, .wordmark { font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.1; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }

/* ---------- Language toggle ---------- */
[data-lang="en"] .fr { display: none; }
[data-lang="fr"] .en { display: none; }

/* ---------- Hero word-split reveal ---------- */
.hero h1 .word-wrap { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.hero h1 .word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero h1 .word.in-view { transform: translateY(0); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1 .word { transform: none; transition: none; }
  body { opacity: 1; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Scroll progress bar ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent); z-index: 100; transition: width 0.1s linear;
}

/* ---------- Hero cursor blob ---------- */
.hero { position: relative; overflow: hidden; }
.hero-blob {
  position: absolute;
  top: 0; left: 0;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,59,48,0.18) 0%, rgba(255,59,48,0) 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* ---------- Magnetic buttons / tilt cards ---------- */
.btn, .card, .work-item { transition: transform 0.2s ease, opacity 0.15s ease, border-color 0.2s ease, background 0.15s ease; }

/* ---------- Stats band ---------- */
.stats-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 56px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat-number {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 56px;
  color: var(--text);
}
.stat-number::after { content: ''; }
.stat-label { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-secondary); margin-top: 8px; display: block; }

/* ---------- Instagram-style grid (social portfolio) ---------- */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: 16px;
  overflow: hidden;
}
.ig-tile {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-alt), rgba(255,59,48,0.10));
  border: 1px solid var(--border);
}
.ig-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ig-tile:hover img { transform: scale(1.06); }
.ig-tile .ig-placeholder-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: var(--text-secondary); letter-spacing: 1px;
  transition: opacity 0.3s ease;
}
.ig-tile:hover .ig-placeholder-label { opacity: 0.5; }
.portfolio-stat-line { color: var(--text-secondary); font-size: 15px; margin-top: 24px; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
header .container { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.wordmark { font-size: 22px; color: var(--text); }
.wordmark .dot { color: var(--accent); }

nav.main-nav { display: flex; align-items: center; gap: 32px; }
nav.main-nav a { font-size: 14px; letter-spacing: 0.3px; color: var(--text-secondary); transition: color 0.15s ease; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); }

.header-right { display: flex; align-items: center; gap: 24px; }

.lang-toggle { display: flex; border: 1px solid var(--border); border-radius: 100px; overflow: hidden; }
.lang-toggle button {
  background: none; border: none; color: var(--text-secondary);
  font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.5px;
  padding: 7px 14px; cursor: pointer;
}
[data-lang="fr"] .lang-toggle button[data-set="fr"],
[data-lang="en"] .lang-toggle button[data-set="en"] { background: var(--text); color: var(--bg); }

.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 100px; font-size: 14px; font-weight: 500;
  font-family: 'Inter', sans-serif; cursor: pointer; border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-primary { background: var(--text); color: var(--bg); border: 1px solid var(--text); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* ---------- Hero ---------- */
.hero { padding: 120px 0 100px; border-bottom: 1px solid var(--border); }
.eyebrow {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-secondary);
  margin-bottom: 24px; display: flex; align-items: center;
}
.eyebrow .accent-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 10px; }
.hero h1 { font-size: 60px; max-width: 820px; margin-bottom: 28px; }
.hero p.lede { font-size: 19px; color: var(--text-secondary); max-width: 580px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 96px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
.section-label { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.section-title { font-size: 36px; max-width: 600px; margin-bottom: 16px; }
.section-intro { color: var(--text-secondary); max-width: 540px; font-size: 16px; margin-bottom: 28px; }

/* ---------- Cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px; padding: 40px; transition: border-color 0.2s ease; }
.card:hover { border-color: var(--text-secondary); }
.card .index { font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: var(--accent); margin-bottom: 24px; }
.card h3 { font-size: 24px; margin-bottom: 14px; }
.card p { color: var(--text-secondary); font-size: 15px; }
.card ul { margin-top: 20px; padding-left: 0; list-style: none; }
.card li { font-size: 14px; color: var(--text-secondary); padding: 8px 0; border-top: 1px solid var(--border); }
.card li:first-child { border-top: none; }

/* ---------- Work grid ---------- */
.work-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}
.work-item {
  background: var(--bg); padding: 40px; min-height: 220px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
  transition: background 0.15s ease;
}
.work-item:hover { background: var(--bg-alt); }
.work-item .tag { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-secondary); }
.work-item h3 { font-size: 28px; margin-top: 16px; }
.work-item .desc { color: var(--text-secondary); font-size: 14px; margin-top: 10px; }
.work-item .rule { width: 28px; height: 3px; background: var(--accent); margin-top: 22px; transition: width 0.25s ease; }
.work-item:hover .rule { width: 48px; }
.work-item img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; }
.work-item-placeholder {
  width: 100%; height: 140px; border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-alt), rgba(255,59,48,0.08));
  border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
}
.work-item-placeholder span { font-family: 'Space Grotesk', sans-serif; font-size: 22px; color: var(--text-secondary); letter-spacing: 1px; }

/* ---------- Footer ---------- */
footer { padding: 64px 0 48px; }
footer .container { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 32px; }
footer .wordmark { font-size: 18px; margin-bottom: 12px; }
footer .col p, footer .col a { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; transition: color 0.15s ease; }
footer .col a:hover { color: var(--text); }
footer .copyright { color: var(--text-secondary); font-size: 12px; margin-top: 40px; }

/* ---------- CTA band ---------- */
.cta-band { padding: 96px 0; }
.cta-band h2 { font-size: 40px; max-width: 600px; margin-bottom: 32px; }

/* ---------- Contact form ---------- */
.field { margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--text-secondary); display: block; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; color: var(--text); font-family: 'Inter', sans-serif; font-size: 14px;
}
.field textarea { resize: vertical; }
.form-note { font-size: 13px; color: var(--text-secondary); margin-top: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero h1 { font-size: 38px; }
  .grid-2, .grid-3, .work-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 32px; }
  .ig-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .card, .work-item { padding: 28px; }
  nav.main-nav { display: none; }
  nav.main-nav.open {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg); padding: 24px; border-bottom: 1px solid var(--border); gap: 18px;
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .menu-toggle { display: block; }
  header .container { height: 72px; }
  section { padding: 64px 0; }
  .container { padding: 0 24px; }
  .hero-blob { width: 280px; height: 280px; }
}

@media (max-width: 480px) {
  .header-right .btn-primary { display: none; }
}
