/* ============================================================
   FolkOS — site de présentation. Charte de marque (logo) :
   Navy #092134 · Forest-blue #054273 · Blue2 #0572BA · Blue #058DD1
   Green #65AD48 · Forest #1E7748 · Orange #F87120 · Red #EB4223
   Gradient signature : 135deg red→orange→green→blue→navy.
   ============================================================ */

:root {
  /* tokens de marque (constants) */
  --navy: #092134; --fblue: #054273; --blue2: #0572BA; --blue: #058DD1;
  --green: #65AD48; --forest: #1E7748; --orange: #F87120; --red: #EB4223;
  --grad: linear-gradient(135deg, #EB4223 0%, #F87120 25%, #65AD48 50%, #058DD1 75%, #054273 100%);
  --grad-cool: linear-gradient(120deg, #058DD1, #65AD48);
  --radius: 18px;
  --maxw: 1180px;
  --ff-display: 'Bricolage Grotesque', 'Sora', system-ui, sans-serif;
  --ff-body: 'Sora', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* THÈME SOMBRE (par défaut, recommandé) */
[data-theme="dark"] {
  --bg: #050A12; --surface: #092134; --surface-2: #0c2c47; --surface-3: #103355;
  --line: rgba(120, 170, 210, .14); --line-soft: rgba(120, 170, 210, .08);
  --text: #FFFFFF; --text-2: #B7C3CF; --faint: #6f8194;
  --primary: #058DD1; --secondary: #65AD48; --accent: #F87120;
  --glow: rgba(5, 141, 209, .45);
  --card: rgba(12, 39, 64, .55);
  color-scheme: dark;
}
/* THÈME CLAIR */
[data-theme="light"] {
  --bg: #F8FAFC; --surface: #FFFFFF; --surface-2: #eef3f8; --surface-3: #e6edf4;
  --line: rgba(9, 33, 52, .12); --line-soft: rgba(9, 33, 52, .07);
  --text: #092134; --text-2: #4d6173; --faint: #8499a8;
  --primary: #0572BA; --secondary: #1E7748; --accent: #F87120;
  --glow: rgba(5, 114, 186, .28);
  --card: rgba(255, 255, 255, .7);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--ff-body); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-weight: 400; letter-spacing: -0.01em;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Grain global subtil */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-green { background: linear-gradient(120deg, #65AD48, #1E7748); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───────── Boutons ───────── */
.btn { display: inline-flex; align-items: center; gap: .5em; font-family: var(--ff-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; transition: transform .18s, box-shadow .25s, background .2s, border-color .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn.block { display: flex; justify-content: center; width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 30px -8px var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--glow); background: var(--blue); }
.btn-secondary { background: var(--secondary); color: #06210f; box-shadow: 0 10px 30px -10px rgba(101, 173, 72, .5); }
.btn-secondary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ───────── Navigation ───────── */
.nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px clamp(16px, 5vw, 40px); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--ff-display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); box-shadow: 0 4px 14px -3px var(--glow); position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 6px; border-radius: 5px; background: var(--bg); opacity: .25; }
.brand-mark.sm { width: 26px; height: 26px; }
.brand-word { color: var(--text); }
.brand-os { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 28px; font-size: 14.5px; color: var(--text-2); font-weight: 500; }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--grad-cool); border-radius: 2px; transition: width .25s; }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
  padding: 8px 13px; border-radius: 999px; cursor: pointer; font-family: var(--ff-body); font-size: 13px; transition: border-color .2s, color .2s; }
.theme-toggle:hover { border-color: var(--primary); color: var(--text); }
.tt-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--grad); box-shadow: inset 0 0 0 3px var(--surface); }

/* ───────── Hero ───────── */
.hero { position: relative; padding: clamp(48px, 9vw, 110px) clamp(16px, 5vw, 40px) 60px; overflow: hidden; }
.hero-aura { position: absolute; inset: -20% -10% auto; height: 700px; pointer-events: none; z-index: 0; filter: blur(60px); opacity: .55;
  background:
    radial-gradient(40% 50% at 18% 30%, rgba(235, 66, 35, .35), transparent 70%),
    radial-gradient(35% 45% at 50% 20%, rgba(101, 173, 72, .30), transparent 70%),
    radial-gradient(45% 55% at 82% 35%, rgba(5, 141, 209, .42), transparent 70%); }
.hero-grid { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.hero-copy h1 { font-size: clamp(40px, 6.4vw, 76px); margin: 18px 0 22px; font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--secondary); background: color-mix(in srgb, var(--secondary) 14%, transparent); border: 1px solid color-mix(in srgb, var(--secondary) 35%, transparent);
  padding: 6px 13px; border-radius: 999px; }
.lede { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); max-width: 30em; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }
.hero-facts { display: flex; gap: 30px; margin-top: 40px; list-style: none; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts b { font-family: var(--ff-display); font-size: 30px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-facts span { font-size: 13px; color: var(--faint); }

/* ── Maquette bureau ── */
.mock { position: relative; }
.mock-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: var(--navy); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65), 0 0 0 1px var(--line-soft); }
.mock-wall { position: absolute; inset: 0; opacity: .9;
  background: radial-gradient(120% 90% at 80% 10%, rgba(5, 141, 209, .5), transparent 55%), radial-gradient(90% 80% at 10% 90%, rgba(101, 173, 72, .35), transparent 55%), linear-gradient(160deg, #082138, #061626); }
.mock-icons { position: absolute; top: 14px; left: 14px; display: grid; gap: 14px; font-size: 22px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .4)); }
.win { position: absolute; border-radius: 11px; overflow: hidden; background: var(--surface); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .7); }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 8px 11px; background: #0d2a45; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.win-bar.alt { background: #103a2a; } .win-bar.dark { background: #060d15; }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c4d6b; }
.win-bar i:first-child { background: var(--red); } .win-bar i:nth-child(2) { background: var(--orange); } .win-bar i:nth-child(3) { background: var(--green); }
.win-t { font-size: 11px; color: #9fb6cc; margin-left: 6px; font-weight: 500; }
.win-browser { top: 12%; left: 20%; width: 62%; }
.win-body { display: flex; min-height: 120px; }
.nx-side { width: 34px; background: #07203a; padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.nx-s { width: 16px; height: 5px; border-radius: 3px; background: #234864; }
.nx-s.on { background: var(--blue); width: 18px; }
.nx-main { flex: 1; padding: 14px; }
.nx-h { width: 55%; height: 12px; border-radius: 4px; background: var(--grad-cool); margin-bottom: 12px; }
.nx-l { height: 7px; border-radius: 4px; background: #1c3e5b; margin: 7px 0; }
.nx-l.short { width: 60%; }
.nx-card { height: 34px; border-radius: 8px; background: #0e2c48; border: 1px solid rgba(255, 255, 255, .06); margin-top: 12px; }
.win-music { bottom: 16%; left: 7%; width: 30%; }
.win-body.music { padding: 12px; align-items: center; gap: 10px; min-height: 0; }
.mu-art { width: 42px; height: 42px; border-radius: 8px; background: var(--grad); flex: 0 0 auto; }
.mu-eq { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.mu-eq span { width: 4px; background: var(--green); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.mu-eq span:nth-child(2) { animation-delay: .15s; } .mu-eq span:nth-child(3) { animation-delay: .3s; } .mu-eq span:nth-child(4) { animation-delay: .45s; }
.mu-eq span:nth-child(5) { animation-delay: .2s; } .mu-eq span:nth-child(6) { animation-delay: .35s; } .mu-eq span:nth-child(7) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 8px; } 50% { height: 30px; } }
.win-term { bottom: 13%; right: 8%; width: 40%; }
.win-body.term { background: #060d15; padding: 11px 13px; font-family: var(--ff-mono); font-size: 10.5px; line-height: 1.7; color: #cfe0f2; min-height: 0; }
.win-body.term b { color: var(--blue); } .win-body.term .ok { color: var(--green); }
.caret { animation: blink 1.05s step-end infinite; color: var(--orange); }
@keyframes blink { 50% { opacity: 0; } }
.mock-taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: color-mix(in srgb, var(--navy) 88%, black); border-top: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(6px); }
.tb-start { width: 22px; height: 22px; border-radius: 6px; background: var(--grad); }
.tb-app { font-size: 16px; opacity: .85; }
.tb-app.on { position: relative; }
.tb-app.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -7px; width: 14px; height: 3px; border-radius: 2px; background: var(--blue); }
.tb-clock { margin-left: auto; font-family: var(--ff-mono); font-size: 10.5px; color: #9fb6cc; }
.mock { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ───────── Ribbon ───────── */
.ribbon { height: 5px; background: var(--grad); background-size: 200% 100%; animation: slide 8s linear infinite; }
@keyframes slide { to { background-position: 200% 0; } }

/* ───────── Sections génériques ───────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(60px, 9vw, 110px) clamp(16px, 5vw, 40px); }
.sec-head { max-width: 720px; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(30px, 4.6vw, 50px); margin: 14px 0 16px; }
.sec-head p { color: var(--text-2); font-size: clamp(15px, 1.8vw, 18px); }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); }
.eyebrow.green { color: var(--secondary); }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; backdrop-filter: blur(8px); transition: transform .2s, border-color .2s, box-shadow .25s; }
.feat:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); box-shadow: 0 24px 50px -28px var(--glow); }
.feat-ico { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; margin-bottom: 16px; }
.i-blue { background: color-mix(in srgb, var(--blue) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 40%, transparent); }
.i-green { background: color-mix(in srgb, var(--green) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 40%, transparent); }
.i-orange { background: color-mix(in srgb, var(--orange) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 40%, transparent); }
.feat h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.02em; }
.feat p { color: var(--text-2); font-size: 14.5px; }
.feat strong { color: var(--text); }

/* Apps */
.apps { padding-top: 0; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.app { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; gap: 4px; transition: transform .18s, border-color .2s, background .2s; }
.app:hover { transform: translateY(-4px); border-color: var(--primary); background: var(--surface-3); }
.app-ico { font-size: 32px; line-height: 1; margin-bottom: 8px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.app b { font-size: 15px; letter-spacing: -0.01em; }
.app small { color: var(--faint); font-size: 12px; }
.app-more { border-style: dashed; color: var(--text-2); }

/* Éditions */
.ed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; align-items: stretch; }
.ed { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; display: flex; flex-direction: column; backdrop-filter: blur(8px); transition: transform .2s, box-shadow .3s; }
.ed-lite { border-top: 3px solid var(--green); }
.ed-pro { border-top: 3px solid var(--blue); }
.ed.featured { box-shadow: 0 30px 70px -34px var(--glow); }
.ed:hover { transform: translateY(-5px); }
.ed-flag { position: absolute; top: -12px; right: 22px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: #06210f; background: var(--grad-cool); padding: 5px 12px; border-radius: 999px; }
.ed-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ed-badge { font-family: var(--ff-display); font-size: 21px; font-weight: 700; }
.ed-badge b { font-weight: 800; }
.ed-lite .ed-badge b { color: var(--green); } .ed-pro .ed-badge b { color: var(--blue); }
.ed-for { font-size: 12px; color: var(--faint); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.ed-price { margin: 20px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.ed-price b { font-family: var(--ff-display); font-size: 34px; }
.ed-price span { color: var(--faint); font-size: 13px; }
.ed-pitch { color: var(--text-2); font-size: 14.5px; min-height: 44px; }
.ed-list { list-style: none; margin: 18px 0 26px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.ed-list li { position: relative; padding-left: 28px; font-size: 14.5px; color: var(--text-2); }
.ed-list li b { color: var(--text); }
.ed-list li::before { content: '✓'; position: absolute; left: 0; top: -1px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.ed-lite .ed-list li::before { color: var(--green); background: color-mix(in srgb, var(--green) 18%, transparent); }
.ed-pro .ed-list li::before { color: var(--blue); background: color-mix(in srgb, var(--blue) 18%, transparent); }
.tag { font-size: 11px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); padding: 1px 8px; border-radius: 6px; margin-left: 4px; }
.ed-note { text-align: center; color: var(--faint); font-size: 13.5px; margin-top: 26px; }

/* Open source */
.open { padding-top: 0; }
.open-card { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(34px, 6vw, 64px); border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--forest) 30%, var(--surface)), var(--surface)); }
.open-copy { position: relative; z-index: 2; max-width: 620px; }
.open-copy h2 { font-size: clamp(28px, 4vw, 46px); margin: 14px 0 16px; }
.open-copy p { color: var(--text-2); font-size: clamp(15px, 1.8vw, 18px); margin-bottom: 28px; }
.open-orbs span { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; z-index: 1; }
.open-orbs span:nth-child(1) { width: 220px; height: 220px; right: -40px; top: -50px; background: radial-gradient(circle, var(--blue), transparent 70%); }
.open-orbs span:nth-child(2) { width: 180px; height: 180px; right: 120px; bottom: -70px; background: radial-gradient(circle, var(--green), transparent 70%); }
.open-orbs span:nth-child(3) { width: 120px; height: 120px; right: -20px; bottom: 40px; background: radial-gradient(circle, var(--orange), transparent 70%); }

/* CTA final */
.cta { padding: clamp(50px, 8vw, 90px) clamp(16px, 5vw, 40px) clamp(70px, 9vw, 120px); position: relative; }
.cta-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.cta-inner h2 { font-size: clamp(34px, 6vw, 64px); }
.cta-inner p { color: var(--text-2); font-size: clamp(16px, 2vw, 19px); margin: 14px 0 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 54px clamp(16px, 5vw, 40px) 26px; background: var(--surface); }
.foot-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand .brand-word { font-family: var(--ff-display); font-size: 22px; font-weight: 800; display: inline; }
.foot-brand { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.foot-brand p { color: var(--faint); font-size: 13.5px; margin-top: 4px; }
.foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--text-2); font-size: 14px; padding: 5px 0; transition: color .2s; }
.foot-col a:hover { color: var(--primary); }
.foot-bottom { max-width: var(--maxw); margin: 40px auto 0; padding-top: 22px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--faint); font-size: 13px; }
.foot-grad { flex: 1; max-width: 220px; height: 4px; border-radius: 4px; background: var(--grad); }

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

/* ───────── Responsive ───────── */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .mock { max-width: 560px; margin: 8px auto 0; width: 100%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .hero-facts { gap: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .hero-cta { flex-direction: column; }
}
