/* Bonap — site public (accueil + pages légales).
   Mêmes tokens que l'app (constants/theme.ts) : fond crème, bordeaux et
   terracotta en accents plats, coins très arrondis, Poppins pour les
   titres. Le corps de texte utilise une police système plutôt que
   General Sans : la licence Fontshare autorise General Sans sur le web en
   général mais interdit explicitement le "font serving" (auto-hébergement
   en @font-face) sans accord écrit — pour rester du bon côté de la
   licence, seule Poppins (servie officiellement par Google Fonts) est
   chargée ici. */

:root {
  --bg: #FBF3E7;
  --surface: #FFFBF2;
  --surface-alt: #F0E0C8;
  --border: #E3D0B4;
  --ink: #241512;
  --ink-soft: rgba(36, 21, 18, 0.68);
  --ink-faint: rgba(36, 21, 18, 0.45);
  --primary: #D9713C;
  --primary-dark: #C05F2F;
  --on-primary: #FBF3E7;
  --bordeaux: #6E2028;
  --bordeaux-dark: #57181E;
  --on-bordeaux: #FBF3E7;

  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Shadow-as-border: ring + lift + ambient (see make-interfaces-feel-better/surfaces.md) */
  --shadow-card:
    0px 0px 0px 1px rgba(36, 21, 18, 0.06),
    0px 2px 5px -2px rgba(36, 21, 18, 0.07),
    0px 10px 24px -8px rgba(36, 21, 18, 0.08);
  --shadow-card-hover:
    0px 0px 0px 1px rgba(36, 21, 18, 0.08),
    0px 4px 10px -3px rgba(36, 21, 18, 0.10),
    0px 16px 32px -10px rgba(36, 21, 18, 0.12);
  --shadow-pop:
    0px 0px 0px 1px rgba(36, 21, 18, 0.05),
    0px 8px 20px -6px rgba(36, 21, 18, 0.16),
    0px 24px 48px -16px rgba(36, 21, 18, 0.16);

  --font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --container: 1040px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 243, 231, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--bordeaux);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.wordmark-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--bordeaux);
  color: var(--on-bordeaux);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: var(--radius-full);
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

/* Hero */

.hero {
  position: relative;
  padding: 64px 0 88px;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  border-radius: var(--radius-full);
  z-index: 0;
}

.hero-shape.one {
  width: 340px;
  height: 340px;
  background: var(--bordeaux);
  opacity: 0.08;
  top: -120px;
  right: -80px;
}

.hero-shape.two {
  width: 220px;
  height: 220px;
  background: var(--primary);
  opacity: 0.12;
  bottom: -60px;
  left: -60px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-visual {
    order: -1;
    display: flex;
    justify-content: center;
  }
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 600;
  color: var(--bordeaux);
  margin-bottom: 28px;
  animation: rise 600ms var(--ease-out) both;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(217, 113, 60, 0.18);
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--ink);
  text-wrap: balance;
  animation: rise 650ms var(--ease-out) 60ms both;
}

h1 .accent {
  color: var(--bordeaux);
}

.hero p.lead {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 480px;
  text-wrap: pretty;
  animation: rise 650ms var(--ease-out) 130ms both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: rise 650ms var(--ease-out) 200ms both;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 600;
}

.badge-soon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Device mockup */

.hero-visual {
  animation: rise 750ms var(--ease-out) 180ms both;
}

.device {
  width: 250px;
  padding: 12px;
  border-radius: 46px;
  background: linear-gradient(160deg, #362019, var(--ink));
  box-shadow: var(--shadow-pop);
  transform: rotate(2deg);
}

.device-notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 18px;
  border-radius: var(--radius-full);
  background: #362019;
  z-index: 2;
}

.device-screen {
  position: relative;
  background: var(--bg);
  border-radius: 34px;
  overflow: hidden;
  padding: 34px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device-search {
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--surface);
  box-shadow: 0px 0px 0px 1px rgba(36, 21, 18, 0.06);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
}

.device-search svg {
  width: 13px;
  height: 13px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.device-search-bar {
  height: 7px;
  width: 60%;
  border-radius: var(--radius-full);
  background: var(--border);
}

.device-pills {
  display: flex;
  gap: 6px;
}

.device-pill {
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--surface-alt);
}

.device-pill.active {
  background: var(--ink);
  width: 52px;
}

.device-pill:not(.active) {
  width: 40px;
}

.device-card {
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.device-card.bordeaux {
  background: var(--bordeaux);
}

.device-card.terracotta {
  background: var(--primary);
}

.device-photo {
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(251, 243, 231, 0.16);
}

.device-title {
  height: 9px;
  width: 72%;
  border-radius: var(--radius-full);
  background: rgba(251, 243, 231, 0.92);
}

.device-meta {
  display: flex;
  gap: 6px;
}

.device-meta span {
  height: 14px;
  width: 34px;
  border-radius: var(--radius-full);
  background: rgba(251, 243, 231, 0.3);
}

/* Feature grid */

.section {
  padding: 40px 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-wrap: balance;
}

.section-sub {
  color: var(--ink-soft);
  margin: 0 0 44px;
  font-size: 16px;
  max-width: 480px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 760px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out);
  cursor: default;
}

.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.feature-step {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 0 0 14px;
  text-transform: uppercase;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px; /* concentric: 26px card inset gap ~ treated as its own surface */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.feature-icon svg {
  width: 23px;
  height: 23px;
}

.feature-icon.bordeaux {
  background: var(--bordeaux);
  color: var(--on-bordeaux);
}

.feature-icon.terracotta {
  background: var(--primary);
  color: var(--on-primary);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 56px;
  margin-top: 40px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 4px;
  font-size: 14px;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.footer-links a:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.footer-copy {
  font-size: 13px;
  color: var(--ink-faint);
}

/* Legal pages */

.legal-header {
  padding: 40px 0 36px;
  animation: rise 550ms var(--ease-out) both;
}

.legal-header .updated {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 10px 0 0;
}

.legal-header h1 {
  font-size: clamp(28px, 4.2vw, 38px);
  margin-bottom: 4px;
  animation: none;
}

.legal-body {
  max-width: 700px;
  padding-bottom: 72px;
}

.legal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  box-shadow: var(--shadow-card);
  animation: rise 600ms var(--ease-out) 80ms both;
}

@media (max-width: 600px) {
  .legal-card {
    padding: 28px 22px;
  }
}

.legal-card > p:first-child {
  margin-top: 0;
}

.legal-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin: 32px 0 10px;
}

.legal-card h2:first-of-type {
  margin-top: 8px;
}

.legal-card p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card strong {
  color: var(--ink);
}

.legal-card a {
  color: var(--bordeaux);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bordeaux);
  text-decoration: none;
  margin: 28px 0 0;
  padding: 8px 4px;
  transition: gap 150ms var(--ease-out);
}

.back-link:hover {
  gap: 9px;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

/* Shared entrance animation */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
