/* Petit Somme website. Tokens follow brand/visual-language/tokens.json v1.1.0 (day palette B, night palette for Dark Mode). */

@font-face {
  font-family: "Nunito PS";
  src: url("fonts/nunito-var.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ground: #FFFCF7;
  --surface: #FFFFFF;
  --sunk: #F9F2E9;
  --line: #EFE6DB;
  --ink: #3A2A23;
  --ink-soft: #6B574D;
  --honey: #FFDA7A;
  --honey-strong: #FFC94A;
  --honey-soft: #FFF0C2;
  --honey-line: #9C6C10;
  --on-honey: #3A2A23;
  --cloud: #DDECF9;
  --almond: #E3F0D5;
  --focus: #2F6FB0;
  --link: #8A5A12;
  --frame: #2B201B;
  --todo-bg: #FFE4CF;
  --todo-ink: #6A3A12;

  --e1: 0 1px 0 #3A2A230A, 0 8px 20px -12px #3A2A2340;
  --e2: 0 2px 0 #3A2A230D, 0 16px 32px -16px #3A2A2359;
  --e-phone: 0 2px 0 #3A2A2314, 0 30px 60px -28px #3A2A2380;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --display: ui-rounded, "SF Pro Rounded", "Nunito PS", -apple-system, system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;

  --gutter: 16px;
  --max: 1120px;
  --measure: 68ch;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #17110E;
    --surface: #231A15;
    --sunk: #1D1511;
    --line: #33271F;
    --ink: #DCC9B2;
    --ink-soft: #A8937E;
    --honey: #D99A48;
    --honey-strong: #D99A48;
    --honey-soft: #5A4126;
    --honey-line: #A87A3A;
    --on-honey: #17110E;
    --cloud: #4A5357;
    --almond: #4B5442;
    --focus: #D99A48;
    --link: #E8B26A;
    --frame: #0C0806;
    --todo-bg: #5A4126;
    --todo-ink: #FFE4CF;
    --e1: none;
    --e2: none;
    --e-phone: 0 30px 60px -30px #000000;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--honey-soft); color: var(--ink); }

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

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; transition: none; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  min-width: 0;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -60px;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--r-sm);
  z-index: 10;
}
.skip:focus-visible { top: 10px; }

/* Header */
.site-head { padding-block: 14px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand svg { width: 128px; height: auto; color: var(--ink); }
.head-links { display: flex; gap: 6px; align-items: center; }
.head-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink); text-decoration: none; font: 600 15px/1 var(--display); border-radius: var(--r-pill);
}
.head-links a:hover { background: var(--sunk); }
.head-links a[aria-current="page"] { background: var(--sunk); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 28px; border-radius: var(--r-pill); border: 0;
  background: var(--honey-strong); color: var(--on-honey);
  font: 700 17px/1.2 var(--display); text-decoration: none; text-align: center;
  box-shadow: var(--e2);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.btn:hover { background: var(--honey); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.quiet { background: var(--surface); color: var(--ink); box-shadow: var(--e1); }
@media (prefers-color-scheme: dark) { .btn.quiet { border: 1.5px solid var(--line); } }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* Phone frame around the real app renders (the render carries its own status bar) */
.phone {
  margin: 0;
  width: 100%;
  border-radius: 46px;
  padding: 7px;
  background: var(--frame);
  box-shadow: var(--e-phone);
}
.phone img { width: 100%; border-radius: 39px; aspect-ratio: 1206 / 2622; object-fit: cover; background: var(--sunk); }

/* Home: hero */
.hero { padding-block: 12px 56px; }
.hero .wrap { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 7vw + 1rem, 4.4rem); letter-spacing: -0.025em; max-width: 12ch; }
.hero .lead { margin-top: 16px; font-size: 1.16rem; line-height: 1.5; color: var(--ink-soft); max-width: 34ch; }
.hero .actions { margin-top: 24px; display: grid; gap: 12px; justify-items: start; }
.hero .price { font-size: 0.95rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hero .price strong { color: var(--ink); font-weight: 650; }
.hero-visual { position: relative; justify-self: center; width: min(76vw, 300px); }
.hero-visual .loir { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero-visual .phone { animation: rise 700ms var(--ease-out) both 80ms; }
  @keyframes rise { from { transform: translateY(16px); } to { transform: none; } }
}

@media (max-width: 480px) {
  .hero .btn { width: 100%; }
  .hero .actions { justify-items: stretch; }
}

@media (min-width: 880px) {
  .hero { padding-block: 40px 96px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; }
  .hero-visual { width: 320px; }
  .hero-visual .loir { display: block; position: absolute; z-index: 1; width: 170px; left: -150px; bottom: 60px; }
}

/* Home: sections */
.band { padding-block: 64px; }
.band.sunk { background: var(--sunk); }
.band h2 { font-size: clamp(1.8rem, 3vw + 1rem, 2.6rem); }
.band .sub { margin-top: 12px; color: var(--ink-soft); max-width: 46ch; }

.how { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.how li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 18px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e1);
}
.how .glyph {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--honey-soft); color: var(--ink);
}
.how .glyph svg { width: 22px; height: 22px; }
.how p { font-size: 1.02rem; }
.how strong { font-family: var(--display); font-weight: 750; display: block; font-size: 1.1rem; margin-bottom: 2px; }
@media (min-width: 880px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .how li { padding: 22px; } }

.screens {
  margin-top: 32px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(64vw, 240px); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 8px var(--gutter) 28px; margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.screens figure { margin: 0; scroll-snap-align: center; }
.screens figcaption { margin-top: 14px; font-size: 0.97rem; color: var(--ink-soft); }
.screens figcaption strong { display: block; color: var(--ink); font-family: var(--display); font-weight: 750; font-size: 1.05rem; }
.swipe-hint { margin-top: 4px; font-size: 0.9rem; color: var(--ink-soft); }
@media (min-width: 880px) {
  .screens { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; gap: 28px; }
  .swipe-hint { display: none; }
}

.data { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.data .art { width: min(78vw, 340px); justify-self: center; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.facts svg { width: 22px; height: 22px; margin-top: 3px; color: var(--honey-line); }
@media (min-width: 880px) { .data { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; } .data .art { width: 100%; max-width: 380px; order: -1; } }

.plans { margin-top: 28px; display: grid; gap: 12px; max-width: 560px; }
.plan {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline;
  padding: 18px 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e1);
  border: 2px solid transparent;
}
.plan.main { border-color: var(--ink); }
.plan .name { font: 750 1.1rem/1.3 var(--display); }
.plan .amount { font: 750 1.35rem/1.2 var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.plan .note { grid-column: 1 / -1; font-size: 0.95rem; color: var(--ink-soft); }
.price-notes { margin-top: 18px; display: grid; gap: 6px; max-width: 60ch; color: var(--ink-soft); font-size: 0.97rem; }
.price-cta { margin-top: 26px; }
@media (max-width: 480px) { .price-cta .btn { width: 100%; } }

.disclaimer { padding-block: 36px; }
.disclaimer p { max-width: 62ch; color: var(--ink-soft); font-size: 0.97rem; }

/* Reading pages (legal, help) */
.doc { padding-block: 16px 72px; }
.doc .wrap { max-width: calc(var(--measure) + var(--gutter) * 2); }
.doc h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3rem); }
.doc .meta { margin-top: 10px; color: var(--ink-soft); font-size: 0.97rem; }
.doc .intro { margin-top: 14px; font-size: 1.1rem; color: var(--ink-soft); }
.doc .lang { margin-top: 14px; font-size: 0.95rem; }
.doc h2 { font-size: clamp(1.45rem, 1.4vw + 1rem, 1.8rem); margin-top: 48px; scroll-margin-top: 24px; }
.doc h3 { font-size: 1.2rem; margin-top: 32px; scroll-margin-top: 24px; }
.doc p, .doc ul, .doc ol, .doc table, .doc .callout { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--honey-line); }
.doc strong { font-weight: 650; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.toc { margin-top: 28px; padding: 18px 20px; background: var(--sunk); border-radius: var(--r-lg); }
.toc h2 { font-size: 1.05rem; margin: 0; font-family: var(--display); }
.toc ul { list-style: none; margin: 10px 0 0; padding: 0; columns: 1; font-size: 0.98rem; }
.toc li + li { margin-top: 6px; }
@media (min-width: 720px) { .toc ul { columns: 2; column-gap: 32px; } .toc li { break-inside: avoid; } }

.doc table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.doc th { font-family: var(--display); font-weight: 750; color: var(--ink); }
.doc td:first-child { font-weight: 600; }
@media (max-width: 640px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc tr { padding: 14px 16px; margin-top: 10px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--e1); }
  .doc td { border: 0; padding: 3px 0; }
  .doc td[data-label]::before { content: attr(data-label); display: block; font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }
  .doc td:first-child { font-family: var(--display); font-size: 1.05rem; padding-bottom: 6px; }
  .doc td:first-child::before { display: none; }
}
@media (max-width: 640px) and (prefers-color-scheme: dark) { .doc tr { border: 1px solid var(--line); } }

.callout { padding: 16px 18px; background: var(--honey-soft); border-radius: var(--r-md); color: var(--ink); }
.callout p:first-child { margin-top: 0; }
.callout .label { font-family: var(--display); font-weight: 750; }

.ph { background: var(--todo-bg); color: var(--todo-ink); padding: 0 4px; border-radius: 4px; font-weight: 650; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Help page */
.contact-card {
  margin-top: 24px; padding: 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e1);
  display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr);
}
@media (prefers-color-scheme: dark) { .contact-card { border: 1px solid var(--line); } }
.contact-card p { margin: 0; }
.contact-card .btn { justify-self: start; }
@media (max-width: 480px) { .contact-card .btn { width: 100%; } }
.qnav { margin-top: 28px; list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qnav li + li { margin-top: 0; }
.qnav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--sunk); color: var(--ink); text-decoration: none; font: 600 0.95rem/1.2 var(--display);
}
.qnav a:hover { background: var(--honey-soft); }
.faq h2 { margin-top: 44px; }
.path { font-family: var(--display); font-weight: 650; }
.help-art { width: 150px; margin-top: 8px; }

/* 404 */
.lost { padding-block: 24px 96px; text-align: center; }
.lost .art { width: min(70vw, 280px); margin: 0 auto; }
.lost h1 { font-size: clamp(2.2rem, 5vw + 1rem, 3.4rem); margin-top: 12px; }
.lost p { margin: 14px auto 0; max-width: 36ch; color: var(--ink-soft); }
.lost .row { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px 48px; font-size: 0.97rem; }
.site-foot .wrap { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.site-foot .brand svg { width: 120px; }
.site-foot .tag { margin-top: 10px; color: var(--ink-soft); max-width: 34ch; }
.site-foot h2 { font: 700 0.98rem/1.3 var(--display); color: var(--ink); }
.site-foot ul { list-style: none; margin: 8px 0 0; padding: 0; }
.site-foot li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-soft); text-decoration: none; }
.site-foot li a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .mail { color: var(--link); }
@media (min-width: 720px) { .site-foot .wrap { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
