/* Maestro shared styles. Tokens and decisions are documented in DESIGN.md. */
:root {
  --bg: #f1f2f4;
  --surface: #ffffff;
  --ink: #121418;
  --muted: #4d535c;
  --faint: #646a73;
  --line: #d9dce1;
  --line-strong: #b9bec6;
  --rec: #c4321a;
  --rec-soft: #fbe9e5;
  --ok: #1f7a4d;
  --film: #0f1012;
  --film-text: #a9adb4;
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --gutter: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(28px, 4.2vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.25; }
:focus-visible { outline: 3px solid var(--rec); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(241, 242, 244, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 800 20px/1 var(--display); letter-spacing: -0.03em; text-decoration: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 3px var(--rec-soft); }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.header-cta { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rec); text-decoration-thickness: 2px; white-space: nowrap; }
@media (max-width: 760px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
}

/* Buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: var(--radius-sm);
  font: 600 17px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2e35; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary .arrow { color: #ff9b85; }
.btn[disabled] { cursor: progress; background: #3b3f46; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-quiet:hover { border-color: var(--ink); }

.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-weight: 400; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 16px/1.3 var(--body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(196, 50, 26, 0.28); }
.form-error { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--rec-soft); color: #7d1f0f; font-size: 15px; }
.form-error a { font-weight: 600; }
.form-ok { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: #e3f2ea; color: #14532f; font-size: 15px; }

/* Sections */
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.label { font: 500 12px/1 var(--mono); letter-spacing: 0.04em; color: var(--faint); }
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 28px; }
}

/* Video cards */
.reel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 980px; }
.wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 980px; }
.row-note { margin: 36px 0 14px; font-size: 15px; color: var(--muted); }
.clip { margin: 0; }
.clip .frame {
  position: relative; overflow: hidden; background: var(--film);
  border-radius: var(--radius); box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 18px 40px -24px rgba(18,20,24,0.45);
}
.clip video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.clip.tall .frame { aspect-ratio: 9 / 16; }
.clip.square .frame { aspect-ratio: 1 / 1; }
.play {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 999px; border: 0; background: rgba(255,255,255,0.94); color: var(--ink);
  font: 600 14px/1 var(--body); cursor: pointer;
}
.play svg { width: 12px; height: 12px; }
.clip.is-playing .play { display: none; }
.clip figcaption { padding: 12px 2px 0; font-size: 15px; color: var(--muted); }
.clip figcaption strong { display: block; color: var(--ink); font-weight: 600; }
.tag { display: block; margin-top: 6px; font: 500 12px/1 var(--mono); color: var(--faint); }
@media (max-width: 760px) {
  .reel { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .reel .clip { scroll-snap-align: start; }
  .wide { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .wide .clip { scroll-snap-align: start; }
  .reel, .wide { scrollbar-width: none; }
  .reel::-webkit-scrollbar, .wide::-webkit-scrollbar { display: none; }
  .dots { display: flex; justify-content: center; gap: 2px; margin-top: 6px; }
  .dots button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
  .dots button::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--faint); transition: width 0.25s var(--ease), background-color 0.25s var(--ease); }
  .dots button[aria-current]::after { width: 22px; background: var(--ink); }
}
@media (min-width: 761px) { .dots { display: none; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 15px/1 var(--display); margin-bottom: 16px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 12px; } }

/* Order panel */
.order-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 24px 60px -40px rgba(18,20,24,0.5); }
.order-card form { display: grid; gap: 16px; }
.order-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promise { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.promise li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--muted); }
.promise li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.thanks { display: none; text-align: left; }
.thanks.show { display: block; }
.thanks h3 { font-size: 26px; margin-bottom: 10px; }
.thanks p { color: var(--muted); }
.order-card.done form { display: none; }
@media (max-width: 860px) {
  .order-grid { grid-template-columns: 1fr; gap: 28px; }
  .order-card { padding: 20px; }
  .order-card .row { grid-template-columns: 1fr; }
}

/* Pricing */
.price-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 36px; }
.price { font: 800 64px/1 var(--display); letter-spacing: -0.04em; }
.price small { font: 500 17px/1 var(--body); letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.price-card .lede { color: var(--muted); margin: 14px 0 24px; }
.price-card ul { margin: 0; }
.note { margin-top: 20px; font-size: 15px; color: var(--faint); }
@media (max-width: 760px) { .price-card { grid-template-columns: 1fr; padding: 24px; gap: 24px; } .price { font-size: 52px; } }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative; font: 600 18px/1.35 var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 26px/1 var(--body); color: var(--faint); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 36px; }

/* Compact capture band (Shopify app list) */
.band { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.band p { color: var(--muted); margin: 10px 0 0; }
.band form { display: grid; gap: 12px; }
.band .inline { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 20px; gap: 20px; } .band .inline { grid-template-columns: 1fr; } }

/* Closing CTA */
.closing { text-align: center; }
.closing p { color: var(--muted); max-width: 520px; margin: 14px auto 28px; font-size: 18px; }

/* Article pages (pricing, compare, use cases) */
.page-hero { padding: 64px 0 40px; }
.page-hero h1 { font-size: clamp(34px, 5.4vw, 56px); max-width: 820px; }
.page-hero p { font-size: 19px; color: var(--muted); max-width: 640px; margin-top: 18px; }
.page-hero .btn { margin-top: 8px; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(24px, 3.2vw, 32px); margin: 48px 0 14px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 20px 0; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
@media (max-width: 560px) { .table-wrap table { font-size: 13.5px; } .table-wrap th, .table-wrap td { padding: 10px 8px; } }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th { font-weight: 600; background: #f7f8f9; }
.table-wrap tr:last-child td { border-bottom: 0; }
.cta-box { margin: 48px 0 0; padding: 28px; border-radius: 18px; background: var(--ink); color: #fff; }
.cta-box h2 { color: #fff; margin: 0 0 10px; }
.cta-box p { color: #c9ccd2; }
.cta-box .btn-primary { background: #fff; color: var(--ink); }
.cta-box .btn-primary:hover { background: #e9eaed; }

/* Long-form pages: compare and use cases */
.page-article { max-width: 800px; padding-top: 48px; padding-bottom: 24px; }
.page-article h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.06; letter-spacing: -0.03em; margin: 12px 0 22px; }
.page-article > p:first-of-type + h1 + p { font-size: 19px; color: var(--ink); }
.breadcrumb { font-size: 14px; color: var(--faint); }
.breadcrumb a { color: var(--muted); }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0; padding: 22px 24px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.cta-band p { margin: 0; color: #e4e6ea; font-weight: 500; }
.cta-band .btn-primary { background: #fff; color: var(--ink); }
.cta-band .btn-primary:hover { background: #e9eaed; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ink); }
.faq-list details p { margin-top: 0; }
.related { max-width: 800px; padding-bottom: 64px; }
.related h2 { font-size: 22px; margin: 32px 0 14px; }
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.related a { display: inline-block; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; font-size: 15px; background: var(--surface); }
.related a:hover { border-color: var(--ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 15px; color: var(--muted); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-footer h4 { margin: 0 0 12px; font: 600 14px/1 var(--body); color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .fine { margin-top: 32px; font-size: 14px; color: var(--faint); }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > :first-child { grid-column: 1 / -1; } }

/* Entrance: visible by default, hidden state only at first style resolution. */
.reveal { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
@starting-style { .reveal { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .reveal { transform: none; }
}
