/* ============================================================
   Maromi Systems v7 — homepage-only extras + demo state machine
   Sits on top of site-v7.css. Captures the inline JSX styles
   from the v7 prototype as proper CSS classes, plus the wired
   /api/demo/generate state-machine styles preserved from the
   previous live homepage (dispatch 014).
   ============================================================ */

/* ---------- Hero preview (UI variant) — JSX-inline → class ---------- */
.hero-preview-body { padding: 26px 28px; display: grid; grid-template-columns: 0.85fr 1fr; gap: 24px; }
.hero-preview-thumb {
  aspect-ratio: 4/5;
  background: repeating-linear-gradient(135deg, #f2f4f8 0 8px, #e9ecf2 8px 16px);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.14em; color: var(--mute); text-transform: uppercase;
}
.hero-preview-fields { display: flex; flex-direction: column; gap: 14px; }
.hero-preview-label { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
.hero-preview-title { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 17px; line-height: 1.25; color: var(--ink); }
.hero-preview-bullets { font-size: 12px; line-height: 1.5; color: var(--body); }
.hero-preview-kw { display: flex; flex-wrap: wrap; gap: 4px; }
.hero-preview-foot {
  display: flex; justify-content: space-between; padding: 12px 20px;
  border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute);
}
.hero-preview-ok { color: var(--accent-ink); }

/* ---------- Mobile reflow for the hero editor-preview card (dispatch 059) ----------
   Root cause: .hero-preview-body is a 2-column inner grid (0.85fr 1fr) that never
   collapsed below the hero's 900px breakpoint, so on phones the thumb + fields were
   forced side-by-side inside the already-narrow full-width card — squished/clipped.
   Collapse to one column on phones, cap the thumb height, and let the long title wrap. */
@media (max-width: 560px) {
  .hero-preview-body { grid-template-columns: 1fr; gap: 18px; padding: 20px 20px; }
  .hero-preview-thumb { aspect-ratio: 16/10; max-height: 220px; }
}
.hero-preview-title { overflow-wrap: anywhere; }
.hero-preview-kw { min-width: 0; }
.hero-preview-card, .hero-preview-body, .hero-preview-fields { min-width: 0; max-width: 100%; }

.editor-keyword {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  padding: 3px 8px; border-radius: 0;
}
.editor-keyword.score { background: var(--ink); color: var(--paper); }

/* ---------- TryIt section / demo state-machine (from homepage.css) ---------- */
.tryit { padding: var(--section-y) 0; background: var(--paper-cream); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tryit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.tryit-badge { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; background: var(--accent); padding: 6px 10px; color: var(--accent-ink); }
.demo-card { background: var(--paper); border: 1px solid var(--ink); padding: 36px; position: relative; box-shadow: 0 28px 60px -36px rgba(0,0,0,0.24); }

.hd-form { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 800px) { .hd-form { grid-template-columns: 1fr 1.2fr; gap: 36px; } }
.hd-fields { display: flex; flex-direction: column; gap: 16px; }
.hd-drop {
  display: block; background: var(--paper-2); border: 1.5px dashed var(--ink);
  padding: 40px 24px; cursor: pointer; min-height: 220px; position: relative;
  background-size: cover; background-position: center;
  transition: background-color .15s;
}
.hd-drop.drag { background-color: var(--accent); }
.hd-drop.has-image { background-image: var(--bg-image); }
.hd-drop.has-image .hd-drop-inner { background: rgba(255,255,255,0.94); padding: 8px 14px; border-radius: 0; }
.hd-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.hd-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; height: 100%; justify-content: center; }
.hd-drop-icon { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 32px; color: var(--ink); }
.hd-drop-text { font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.4; }
.hd-drop-text span { display: block; font-size: 12px; font-weight: 400; color: var(--mute); margin-top: 2px; }
.hd-field label { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); display: block; margin-bottom: 6px; }
.hd-field label span { color: var(--mute); text-transform: none; letter-spacing: 0; font-family: 'DM Sans', system-ui, sans-serif; font-size: 12px; margin-left: 4px; font-weight: 400; }
.hd-field input, .hd-field select { width: 100%; padding: 12px 14px; font-family: 'DM Sans', system-ui, sans-serif; font-size: 16px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.hd-field input:focus, .hd-field select:focus { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.hd-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.hd-cta { width: 100%; justify-content: center; margin-top: 8px; }
.hd-fineprint { font-size: 12px; color: var(--mute); margin-top: 4px; }

/* writing state */
.hd-writing { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hd-writing-mark { width: 88px; height: 88px; display: flex; align-items: center; justify-content: center; }
.hd-writing-mark svg { width: 100%; height: 100%; overflow: visible; }
.hd-writing-mark .m-stroke { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 480; stroke-dashoffset: 480; animation: m-draw 2.6s ease-in-out infinite; }
@keyframes m-draw { 0% { stroke-dashoffset: 480; } 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -480; } }
.hd-writing-text { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(24px, 3vw, 32px); color: var(--ink); }
.hd-writing-step { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); }

/* result state */
.hd-result-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.hd-result-thumb { width: 100%; max-width: 180px; aspect-ratio: 4/5; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--rule); }
.hd-result-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hd-result-block { margin: 16px 0; }
.hd-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
.hd-title { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(20px, 2vw, 26px); line-height: 1.25; color: var(--ink); }
.hd-desc { font-size: 15px; line-height: 1.6; color: var(--body); }
.hd-desc p { margin: 0 0 10px; }
.hd-desc p:last-child { margin-bottom: 0; }
.hd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 4px 8px; }
.hd-locked { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--rule-strong); text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.hd-locked-text { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(18px, 2vw, 22px); color: var(--ink); max-width: 36ch; line-height: 1.4; }

/* used / retry */
.hd-used-headline { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 600; font-size: clamp(28px, 3.4vw, 38px); color: var(--ink); line-height: 1.1; }
.hd-used-headline em { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 700; font-size: 1.05em; }
.hd-reset-link { background: transparent; border: none; color: var(--mute); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; padding: 6px; }
.hd-reset-link:hover { color: var(--ink); }

/* ---------- Editor section: 4-up feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 64px; }
@media (min-width: 700px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-col { border-top: 1px solid var(--ink); padding-top: 22px; }
.feature-num { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 24px; color: var(--ink); display: block; margin-bottom: 12px; }
.feature-col h4 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 8px; }
.feature-col p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--body); }

/* ---------- Rules + still-life + closing helpers (JSX-inline → class) ---------- */
.rules-h2 { font-size: var(--fs-display-l); max-width: 16ch; }
.rules-lead { margin-top: 24px; max-width: 44ch; }
.stilllife-h2 { font-size: var(--fs-display-l); max-width: 16ch; }
.stilllife-lead { margin-top: 24px; max-width: 42ch; }
.stilllife-attr { margin-top: 32px; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 18px; color: var(--ink); }

.closing-h2 { font-size: clamp(46px, 7vw, 92px); max-width: 16ch; }
.closing-lead { margin-top: 28px; max-width: 48ch; color: rgba(255,255,255,0.82); }
.closing-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-paper-ghost { background: transparent; color: var(--paper); border-color: rgba(255,255,255,0.5); }
.btn-paper-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- Footer ---------- */
.footer-bar { padding: 56px 0 40px; border-top: 1px solid var(--rule); }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; } }
.foot-logo { height: 88px; margin: -16px 0 -8px -4px; width: auto; display: block; }
.foot-tagline { max-width: 32ch; font-size: 14px; color: var(--mute); margin-top: 16px; }
.footer-bar h4 { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin: 0 0 16px; }
.footer-bar ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-bar ul li a { color: var(--ink); text-decoration: none; }
.footer-bar ul li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--mute); }

/* ---------- Smooth scroll for anchor CTAs ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============================================================
   045b — Restored sections (pricing, FAQ, explanatory texts).
   Pre-045 styling ported from public/styles/homepage.css and
   re-fitted to the v7 token system (--sky → --accent).
   ============================================================ */

/* Alternate section backgrounds — restored from 014/14d homepage */
.cream { background: var(--paper-cream); padding: var(--section-y) 0; }
.stone { background: var(--paper-stone); padding: var(--section-y) 0; }

/* Shared restored-section helpers */
.restore-h2 { font-size: var(--fs-display-l); max-width: 18ch; }
.restore-lead { margin-top: 20px; max-width: 50ch; }
.restore-body { margin-top: 32px; max-width: 56ch; }
.restore-list { font-size: var(--fs-lead); line-height: 1.7; padding-left: 22px; margin: 16px 0 28px; }
.restore-list li { margin-bottom: 6px; }
.restore-spaced { margin-top: 20px; }

/* "Everything your shop needs" — checklist */
.checklist { margin-top: 40px; display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 760px; }
@media (min-width: 700px) { .checklist { grid-template-columns: 1fr 1fr; gap: 14px 56px; } }
.check-item { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.check-item .tick { color: var(--ink); font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 22px; line-height: 1; }
.check-item strong { font-weight: 500; font-size: var(--fs-body); display: block; color: var(--ink); }

/* Pricing — three-tier cards, Pro featured */
.price-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
@media (min-width: 900px) { .price-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; } }
.price { background: var(--paper); border: 1px solid var(--rule-strong); padding: 32px 28px; display: flex; flex-direction: column; }
.price h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 28px; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.price .amount { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400; font-size: 56px; line-height: 1; margin: 18px 0 4px; color: var(--ink); }
.price .per { font-size: 14px; color: var(--ink); }
.price .price-tagline { font-style: italic; font-family: 'Cormorant Garamond', serif; font-size: 18px; color: var(--mute); margin: 16px 0 0; line-height: 1.35; }
.price .price-tagline.price-tagline-ink { color: var(--ink); }
.price ul { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.price li { font-size: 15px; line-height: 1.5; padding-left: 18px; position: relative; color: var(--body); }
.price li::before { content: "·"; position: absolute; left: 4px; font-size: 22px; line-height: 1; color: var(--ink); }
.price .btn { width: 100%; justify-content: center; }
.price.featured { background: var(--accent); border-color: var(--accent); position: relative; box-shadow: 0 28px 56px -28px rgba(0,0,0,0.22), 0 1px 0 var(--ink); }
.price.featured .price-tagline { color: var(--accent-ink); }
.price.featured::after {
  content: "Recommended";
  position: absolute; top: -14px; right: 20px;
  background: var(--ink); color: var(--paper);
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 10px; transform: rotate(2deg);
}
.price-fineprint { font-style: italic; font-family: 'Cormorant Garamond', serif; font-size: 18px; color: var(--mute); margin-top: 28px; }

/* "No contracts" sub-block inside pricing */
.no-contracts { margin-top: 64px; }
.no-contracts-h2 { font-size: var(--fs-display-m); max-width: 18ch; }

/* FAQ — accessible <details>/<summary> with wobbly dividers */
.faq-h2 { max-width: 14ch; }
.faq-list { margin-top: 40px; }
.faq-row { padding: 28px 0 28px 36px; position: relative; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 4' preserveAspectRatio='none'><path d='M2 2 Q 200 1, 400 2 T 800 2 T 1198 2' stroke='black' stroke-width='1' fill='none' stroke-linecap='round' opacity='0.28'/></svg>"); background-repeat: no-repeat; background-position: 0 0; background-size: 100% 4px; }
.faq-row::before { content: '+'; position: absolute; left: 4px; top: 28px; font-family: 'JetBrains Mono', monospace; font-size: 22px; color: var(--ink); line-height: 1; font-weight: 500; }
.faq-row[open]::before { content: '−'; }
.faq-row summary { list-style: none; cursor: pointer; outline: none; }
.faq-row summary::-webkit-details-marker { display: none; }
.faq-row summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.faq-row h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.01em; line-height: 1.25; margin: 0; color: var(--ink); }
.faq-row[open] h3 { margin-bottom: 12px; }
.faq-row p { max-width: 70ch; font-size: var(--fs-body); line-height: 1.55; margin: 0; color: var(--body); }
.faq-row:last-child::after {
  content: ''; display: block; height: 4px; margin-top: 24px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 4' preserveAspectRatio='none'><path d='M2 2 Q 200 3, 400 2 T 800 2 T 1198 2' stroke='black' stroke-width='1' fill='none' stroke-linecap='round' opacity='0.28'/></svg>");
  background-repeat: no-repeat; background-size: 100% 100%;
}
