/* Brand Guide Samurai v1.0 — palette du dojo. */
:root {
  --cream: #f7f5f0;
  --ink: #1d1d1f;
  --mid: #6e6e73;
  --light: #86868b;
  --text-on-dark: #f5f5f7;
  --card: #ffffff;
  --line: rgba(29, 29, 31, 0.1);
  --field-line: rgba(29, 29, 31, 0.18);
  --blue: #0071e3;
  --blue-hv: #0066cc;
  --gold-1: #7a5a1c;
  --gold-2: #b8892f;
  --gold-3: #e0c17a;
  --focus-ring: rgba(0, 113, 227, 0.35);
  --success: #25743a;
  --error: #b42318;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
  scroll-behavior: smooth;
  /* Le kanji pinceau déborde volontairement du bord droit (façon dojo) sans créer de scroll. */
  overflow-x: clip;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Le kanji pinceau déborde volontairement du bord droit (façon dojo) :
     clip sur body pour qu'il soit coupé au bord de l'écran sans créer de scroll. */
  overflow-x: clip;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.page-shell {
  position: relative;
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

/* Hero façon Founder OS : logo centré, puis DEUX colonnes (texte | mock-up flouté). */
.hero {
  position: relative;
}

.brand-logo {
  display: block;
  width: min(190px, 54vw);
  height: auto;
  margin: 0 auto;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 56px;
  align-items: center;
  margin-top: 44px;
}

.hero-copy {
  position: relative;
  text-align: left;
}

/* Filigrane kanji 道 (la voie), calligraphie pinceau Yuji Syuku : la signature du dojo,
   posée à droite, à l'encre presque invisible, coupée par le bord de l'écran. */
.hero-kanji {
  position: absolute;
  top: 46%;
  right: -0.32em;
  transform: translateY(-50%);
  z-index: 0;
  font-family: "Yuji Syuku", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(240px, 34vw, 520px);
  line-height: 1;
  color: var(--ink);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}

.hero-copy > *:not(.hero-kanji) {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.subtitle {
  max-width: 470px;
  margin: 18px 0 0;
  color: var(--mid);
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  line-height: 1.6;
}

.offer-line {
  max-width: 470px;
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.55;
}

.hero-cta {
  margin-top: 30px;
}

/* Colonne visuelle : le livre, "photographié" légèrement flou (le teaser de Matt, on discerne le titre). */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
}

/* Bouton apple — texte pur, entièrement arrondi, mobile 13/42, desktop 15/55. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  padding: 0 34px;
  border: 0;
  border-radius: 9999px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}

.cta:hover {
  filter: brightness(0.9);
}

.cta:active {
  transform: scale(0.97);
}

/* Or satin — texte premium de la marque. */
.gold-text {
  background: linear-gradient(90deg, var(--gold-1) 0%, var(--gold-2) 22%, var(--gold-3) 50%, var(--gold-2) 78%, var(--gold-1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Mock-up livre réaliste : dos, couverture, tranche de feuillets, ombre. Légèrement flouté. */
.book {
  position: relative;
  width: min(330px, 100%);
  transform: rotate(-1.5deg);
  filter: blur(3px) drop-shadow(0 22px 28px rgba(29, 29, 31, 0.34));
}

/* Dos du livre, à gauche. */
.book::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 12px;
  bottom: 34px;
  width: 20px;
  border-radius: 7px 2px 2px 7px;
  background: linear-gradient(90deg, #0b0b0d 0%, #202024 55%, #2e2e34 100%);
  box-shadow: inset -3px 0 4px rgba(0, 0, 0, 0.55);
  z-index: 0;
}

/* Tranche des feuillets, à droite. */
.book::after {
  content: "";
  position: absolute;
  top: 8px;
  right: -13px;
  bottom: -16px;
  width: 20px;
  border-radius: 0 4px 4px 0;
  background: repeating-linear-gradient(
    to bottom,
    #f6f4ef 0px,
    #f6f4ef 2px,
    #dcdad3 2px,
    #dcdad3 4px
  );
  box-shadow: inset 2px 0 3px rgba(0, 0, 0, 0.12);
  z-index: 1;
}

.book-cover {
  position: relative;
  margin-left: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 38px 30px 34px;
  border-radius: 3px 14px 14px 3px;
  background: linear-gradient(135deg, #232327 0%, var(--ink) 55%, #141416 100%);
  color: var(--text-on-dark);
  text-align: center;
  z-index: 2;
}

.book-kanji {
  position: absolute;
  top: -16px;
  right: -6px;
  font-family: "Yuji Syuku", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 170px;
  line-height: 1;
  color: var(--text-on-dark);
  opacity: 0.1;
  pointer-events: none;
  user-select: none;
}

.book-kicker {
  margin: 0;
  color: var(--gold-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.book-title {
  margin: 12px 0 0;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.book-hook {
  max-width: 250px;
  margin: 14px 0 0;
  color: var(--text-on-dark);
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.92;
}

.book-list {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.book-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-on-dark);
  font-size: 0.92rem;
  line-height: 1.5;
}

.book-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 10px;
  height: 2px;
  background: var(--gold-3);
}

.book-badge {
  margin: 24px 0 0;
  padding: 8px 16px;
  border: 1px solid rgba(224, 193, 122, 0.55);
  border-radius: 9999px;
  color: var(--gold-3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Tranche de pages en bas : le livre a une épaisseur. */
.book-pages {
  position: absolute;
  left: 16px;
  right: 18px;
  bottom: -16px;
  height: 20px;
  border-radius: 0 0 9px 9px;
  background: repeating-linear-gradient(
    to bottom,
    #f6f4ef 0px,
    #f6f4ef 2px,
    #dcdad3 2px,
    #dcdad3 4px
  );
  box-shadow: 0 12px 20px rgba(29, 29, 31, 0.2);
  z-index: 1;
}

/* Témoignages façon Founder OS (rendu de Matt, mesuré 06/08) : cartes larges pleine largeur,
   photo 120 px à gauche qui déborde au-dessus de la carte, nom + rôle à sa droite, citation en dessous.
   Largeur plafonnée à 1440px : le conteneur `global-container` de Matt est en max-width:1440px,
   ses cartes restent donc à 447px même sur un très grand écran (mesuré 05/08 à 1440/1920). */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
  width: min(1440px, 100vw);
  /* Centrage par rapport au viewport (pas au shell) : 100vw jusqu'à 1440, puis 720px de chaque côté.
     `auto` échouerait ici car l'élément dépasse son conteneur (le shell fait 980px). */
  margin: 52px 0 0 calc(50% - min(50vw, 720px));
  padding: 0 24px;
  box-sizing: border-box;
}

.testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(29, 29, 31, 0.03), 0 12px 28px -18px rgba(29, 29, 31, 0.22);
  text-align: left;
}

/* Rangée du haut : la photo (ou le monogramme) à gauche, le nom + rôle à sa droite. */
.t-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(122, 90, 28, 0.25);
  /* Petit débord au-dessus de la carte : la signature du rendu de Matt. */
  transform: translateY(-42px);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.t-id {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.t-name {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
}

.t-org {
  color: var(--mid);
  font-size: 0.88rem;
}

.testimonial blockquote {
  margin: 0;
  color: #2e2e2e;
  font-size: 0.96rem;
  line-height: 1.55;
  font-weight: 500;
}

/* Section sombre façon dojo (vert-noir #0A0F0D, le ton exact du site Kōshin Ryū) :
   kanji blanc en calligraphie pinceau en filigrane, la ligne de clôture, le CTA.
   Le rouge du dojo n'est pas repris (charte Samurai : zéro rouge). */
.cta-dark {
  position: relative;
  overflow: hidden;
  margin-top: 72px;
  padding: 96px 24px;
  background: #0a0f0d;
  color: var(--text-on-dark);
  text-align: center;
}

.dark-kanji {
  position: absolute;
  top: 50%;
  right: -0.3em;
  transform: translateY(-50%);
  font-family: "Yuji Syuku", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(240px, 34vw, 540px);
  line-height: 1;
  color: #ffffff;
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}

.cta-dark-inner {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
}

.dark-kicker {
  margin: 0;
  color: var(--gold-3);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dark-lead {
  margin: 20px 0 0;
  color: var(--text-on-dark);
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.dark-cta {
  margin-top: 34px;
}

.dark-badge {
  display: inline-block;
  margin: 26px 0 0;
  padding: 8px 16px;
  border: 1px solid rgba(224, 193, 122, 0.55);
  border-radius: 9999px;
  color: var(--gold-3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

footer {
  padding: 26px 20px 46px;
  color: var(--light);
  font-size: 0.8rem;
  text-align: center;
}

/* Pop-up d'inscription, ouvert par le bouton (modèle Founder OS). */
.signup-modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 64px -24px rgba(29, 29, 31, 0.35);
}

.signup-modal[open] {
  display: flex;
  flex-direction: column;
}

.signup-modal::backdrop {
  background: rgba(29, 29, 31, 0.44);
}

body:has(.signup-modal[open]) {
  overflow: hidden;
}

.modal-close {
  align-self: flex-end;
  padding: 6px 2px 10px;
  border: 0;
  background: none;
  color: var(--mid);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
}

.signup-modal .portrait {
  display: block;
  width: 56px;
  aspect-ratio: 1;
  margin: 0 auto 16px;
  border: 2px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
}

.signup-modal h2 {
  margin: 0 0 24px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-align: center;
}

.field,
.choice-group {
  margin: 0 0 18px;
}

.field label,
.choice-group legend {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--card);
  font-size: 16px;
}

.field input::placeholder {
  color: var(--light);
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

.choice-group {
  padding: 0;
  border: 0;
}

.radio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-row label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.radio-row label:has(input:checked) {
  border-color: var(--blue);
  background: #f0f7ff;
  font-weight: 600;
}

.radio-row label:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.radio-row input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.signup-form button.cta {
  width: 100%;
  margin-top: 6px;
}

.consent {
  margin: 14px 0 0;
  color: var(--mid);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.form-status {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: var(--success);
  font-size: 0.85rem;
  text-align: center;
}

.form-status[data-state="error"] {
  color: var(--error);
}

/* Page merci, même thème. */
.thanks-page {
  background: var(--cream);
}

.thanks-shell {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 48px;
  text-align: center;
}

.thanks-shell .brand-logo {
  width: min(190px, 54vw);
  margin-bottom: 40px;
}

.thanks-shell .portrait {
  width: 140px;
  margin: 0 auto 32px;
  border: 2px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
}

.thanks-shell h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.confirm-msg {
  max-width: 600px;
  margin: 24px auto 0;
  color: var(--mid);
  font-size: 1.1rem;
  line-height: 1.6;
}

.confirm-msg strong {
  color: var(--ink);
}

.newsletter-install {
  max-width: 600px;
  margin: 44px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--gold-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.newsletter-install h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  letter-spacing: -0.035em;
}

.newsletter-install ul {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.newsletter-install li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  line-height: 1.55;
}

.newsletter-install li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 11px;
  height: 2px;
  background: var(--gold-2);
}

.choice-line {
  max-width: 600px;
  margin: 32px auto 0;
  color: var(--mid);
  font-size: 1.05rem;
  line-height: 1.6;
}

.thanks-cta {
  margin-top: 28px;
}

.thanks-closing {
  text-align: left;
}

.thanks-closing p {
  margin: 16px 0 0;
  color: var(--mid);
  font-size: 1.05rem;
  line-height: 1.6;
}

.thanks-closing strong {
  color: var(--ink);
}

.thanks-closing ol {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding-left: 24px;
  color: var(--ink);
  line-height: 1.55;
}

.thanks-goodbye {
  margin-top: 44px;
}

.thanks-signature {
  margin: 24px 0 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    margin-top: 34px;
  }

  .hero-kanji {
    top: 38%;
    right: -0.26em;
    font-size: 150px;
    opacity: 0.05;
  }

  .hero-visual {
    padding: 0;
  }

  .testimonials {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: calc(100% - 32px);
    padding-top: 30px;
  }

  .brand-logo {
    width: min(170px, 58vw);
  }

  .hero h1 {
    font-size: clamp(1.7rem, 7.5vw, 2.1rem);
  }

  .subtitle {
    margin-top: 16px;
    font-size: 0.98rem;
  }

  .offer-line {
    margin-top: 14px;
    font-size: 0.95rem;
  }

  .hero-cta {
    margin-top: 24px;
  }

  .cta {
    min-height: 42px;
    padding: 0 24px;
    font-size: 13px;
  }

  .book {
    transform: rotate(-1deg);
  }

  .book-cover {
    padding: 30px 22px 28px;
  }

  /* Photos réduites sur mobile, le nom + rôle restent à droite. */
  .testimonial {
    padding: 26px;
  }

  .avatar {
    width: 84px;
    height: 84px;
    font-size: 1.45rem;
  }

  .cta-dark {
    margin-top: 56px;
    padding: 72px 20px;
  }

  .thanks-shell {
    padding-top: 44px;
  }

  .signup-modal {
    padding: 20px 16px;
  }

  .field input {
    min-height: 48px;
  }

  .radio-row label {
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
