/*
 * MRS Digital Systems — main.css
 * Shared styles for all pages. Edit here, changes apply everywhere.
 * Design tokens live in theme.json — colours, spacing, typography.
 */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg:       #F5F4F2;
  --surface:  #FFFFFF;
  --border:   #E2E0DB;
  --ink:      #1E1C1A;
  --muted:    #6B6860;
  --accent:   #4338CA;
  --soft:     #EEF2FF;
  --green:    #16A34A;
  --green-bg: #ECFDF5;
  --r:        10px;
  --font:     Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --w:        min(1140px, calc(100% - 32px));
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: transparent;
  position: relative;
  isolation: isolate;
}
body.locked { overflow: hidden; }

/* ── DIGITAL CANVAS BACKGROUND ───────────────────────────── */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
/* Layer 1 — static dot grid + base colour */
body::before {
  background:
    radial-gradient(circle, rgba(67,56,202,.18) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px, 100% 100%;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(67,56,202,.35); outline-offset: 3px; border-radius: 4px; }

.wrap { width: var(--w); margin-inline: auto; }
.sec  { padding: 72px 0; background: transparent; }

/* ── ALTERNATING SECTIONS (all pages) ────────────────────── */
.wp-block-post-content > section:nth-of-type(even) { background: rgba(255,255,255,.55) !important; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1 { font-size: clamp(2.2rem, 4.8vw, 4rem); font-weight: 660; letter-spacing: -.045em; line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); font-weight: 630; letter-spacing: -.04em; line-height: 1.08; margin-bottom: 16px; }
h3 { font-size: 1.15rem; font-weight: 640; line-height: 1.3; margin-bottom: 10px; letter-spacing: -.01em; }
p  { color: var(--muted); line-height: 1.75; }
.ink { color: var(--ink); }

.label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── SKIP LINK ────────────────────────────────────────────── */
.skip { position: fixed; top: 8px; left: 8px; z-index: 999; padding: 8px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; transform: translateY(-120%); transition: transform .2s; }
.skip:focus { transform: translateY(0); }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 48px; padding: 0 22px; font-size: .95rem; font-weight: 600; border-radius: 9px; border: 1.5px solid transparent; cursor: pointer; transition: all .2s ease; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 4px rgba(67,56,202,.22), 0 4px 14px rgba(67,56,202,.14); }
.btn-primary:hover { background: #3730A3; transform: translateY(-2px); box-shadow: 0 2px 8px rgba(67,56,202,.28), 0 8px 24px rgba(67,56,202,.18); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: #b8b5ae; background: #f4f3f0; }
.btn-sm { height: 40px; padding: 0 16px; font-size: .875rem; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: .9rem; transition: gap .2s ease; }
.link:hover { gap: 10px; }

/* ── ANNOUNCEMENT STRIP ───────────────────────────────────── */
.announce { position: relative; z-index: 81; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 600; text-align: center; padding: 9px 16px; letter-spacing: .01em; display: flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden; animation: ann-breathe 5s ease-in-out infinite; }
.announce::before { content: ''; position: absolute; inset: -200%; width: 500%; height: 500%; background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(67,56,202,.14) 60deg, transparent 120deg, rgba(99,102,241,.10) 180deg, transparent 240deg, rgba(67,56,202,.08) 300deg, transparent 360deg); animation: ann-rotate 9s linear infinite; pointer-events: none; will-change: transform; }
@keyframes ann-breathe { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes ann-rotate  { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.announce a { color: #fff; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; position: relative; }
.announce-dot { width: 6px; height: 6px; background: #86EFAC; border-radius: 50%; flex: 0 0 auto; animation: adot 2s ease-in-out infinite; position: relative; }
.announce span[id] { position: relative; }
@keyframes adot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.announce-close { background: none; border: none; color: rgba(255,255,255,.55); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 0 0 8px; flex: 0 0 auto; transition: color .15s; position: relative; }
.announce-close:hover { color: #fff; }

/* ── HEADER ───────────────────────────────────────────────── */
.header { position: relative; z-index: 80; height: 62px; background: transparent; border-bottom: 1px solid transparent; transition: box-shadow .3s, background .3s, border-color .3s; }
.header.scrolled { background: rgba(255,255,255,.82); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom-color: var(--border); box-shadow: 0 1px 16px rgba(0,0,0,.06); }
@supports not (backdrop-filter: blur(1px)) {
  .header.scrolled { background: rgba(255,255,255,.97); }
}
/* Sticky wrapper — WordPress wraps template-parts in a div */
.wp-site-blocks { padding-top: 0 !important; }
.wp-site-blocks > .wp-block-template-part:first-child { position: sticky; top: 0; z-index: 80; margin-top: 0 !important; }
.header-inner { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-size: 1rem; font-weight: 720; letter-spacing: -.025em; }
.logo span { color: var(--accent); }
.nav { display: none; align-items: center; gap: 28px; font-size: .875rem; font-weight: 500; }
.nav a { color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--accent); }
.header-tel { font-size: .85rem; font-weight: 600; color: var(--muted); transition: color .2s; }
.header-tel:hover { color: var(--accent); }
.header-actions { display: none; align-items: center; gap: 10px; }
.hamburger { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: none; cursor: pointer; color: var(--ink); }
.mobile-nav { position: fixed; inset: 62px 0 0; z-index: 70; background: var(--surface); padding: 32px 24px; display: flex; flex-direction: column; gap: 20px; transform: translateX(100%); transition: transform .25s ease; }
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { font-size: 1.5rem; font-weight: 640; letter-spacing: -.03em; color: var(--ink); }
.mobile-nav .btn { margin-top: 12px; font-size: 1rem; }

/* ── SCROLL PROGRESS BAR ──────────────────────────────────── */
#scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 9999; transform-origin: left center; transform: scaleX(0); will-change: transform; pointer-events: none; }

/* ── SECTION HEAD ─────────────────────────────────────────── */
.sec-head { margin-bottom: 40px; }
.sec-head h2 { margin-bottom: 10px; }
.sec-head p { max-width: 620px; }

/* ── ANIMATIONS ───────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* ── HERO ─────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: transparent; padding: 96px 0 72px; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; background: var(--soft); border: 1px solid rgba(67,56,202,.2); border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 26px; }
.hero-badge i { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; flex: 0 0 auto; }
.hero h1 { margin-bottom: 24px; }
.hero h1 span { color: var(--accent); }
.hero-sub { font-size: 1.1rem; max-width: 580px; margin-bottom: 36px; color: var(--muted); line-height: 1.65; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-trust { display: flex; flex-direction: column; gap: 11px; }
.trust-item { display: flex; align-items: flex-start; gap: 10px; }
.trust-item svg { flex: 0 0 auto; margin-top: 3px; color: var(--green); }
.trust-item p { font-size: .875rem; color: var(--muted); margin: 0; }
.trust-item strong { color: var(--ink); }

/* ── VALUE GRID ───────────────────────────────────────────── */
.value-sec { background: transparent; border-bottom: 1px solid var(--border); }
.value-grid { display: grid; gap: 14px; }
.value-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; transition: transform .25s, box-shadow .25s, border-color .25s; cursor: pointer; }
.value-card:hover { transform: translateY(-4px); border-color: rgba(67,56,202,.25); box-shadow: 0 0 0 1px rgba(67,56,202,.08), 0 8px 32px rgba(67,56,202,.10), 0 2px 8px rgba(26,25,23,.06); }
.v-icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--soft); border-radius: 8px; margin-bottom: 16px; color: var(--accent); }
.v-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.value-card h3 { margin-bottom: 6px; }
.value-card p { font-size: .9rem; }

/* ── PROCESS ──────────────────────────────────────────────── */
.process-sec { background: transparent; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.process-list { display: grid; gap: 0; }
.process-step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.process-step:last-child { border-bottom: 0; }
.step-num { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; background: var(--soft); border-radius: 50%; font-size: .8rem; font-weight: 720; color: var(--accent); margin-top: 2px; }
.step-body strong { display: block; font-size: 1rem; font-weight: 640; color: var(--ink); margin-bottom: 4px; }
.step-body p { font-size: .9rem; margin: 0; }

/* ── CASE STUDIES / PROOF ─────────────────────────────────── */
.proof-sec { background: transparent; border-bottom: 1px solid var(--border); }
.proof-cards { display: grid; gap: 14px; }
.case-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; cursor: pointer; }
.case-card:hover { transform: translateY(-4px); border-color: rgba(67,56,202,.25); box-shadow: 0 0 0 1px rgba(67,56,202,.08), 0 8px 32px rgba(67,56,202,.10), 0 2px 8px rgba(26,25,23,.06); }
.case-top { height: 4px; }
.case-top.green { background: var(--green); }
.case-top.blue  { background: var(--accent); }
.case-body { padding: 22px; }
.case-type { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; margin-bottom: 14px; }
.case-type.green { background: var(--green-bg); color: var(--green); }
.case-type.blue  { background: var(--soft); color: var(--accent); }
.case-card p { font-size: .9rem; }
.case-flow { display: flex; align-items: center; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.case-flow span { padding: 5px 9px; background: var(--soft); border: 1px solid #dce4ff; border-radius: 5px; font-size: .7rem; font-weight: 700; color: var(--accent); }
.case-flow b { color: var(--muted); font-size: .75rem; }
.case-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.result-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .85rem; }
.result-row svg { color: var(--green); flex: 0 0 auto; }
.result-row span { color: var(--ink); }
.case-status { margin-top: 10px; display: flex; align-items: center; gap: 7px; font-size: .75rem; color: var(--muted); }
.proof-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.stat { padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
.stat-n { font-size: 1.5rem; font-weight: 720; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.stat-l { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.proof-link { color: var(--accent); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.dot.green { background: var(--green); }
.dot.blue  { background: var(--accent); }

/* ── PACKAGES ─────────────────────────────────────────────── */
.pkg-sec  { background: transparent; border-bottom: 1px solid var(--border); }
.pkg-grid { display: grid; gap: 14px; }
.pkg-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 26px 22px 22px; position: relative; display: flex; flex-direction: column; transition: all .25s; cursor: pointer; }
.pkg-card:hover { transform: translateY(-4px); border-color: rgba(67,56,202,.25); box-shadow: 0 0 0 1px rgba(67,56,202,.08), 0 8px 32px rgba(67,56,202,.10), 0 2px 8px rgba(26,25,23,.06); }
.pkg-card.featured { border-color: var(--accent); box-shadow: 0 6px 24px rgba(67,56,202,.1); }
.pkg-card.featured:hover { box-shadow: 0 12px 36px rgba(67,56,202,.15); }
.featured-tag { position: absolute; top: -1px; right: 22px; padding: 4px 10px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .06em; border-radius: 0 0 7px 7px; }
.pkg-name  { font-size: .75rem; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pkg-price { font-size: 2.1rem; font-weight: 720; letter-spacing: -.05em; line-height: 1; color: var(--ink); margin: 10px 0 6px; }
.pkg-price span { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pkg-for { font-size: .875rem; color: var(--muted); margin-bottom: 18px; }
.pkg-includes { list-style: none; margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; }
.pkg-includes li { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; color: var(--muted); }
.pkg-includes li svg { color: var(--green); flex: 0 0 auto; margin-top: 3px; }
.pkg-card .btn { margin-top: auto; width: 100%; }
.pkg-note { margin-top: 10px; text-align: center; font-size: .75rem; color: var(--muted); }
.pkg-help { text-align: center; margin-top: 28px; font-size: .9rem; color: var(--muted); }

/* ── SERVICES — TABBED ────────────────────────────────────── */
.svc-sec  { background: transparent; border-bottom: 1px solid var(--border); }
.svc-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.svc-tab  { flex: 1; min-width: 120px; padding: 9px 14px; font-size: .85rem; font-weight: 600; color: var(--muted); border: none; background: none; border-radius: 7px; cursor: pointer; transition: all .2s; text-align: center; }
.svc-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 6px rgba(26,25,23,.08); border: 1px solid var(--border); }
.svc-tab:hover:not(.active) { color: var(--ink); background: var(--bg); }
.svc-panel { display: none; }
.svc-panel.active { display: grid; gap: 24px; animation: fadeTab .25s ease; }
@keyframes fadeTab { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.svc-panel-inner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 28px; }
.svc-panel-inner h3 { margin-bottom: 10px; }
.svc-panel-inner > p { font-size: .95rem; margin-bottom: 20px; }
.svc-list { list-style: none; display: flex; flex-direction: column; margin-bottom: 20px; }
.svc-list li { padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .875rem; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; }
.svc-list li:last-child { border-bottom: 0; }
.svc-list li svg { color: var(--accent); flex: 0 0 auto; margin-top: 3px; }
.svc-price-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--border); }
.svc-price { font-size: 1.6rem; font-weight: 720; letter-spacing: -.04em; color: var(--ink); }
.svc-price span { font-size: .9rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.svc-pkg-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.svc-pkg-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: all .22s; position: relative; }
.svc-pkg-card:hover { transform: translateY(-3px); border-color: rgba(67,56,202,.3); box-shadow: 0 0 0 1px rgba(67,56,202,.08), 0 8px 28px rgba(67,56,202,.10); }
.svc-pkg-card.featured { border-color: var(--accent); }
.svc-pkg-badge { position: absolute; top: -1px; right: 12px; padding: 3px 8px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .06em; border-radius: 0 0 6px 6px; }
.svc-pkg-name  { font-size: .72rem; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.svc-pkg-price { font-size: 1.5rem; font-weight: 720; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.svc-pkg-price span { font-size: .85rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.svc-pkg-for  { font-size: .8rem; color: var(--muted); line-height: 1.4; flex: 1; }
.svc-pkg-list { list-style: none; display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.svc-pkg-list li { font-size: .75rem; color: var(--muted); padding-left: 10px; position: relative; }
.svc-pkg-list li::before { content: '·'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.svc-pkg-card .btn { margin-top: auto; }

/* ── N8N SECTION ──────────────────────────────────────────── */
.n8n-sec   { background: transparent; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.n8n-inner { display: grid; gap: 40px; }
.n8n-flows { display: grid; gap: 14px; }
.flow-label { font-size: .75rem; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.flow-row   { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.flow-row span { padding: 6px 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: .8rem; font-weight: 600; color: var(--ink); }
.flow-row b    { color: var(--muted); font-size: .8rem; font-weight: 400; }

/* ── LOCAL SEO ────────────────────────────────────────────── */
.local-sec  { background: transparent; border-bottom: 1px solid var(--border); }
.local-grid { display: grid; gap: 14px; }
.local-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; }
.local-card h3 { margin-bottom: 8px; }
.local-card p  { font-size: .9rem; }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-sec   { background: transparent; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.faq-items { border-top: 1px solid var(--border); }
.faq-item  { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; background: none; border: none; cursor: pointer; text-align: left; color: var(--ink); font-size: 1rem; font-weight: 620; }
.faq-q svg { flex: 0 0 auto; color: var(--accent); transition: transform .25s; }
.faq-q.open svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding-bottom: 18px; font-size: .925rem; max-width: 800px; }

/* ── CONTACT ──────────────────────────────────────────────── */
.contact-sec  { background: transparent; }
.contact-grid { display: grid; gap: 48px; }
.contact-info h2 { margin-bottom: 12px; }
.contact-info > p { margin-bottom: 24px; }
.direct-links { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.direct-link { display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 600; color: var(--ink); transition: color .15s; }
.direct-link:hover { color: var(--accent); }
.direct-link svg { color: var(--accent); flex: 0 0 auto; }
.social-row { display: flex; gap: 10px; margin-bottom: 26px; }
.social-btn { width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); transition: all .2s; }
.social-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--soft); }
.founder-note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; font-size: .875rem; }
.founder-note strong { display: block; margin-bottom: 4px; color: var(--ink); }
.founder-note p { margin: 0; font-size: .875rem; }
.contact-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 26px 22px; }

/* ── FORM ─────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 14px; }
.field label { display: block; font-size: .82rem; font-weight: 640; margin-bottom: 5px; color: var(--ink); }
.field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67,56,202,.1); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234338CA' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.field-wide { grid-column: 1 / -1; }
.form-meta  { margin-top: 12px; font-size: .75rem; color: var(--muted); }
.form-rodo  { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #b45309; margin-top: 5px; }
.form-success { display: none; margin-top: 12px; padding: 12px 14px; background: var(--green-bg); border: 1px solid #bbf7d0; border-radius: 7px; font-size: .85rem; color: #126b36; }
.form-success.show { display: block; }
/* inline validation */
.field.valid input, .field.valid textarea { border-color: var(--green); }
.field.invalid input, .field.invalid textarea { border-color: #e5534b; box-shadow: 0 0 0 3px rgba(229,83,75,.10); }
.field-msg { font-size: .74rem; margin-top: 4px; display: none; }
.field.invalid .field-msg { display: block; color: #e5534b; }
.field-check { display: inline; margin-left: 3px; font-size: 0; }
.field-check::after { content: "*"; font-size: .85rem; color: #e11d48; font-weight: 700; }
.field.valid .field-check::after { content: "✓"; color: var(--green); }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer { background: var(--ink); color: #d7d5d0; padding: 56px 0 24px; }
.footer-grid { display: grid; gap: 36px; margin-bottom: 40px; }
.footer-brand h2 { color: #fff; font-size: 1.1rem; margin-bottom: 6px; }
.footer p { color: #d7d5d0; }
.footer-brand p { font-size: .875rem; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-social { display: grid; place-items: center; width: 34px; height: 34px; background: rgba(255,255,255,.08); border-radius: 7px; color: #d7d5d0; transition: background .2s, color .2s; }
.footer-social:hover { background: rgba(255,255,255,.16); color: #fff; }
.footer-col h3 { color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 8px; font-size: .85rem; color: #b3b0a8; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 6px; font-size: .75rem; color: #b3b0a8; }
.footer-bottom a { color: #b3b0a8; transition: color .15s; }
.footer-bottom a:hover { color: #fff; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(26,25,23,.55); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box { position: relative; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: 14px; box-shadow: 0 24px 80px rgba(26,25,23,.22); transform: translateY(18px) scale(.97); transition: transform .3s cubic-bezier(.25,.46,.45,.94); padding: 24px; }
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; cursor: pointer; color: var(--ink); transition: background .15s; outline: none; }
.modal-close:hover { background: var(--border); }
.modal-close:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-color: transparent; }
.modal-box h3#modal-title { font-size: 1.15rem; margin: 0 48px 12px 0; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
#modal-body { margin-top: 4px; }
#modal-body p { font-size: .9rem; margin-bottom: 12px; }
.modal-tag { display: inline-flex; margin-bottom: 14px; padding: 3px 9px; background: var(--soft); border-radius: 5px; color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.modal-rows { margin-top: 16px; border-top: 1px solid var(--border); }
.modal-row { display: flex; align-items: flex-start; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .875rem; color: var(--muted); }
.modal-row:last-child { border-bottom: 0; }
.modal-row svg { flex: 0 0 auto; margin-top: 2px; }
.modal-cta { display: flex; width: 100%; margin-top: 20px; justify-content: center; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (min-width: 640px) {
  .pkg-grid   { grid-template-columns: 1fr 1fr; }
  .proof-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  :root { --w: min(1140px, calc(100% - 56px)); }
  .sec { padding: 88px 0; }
  .value-grid    { grid-template-columns: repeat(3, 1fr); }
  .local-grid    { grid-template-columns: 1fr 1fr; }
  .contact-grid  { grid-template-columns: .85fr 1.15fr; align-items: start; gap: 72px; }
  .form-grid     { grid-template-columns: 1fr 1fr; }
  .footer-grid   { grid-template-columns: 1.3fr repeat(3, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .n8n-inner     { grid-template-columns: 1fr 1fr; align-items: start; gap: 56px; }
}
@media (min-width: 900px) {
  .svc-pkg-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .nav, .header-actions { display: flex; }
  .hamburger { display: none; }
  .pkg-grid    { grid-template-columns: repeat(4, 1fr); }
  .proof-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ── SERVICE HUB CARDS ───────────────────────────────────── */
.service-hub-card { color: var(--ink); cursor: pointer; gap: 0; }
.service-hub-card:hover { text-decoration: none; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.svc-tags span { font-size: .75rem; font-weight: 600; padding: 4px 10px; background: var(--soft); border: 1px solid #c7d2fe; border-radius: 20px; color: var(--accent); }
.svc-cta { font-size: .875rem; font-weight: 600; color: var(--accent); margin-top: auto; }

/* ── GUTENBERG BLOCK GAP RESET ────────────────────────────── */
/* core/html renders raw HTML with NO wrapper div — WordPress still applies
   margin-block-start via :where(.is-layout-flow) > * + * (blockGap: 1.25rem).
   Target our section classes directly — specificity beats :where(). */
.wp-block-post-content > .sec,
.wp-block-post-content > .hero { margin-block-start: 0; margin-block-end: 0; }

/* ── VARIANT A: NATIVE WP:GROUP BLOCKS WITH CUSTOM CLASSNAMES ── */
/* wp:group generates <div class="wp-block-group [className]">.
   WordPress's constrained layout adds max-width to children — override for
   our full-width section groups and let .wrap handle the inner centering. */
.wp-block-group.sec {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* Override WordPress constrained layout that caps children to contentSize (760px).
   Applies to both native wp:group.sec blocks AND raw <section class="sec"> from wp:html. */
:where(.is-layout-constrained) > .sec,
:where(.is-layout-constrained) > .hero,
:where(.is-layout-constrained) > .wp-block-group.sec,
.wp-block-post-content > .wp-block-group.sec {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* Remove blockGap margin between children of .wrap and .sec-head groups.
   Our CSS already defines spacing via .sec-head { margin-bottom:40px } etc. */
.wp-block-group.wrap > * + *,
.wp-block-group.sec-head > * + * { margin-block-start: 0; }
/* process-list: each process-step is a flex row (step-num + step-body).
   Remove blockGap inside step-body so h3/p sit flush. */
.wp-block-group.step-body > * + * { margin-block-start: 0; }
/* process-step internal gap — step-num circle next to step-body */
.wp-block-group.process-step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.wp-block-group.process-step:last-child { border-bottom: none; }
/* step-body h3 mirrors original <strong> styling */
.wp-block-group.step-body h3.wp-block-heading { display: block; font-size: 1rem; font-weight: 640; color: var(--ink); margin-bottom: 4px; letter-spacing: 0; line-height: 1.4; }

/* Native wp:button className="btn-ghost" / "btn-primary":
   className lands on outer .wp-block-button div, not on <a>.
   Re-apply button styles to the inner link. */
.wp-block-button.btn-ghost .wp-block-button__link {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: none;
  border-radius: 9px;
  font-size: .95rem;
  font-weight: 600;
  padding: 0 22px;
  line-height: 44px;
  text-decoration: none;
}
.wp-block-button.btn-ghost .wp-block-button__link:hover {
  border-color: #b8b5ae;
  background: #f4f3f0;
  color: var(--ink);
}
.wp-block-button.btn-primary .wp-block-button__link {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
  box-shadow: 0 1px 4px rgba(67,56,202,.22), 0 4px 14px rgba(67,56,202,.14);
  border-radius: 9px;
  font-size: .95rem;
  font-weight: 600;
  padding: 0 28px;
  line-height: 44px;
  text-decoration: none;
}
.wp-block-button.btn-primary .wp-block-button__link:hover {
  background: #3730a3;
  border-color: #3730a3;
}

/* ── REDUCED MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; }
}
