:root {
  --bg: #fbf9f5;
  --bg-alt: #f3efe6;
  --text: #1f2430;
  --muted: #625d54;
  --border: #e6ddc9;
  --accent: #c9a227;
  --accent-dark: #a5811a;
  --ink: #1f2430;
  --radius: 12px;
  --maxw: 1080px;
  --font-display: 'Fraunces', Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140e;
    --bg-alt: #1d1912;
    --text: #f1ece0;
    --muted: #b9ad96;
    --border: #34301f;
    --accent: #e0b93b;
    --accent-dark: #f0cb5d;
    --ink: #f1ece0;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { display: flex; color: var(--accent); }
.nav {
  display: flex;
  gap: 24px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}
.nav a:hover { color: var(--text); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 72px 0 64px;
  background: radial-gradient(1200px 400px at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 44px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { max-width: none; }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 16ch;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 28px;
}
.section-lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 68ch;
  margin: -16px 0 28px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 15px;
}
.btn-primary {
  background: var(--accent);
  color: #1f1b0e;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); }

/* Hero signature illustration */
.signature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  box-shadow: 0 24px 60px rgba(31, 20, 6, .1);
}
.signature-draw {
  width: 100%;
  height: auto;
  display: block;
}
.signature-draw path {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sig-main {
  stroke-width: 4;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-signature 2.3s ease-out .2s forwards;
}
.sig-flourish {
  stroke-width: 3;
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: draw-signature 0.9s ease-out 2.4s forwards;
}
.signature-dot {
  fill: var(--accent);
  opacity: 0;
  animation: dot-appear .4s ease-out 3.3s forwards;
}
@keyframes draw-signature {
  to { stroke-dashoffset: 0; }
}
@keyframes dot-appear {
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sig-main, .sig-flourish { animation: none; stroke-dashoffset: 0; }
  .signature-dot { animation: none; opacity: 1; }
}
.signature-line {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  text-align: right;
}
.signature-line span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  margin: 0 0 12px;
}
.section > .container > p.section-lead:first-of-type { margin-top: -4px; }

/* Grid + cards */
.grid { display: grid; gap: 20px; margin-top: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

.style-card .style-sample {
  font-size: 40px;
  line-height: 1;
  margin: 0 0 14px;
  color: var(--ink);
}

/* Generator */
.generator {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 780px) {
  .generator { grid-template-columns: 1fr; }
}
.generator-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.field-inline { flex-direction: row; align-items: center; gap: 10px; }
.field input[type="text"] {
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.field input[type="range"] { accent-color: var(--accent); }

.font-picker, .color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.font-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
}
.font-btn.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.color-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.color-btn.is-active { border-color: var(--accent); }

.generator-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.generator-preview canvas {
  max-width: 100%;
  border-radius: 8px;
}

/* Pricing */
.pricing-grid {
  margin-top: 28px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}
.price-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
}
.price-card.is-highlight {
  border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(31, 20, 6, .12);
}
.price-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--accent);
  color: #1f1b0e;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 999px;
}
.price-card h3 { margin: 0 0 4px; font-size: 18px; }
.price-card .price {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--ink);
}
.price-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.price-features li {
  padding-left: 24px;
  position: relative;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.price-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-dark);
  font-weight: 700;
}
.price-card .btn { align-self: flex-start; }

/* Commande / mailing list */
.commande-block {
  margin-top: 48px;
  max-width: 640px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.commande-block h3 { margin: 0 0 8px; font-size: 20px; }
.commande-block .section-lead { margin: 0 0 20px; }
.commande-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.commande-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .commande-row { grid-template-columns: 1fr; }
}
.commande-form input[type="text"],
.commande-form input[type="email"],
.commande-form select,
.commande-form textarea {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
.commande-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.commande-consent input { margin-top: 3px; }
.commande-form .btn { align-self: flex-start; }
.commande-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.commande-msg.ok { background: color-mix(in srgb, #2f7d4f 16%, transparent); color: #205c39; }
.commande-msg.err { background: color-mix(in srgb, #b4232b 14%, transparent); color: #8a1b21; }
@media (prefers-color-scheme: dark) {
  .commande-msg.ok { color: #7fd9a1; }
  .commande-msg.err { color: #ff9a9f; }
}

/* Video */
.video-embed {
  margin-top: 28px;
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.footer-brand svg { color: var(--accent); }
.footer-note { margin: 0; }

/* Responsive nav */
@media (max-width: 720px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .nav-toggle { display: inline-flex; }
}
