/* Base, layout primitives, buttons, shared section pieces, footer.
   Section-specific styles live in blocks/<block>/style.css. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper-wash);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: 120px 0; }
.section.es-attached { margin-top: -100px; padding-top: 0; }

.skip-link {
  position: fixed;
  z-index: 999;
  left: 16px;
  top: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}
.skip-link:focus { transform: translateY(0); }

/* Type */
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -0.045em; line-height: 1.03; }
.kicker { margin-bottom: 18px; color: var(--violet); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.section-title { font-size: clamp(2.55rem, 4.5vw, 4.8rem); }

/* Buttons and links */
.btn {
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: 800;
  font-size: 0.93rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .text-link:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 3px solid rgba(97, 24, 215, 0.35);
  outline-offset: 4px;
}
.btn-small { min-height: 44px; padding-inline: 18px; font-size: 0.84rem; }
.btn-dark { color: var(--white); background: var(--ink); box-shadow: 0 10px 30px rgba(17, 16, 21, 0.18); }
.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--violet), var(--violet-dark));
  box-shadow: 0 18px 38px rgba(97, 24, 215, 0.24);
}
.btn-outline { border-color: rgba(255,255,255,.3); color: var(--white); }
.btn-light { color: var(--ink); background: var(--white); box-shadow: 0 18px 50px rgba(0,0,0,.2); }
.text-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* Shared section heading patterns */
.section-intro p:last-child { max-width: 580px; color: var(--muted); font-size: 1.05rem; }
.section-heading { display: grid; grid-template-columns: 1.25fr .75fr; gap: 9vw; align-items: end; margin-bottom: 54px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { max-width: 450px; margin-bottom: 6px; color: var(--muted); }
.section-heading.light > p { color: rgba(255,255,255,.82); }

/* Service-page primitives shared by the section kit (.es-block) */
.es-block h2 { font-size: clamp(2.55rem, 4.5vw, 4.8rem); }
.es-block h3 { font-size: 1.35rem; letter-spacing: -.035em; }
.es-section-head { margin-bottom: 52px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 9vw; align-items: end; }
.es-section-head h2 { margin: 0; }
.es-section-head > p { max-width: 510px; margin: 0 0 7px; color: var(--muted); }
.es-section-head--stack { max-width: 980px; margin-inline: auto; grid-template-columns: 1fr; gap: 0; align-items: start; }
.es-section-head--stack h2 { margin-bottom: 20px; }
.es-section-head--stack > p { max-width: 760px; margin: 0; font-size: 1.06rem; }
.es-section-head--left { max-width: 1050px; margin-inline: 0; }
.es-section-head--left > p { max-width: 830px; }
.es-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 9vw; align-items: start; }
.sticky-copy { position: sticky; top: 126px; }
.sticky-copy > p:not(.kicker) { max-width: 510px; color: var(--muted); }
.sticky-copy .text-link { margin-top: 12px; }
.team-note { margin-top: 40px; padding-left: 22px; border-left: 3px solid var(--mint); color: var(--muted); }
.team-note b, .team-note strong { color: var(--ink); }
.team-note p { margin: 0; }

/* Section themes. Dark themes also carry .on-dark so block CSS can swap rules/colors. */
.theme-white { background: var(--card); }
.theme-soft { background: var(--paper-wash-soft); }
.theme-dark { color: var(--white); background: var(--dark); }
.theme-charcoal { color: var(--white); background: var(--charcoal); }
.theme-navy { color: var(--white); background: var(--navy-bg); }
.theme-midnight { color: var(--white); background: var(--midnight); }
.theme-violet { color: var(--white); background: var(--violet-bg); }
.band-section { color: var(--white); background: var(--band-bg); }
.band-section .kicker,
.on-dark .kicker { color: var(--mint); }
.theme-dark .kicker, .theme-violet .kicker { color: var(--mint); }
.theme-charcoal .kicker { color: var(--es-amber); }
.theme-navy .kicker, .theme-midnight .kicker { color: var(--mint); }
.on-dark p:not(.kicker), .on-dark .es-section-head > p, .on-dark .sticky-copy > p:not(.kicker) { color: rgba(255,255,255,.82); }
.on-dark small { color: rgba(255,255,255,.72); }
.on-dark [class*="-copy"] p:not(.kicker), .on-dark [class*="-intro"] p:not(.kicker), .on-dark .section-heading > p { color: rgba(255,255,255,.82); }
.on-dark .team-note { color: rgba(255,255,255,.82); }
.on-dark .team-note b, .on-dark .team-note strong, .on-dark .team-note a { color: var(--white); }
.on-dark .text-link { color: var(--white); }

/* Small shared glyphs used by more than one block (hero scene, AI permission map) */
.approval-avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #d5c6ff 0 20%, transparent 21%), radial-gradient(circle at 50% 105%, #6118d7 0 48%, transparent 49%), #eee9f7; }
.lock-icon { width: 14px; height: 11px; margin-left: auto; border: 1.5px solid #058a78; border-radius: 3px; position: relative; }
.lock-icon::before { content: ""; position: absolute; width: 7px; height: 7px; left: 2px; top: -7px; border: 1.5px solid #058a78; border-bottom: 0; border-radius: 7px 7px 0 0; }

/* Fallback container for non-block content (posts, 404, legacy pages) */
.prose-page { padding-top: 180px; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2.4rem, 4vw, 4rem); margin-bottom: 24px; }
.prose p, .prose li { color: #403d47; font-size: 1.05rem; }
.prose .btn { margin-top: 12px; }
.post-list { padding: 0; list-style: none; }
.post-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-list a { font-weight: 800; text-decoration: none; font-size: 1.2rem; }

/* Footer */
.site-footer { padding: 70px 0 32px; background: var(--paper-wash); }
.footer-top { display: grid; grid-template-columns: .55fr 1.1fr .35fr; gap: 7vw; align-items: start; }
.footer-brand img { width: 176px; height: auto; }
.footer-top p { max-width: 580px; color: var(--muted); }
.footer-contact { justify-self: end; font-size: .85rem; font-weight: 900; text-decoration: none; }
.footer-bottom { margin-top: 62px; padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Scroll reveal (assets/js/site.js adds .is-visible) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1); }
.reveal-delay { transition-delay: 120ms; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .es-split { grid-template-columns: 1fr; }
  .sticky-copy { position: static; }
}

@media (max-width: 1050px) {
  .section-heading { gap: 60px; }
}

@media (max-width: 840px) {
  .es-section-head { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 760px) {
  .section { padding: 82px 0; }
  .section.es-attached { margin-top: -64px; }
  .section-heading, .footer-top { grid-template-columns: 1fr; gap: 42px; }
  .section-heading { margin-bottom: 38px; }
  .prose-page { padding-top: 130px; }
  .footer-contact { justify-self: start; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 430px) {
  .section-title { font-size: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
