/* ==========================================================================
   Maestro Digital — main stylesheet
   Design: Concept A "Noir" — near-black, electric lime, serif italic accents
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --bg-3: #1b1b1e;
  --line: #26262a;
  --line-2: #3a3a40;
  --text: #f2f2ee;
  --muted: #9a9a96;
  --accent: #c8ff3d;
  --accent-ink: #0b0b0c;
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1240px;
  --prose: 720px;
  --font: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 16px; top: 16px; }
.placeholder-tag {
  display: inline-block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px dashed var(--muted); color: var(--muted); padding: 2px 8px; border-radius: 99px; vertical-align: middle; white-space: nowrap;
}
.btn-row .placeholder-tag { align-self: center; padding: 8px 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; line-height: 1.2;
  padding: 13px 22px; border-radius: 99px; background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--text); box-shadow: none; }
.btn.dark { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.link-arrow { font-weight: 600; display: inline-flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s, color .2s; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Header / nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); }
/* Blur lives on a pseudo-element: backdrop-filter on .nav itself would trap the fixed mobile menu inside the header */
.nav::before { content: ''; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(11,11,12,.78); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; align-items: center; font-weight: 500; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--muted); transition: color .2s; position: relative; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; place-items: center; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s, background .3s; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.nav.open .burger span { background: transparent; }
.nav.open .burger span::before { transform: translateY(6px) rotate(45deg); }
.nav.open .burger span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; }

/* ---------- Generic sections ---------- */
section { padding: 120px 0; }
.section-tight { padding: 80px 0; }
.no-top { padding-top: 0; }
.border-top { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 56px; flex-wrap: wrap; }
.section-head h2, .h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.035em; font-weight: 700; max-width: 18ch; }
.section-head p { color: var(--muted); max-width: 42ch; }
.h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.025em; line-height: 1.15; font-weight: 600; }

/* ---------- Home hero ---------- */
.hero { padding: 120px 0 88px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; width: 760px; height: 760px; right: -240px; top: -220px;
  background: radial-gradient(circle, rgba(200,255,61,.16), transparent 60%); pointer-events: none;
}
.hero h1 { font-size: clamp(48px, 8.2vw, 124px); line-height: .95; letter-spacing: -.045em; font-weight: 700; max-width: 13ch; margin: 28px 0 40px; }
.hero h1 .serif { color: var(--accent); }
.hero-sub { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.hero-sub p { font-size: 21px; color: var(--muted); max-width: 48ch; }
.hero-sub p strong { color: var(--text); font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,255,61,.6); } 100% { box-shadow: 0 0 0 12px rgba(200,255,61,0); } }

/* ---------- Inner page hero ---------- */
.page-hero { padding: 96px 0 72px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero::before {
  content: ''; position: absolute; width: 620px; height: 620px; right: -200px; top: -260px;
  background: radial-gradient(circle, rgba(200,255,61,.12), transparent 60%); pointer-events: none;
}
.page-hero h1 { font-size: clamp(42px, 6.4vw, 92px); line-height: .98; letter-spacing: -.04em; font-weight: 700; max-width: 15ch; margin: 20px 0 28px; }
.page-hero h1 .serif { color: var(--accent); }
.page-hero .lede { font-size: 21px; color: var(--muted); max-width: 54ch; }
.page-hero .btn-row { margin-top: 36px; }
.crumbs { display: flex; gap: 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { opacity: .5; }

/* ---------- Brands strip ---------- */
.brands { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.brands .wrap { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.brand-list { display: flex; gap: 48px; flex-wrap: wrap; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: #d8d8d2; }

/* ---------- Service rows ---------- */
.services-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid; grid-template-columns: 80px 1.1fr 1fr 40px; gap: 32px; align-items: center;
  padding: 36px 0; border-bottom: 1px solid var(--line); transition: padding .3s, background .3s;
}
.service-row:hover { padding-left: 16px; padding-right: 16px; background: var(--bg-2); }
.service-row .num { font-family: var(--serif); font-size: 28px; color: var(--muted); }
.service-row h3 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.025em; font-weight: 600; line-height: 1.1; }
.service-row p { color: var(--muted); font-size: 16px; }
.service-row .arrow { font-size: 24px; transition: transform .3s, color .3s; }
.service-row:hover .arrow { transform: translateX(6px) rotate(-45deg); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips span { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }

/* ---------- Lime feature panel ---------- */
.feature-panel {
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 80px);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
}
.feature-panel h2 { font-size: clamp(34px, 4.8vw, 64px); line-height: 1; letter-spacing: -.04em; margin-top: 16px; }
.feature-panel p { margin-top: 18px; font-size: 18px; max-width: 46ch; }
.feature-panel .eyebrow { color: rgba(11,11,12,.6); }
.feature-panel ul { list-style: none; display: grid; gap: 14px; font-size: 18px; font-weight: 500; }
.feature-panel li { display: flex; gap: 12px; border-bottom: 1px solid rgba(11,11,12,.15); padding-bottom: 14px; }
.feature-panel li::before { content: '→'; }
.feature-panel .btn { margin-top: 28px; }

/* ---------- Cards ---------- */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s, transform .3s; }
a.card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.card-img {
  aspect-ratio: 16/10; background:
    linear-gradient(135deg, rgba(200,255,61,.10), transparent 50%),
    repeating-linear-gradient(45deg, #18181b 0 12px, #1c1c20 12px 24px);
  display: grid; place-items: center; color: #55555c; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 22px; letter-spacing: -.02em; line-height: 1.25; margin: 10px 0 8px; }
.card-body p { color: var(--muted); font-size: 15px; }
.card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.metric { display: flex; gap: 28px; margin-top: auto; padding-top: 18px; }
.metric b { display: block; font-size: 28px; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.metric small { color: var(--muted); font-size: 13px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Shopify feature grid (one large + two small) */
.shopify-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.shopify-grid .card:first-child { grid-row: span 2; }
.shopify-grid .card:first-child .card-img { aspect-ratio: auto; flex: 1; min-height: 300px; }

/* ---------- Case study teasers ---------- */
.case { border-top: 2px solid var(--text); padding-top: 22px; display: block; transition: border-color .3s; }
.case:hover { border-color: var(--accent); }
.case .eyebrow { display: flex; justify-content: space-between; gap: 8px; }
.case h3 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; margin: 14px 0 10px; }
.case p { color: var(--muted); font-size: 15px; }
.case .big { font-size: 56px; font-weight: 700; letter-spacing: -.04em; margin-top: 18px; line-height: 1; }

/* ---------- Bordered tiles (audience, process, features) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tiles.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tiles.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tile { background: var(--bg); padding: 40px 32px; }
.tile h3 { font-size: 26px; letter-spacing: -.025em; line-height: 1.15; margin: 12px 0 10px; }
.tile p { color: var(--muted); font-size: 15px; }
.tile ul { list-style: none; margin-top: 16px; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.tile li::before { content: '— '; color: var(--accent); }

/* ---------- Split (two-column text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: start; }
.split .sticky { position: sticky; top: 112px; }
.split p + p { margin-top: 18px; }
.split .big-copy { font-size: 22px; line-height: 1.5; }
.split .big-copy p { color: var(--muted); }
.split .big-copy strong { color: var(--text); font-weight: 500; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 0 0; }
.stat b { display: block; font-size: clamp(36px, 4vw, 56px); letter-spacing: -.04em; line-height: 1; }
.stat small { color: var(--muted); font-size: 14px; display: block; margin-top: 10px; }

/* ---------- Timeline ---------- */
.timeline { border-top: 1px solid var(--line); }
.role { display: grid; grid-template-columns: 200px 1fr 1.2fr; gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.role .when { font-family: var(--serif); font-size: 24px; color: var(--muted); }
.role h3 { font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.role .org { color: var(--accent); font-weight: 500; margin-top: 4px; }
.role p { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 28px 0; display: flex; justify-content: space-between; gap: 24px; font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 28px; line-height: 1; color: var(--muted); transition: transform .3s, color .3s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { color: var(--muted); padding: 0 0 28px; max-width: 70ch; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.filters button { font: inherit; font-size: 14px; font-weight: 500; padding: 9px 18px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: .2s; }
.filters button:hover { color: var(--text); border-color: var(--line-2); }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
[data-filter-item].is-hidden { display: none; }

/* ---------- Article / prose ---------- */
.article-head { padding: 88px 0 56px; border-bottom: 1px solid var(--line); }
.article-head .wrap { max-width: calc(var(--prose) + 48px); }
.article-head h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; margin: 20px 0 22px; }
.article-head .lede { font-size: 21px; color: var(--muted); }
.article-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 28px; }
.prose { max-width: calc(var(--prose) + 48px); margin: 0 auto; padding: 64px 24px 40px; font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 34px; letter-spacing: -.03em; line-height: 1.15; margin-top: 2em; }
.prose h3 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; margin-top: 1.8em; }
.prose p, .prose li { color: #cfcfca; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(200,255,61,.4); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 24px; font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1.35; color: var(--text); }
.prose .callout { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; font-size: 16px; }
.prose .callout strong { display: block; margin-bottom: 6px; color: var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }

/* ---------- Apps ---------- */
.app-icon { width: 88px; height: 88px; border-radius: 22px; display: grid; place-items: center; font-size: 42px; background: var(--bg-3); border: 1px solid var(--line); }
.app-hero { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.app-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.app-facts div { padding: 22px 20px 0 0; }
.app-facts small { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.app-facts b { font-size: 20px; font-weight: 600; }
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.screens .card-img { aspect-ratio: 9/19; border-radius: 24px; border: 1px solid var(--line); }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: 160px 0; border-top: 1px solid var(--line); }
.cta h2 { font-size: clamp(44px, 8vw, 120px); line-height: .95; letter-spacing: -.045em; margin: 20px auto 36px; max-width: 14ch; }
.cta h2 .serif { color: var(--accent); }
.cta p { color: var(--muted); max-width: 48ch; margin: -12px auto 36px; font-size: 19px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 72px 0 32px; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 56px; }
.footer-grid h4 { color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--text); }
.footer-grid .logo { color: var(--text); display: inline-block; margin-bottom: 14px; }
.footer-grid p { max-width: 34ch; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; font-size: 14px; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .status i { animation: none; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4, .tiles.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .role { grid-template-columns: 160px 1fr; }
  .role p { grid-column: 2; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .burger { display: grid; }
  .mobile-menu {
    display: block; position: fixed; inset: 72px 0 0 0; background: var(--bg); padding: 32px 24px;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s; overflow-y: auto;
  }
  .nav.open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
  .mobile-menu a:not(.btn) { display: block; font-size: 34px; font-weight: 700; letter-spacing: -.03em; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .mobile-menu a[aria-current="page"] { color: var(--accent); }
  .mobile-menu .btn { margin-top: 32px; }
  body.menu-open { overflow: hidden; }

  section { padding: 80px 0; }
  .hero { padding: 72px 0 56px; }
  .page-hero { padding: 64px 0 52px; }
  .hero-sub { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; gap: 10px; }
  .service-row .arrow { display: none; }
  .feature-panel, .shopify-grid, .grid-2, .grid-3, .tiles, .tiles.cols-2, .split, .app-hero { grid-template-columns: 1fr; }
  .split { gap: 32px; }
  .split .sticky { position: static; }
  .shopify-grid .card:first-child { grid-row: auto; }
  .shopify-grid .card:first-child .card-img { min-height: 0; aspect-ratio: 16/10; }
  .brand-list { gap: 24px; font-size: 18px; }
  .stats, .app-facts { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .screens { grid-template-columns: repeat(2, 1fr); }
  .cta { padding: 100px 0; }
}
@media (max-width: 600px) {
  .grid-4, .tiles.cols-4, .footer-grid { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 8px; }
  .role p { grid-column: auto; }
  .prose { font-size: 17px; }
  .prose blockquote { font-size: 23px; }
}
