
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --paper: #f3ecdd;
  --ink: #2b2718;
  --ink-soft: #54503e;
  --rust: #b5623a;
  --cream: #fcf6e6;
  --wash-opacity: 0.78;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #2a2620;
  color: #eee;
  font-family: "Source Sans 3", system-ui, sans-serif;
  padding: 32px 16px 64px;
}

h1.doc { font-size: 18px; font-weight: 600; margin-bottom: 8px; opacity: .9; }
p.doc { font-size: 13px; opacity: .65; margin-bottom: 24px; max-width: 720px; }

.grid {
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: center;
}

.frame {
  position: relative;
  width: 1200px;
  height: 1200px;
  overflow: hidden;
  background: var(--paper);
  flex-shrink: 0;
  transform-origin: top left;
}

/* Preview scale for laptop screens — real size stays 1200 */
@media (max-width: 1400px) {
  .frame-wrap { width: 600px; height: 600px; }
  .frame-wrap .frame { transform: scale(0.5); }
}
.frame-wrap { position: relative; }

.paper { position: absolute; inset: 0; background: var(--paper); }

.wash {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: var(--wash-opacity);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Paper grain / fiber overlay — Claude promo style (not flat wash alone) */
.grain {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0.48;
  mix-blend-mode: soft-light;
  background-image: url("paper-grain-1200.png");
  background-size: 280px 280px;
  background-repeat: repeat;
}
/* Extra SVG turbulence for finer digital-paper grit.
   Disabled during PNG export (body.exporting-png) — SVG data-URI
   background-image taints canvas in Safari via html2canvas createPattern. */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  pointer-events: none;
}
/* Export: strip ALL grain (PNG tile + SVG ::after). html2canvas/clones
   often miss body.exporting-png — JS also filter-removes .grain. */
body.exporting-png .grain,
body.exporting-png .grain::before,
body.exporting-png .grain::after {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  background: none !important;
  background-image: none !important;
  content: none !important;
}
body.exporting-png .wash {
  mix-blend-mode: normal !important;
}

/* Soft cream radial under covers */
.cream-lift {
  position: absolute;
  left: 50%; top: 48%;
  width: 96%; height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(252,246,230,0.22) 0%,
    rgba(252,246,230,0.22) 45%,
    rgba(252,246,230,0) 72%);
  pointer-events: none;
}

/* Clean logo zone a bit */
.logo-clean {
  position: absolute; left: 0; top: 0; width: 210px; height: 160px;
  background: radial-gradient(ellipse at 40% 40%,
    rgba(243,236,221,0.35) 0%,
    rgba(243,236,221,0.12) 55%,
    transparent 80%);
  pointer-events: none;
}

.logo {
  position: absolute;
  left: 28px; top: 24px;
  width: auto; height: 100px;
  object-fit: contain;
  z-index: 20;
}

.covers {
  position: absolute;
  left: 0; right: 0;
  top: 0; bottom: 0;
  z-index: 10;
  pointer-events: none;
}

.book {
  position: absolute;
  left: 50%; top: 610px;
  transform: translate(-50%, -50%);
  border-radius: 7px;
  /* Soft live shadow — large blur + rotate mis-renders in PNG export (see exporting-png) */
  box-shadow: 4px 6px 14px rgba(40, 32, 18, 0.22);
  object-fit: cover;
  background: transparent;
}

.text-block {
  position: absolute;
  left: 40px; right: 40px;
  bottom: 108px;
  text-align: center;
  z-index: 15;
}

.text-halo {
  position: absolute;
  left: 50%; bottom: 40px;
  width: 88%; height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(252,246,230,0.72) 0%,
    rgba(252,246,230,0.28) 50%,
    transparent 75%);
  pointer-events: none;
  z-index: 14;
}

.headline {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 70px;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 16;
}

.headline .rust { color: var(--rust); }

.sub {
  margin-top: 18px;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 43px;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.2;
  position: relative;
  z-index: 16;
}

.sub .rust {
  color: var(--rust);
  font-weight: 700;
}

.cap {
  margin-top: 10px;
  font-size: 12px;
  opacity: .5;
  text-align: center;
  max-width: 600px;
}

/* === Corner facts (FINAL Meta live style) === */
.fact-age {
  position: absolute;
  top: 52px;
  right: 48px;
  z-index: 22;
  padding: 12px 22px;
  border-radius: 100px;
  background: rgba(252, 246, 230, 0.92);
  border: 1.5px solid rgba(181, 98, 58, 0.35);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(70, 45, 20, 0.12);
}

.fact-circle {
  position: absolute;
  top: 118px;
  right: 42px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: var(--rust);
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 10px 28px rgba(150, 80, 45, 0.35);
  padding: 12px;
}

.fact-circle .pct {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 54px;
  line-height: 1.05;
  color: #fffdf8;
  letter-spacing: -0.02em;
}

.fact-circle .pct.sm {
  font-size: 40px;
}

.fact-circle .desc {
  margin-top: 4px;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: rgba(255, 253, 247, 0.92);
  line-height: 1.15;
}

.fact-until {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 22;
  padding: 14px 36px;
  border-radius: 100px;
  background: #6e6456;
  color: #fffdf8;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(40, 32, 18, 0.25);
}

