/* ───────────────────────────────────────────────────────────
   Tiramisu — Design System
   Apple Liquid Glass meets warm-tiramisu palette
   ─────────────────────────────────────────────────────────── */

:root {
  /* Tiramisu palette */
  --mascarpone: #fbf3e2;
  --cream: #f5e9d4;
  --crema: #c8a370;
  --cocoa-soft: #8c5a3a;
  --cocoa: #4a2c1a;
  --espresso: #2b1810;
  --accent: #d4823b;
  --accent-deep: #b86628;
  --highlight: #ffffff;

  /* ───── Tiramisu textures (SVG noise data URIs) ───── */
  /* Fine grain: like fresh-ground cocoa dust on the top of a slice */
  --tex-dust: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch' seed='3'/><feColorMatrix values='0 0 0 0 0.22 0 0 0 0 0.13 0 0 0 0 0.07 0 0 0 0.85 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  /* Powder: heavier dusting like the top of fresh tiramisu */
  --tex-powder: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='4' stitchTiles='stitch' seed='7'/><feColorMatrix values='0 0 0 0 0.22 0 0 0 0 0.13 0 0 0 0 0.07 0 0 0 0.75 0'/></filter><rect width='320' height='320' filter='url(%23n)'/></svg>");
  /* Coarse speckle: bigger cocoa flakes scattered */
  --tex-flakes: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='480' height='480'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.22' numOctaves='3' stitchTiles='stitch' seed='11'/><feColorMatrix values='0 0 0 0 0.13 0 0 0 0 0.07 0 0 0 0 0.04 0 0 0 0.7 0'/><feComponentTransfer><feFuncA type='discrete' tableValues='0 0 0 0 0 0 0 0.4 0.8 1'/></feComponentTransfer></filter><rect width='480' height='480' filter='url(%23n)'/></svg>");
  /* Mascarpone weave: smooth cream-like noise */
  --tex-cream: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch' seed='5'/><feColorMatrix values='0 0 0 0 0.99 0 0 0 0 0.96 0 0 0 0 0.88 0 0 0 0.45 0'/></filter><rect width='260' height='260' filter='url(%23n)'/></svg>");
  /* Espresso stains: scattered dark circular blots */
  --tex-stains: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><g opacity='0.20'><ellipse cx='80' cy='120' rx='42' ry='14' fill='%234a2c1a' transform='rotate(15 80 120)'/><ellipse cx='420' cy='240' rx='30' ry='10' fill='%232b1810' transform='rotate(-10 420 240)'/><ellipse cx='220' cy='450' rx='52' ry='18' fill='%234a2c1a' transform='rotate(8 220 450)'/><ellipse cx='520' cy='480' rx='38' ry='13' fill='%232b1810' transform='rotate(-22 520 480)'/><ellipse cx='90' cy='340' rx='26' ry='9' fill='%234a2c1a' transform='rotate(34 90 340)'/></g></svg>");
  /* Ladyfinger horizontal striations — soft cream layer pattern */
  --tex-ladyfinger: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='80'><defs><linearGradient id='lf' x1='0' x2='0' y1='0' y2='1'><stop offset='0%25' stop-color='%23d4b083' stop-opacity='0.10'/><stop offset='40%25' stop-color='%23c8a370' stop-opacity='0.16'/><stop offset='60%25' stop-color='%238c5a3a' stop-opacity='0.10'/><stop offset='100%25' stop-color='%234a2c1a' stop-opacity='0.06'/></linearGradient></defs><rect width='400' height='80' fill='url(%23lf)'/></svg>");

  /* Liquid Glass */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.7);
  --glass-bg-deep: rgba(43, 24, 16, 0.6);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-border-soft: rgba(74, 44, 26, 0.12);
  --glass-shadow: 0 8px 32px rgba(74, 44, 26, 0.08);
  --glass-shadow-deep: 0 24px 60px rgba(74, 44, 26, 0.18);
  --glass-inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  /* Type scale */
  --font-display: -apple-system, "SF Pro Display", BlinkMacSystemFont, sans-serif;
  --font-text: -apple-system, "SF Pro Text", BlinkMacSystemFont, sans-serif;
  --font-mono: "SF Mono", Menlo, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-text);
  color: var(--espresso);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #fbf3e2;
  overflow-x: hidden;
}

/* Anchor scrolls account for the fixed floatnav */
html { scroll-padding-top: 110px; }

body {
  /* Simple warm cream — readability first.
     The "cake" feeling comes from the cocoa dust + stain overlays + textured cards,
     not from the body gradient. */
  background:
    radial-gradient(ellipse 1200px 800px at 20% -10%, rgba(212, 130, 59, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 1000px 600px at 80% 20%, rgba(200, 163, 112, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 1400px 1000px at 50% 100%, rgba(140, 90, 58, 0.12) 0%, transparent 65%),
    linear-gradient(180deg, #fbf3e2 0%, #f5e9d4 50%, #ecdab8 100%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}
/* Texture is applied PER-ELEMENT, not page-wide.
   The cream body stays clean — grain lives on dark-brown surfaces:
   - .glass.dark cards get cocoa flakes via .glass.dark::after
   - .heroframe sections get the cocoa crust via .tex-powder-top
   - Any element can opt in via .tex-dust / .tex-flakes / .tex-cream / .tex-powder-top
   Re-introducing a body-wide overlay made every page feel grainy regardless of palette;
   we want the texture to read as "this dark-brown surface is dusted" rather than
   "the entire page is filtered through noise". */
body > * { position: relative; z-index: 1; }

/* ───── Texture utility classes ───── */
.tex-dust   { position: relative; }
.tex-dust::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tex-dust);
  background-size: 220px 220px;
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
  /* Light dusting concentrated at the top — like cocoa settled on a slice */
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 18%, transparent 65%);
  mask-image: linear-gradient(180deg, black 0%, black 18%, transparent 65%);
}
.tex-dust > * { position: relative; z-index: 1; }

.tex-powder-top { position: relative; overflow: hidden; }
/* The cocoa crust — a dramatic dark band at the very top with heavy texture */
.tex-powder-top::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 12%;
  background: linear-gradient(180deg, rgba(74, 44, 26, 0.30) 0%, rgba(74, 44, 26, 0.10) 60%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.tex-powder-top::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tex-powder), var(--tex-flakes);
  background-size: 320px 320px, 480px 480px;
  background-position: 0 0, 120px 0;
  opacity: 0.38;
  mix-blend-mode: multiply;
  pointer-events: none;
  border-radius: inherit;
  /* A light dusting at the top, fading quickly — like cocoa on a slice */
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 12%, transparent 45%);
  mask-image: linear-gradient(180deg, black 0%, black 12%, transparent 45%);
  z-index: 0;
}
.tex-powder-top > * { position: relative; z-index: 1; }

.tex-flakes { position: relative; }
.tex-flakes::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tex-flakes);
  background-size: 480px 480px;
  opacity: 0.14;
  pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: multiply;
  z-index: 0;
  /* Sparse top-down fade so flakes feel like settled dust, not a coating */
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 25%, transparent 75%);
  mask-image: linear-gradient(180deg, black 0%, black 25%, transparent 75%);
}
.tex-flakes > * { position: relative; z-index: 1; }

.tex-cream { position: relative; }
.tex-cream::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tex-cream);
  background-size: 260px 260px;
  opacity: 0.20;
  pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: overlay;
  z-index: 0;
}
.tex-cream > * { position: relative; z-index: 1; }

/* Bumpy embossed surface (like the irregular top of a tiramisu) */
.bumpy {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 1px rgba(74, 44, 26, 0.08),
    inset 1px 0 1px rgba(255, 255, 255, 0.4),
    inset -1px 0 1px rgba(74, 44, 26, 0.05),
    var(--glass-shadow);
}

/* Layered cake stratum — three faint horizontal bands echoing tiramisu's structure */
.tiramisu-strata { position: relative; }
.tiramisu-strata::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      transparent 0%,
      rgba(74, 44, 26, 0.03) 28%, rgba(74, 44, 26, 0.05) 30%, transparent 32%,
      transparent 60%,
      rgba(255, 255, 255, 0.18) 62%, rgba(255, 255, 255, 0.10) 64%, transparent 67%,
      transparent 100%);
  border-radius: inherit;
  z-index: 0;
}
.tiramisu-strata > * { position: relative; z-index: 1; }

/* ───── Typography ───── */
.display-1 {
  font-family: var(--font-display);
  font-size: clamp(68px, 11vw, 168px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0;
}
.display-2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0;
}
.display-3 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0;
}
h1 { font-family: var(--font-display); font-size: clamp(40px, 5vw, 72px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 16px; }
h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
h3 { font-family: var(--font-display); font-size: clamp(20px, 2vw, 24px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 8px; }
h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px; color: var(--accent); margin: 24px 0 8px; }
p { margin: 0 0 16px; font-size: 17px; line-height: 1.6; }
.lead { font-size: 21px; line-height: 1.5; color: var(--cocoa); opacity: 0.9; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent);
}
strong { color: var(--espresso); font-weight: 600; }
em.gradient {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cocoa-soft) 50%, var(--cocoa) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
code, .mono {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(74, 44, 26, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--cocoa);
}

/* ───── Layout ───── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }
section.block { padding: 80px 0; position: relative; }
section.hero { padding: 120px 0 80px; position: relative; }

/* ───── Liquid Glass Card ───── */
.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.35) 100%);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow:
    var(--glass-shadow),
    var(--glass-inner-light),
    inset 0 -1px 0 rgba(74, 44, 26, 0.06);
  padding: 40px 44px;
  position: relative;
  overflow: hidden;
}
/* Specular gradient border (the Liquid Glass edge highlight) */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.15) 45%, transparent 70%, rgba(255,255,255,0.3) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
/* Cocoa-dust + ladyfinger striations baked into every glass card.
   Stack is intentionally rich so cards feel like photographs of cake. */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tex-dust), var(--tex-flakes);
  background-size: 220px 220px, 480px 480px;
  background-position: 0 0, 80px 60px;
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}
.glass > * { position: relative; z-index: 2; }
.glass.dark {
  background: linear-gradient(135deg, rgba(43, 24, 16, 0.94) 0%, rgba(74, 44, 26, 0.88) 100%);
  color: var(--mascarpone);
  border-color: rgba(255, 255, 255, 0.1);
}
.glass.dark::after {
  /* Light dusting of cocoa flakes settled at the top of dark cards */
  background-image: var(--tex-flakes);
  background-size: 480px 480px;
  opacity: 0.18;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 20%, transparent 65%);
  mask-image: linear-gradient(180deg, black 0%, black 20%, transparent 65%);
}
.glass.dark h2, .glass.dark h3 { color: var(--mascarpone); }
.glass.dark p { color: var(--cream); }
.glass.dark strong { color: white; }
.glass.tight { padding: 28px 32px; border-radius: 22px; }
/* Top-of-cake dusting on hero cards — light, fades fast */
.glass.powder-top::after {
  background-image: var(--tex-powder);
  background-size: 320px 320px;
  opacity: 0.26;
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 14%, transparent 50%);
  mask-image: linear-gradient(180deg, black 0%, black 14%, transparent 50%);
}

/* ───── Buttons / Pills ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.3));
  border: 1px solid var(--glass-border);
  color: var(--espresso);
  backdrop-filter: blur(20px);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(74, 44, 26, 0.15); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: white; border-color: rgba(255,255,255,0.2); }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(74, 44, 26, 0.08);
  color: var(--cocoa);
}
.pill.accent { background: rgba(212, 130, 59, 0.15); color: var(--accent-deep); }
.pill.green { background: rgba(45, 106, 64, 0.12); color: #1f4d2f; }
.pill.red { background: rgba(193, 74, 44, 0.12); color: #8a3320; }
.pill.gold { background: rgba(200, 163, 112, 0.20); color: var(--cocoa); }

/* ───── Quote / Callout ───── */
.callout {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  font-size: 19px;
  line-height: 1.55;
  font-style: italic;
  color: var(--cocoa);
  background: linear-gradient(90deg, rgba(212, 130, 59, 0.08), transparent 80%);
  border-radius: 0 16px 16px 0;
}

/* ───── Hero variants ───── */
.hero {
  text-align: center;
  position: relative;
}
.hero .container { position: relative; }
.hero .display-1 { margin-bottom: 24px; }
.hero .lead { max-width: 700px; margin: 0 auto; }

/* ───── Tables ───── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border-soft);
  vertical-align: top;
}
th {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--cocoa);
  background: rgba(74, 44, 26, 0.04);
}
td.win { color: #1f4d2f; font-weight: 600; }
td.lose { color: #8a3320; font-weight: 600; }
td.tie { color: var(--cocoa); opacity: 0.55; }

/* ───── Scroll-triggered Reveal ───── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.34s; }
.reveal-stagger.visible > *:nth-child(n+7) { transition-delay: 0.40s; }
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }

/* ───── Floating Nav ───── */
.floatnav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: 0 12px 40px rgba(74, 44, 26, 0.10), var(--glass-inner-light);
  font-size: 13px;
  font-weight: 600;
}
.floatnav a {
  padding: 8px 14px;
  border-radius: 100px;
  text-decoration: none;
  color: var(--cocoa);
  transition: background 0.2s, color 0.2s;
}
.floatnav a:hover { background: rgba(74, 44, 26, 0.05); color: var(--espresso); }
.floatnav a.brand {
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 6px;
}
.brand-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}
/* GitHub icon button at the end of the nav */
.floatnav a.nav-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  padding: 0;
  background: var(--espresso);
  color: var(--mascarpone);
  border-radius: 100px;
  transition: transform 0.2s var(--ease-out), background 0.2s;
}
.floatnav a.nav-github:hover {
  background: var(--cocoa);
  color: var(--mascarpone);
  transform: scale(1.06);
}
.floatnav a.nav-github svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ───── Footer ───── */
footer.site {
  padding: 56px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--cocoa);
  opacity: 0.55;
}

/* ───── Animation helpers ───── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 130, 59, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(212, 130, 59, 0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.float { animation: float 6s ease-in-out infinite; }

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .glass { padding: 28px 24px; border-radius: 22px; }
  section.block, section.hero { padding: 60px 0; }
  .floatnav { top: 12px; font-size: 11px; padding: 6px; }
  .floatnav a { padding: 6px 10px; }
}

/* ─────────────────────────────────────────────────────────────────
   Showcase sections — editor screenshot + Made-with-Tiramisu gallery
   ───────────────────────────────────────────────────────────────── */

/* Section eyebrow + heading group, used by both showcase blocks */
.showcase-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}
.showcase-head .eyebrow { margin-bottom: 12px; }
.showcase-head .display-3 + p {
  color: var(--cocoa);
  opacity: 0.72;
  font-size: 17px;
  line-height: 1.55;
  margin-top: 14px;
}

/* The editor screenshot frame — sits over the parchment, glass-card style */
.editor-frame {
  max-width: 980px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 28px 80px rgba(74, 44, 26, 0.18),
    0 8px 20px rgba(74, 44, 26, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(74, 44, 26, 0.08);
  background: var(--mascarpone);
}
.editor-frame img { display: block; width: 100%; height: auto; }

/* Hero marquee thumbnail (16:9, full width of the gallery) */
.thumb-marquee {
  max-width: 980px;
  margin: 0 auto 32px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(74, 44, 26, 0.20);
  border: 1px solid rgba(74, 44, 26, 0.06);
  aspect-ratio: 16 / 9;
}
.thumb-marquee img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 3-up sub-grid below the marquee — each card holds one finished thumbnail
   in its own native aspect ratio. The figcaption below labels the format. */
.thumb-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.thumb-card { margin: 0; }
.thumb-card .frame {
  aspect-ratio: 1 / 1;             /* default — overridden per card below */
  background: var(--cream);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(74, 44, 26, 0.14);
  border: 1px solid rgba(74, 44, 26, 0.06);
}
.thumb-card .frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-card.wide .frame { aspect-ratio: 16 / 9; }
.thumb-card figcaption {
  text-align: center;
  font: 12px/1.4 var(--font-mono);
  color: var(--cocoa);
  opacity: 0.55;
  margin-top: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Blend modes contact-sheet block — small label + sheet, centered */
.blend-modes-proof {
  max-width: 720px;
  margin: 56px auto 0;
  text-align: center;
}
.blend-modes-proof p {
  color: var(--cocoa);
  opacity: 0.6;
  font-size: 13px;
  margin: 0 0 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.blend-modes-proof img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(74, 44, 26, 0.14);
  border: 1px solid rgba(74, 44, 26, 0.06);
}

/* Mobile collapse for the 3-up sub-grid */
@media (max-width: 760px) {
  .thumb-grid { grid-template-columns: 1fr; }
  .thumb-marquee { max-width: 100%; }
  .editor-frame  { max-width: 100%; }
}
