/* ============================================================
   zapia — site vitrine (cloud provider + studio web)
   Shared styles. Two themes: .theme-zapia (teal-ink), .theme-pizza (warm).
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=IBM+Plex+Mono:wght@500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ---- Design tokens (zapia default) ---- */
:root {
  --ink:        #081f22;
  --ink-2:      #0e282b;
  --ink-3:      #143538;
  --paper:      #ece9de;
  --paper-dim:  #c7cfcb;
  --muted:      #8fa9a8;
  --gold:       #f2b134;
  --gold-soft:  #f7c866;
  --mint:       #5fd9b4;
  --line:       rgba(236, 233, 222, 0.12);
  --line-soft:  rgba(236, 233, 222, 0.07);
  --live:       var(--gold);

  --bg:         var(--ink);
  --surface:    var(--ink-2);
  --surface-2:  var(--ink-3);
  --text:       var(--paper);
  --text-dim:   var(--paper-dim);
  --accent:     var(--gold);
  --link:       var(--mint);

  --maxw: 1140px;
  --pad: clamp(1.25rem, 4vw, 2.75rem);
  --radius: 14px;
  --radius-lg: 22px;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --dur: 420ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Pizza theme (Super Pizza promo page) ---- */
.theme-pizza {
  --bg:        #fbf6ef;
  --surface:   #ffffff;
  --surface-2: #f4ebdd;
  --text:      #241a16;
  --text-dim:  #6b5b50;
  --muted:     #8a7868;
  --accent:    #d6482b;   /* tomato */
  --link:      #b03a22;
  --gold:      #e8a93a;
  --mint:      #4f8a3d;   /* basil */
  --live:      #4f8a3d;
  --line:      rgba(36, 26, 22, 0.12);
  --line-soft: rgba(36, 26, 22, 0.07);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }

/* ---- Language toggle visibility ---- */
html[lang="fr"] .en { display: none !important; }
html[lang="en"] .fr { display: none !important; }

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section + .section { padding-top: 0; }

/* ---- Typography ---- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.1rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }
p { margin: 0 0 1.1em; max-width: 64ch; }
strong { font-weight: 600; color: var(--text); }

.lede { font-size: clamp(1.1rem, 1.02rem + 0.5vw, 1.4rem); line-height: 1.5; color: var(--text-dim); max-width: 56ch; }

.mono { font-family: var(--font-mono); font-variant-ligatures: none; }

/* ---- Header ---- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.04em; color: var(--text); display: inline-flex; align-items: center; gap: 0.5ch; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
.nav a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav-links { display: flex; gap: clamp(0.75rem, 2vw, 1.6rem); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---- Language toggle ---- */
.lang-toggle {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.8rem; cursor: pointer; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 0.5ch;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-toggle:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.lang-toggle .cur { color: var(--accent); }
.lang-toggle .sep { opacity: 0.4; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6ch;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.35rem; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-primary { background: var(--accent); color: #1a1205; }
.theme-pizza .btn-primary { color: #fff; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }

/* ---- Hero ---- */
.hero { position: relative; padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 1.1rem; }
.hero .accent-word { color: var(--accent); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }
.hero-meta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1.6rem; color: var(--muted); font-size: 0.92rem; }
.hero-meta b { color: var(--text); font-family: var(--font-display); font-weight: 700; }

/* portrait card */
.portrait {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.55);
}
.portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: saturate(1.02); }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--ink) 85%, transparent) 100%); pointer-events: none; }
.theme-pizza .portrait::after { display: none; }
.portrait .tag {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  color: var(--paper); background: rgba(8,31,34,0.6); backdrop-filter: blur(6px);
  border: 1px solid rgba(236,233,222,0.18); border-radius: 999px; padding: 0.3rem 0.7rem;
}
.portrait .caption {
  position: absolute; left: 16px; bottom: 14px; z-index: 2; right: 16px;
  font-size: 0.85rem; color: var(--paper-dim);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 70%, transparent); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ---- Fleet rail ---- */
.fleet { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-top: clamp(2.5rem, 6vw, 4rem); }
.fleet-inner { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.fleet-inner::-webkit-scrollbar { display: none; }
.fleet-label { flex: 0 0 auto; align-self: center; color: var(--muted); font-size: 0.82rem; padding: 1.1rem 1.4rem 1.1rem 0; white-space: nowrap; border-right: 1px solid var(--line-soft); margin-right: 1.4rem; }
.fleet-item {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.15rem;
  padding: 1.1rem 1.6rem 1.1rem 0; white-space: nowrap;
  opacity: 0; transform: translateY(6px);
}
.fleet-item .name { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; display: inline-flex; align-items: center; gap: 0.55ch; }
.fleet-item .name::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: 0 0 auto; }
.fleet-item .host { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.is-in .fleet-item { animation: settle 560ms var(--ease) forwards; }
.is-in .fleet-item:nth-child(2) { animation-delay: 40ms; }
.is-in .fleet-item:nth-child(3) { animation-delay: 90ms; }
.is-in .fleet-item:nth-child(4) { animation-delay: 140ms; }
.is-in .fleet-item:nth-child(5) { animation-delay: 190ms; }
.is-in .fleet-item:nth-child(6) { animation-delay: 240ms; }
.is-in .fleet-item:nth-child(7) { animation-delay: 290ms; }
.is-in .fleet-item:nth-child(8) { animation-delay: 340ms; }
.is-in .fleet-item:nth-child(9) { animation-delay: 390ms; }
@keyframes settle { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fleet-item { opacity: 1 !important; transform: none !important; animation: none !important; } }

/* ---- Section head ---- */
.sec-head { max-width: 62ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.sec-rule { height: 2px; width: 46px; background: var(--accent); border: 0; margin: 0 0 1.4rem; }
.sec-head h2 { margin-bottom: 0.9rem; }
.sec-head p { color: var(--text-dim); margin-bottom: 0; }

/* ---- Feature grid ---- */
.grid { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.cell { background: var(--surface); padding: clamp(1.4rem, 3vw, 2rem); }
.cell h3 { margin-bottom: 0.55rem; }
.cell p { color: var(--text-dim); margin-bottom: 0; font-size: 0.98rem; }
.cell .ic { font-family: var(--font-mono); color: var(--accent); font-size: 0.95rem; margin-bottom: 0.9rem; display: block; }

/* ---- Split (text + aside) ---- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.25rem); }
.aside-card h3 { margin-bottom: 1rem; }
.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.stack li { display: flex; gap: 0.8ch; align-items: baseline; color: var(--text-dim); }
.stack li::before { content: "→"; color: var(--accent); font-weight: 700; flex: 0 0 auto; }

/* ---- Offers ---- */
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 820px) { .offers { grid-template-columns: 1fr; } }
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3.5vw, 2.1rem); display: flex; flex-direction: column; }
.offer.feat { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.offer h3 { margin-bottom: 0.35rem; }
.offer .price { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--text); margin: 0.4rem 0 1rem; }
.offer .price small { font-family: var(--font-body); font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.offer ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.6rem; font-size: 0.95rem; color: var(--text-dim); }
.offer ul li { display: flex; gap: 0.7ch; }
.offer ul li::before { content: "✓"; color: var(--mint); font-weight: 700; }
.offer .btn { margin-top: auto; justify-content: center; }

/* ---- Work grid ---- */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 820px) { .work { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .work { grid-template-columns: 1fr; } }
.work a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; color: var(--text); display: flex; flex-direction: column; gap: 0.3rem; transition: border-color var(--dur) var(--ease); }
.work a:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.work .n { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.work .r { color: var(--muted); font-size: 0.86rem; }
.work .h { font-family: var(--font-mono); color: var(--mint); font-size: 0.78rem; margin-top: 0.4rem; }

/* ---- CTA band ---- */
.cta-band { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.cta-band h2 { margin-bottom: 0.8rem; }
.cta-band p { margin-inline: auto; color: var(--text-dim); }
.cta-band .hero-cta { justify-content: center; margin-top: 1.6rem; }

/* ---- Pizza feature list with emoji marks ---- */
.pizza-hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.pill { display: inline-flex; align-items: center; gap: 0.5ch; font-size: 0.85rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 999px; padding: 0.35rem 0.85rem; }
.trustline { display: flex; flex-wrap: wrap; gap: 1.2rem; color: var(--muted); font-size: 0.9rem; margin-top: 1.6rem; }
.trustline span { display: inline-flex; align-items: center; gap: 0.5ch; }
.trustline span::before { content: "•"; color: var(--mint); }

/* ---- Footer ---- */
.site-foot { border-top: 1px solid var(--line-soft); padding-block: 2.5rem; margin-top: clamp(3rem, 7vw, 5rem); color: var(--muted); font-size: 0.9rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.site-foot a { color: var(--text-dim); }
.site-foot a:hover { color: var(--text); }
.foot-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }

/* ---- Hero load animation (one orchestrated moment) ---- */
.rise { opacity: 0; transform: translateY(14px); }
.is-ready .rise { animation: rise 680ms var(--ease) forwards; }
.is-ready .rise.d1 { animation-delay: 90ms; }
.is-ready .rise.d2 { animation-delay: 180ms; }
.is-ready .rise.d3 { animation-delay: 270ms; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1 !important; transform: none !important; animation: none !important; } }

/* ---- Editorial article (zapia press piece) ---- */
.article { padding-block: clamp(2.5rem, 6vw, 4.75rem); }
.article-col { max-width: 760px; margin-inline: auto; }
.kicker { display: inline-flex; align-items: center; gap: 0.75ch; font-size: 0.82rem; font-weight: 600; color: var(--accent); margin-bottom: 1.5rem; }
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block; }
.article-head h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.6rem); letter-spacing: -0.028em; margin-bottom: 1.1rem; }
.deck { font-family: var(--font-body); font-size: clamp(1.14rem, 1.04rem + 0.5vw, 1.45rem); line-height: 1.5; color: var(--text-dim); font-weight: 400; margin: 0 0 1.7rem; max-width: 62ch; }
.byline { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; border-top: 1px solid var(--line-soft); padding-top: 1.1rem; margin: 0; }
.figure { margin: clamp(2rem, 5vw, 3.25rem) 0; }
.figure img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.figcaption { margin-top: 0.85rem; font-size: 0.86rem; line-height: 1.45; color: var(--muted); max-width: 60ch; }
.article-body { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); line-height: 1.75; }
.article-body p { max-width: 68ch; margin: 0 0 1.4em; color: var(--text); }
.article-body > p:first-of-type::first-letter { font-family: var(--font-display); font-weight: 800; float: left; font-size: 3.4em; line-height: 0.8; padding: 0.04em 0.14em 0 0; color: var(--accent); }
.subhead { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.7rem); letter-spacing: -0.02em; margin: 2.1em 0 0.65em; }
.pullquote { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.15rem); line-height: 1.22; letter-spacing: -0.02em; color: var(--text); border-left: 3px solid var(--accent); padding: 0.1em 0 0.1em 0.9em; margin: 1.5em 0; max-width: none; }
.article-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.endnote { margin-top: 2.3em; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); color: var(--text-dim); font-size: 1.05rem; max-width: 68ch; }
.endnote a { color: var(--accent); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---- Focus ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
