/* Smart Colibri — « Le Papier à en-tête »
   Shared shell for the app pages served under smartcolibri.github.io.
   Source of truth: smartcolibri.github.io/index.html (tokens and components copied verbatim).
   Copy this file as-is into each app repo at docs/assets/sc.css, with the fonts in docs/assets/fonts/. */

@font-face {
  font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4'; font-style: italic; font-weight: 400 500; font-display: swap;
  src: url('fonts/source-serif-4-latin-wght-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('fonts/inter-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-padding-top: 88px; }

:root {
  --fs-display: clamp(46px, 6.6vw, 92px);
  --fs-display-m: clamp(42px, 11vw, 60px);
  --fs-headline: clamp(32px, 4.2vw, 54px);
  --fs-title: clamp(21px, 2vw, 25px);
  --fs-wordmark: 20px;
  --fs-lead: clamp(18px, 1.5vw, 20px);
  --fs-body: 16px;
  --fs-label: 14.5px;
  --fs-small: 12.5px;

  --white: #ffffff;
  --mist: #f4f6f9;
  --navy: #0f2340;
  --navy-deep: #0a1830;
  --ink: #16223a;
  --ink-body: #2b3445;
  --ink-mut: #5a6374;
  --ink-faint: #69717f;
  --line: #dde2ea;
  --line-strong: #c4ccd8;
  --line-navy: rgba(255, 255, 255, .16);
  --on-navy: #ffffff;
  --on-navy-mut: rgba(255, 255, 255, .72);

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 2px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

body {
  font-family: var(--serif); font-optical-sizing: auto;
  color: var(--ink-body); background: var(--white);
  overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}
img, video { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(15, 35, 64, .14); color: var(--ink); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 1000;
  background: var(--navy); color: var(--on-navy); font: 500 var(--fs-label) var(--sans);
  padding: 10px 18px; border-radius: var(--r); text-decoration: none;
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* ---------- TYPE ---------- */
.display { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.012em; color: var(--ink); text-wrap: balance; }
.display em { font-style: italic; font-weight: 400; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-mut); text-wrap: pretty; }
.rule-head { display: block; width: 40px; height: 1px; background: var(--ink-faint); margin-bottom: 28px; }
.eyebrow { display: block; font-family: var(--sans); font-size: var(--fs-small); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px; }
.meta { font-family: var(--sans); font-size: var(--fs-small); color: var(--ink-faint); }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r); padding: .1em .35em; color: var(--ink); }

/* ---------- NAV ---------- */
nav.site-nav {
  position: fixed; inset: 0 0 auto; z-index: 900; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
nav.site-nav.scrolled { border-bottom-color: var(--line); }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); --mark-eye: var(--white); }
.nav-logo .mark { width: 28px; height: 28px; }
.nav-logo-name { font-family: var(--serif); font-size: var(--fs-wordmark); font-weight: 500; letter-spacing: .005em; color: var(--navy); }
/* App name after the wordmark: « Smart Colibri / MacInside » */
.nav-app { font-family: var(--serif); font-size: var(--fs-wordmark); color: var(--ink-mut); }
.nav-app::before { content: "/"; color: var(--line-strong); margin: 0 10px 0 2px; }
.nav-app a { color: inherit; text-decoration: none; }
.nav-app a:hover { color: var(--navy); }
.nav-left { display: flex; align-items: center; min-width: 0; }
.nav-links { display: flex; gap: clamp(22px, 2.6vw, 40px); list-style: none; align-items: center; }
.nav-links a {
  font-family: var(--sans); font-size: var(--fs-label); color: var(--ink-body);
  text-decoration: none; letter-spacing: .01em; transition: color .25s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav-links .nav-cta { color: var(--navy); border: 1px solid var(--navy); padding: 9px 18px; border-radius: var(--r); font-weight: 500; transition: background .3s var(--ease), color .3s var(--ease); }
.nav-links .nav-cta:hover { background: var(--navy); color: var(--on-navy); text-decoration: none; }

/* ---------- BUTTONS ---------- */
.btn-p {
  display: inline-block; background: var(--navy); color: var(--on-navy);
  border: 1px solid var(--navy); border-radius: var(--r); padding: 15px 28px;
  font: 500 var(--fs-label) var(--sans); letter-spacing: .01em; text-decoration: none;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.btn-p:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn-g {
  display: inline-flex; align-items: center; gap: 10px; color: var(--navy);
  font: 500 var(--fs-label) var(--sans); text-decoration: none;
  padding: 6px 0; border-bottom: 1px solid var(--navy); transition: gap .35s var(--ease);
}
.btn-g:hover { gap: 16px; }
.actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.actions .meta { flex-basis: 100%; }

/* ---------- HERO ---------- */
.hero { padding: calc(72px + clamp(64px, 11vh, 120px)) 24px clamp(96px, 13vh, 150px); background: var(--white); }
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.hero h1 { font-size: var(--fs-display); line-height: 1.03; letter-spacing: -.014em; }
.hero-sub { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-mut); margin-bottom: 36px; max-width: 34em; }
.hero-icon { width: 96px; height: 96px; margin-bottom: 28px; }
.hero-media { max-width: 1180px; margin: clamp(56px, 8vw, 96px) auto 0; }
/* Compact hero for secondary pages (privacy, support) */
.hero--page { padding-bottom: clamp(48px, 7vh, 72px); }
.hero--page h1 { font-size: var(--fs-headline); }

/* ---------- SECTIONS ---------- */
section.sec { padding: clamp(96px, 13vh, 150px) 24px; }
.sec-light { background: var(--white); }
.sec-mist { background: var(--mist); }
.wrap { max-width: 1180px; margin: 0 auto; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(48px, 7vw, 80px); }
.sec-head h2 { font-size: var(--fs-headline); }
.sec-head--solo { grid-template-columns: 1fr; max-width: 48em; }

/* Ruled list (no cards): one row per item, hairlines between rows */
.rows { list-style: none; border-top: 1px solid var(--line-strong); }
.rows > li { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 12px clamp(24px, 4vw, 64px); padding: 22px 4px; border-bottom: 1px solid var(--line); }
.row-n { font-family: var(--serif); font-size: var(--fs-title); font-weight: 500; line-height: 1.25; color: var(--ink); }
.row-d { font-size: var(--fs-body); line-height: 1.6; color: var(--ink-mut); max-width: 46em; }
.row-d p + p, .row-d p + ul, .row-d ul + p { margin-top: 10px; }
.row-d ul { padding-left: 1.2em; }
.row-d a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Values / principles: columns opened by a strong hairline */
.vals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.vals--2 { grid-template-columns: repeat(2, 1fr); }
.vals--4 { grid-template-columns: repeat(4, 1fr); }
.val { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.val-n { font-family: var(--serif); font-style: italic; font-size: var(--fs-title); font-weight: 400; color: var(--navy); margin-bottom: 8px; }
.val-d { font-size: var(--fs-body); line-height: 1.55; color: var(--ink-mut); max-width: 34ch; }

/* Figures: sober screenshot frame */
.figure { margin: 0; }
.figure img, .figure video { border: 1px solid var(--line); border-radius: var(--r); background: var(--mist); }
.figure figcaption { font-family: var(--sans); font-size: var(--fs-small); color: var(--ink-faint); margin-top: 12px; }
.figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px); }
.figs--3 { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--rev > :first-child { order: 2; }

/* Long-form prose (privacy, support, legal) */
.prose { max-width: 68ch; font-size: 17px; line-height: 1.7; color: var(--ink-body); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-family: var(--serif); font-size: var(--fs-title); font-weight: 500; line-height: 1.25; color: var(--ink); margin-top: 2.4em; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.prose h3 { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--ink); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 500; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--sans); font-size: var(--fs-small); font-weight: 500; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; border-bottom-color: var(--line-strong); }
.prose details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.prose summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.prose details > * + * { margin-top: .6em; }
.prose pre { background: var(--mist); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }

/* ---------- FOOTER ---------- */
footer.site-footer { background: var(--navy); color: var(--on-navy); padding: 64px 24px 40px; }
.ft-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ft-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-navy); --mark-eye: var(--navy); }
.ft-logo .mark { width: 26px; height: 26px; }
.ft-name { font-family: var(--serif); font-size: var(--fs-wordmark); font-weight: 500; }
.ft-nav { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.ft-nav a { font-family: var(--sans); font-size: var(--fs-label); color: var(--on-navy-mut); text-decoration: none; transition: color .25s; }
.ft-nav a:hover { color: var(--on-navy); text-decoration: underline; text-underline-offset: 5px; }
.ft-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-navy); }
.ft-copy { font-family: var(--sans); font-size: var(--fs-small); color: var(--on-navy-mut); }
.ft-copy a { color: var(--on-navy-mut); text-decoration: none; }
.ft-copy a:hover { color: var(--on-navy); text-decoration: underline; text-underline-offset: 4px; }
footer.site-footer :focus-visible { outline-color: var(--on-navy); }

/* ---------- REVEAL ---------- */
.js .fu { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fu.d1 { transition-delay: .08s; }
.fu.d2 { transition-delay: .16s; }
.fu.v { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .hero-inner, .sec-head, .split { grid-template-columns: 1fr; align-items: start; }
  .sec-head { gap: 20px; }
  .split--rev > :first-child { order: 0; }
  .vals--4 { grid-template-columns: repeat(2, 1fr); }
  .figs--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  nav.site-nav { height: 64px; }
  html { scroll-padding-top: 80px; }
  .nav-links .hide-sm, .nav-app.hide-sm { display: none; }
  .hero { padding-top: calc(64px + 56px); }
  .hero h1 { font-size: var(--fs-display-m); }
  .hero--page h1 { font-size: var(--fs-headline); }
  .vals, .vals--2, .vals--4, .figs, .figs--3 { grid-template-columns: 1fr; gap: 28px; }
  .rows > li { grid-template-columns: 1fr; }
  .ft-in { flex-direction: column; text-align: center; }
  .ft-legal { gap: 8px; }
  .ft-nav { flex-direction: column; align-items: center; gap: 14px; }
}
@media (pointer: coarse) {
  .ft-nav a, .nav-links a:not(.nav-cta) { padding: 14px 6px; margin: -14px -6px; }
  .btn-g { min-height: 44px; padding-top: 12px; padding-bottom: 12px; }
  .ft-legal a { display: inline-block; padding: 15px 0; margin: -15px 0; }
  .nav-logo, .ft-logo { padding: 8px 0; margin: -8px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .js .fu { opacity: 1; transform: none; transition: none; }
  .btn-g, nav.site-nav { transition: none; }
}
