/* =============================================================================
   niaiwo.love — feuille de style
   Palette et typographie reprises de l'application pour que les captures
   d'écran se fondent dans la page.
   ============================================================================= */

@font-face { font-family: 'Hanken Grotesk'; font-weight: 600; font-display: swap; src: url('/assets/fonts/hanken-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 700; font-display: swap; src: url('/assets/fonts/hanken-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 800; font-display: swap; src: url('/assets/fonts/hanken-grotesk-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 400; font-display: swap; src: url('/assets/fonts/dm-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 500; font-display: swap; src: url('/assets/fonts/dm-mono-latin-500-normal.woff2') format('woff2'); }
/* Calligraphie : sous-ensemble de Ma Shan Zheng limité aux trois caractères 你爱我 (2 Ko). */
@font-face { font-family: 'Ma Shan Zheng'; font-weight: 400; font-display: block; src: url('/assets/fonts/mashanzheng-niaiwo.woff2') format('woff2'); unicode-range: U+4F60, U+7231, U+6211; }

:root {
  --paper: #F2EDE6;
  --paper-deep: #E9E2D7;
  --card: #F8F4EE;
  --card-alt: #EFE9E0;
  --line: #E0D7CA;
  --ink: #2B2926;
  --ink-soft: #5F5A54;
  --ink-mute: #8C8680;
  --blush: #F8D0DC;
  --rose: #E58CA8;
  --rose-deep: #8E3A5B;
  --lake: #1B6FA8;
  --lake-deep: #145A8A;
  --lake-soft: #CFE6F5;
  --apricot: #F5AB4E;
  --apricot-soft: #FBE1BA;
  --leaf: #7FA06A;
  --leaf-soft: #DCE6D2;

  --display: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --hanzi: 'Ma Shan Zheng', 'Noto Serif SC', 'Songti SC', 'STKaiti', 'KaiTi', serif;

  --wrap: 1120px;
  --gutter: clamp(18px, 4vw, 40px);
  --radius: 22px;
  --radius-lg: 30px;
  --phone-radius: 9% / 4.2%;
  --shadow-phone: 0 30px 60px -20px rgba(43, 41, 38, .35), 0 12px 24px -12px rgba(43, 41, 38, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.08; margin: 0; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2rem, 3.7vw, 3rem); max-width: 24ch; }
h2 { font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-weight: 700; font-size: 1.25rem; }
p { margin: 0; }
a { color: var(--lake-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }

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

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 16px; border: 0; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em;
  text-decoration: none; transition: transform .15s ease, background-color .15s ease;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lake); color: #fff; }
.btn--primary:hover { background: var(--lake-deep); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { background: var(--card); }
.btn--big { padding: 18px 26px; font-size: 1.1rem; border-radius: 18px; }
.btn--small { padding: 8px 14px; font-size: .9rem; border-radius: 12px; }

/* ----------------------------------------------------------------- topbar */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.nav a:hover { color: var(--lake-deep); }
.langs { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card-alt); }
.langs a { padding: 5px 10px; border-radius: 999px; font-size: .82rem; font-family: var(--display); font-weight: 600; white-space: nowrap; }
.langs a.langs__on { background: var(--card); box-shadow: 0 1px 2px rgba(43,41,38,.08); }
/* CJK: let the system CJK faces carry Chinese text with slightly roomier leading */
.lang-zh body, .lang-zh { --display: 'Hanken Grotesk', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif; --mono: 'DM Mono', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', ui-monospace, monospace; }
.lang-zh h1, .lang-zh h2, .lang-zh h3 { letter-spacing: 0; line-height: 1.3; }
.lang-zh h1 { max-width: 15em; }
.lang-zh p, .lang-zh li, .lang-zh dd { line-height: 1.8; }
.lang-zh .hero__pinyin { letter-spacing: .12em; }
.nav__cta { background: var(--ink); color: var(--paper) !important; padding: 9px 16px; border-radius: 999px; font-family: var(--display); font-weight: 700; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: var(--card); border-radius: 14px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.menu-btn__bar { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease; }
.menu-btn[aria-expanded="true"] .menu-btn__bar:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ------------------------------------------------------------------- hero */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 7vw, 96px); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__hanzi {
  font-family: var(--hanzi); font-size: clamp(5.5rem, 13vw, 10.5rem); line-height: .9; color: var(--rose);
  /* inline-block + marges internes : avec background-clip:text, l'encre qui dépasse de la boîte du texte (le crochet
     et le point de 我, l'attaque de 你) serait rognée ; les marges négatives gardent l'alignement. */
  display: inline-block; white-space: nowrap; padding: .06em .3em .06em .12em; margin: -.06em -.3em 0 calc(-0.04em - .12em); letter-spacing: .02em;
  background: linear-gradient(100deg, var(--rose) 0%, #D96F8F 55%, var(--lake) 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__pinyin { font-size: 1.05rem; color: var(--ink-mute); margin-bottom: 22px; letter-spacing: .08em; }
.hero__lead { max-width: 56ch; margin-top: 22px; color: var(--ink-soft); font-size: 1.02rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__meta { margin-top: 16px; color: var(--ink-mute); font-size: .88rem; max-width: 52ch; }

.hero__phones { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; min-height: 520px; }
.phone {
  margin: 0; background: var(--ink); padding: 10px; border-radius: 40px;
  box-shadow: var(--shadow-phone);
}
.phone img { border-radius: 30px; width: 100%; height: auto; }
.phone--left, .phone--right { width: min(46%, 270px); }
.phone--left { transform: rotate(-7deg) translate(14px, 10px); z-index: 1; }
.phone--right { transform: rotate(6deg) translate(-14px, -18px); z-index: 2; }
.hero__heart {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; z-index: 3;
  width: 64px; height: 64px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(43,41,38,.35);
}
.hero__heart svg { width: 38px; height: 38px; }

/* page-load moment: the two phones settle toward each other, the characters wash in */
@media (prefers-reduced-motion: no-preference) {
  .hero__hanzi { animation: ink-in 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .phone--left { animation: settle-left 1.2s cubic-bezier(.2,.7,.2,1) .15s both; }
  .phone--right { animation: settle-right 1.2s cubic-bezier(.2,.7,.2,1) .25s both; }
  .hero__heart { animation: pop .6s cubic-bezier(.3,1.4,.5,1) .9s both; }
  @keyframes ink-in { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
  @keyframes settle-left { from { transform: rotate(-14deg) translate(-40px, 40px); opacity: 0; } to { transform: rotate(-7deg) translate(14px, 10px); opacity: 1; } }
  @keyframes settle-right { from { transform: rotate(13deg) translate(40px, 20px); opacity: 0; } to { transform: rotate(6deg) translate(-14px, -18px); opacity: 1; } }
  @keyframes pop { from { scale: 0; } to { scale: 1; } }
}

/* -------------------------------------------------------------- manifesto */
.manifesto { background: var(--card); border-block: 1px solid var(--line); padding: clamp(44px, 7vw, 88px) 0; }
.manifesto__inner { max-width: 760px; }
.manifesto h2 { margin: 18px 0 16px; }
.manifesto p { color: var(--ink-soft); font-size: 1.02rem; max-width: 64ch; }
.pair { display: inline-flex; }
.pair__dot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--card); }
.pair__dot--a { background: var(--lake); }
.pair__dot--b { background: var(--rose); margin-left: -8px; }

/* ---------------------------------------------------------------- screens */
.screens { padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); }
.screens__head { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: end; margin-bottom: 28px; }
.screens__head p { color: var(--ink-soft); grid-column: 1; }
.screens__ctrl { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; }
.arrow:hover { background: var(--card-alt); }

.strip {
  display: flex; gap: clamp(18px, 2.4vw, 30px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 10px var(--gutter) 34px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.strip__item { flex: 0 0 auto; width: clamp(200px, 22vw, 250px); scroll-snap-align: start; margin: 0; }
.phone--small { padding: 7px; border-radius: 30px; box-shadow: 0 20px 40px -18px rgba(43,41,38,.35); }
.phone--small img { border-radius: 23px; }
.strip figcaption { margin-top: 14px; display: grid; gap: 2px; }
.strip figcaption strong { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.strip figcaption span { color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }

/* ---------------------------------------------------------------- details */
.details { padding: 0 0 clamp(48px, 7vw, 96px); }
.details__list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 72px); border-top: 1px solid var(--line); }
.details__list > div { padding: 26px 0; border-bottom: 1px solid var(--line); }
.details__list dt { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; }
.details__list dd { margin: 0; color: var(--ink-soft); max-width: 58ch; }

/* ------------------------------------------------------------------ steps */
.steps { background: var(--paper-deep); padding: clamp(48px, 7vw, 96px) 0; }
.steps h2 { margin-bottom: 36px; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: step; }
.steps__list li { position: relative; padding-top: 18px; }
.steps__num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin-bottom: 18px; }
.steps__list h3 { margin-bottom: 8px; }
.steps__list p { color: var(--ink-soft); max-width: 40ch; }

/* --------------------------------------------------------------- download */
.download { padding: clamp(48px, 7vw, 96px) 0; }
.download__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(22px, 3vw, 40px); align-items: start; }
.download__card { grid-row: 1 / span 2; background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 44px); }
.download__card h2 { color: var(--paper); margin-bottom: 22px; }
.download__card .btn--primary { background: var(--apricot); color: var(--ink); }
.download__card .btn--primary:hover { background: #f7bb6a; }
.download__facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #D8D0C4; font-size: .92rem; }
.download__facts li::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--apricot); margin-right: 10px; vertical-align: 1px; }
.download__store { margin-top: 18px; color: #D8D0C4; }
.download__store a { color: var(--paper); }
.sha { margin-top: 26px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; }
.sha summary { cursor: pointer; color: #D8D0C4; }
.sha code { display: block; margin: 12px 0; font-size: .82rem; word-break: break-all; color: var(--paper); }
.sha .btn--ghost { color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); }
.sha .btn--ghost:hover { background: rgba(255,255,255,.08); }

.download__help, .download__ios { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.download__help h3, .download__ios h3 { margin-bottom: 12px; }
.download__help ol { margin: 0 0 14px; padding-left: 20px; color: var(--ink-soft); display: grid; gap: 8px; }
.download__help p, .download__ios p { color: var(--ink-soft); }
.waitlist { margin-top: 16px; }
.waitlist label { display: block; font-family: var(--display); font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.waitlist__row { display: flex; gap: 8px; }
.waitlist input[type="email"] { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.waitlist input[type="email"]:focus { border-color: var(--lake); outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--apricot-soft); color: var(--ink); font-size: .95rem; }
.notice--ok { background: var(--leaf-soft); }
.notice--err { background: var(--blush); color: var(--rose-deep); }

/* ---------------------------------------------------------------- privacy */
.privacy { background: var(--card); border-top: 1px solid var(--line); padding: clamp(48px, 7vw, 88px) 0; }
.privacy__inner { max-width: 720px; }
.privacy h2 { margin-bottom: 16px; }
.privacy p { color: var(--ink-soft); max-width: 64ch; margin-bottom: 18px; }
.link { font-family: var(--display); font-weight: 700; }

/* ------------------------------------------------------------------ legal */
.legal { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 96px); }
.legal__inner { max-width: 720px; }
.legal h1 { margin-bottom: 6px; }
.legal__date { color: var(--ink-mute); margin-bottom: 28px; font-size: .9rem; }
.legal h2 { font-size: 1.35rem; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin: 0; }
.legal p + p { margin-top: 12px; }

/* ----------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 22px 40px; align-items: start; }
.footer__brand { display: flex; gap: 12px; align-items: flex-start; }
.footer__brand strong { font-family: var(--display); font-size: 1.1rem; }
.footer__brand p { color: var(--ink-mute); font-size: .9rem; }
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__links a { color: var(--ink); text-decoration: none; font-size: .92rem; }
.footer__links a:hover { color: var(--lake-deep); }
.footer__legal { grid-column: 1 / -1; color: var(--ink-mute); font-size: .85rem; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .nav { gap: 16px; }
  .nav a { font-size: .9rem; }
  .nav__cta { padding: 8px 14px; }
  .langs a { padding: 5px 8px; }
}
@media (max-width: 1040px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: 68px; flex-direction: column; align-items: stretch; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px; box-shadow: 0 18px 40px -20px rgba(43,41,38,.35); }
  .nav[data-open] { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; font-size: .95rem; }
  .langs { align-self: flex-start; margin: 6px 10px; }
  .langs a { padding: 6px 12px; }
  .nav a:hover { background: var(--card-alt); }
  .nav__cta { text-align: center; margin-top: 6px; }
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__phones { min-height: 0; margin-top: 10px; }
  .phone--left, .phone--right { width: min(46%, 240px); }
  .details__list { grid-template-columns: 1fr; }
  .steps__list { grid-template-columns: 1fr; gap: 28px; }
  .download__inner { grid-template-columns: 1fr; }
  .download__card { grid-row: auto; }
}
@media (max-width: 720px) {
  .screens__head { grid-template-columns: 1fr; }
  .screens__ctrl { display: none; }
  .strip__item { width: min(66vw, 240px); }
  .waitlist__row { flex-direction: column; }
  .footer__inner { grid-template-columns: 1fr; }
}
