/* Ysamihal Labs homepage, shared by / (EN) and /fr/ (FR) */
:root {
  --ink: #0A0A0B;
  --ink-2: #1C1C1F;
  --ink-3: #2A2A2E;
  --paper: #F7F6F2;
  --white: #FFFFFF;
  --muted-dark: #8E8E96;
  --muted-light: #5C5C63;
  --accent: #8C9BFF;
  --accent-soft: #C9D0FF;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --text: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --max: 1120px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.01em; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(10, 10, 11, .72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.site-header .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -0.04em; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 26px; height: 26px; flex-shrink: 0; }
.logo-mark .l { fill: var(--accent); transition: fill .4s var(--ease); }
.logo-mark .r { fill: var(--paper); transition: fill .4s var(--ease); }
.site-header.is-light .logo-mark .l { fill: #3D4FE0; }
.site-header.is-light .logo-mark .r { fill: var(--ink); }
.header-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.header-nav .link { opacity: .7; transition: opacity .2s; }
.header-nav .link:hover { opacity: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--ink);
  font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 999px;
  transition: transform .25s var(--ease), background .4s var(--ease), color .4s var(--ease);
}
.pill:hover { transform: translateY(-1px); }
.site-header.is-light { background: rgba(247, 246, 242, .82); color: var(--ink); border-color: rgba(10, 10, 11, .08); }
.site-header.is-light .pill { background: var(--ink); color: var(--white); }
/* Language switch (EN at /, FR at /fr/) */
.lang {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; line-height: 1;
  padding: 7px 10px; border-radius: 999px; border: 1px solid currentColor; opacity: .6; transition: opacity .2s;
}
.lang:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; padding: 150px 20px 40px; position: relative; overflow: hidden;
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(48px, 8.4vw, 116px); line-height: .98; letter-spacing: -0.055em;
  max-width: 1100px;
}
.hero h1 .serif { font-size: 1.08em; }
.word { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(18px); }
.is-loaded .hero .word {
  opacity: 1; filter: blur(0); transform: none;
  transition: opacity 1s var(--ease), filter 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i) * 90ms + 150ms);
}
.hero-sub {
  margin-top: 36px; max-width: 520px; font-size: 18px; line-height: 1.6; color: var(--muted-dark);
  opacity: 0; transform: translateY(12px);
}
.is-loaded .hero-sub { opacity: 1; transform: none; transition: all 1s var(--ease) 1.1s; }
/* Hero orbit: app icons on an elliptical track, positioned by JS each frame */
.orbit { position: relative; width: min(1100px, 100%); height: 440px; margin-top: 24px; opacity: 0; transition: opacity 1.6s var(--ease) 1s; }
.is-loaded .orbit { opacity: 1; }
.orbit::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 460px; height: 220px; translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(140, 155, 255, .22), transparent); filter: blur(20px); pointer-events: none;
}
.orbit-item {
  position: absolute; left: 50%; top: 50%; width: 136px; height: 136px; margin: -68px 0 0 -68px;
  will-change: transform, opacity, filter; z-index: 1;
}
.orbit-item img { width: 100%; height: 100%; border-radius: 31px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 60px -10px rgba(0, 0, 0, .8); }

/* ---------- Pillars (stats-style) ---------- */
.pillars { padding: 8vh 20px 18vh; display: flex; flex-direction: column; align-items: center; gap: 15vh; text-align: center; }
.pillar { --p: 0; opacity: calc(.18 + var(--p) * .82); transform: scale(calc(.94 + var(--p) * .06)); will-change: opacity, transform; }
.pillar-big {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(56px, 10vw, 136px); line-height: 1; letter-spacing: -0.05em;
  display: flex; align-items: baseline; justify-content: center; gap: .18em; flex-wrap: wrap;
}
.pillar-big .serif { font-size: 1.1em; }
.pillar-cap { margin-top: 14px; font-size: clamp(17px, 1.8vw, 22px); color: #D6D6DC; }

/* ---------- About (word reveal) ---------- */
.about { padding: 6vh 0 22vh; }
.about-label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 40px; }
.reveal-text {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 3.9vw, 50px); line-height: 1.16; letter-spacing: -0.035em;
  max-width: 900px; margin-bottom: 12vh;
}
.reveal-text:last-child { margin-bottom: 0; }
.reveal-text .w { opacity: .12; filter: blur(6px); transition: opacity .5s var(--ease), filter .5s var(--ease); }
.reveal-text .w.on { opacity: 1; filter: blur(0); }

/* ---------- Products ---------- */
.products { background: var(--paper); color: var(--ink); padding: 140px 0 120px; }
.section-title {
  font-family: var(--display); font-weight: 400; text-align: center;
  font-size: clamp(44px, 6vw, 80px); line-height: 1; letter-spacing: -0.05em; margin-bottom: 64px;
}
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.product {
  position: relative; border-radius: 32px; overflow: hidden; min-height: 720px;
  display: flex; flex-direction: column; padding: 28px 28px 0;
  box-shadow: 0 40px 90px -30px var(--glow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.product.visible:hover { transform: translateY(-6px); box-shadow: 0 60px 120px -30px var(--glow); }
.product-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-brand { display: flex; align-items: center; gap: 12px; }
.product-brand img { width: 44px; height: 44px; border-radius: 11px; }
.product-name { font-size: 26px; font-weight: 700; letter-spacing: -0.04em; }
.product-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; background: rgba(10, 10, 11, .07);
  transition: background .2s;
}
.product-link:hover { background: rgba(10, 10, 11, .14); }
.product-link svg { width: 12px; height: 12px; }
.product-meta { margin-top: 18px; font-size: 14px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.product-meta svg { width: 14px; height: 14px; opacity: .8; }
.product ul { margin: 8px 0 0 22px; font-size: 14px; line-height: 1.7; opacity: .72; }
.product-shot { margin-top: auto; padding-top: 40px; display: flex; justify-content: center; }
.product-shot .phone {
  width: min(300px, 78%); border-radius: 44px 44px 0 0; padding: 10px 10px 0;
  background: rgba(10, 10, 11, .9); box-shadow: 0 -10px 40px rgba(0, 0, 0, .12);
  transform: translateY(40px); transition: transform .9s var(--ease);
}
.product.visible .product-shot .phone { transform: translateY(0); }
.product:hover .product-shot .phone { transform: translateY(-8px); }
.product-shot img { border-radius: 36px 36px 0 0; height: 440px; width: 100%; object-fit: cover; object-position: top; }

/* Stance card mirrors the app's own UI: black ground, red glow, sand-on-black sections */
.p-stance {
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(150, 24, 24, .55), transparent 60%),
    #000;
  color: #F6EFD2; --glow: rgba(228, 54, 54, .45);
  font-family: "Space Grotesk", var(--text);
}
.p-stance .product-name { font-family: "Space Grotesk", var(--display); }
.p-stance .product-link { background: rgba(246, 239, 210, .08); border: 1px solid #2A2720; }
.p-stance .product-link:hover { background: rgba(246, 239, 210, .16); }
.p-stance .product-brand img { box-shadow: 0 0 0 1px #2A2720; }
.stance-kicker { margin-top: 22px; font-size: 12px; font-weight: 700; letter-spacing: .26em; color: #E43636; }
.stance-label { margin-top: 22px; display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .18em; color: #E2DDB4; }
.stance-label::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: #E43636; }
.stance-tiles { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stance-tile { background: #121110; border: 1px solid #2A2720; border-radius: 18px; padding: 14px 16px; font-size: 14px; line-height: 1.45; }
.stance-tile strong { display: block; font-size: 15px; margin-bottom: 4px; color: #F6EFD2; }
.stance-tile span { color: #8A856B; }
.p-stance .phone { background: #1A1815; box-shadow: 0 0 0 1px #2A2720, 0 -20px 60px rgba(228, 54, 54, .18); }
/* Kadence card mirrors the app's UI: graphite ground, cyan brand, Barlow / Barlow Condensed, mode colours */
.p-kadence {
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(53, 213, 235, .24), transparent 60%),
    #0D1113;
  color: #F5F5F7; --glow: rgba(53, 213, 235, .4);
  font-family: "Barlow", var(--text);
}
.p-kadence .product-name { font-family: "Barlow Condensed", var(--display); font-size: 30px; line-height: 1.15; letter-spacing: .01em; text-transform: uppercase; }
.p-kadence .product-link { background: #35D5EB; color: #0D1113; font-weight: 700; box-shadow: 0 8px 24px -8px rgba(53, 213, 235, .8); }
.p-kadence .product-link:hover { background: #6BE2F2; }
.kad-kicker { margin-top: 22px; font-size: 12px; font-weight: 600; letter-spacing: .2em; color: #35D5EB; }
.kad-label { margin-top: 22px; font-size: 11px; font-weight: 600; letter-spacing: .16em; color: #8E8E93; }
.kad-tiles { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kad-tile { background: #1C2326; border-radius: 18px; padding: 14px 16px; font-size: 14px; line-height: 1.45; }
.kad-tile strong { display: block; margin-bottom: 4px; font-family: "Barlow Condensed", var(--display); font-size: 20px; line-height: 1.15; letter-spacing: .01em; text-transform: uppercase; }
.kad-tile span { color: #8E8E93; }
.kad-modes { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 999px; background: #1C2326; }
.kad-modes span {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 2px; border-radius: 999px;
  font-family: "Barlow Condensed", var(--display); font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 1.15; color: var(--m);
}
.kad-modes span::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kad-modes .on { background: var(--m); color: #0D1113; }
.p-kadence .phone { background: #1C2326; box-shadow: 0 0 0 1px #2A383C, 0 -20px 60px rgba(53, 213, 235, .16); }

.more { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 64px; font-size: 15px; color: var(--muted-light); }
.more::before, .more::after { content: ""; width: 40px; height: 1px; background: currentColor; opacity: .4; }

/* ---------- Expertise ---------- */
.expertise { background: var(--ink-2); padding: 140px 0; }
.expertise .section-title { color: var(--white); }
.exp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.exp-card {
  background: var(--ink); border-radius: 28px; overflow: hidden; text-align: center;
  padding: 36px 28px 0; min-height: 440px; display: flex; flex-direction: column;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.exp-card h3 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: -0.01em; }
.exp-card p { margin: 12px auto 0; max-width: 340px; font-size: 14px; line-height: 1.6; color: var(--muted-dark); }
.exp-art { margin-top: auto; height: 250px; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.exp-art::before {
  content: ""; position: absolute; left: 50%; bottom: 10%; width: 260px; height: 160px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(140, 155, 255, .22), transparent); pointer-events: none;
}
.exp-art svg { width: 300px; max-width: 100%; height: 240px; overflow: visible; position: relative; }
.exp-art .spin { transform-origin: 150px 140px; animation: spin 24s linear infinite; }
.exp-art .float { animation: float 6s ease-in-out infinite; }
.exp-art .pulse { animation: pulse 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Mission ---------- */
.mission { padding: 180px 0; text-align: center; }
.mission .about-label { margin-bottom: 32px; }
.mission blockquote {
  font-family: var(--display); font-weight: 400; margin: 0 auto; max-width: 1000px;
  font-size: clamp(36px, 5.4vw, 76px); line-height: 1.04; letter-spacing: -0.045em;
}

/* ---------- Contact band ---------- */
.contact { background: var(--accent-soft); color: var(--ink); padding: 130px 0; text-align: center; }
.contact h2 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 100px); line-height: .96; letter-spacing: -0.055em; }
.contact h2 .serif { color: #3D4FE0; }
.contact p { margin-top: 22px; font-size: 18px; color: #3A3A44; }
.contact .cta {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--white); font-weight: 600; font-size: 16px;
  padding: 16px 26px; border-radius: 999px; transition: transform .25s var(--ease);
}
.contact .cta:hover { transform: translateY(-2px); }

/* ---------- Footer ---------- */
footer { background: var(--ink); padding: 72px 0 40px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; }
.foot-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 14px; }
.foot-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.foot-grid a:hover { color: var(--accent); }
.foot-grid p { color: #C9C9CF; line-height: 1.6; }
.foot-legal { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--ink-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted-dark); }

/* ---------- Generic reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.legal-page { display: none; background: var(--paper); color: var(--ink); min-height: 100vh; padding: 120px 0 100px; }
.legal-page.active { display: block; }
.legal-page .container { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.legal-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted-light); margin-bottom: 40px; }
.legal-back svg { width: 16px; height: 16px; }
.legal-page h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.045em; line-height: 1; }
.legal-page h2 { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; margin: 40px 0 12px; }
.legal-page p, .legal-page li { font-size: 16px; line-height: 1.7; color: #3A3A40; }
.legal-page ul { margin: 8px 0 0 22px; }
.legal-page a { color: #3D4FE0; text-decoration: underline; }
.legal-updated { margin-top: 12px; font-family: var(--mono); font-size: 12px !important; color: var(--muted-light) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .product-grid, .exp-grid { grid-template-columns: 1fr; }
  .product { min-height: 640px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .header-nav .link { display: none; }
}
@media (max-width: 760px) {
  .hero { padding-top: 116px; }
  .hero-sub { margin-top: 24px; font-size: 16px; }
  .orbit { height: 300px; margin-top: 20px; }
  .orbit-item { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
  .orbit-item img { border-radius: 18px; }
  .orbit::after { width: 260px; height: 140px; }
}
@media (max-width: 480px) {
  .site-header .wrap { gap: 10px; }
  .logo { font-size: 19px; gap: 8px; }
  .header-nav { gap: 10px; }
  .pill { font-size: 13px; padding: 9px 14px; }
  .foot-grid { grid-template-columns: 1fr; }
  .product { padding: 22px 22px 0; border-radius: 26px; min-height: 600px; }
  .product-link span { display: none; }
  .product-link { padding: 10px; }
  .stance-tiles, .kad-tiles { grid-template-columns: 1fr; }
  .kad-modes span { font-size: 12px; letter-spacing: .04em; }
  .kad-modes span::before { display: none; }
  .product-shot img { height: 360px; }
  .products, .expertise { padding: 96px 0; }
  .section-title { margin-bottom: 40px; }
  .exp-card { min-height: 400px; }
  .mission { padding: 120px 0; }
  .contact { padding: 96px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .word, .hero-sub, .orbit, .reveal { opacity: 1 !important; filter: none !important; transform: none !important; }
  .pillar { opacity: 1 !important; transform: none !important; }
  .reveal-text .w { opacity: 1 !important; filter: none !important; }
}
