/* KALAZIMA — feuille de style unique, autonome (aucune dépendance externe).
   Direction : marque contemporaine, chaleureuse. Crème + espresso + terracotta. */

:root {
  --paper:   #f3ece1;   /* crème chaud */
  --paper-2: #ece2d3;
  --ink:     #211c17;   /* espresso */
  --body:    #564d42;
  --muted:   #a89b88;
  --line:    #e1d7c6;
  --accent:  #c25c39;   /* terracotta */
  --accent-d:#a94a2b;
  --accent-l:#dd8a55;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--body);
  background: var(--paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain texturé global (SVG inline, aucune requête externe) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .04; mix-blend-mode: multiply;
  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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wordmark, .block h2, .legal-head h1, .foot-bleed, .idx {
  font-family: "New York", ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 34px; }
a { color: inherit; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar { position: relative; z-index: 3; padding: 24px 0; opacity: 0; animation: rise .8s ease forwards .1s; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand-sm { font-weight: 600; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink); }
.brand-mail {
  font-size: 13.5px; color: var(--muted); letter-spacing: .01em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .32s ease, color .25s ease;
}
.brand-mail:hover { color: var(--accent); background-size: 100% 1px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 78vh; display: flex; flex-direction: column; }
.hero-glow {
  position: absolute; left: 50%; top: -10%;
  width: 820px; height: 820px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(194,92,57,.18) 0%, rgba(194,92,57,0) 62%);
  pointer-events: none; animation: breathe 12s ease-in-out infinite;
}
.cursor-glow {
  position: absolute; left: 0; top: 0; width: 460px; height: 460px;
  transform: translate(calc(var(--x, 50%) - 230px), calc(var(--y, 50%) - 230px));
  background: radial-gradient(circle, rgba(221,138,85,.20) 0%, rgba(221,138,85,0) 60%);
  opacity: 0; transition: opacity .5s ease; pointer-events: none; z-index: 1;
}
.hero-inner { position: relative; z-index: 2; text-align: center; margin: auto; padding: 64px 34px 40px; }
.emblem { color: var(--accent); margin-bottom: 32px; }
.emblem path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(.62,.04,.34,1) forwards .25s; }
.emblem path:nth-child(2) { animation-delay: .75s; animation-duration: .9s; }

.wordmark { margin: 0; line-height: .9; opacity: 0; animation: rise 1s cubic-bezier(.22,.61,.36,1) forwards .45s; }
.wordmark span {
  display: inline-block;
  font-size: clamp(64px, 16vw, 168px);
  letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, var(--accent-l) 50%, var(--ink) 62%, var(--ink) 100%);
  background-size: 230% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sheen 7s ease-in-out infinite 1.4s;
}
.tagline {
  margin: 28px 0 0; color: var(--body);
  font-size: clamp(14px, 2.3vw, 18px); font-weight: 500; letter-spacing: .04em;
  opacity: 0; animation: rise 1s cubic-bezier(.22,.61,.36,1) forwards .62s;
}

.scroll-cue { position: relative; z-index: 2; display: block; width: 1px; height: 54px; margin: 0 auto 30px; overflow: hidden; }
.scroll-cue span { position: absolute; inset: 0; background: var(--accent); transform-origin: top; animation: cue 2.1s cubic-bezier(.7,0,.3,1) infinite; }

/* ---------- Ticker ---------- */
.ticker {
  background: linear-gradient(100deg, var(--accent-d), var(--accent) 55%, var(--accent-l));
  color: var(--paper); overflow: hidden; padding: 20px 0;
  cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.ticker.dragging { cursor: grabbing; }
.ticker-track { display: inline-flex; align-items: center; white-space: nowrap; will-change: transform; }
.tk {
  font-family: "New York", ui-serif, Georgia, serif; font-size: clamp(20px, 3vw, 28px);
  font-style: italic; padding: 0 4px; letter-spacing: .005em;
}
.tk-peak { flex: none; margin: 0 28px; color: rgba(255,255,255,.72); }

/* ---------- Sections ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }

main { background: var(--paper); }
.block { padding: 92px 0; border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }

.row-aside { position: relative; padding-top: 6px; }
.idx {
  display: block; font-size: 76px; line-height: .8; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px var(--accent); opacity: .55; margin-bottom: 16px;
}
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.block h2 {
  margin: 0 0 20px; font-size: clamp(30px, 5vw, 46px); line-height: 1.08; letter-spacing: -.018em; color: var(--ink);
}
.lede { margin: 0; font-size: 18.5px; max-width: 54ch; }
.lede em { color: var(--accent-d); font-style: italic; }
.lede + .lede { margin-top: 16px; }

/* ---------- Page légale ---------- */
.legal-head { padding: 76px 0 8px; }
.legal-head .eyebrow { display: block; margin-bottom: 16px; }
.legal-head h1 { margin: 0; font-size: clamp(42px, 8vw, 76px); letter-spacing: -.03em; line-height: .96; color: var(--ink); }
.legal { padding: 44px 0 28px; }
.legal-item { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-item:first-child { border-top: none; }
.legal h2 { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-d); }
.legal p { margin: 0; font-size: 16px; }
.legal strong { color: var(--ink); }
.legal a { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.legal a:hover { color: var(--accent); }
.legal .back { margin-top: 38px; }
.legal .back a { border: none; color: var(--muted); }
.legal .back a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9bfb1; padding: 72px 0 0; overflow: hidden; }
.foot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-mail {
  color: var(--paper); font-size: clamp(20px, 3vw, 30px);
  font-family: "New York", ui-serif, Georgia, serif;
  background-image: linear-gradient(var(--accent-l), var(--accent-l));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .35s ease, color .25s ease;
}
.foot-mail:hover { color: var(--accent-l); background-size: 100% 1px; }
.foot-legal { font-size: 12.5px; letter-spacing: .08em; color: #8c8071; white-space: nowrap; }
.foot-legal a { color: #b3a796; }
.foot-legal a:hover { color: var(--paper); }
.foot-legal .sep { margin: 0 9px; color: #5a5044; }
.foot-bleed {
  margin: 36px 0 -.18em; text-align: center; line-height: .8;
  font-size: clamp(96px, 26vw, 360px); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(243,236,225,.14);
  user-select: none;
}

/* ---------- Keyframes ---------- */
@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes rise   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes breathe{ 0%,100% { opacity: .9; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.07); } }
@keyframes sheen  { 0%,100% { background-position: 130% 0; } 50% { background-position: -30% 0; } }
@keyframes cue    { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .hero { min-height: 70vh; }
  .hero-inner { padding: 40px 28px 24px; }
  .block { padding: 60px 0; }
  .row { grid-template-columns: 1fr; gap: 18px; }
  .row-aside { display: flex; align-items: center; gap: 16px; }
  .idx { font-size: 44px; margin-bottom: 0; }
  .ticker-track span { font-size: 18px; }
  .ticker-track i { margin: 0 20px; }
}

/* ---------- Réduction de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .emblem path { stroke-dashoffset: 0 !important; }
  .topbar, .wordmark, .tagline { opacity: 1 !important; }
  .wordmark span { background-position: 50% 0 !important; }
  .scroll-cue { display: none; }
}
