/* =========================================================
   PARTITION MAGIQUE — Site one-page
   Inherits design tokens from PDF, optimized for web/responsive
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Quicksand:wght@400;500;600;700&family=Caveat:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Surface */
  --bg: #FBF6EC;
  --bg-soft: #F4ECDC;
  --paper: #FFFDF8;
  --ink: #2A2418;
  --ink-soft: #5C5240;
  --ink-mute: #8C8270;
  --line: #E8DEC9;
  --line-strong: #D4C7A8;

  /* Magic colors */
  --c1: #E86A5C;
  --c2: #F4A24A;
  --c3: #F0CB47;
  --c4: #7DB87B;
  --c5: #7B9CD4;

  --c1-soft: #FAD9D3;
  --c2-soft: #FBE4C8;
  --c3-soft: #FAF1C4;
  --c4-soft: #D4E6CE;
  --c5-soft: #D4DFEF;

  --accent: var(--c1);

  /* Type */
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Quicksand', system-ui, sans-serif;
  --hand: 'Caveat', cursive;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

.section {
  padding: 96px 0;
  position: relative;
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.05;
}

h1 { font-size: clamp(40px, 6.5vw, 78px); }
h2 { font-size: clamp(32px, 4.5vw, 56px); line-height: 1.08; }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }

em.italic-accent {
  font-style: italic;
  color: var(--accent);
}

.hand {
  font-family: var(--hand);
  font-weight: 600;
}

p { margin: 0; }

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 6px 0 -2px var(--accent), 0 14px 24px -10px rgba(40, 30, 10, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 -2px var(--accent), 0 18px 30px -10px rgba(40, 30, 10, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-arrow {
  display: inline-block;
  width: 18px; height: 18px;
  position: relative;
  transition: transform 0.2s ease;
}
.btn-arrow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h14M13 6l6 6-6 6' stroke='black' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center/contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h14M13 6l6 6-6 6' stroke='black' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center/contain;
}
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 2px;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero-lead {
  margin-top: 24px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
}

.hero-cta-row {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.hero-meta-item svg { flex-shrink: 0; }

/* ---------- PDF preview stack (hero right) ---------- */
.pdf-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin: 0 auto;
}

.pdf-stack .page-card {
  position: absolute;
  background: var(--paper);
  border-radius: 6px;
  box-shadow:
    0 30px 60px -20px rgba(60, 40, 10, 0.25),
    0 8px 16px -8px rgba(60, 40, 10, 0.15);
  overflow: hidden;
}

/* ---------- Section header ---------- */
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .eyebrow { margin-bottom: 14px; display: inline-block; }
.section-head h2 { max-width: 18ch; margin: 0 auto; }
.section-head .lead {
  margin: 20px auto 0;
  text-align: center;
  max-width: 56ch;
}

/* ---------- Card grid (audience, contents, etc.) ---------- */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--paper);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -16px rgba(60, 40, 10, 0.18);
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--ink);
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* ---------- Contents stripe (5 colors) ---------- */
.contents-stripe {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}
.contents-stripe span {
  height: 14px;
}

/* ---------- Pages preview gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

.gallery-item {
  aspect-ratio: 210 / 297;
  background: var(--paper);
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px -12px rgba(60, 40, 10, 0.18);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.gallery-item:hover { transform: translateY(-4px); }
.gallery-item .gallery-num {
  position: absolute;
  bottom: 8px; right: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
}

/* ---------- Testimonials ---------- */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .testi-grid { grid-template-columns: 1fr; }
}

.testi {
  background: var(--paper);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--line);
}
.testi-quote {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.4;
  margin-bottom: 20px;
  color: var(--ink);
}
.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testi-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c2-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  flex-shrink: 0;
}
.testi-name { font-weight: 700; font-size: 14px; }
.testi-meta { font-size: 12px; color: var(--ink-mute); letter-spacing: 0.04em; }

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  padding: 22px 0;
  font-family: var(--serif);
  font-size: 21px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .chev {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
}
.faq-item.open .faq-q .chev {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: 20px;
}

/* ---------- CTA Block ---------- */
.cta-block {
  background: var(--ink);
  color: var(--paper);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block h2 { color: var(--paper); }
.cta-block .lead { color: rgba(255,253,248,0.7); margin: 18px auto 32px; }
.cta-block .btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 6px 0 -2px rgba(0,0,0,0.18), 0 14px 24px -10px rgba(0,0,0,0.4);
}

.cta-deco {
  position: absolute;
  display: flex;
  gap: 8px;
  opacity: 0.18;
  pointer-events: none;
}
.cta-deco span { width: 24px; height: 24px; border-radius: 4px; }
.cta-deco.tl { top: 28px; left: 28px; transform: rotate(-12deg); }
.cta-deco.br { bottom: 28px; right: 28px; transform: rotate(8deg); }

/* ---------- Email form ---------- */
.email-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
  background: var(--paper);
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
}
.email-form input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  outline: none;
}
.email-form input::placeholder { color: var(--ink-mute); }
.email-form .btn {
  padding: 14px 22px;
  font-size: 14px;
}

@media (max-width: 520px) {
  .email-form {
    flex-direction: column;
    border-radius: 18px;
    padding: 10px;
  }
  .email-form input { padding: 14px 12px; text-align: center; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-soft);
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer h4 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.footer ul a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

/* ---------- Floating decorative squares ---------- */
.float-sq {
  position: absolute;
  border-radius: 6px;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Sticky bottom CTA (mobile) ---------- */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.4);
}
@media (max-width: 768px) {
  .sticky-cta { display: block; }
  body { padding-bottom: 72px; }
}
