/* I Beg The Pardon - site styles. Original design. Font: Inter (SIL OFL 1.1), self-hosted. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --soft: #f4f3f7;
  --ink: #15141a;
  --muted: #5c5a66;
  --line: #e4e2ea;
  --accent: #5a3cf0;
  --accent-ink: #ffffff;
  --dark: #0d0c12;
  --dark-2: #1a1822;
  --on-dark: #f3f2f7;
  --on-dark-muted: #b4b1c0;
  --accent-on-dark: #b8a9ff;
  --radius: 28px;
  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible { outline-color: var(--accent-on-dark); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(21, 20, 26, .08);
}
.nav .wrap { display: flex; align-items: center; height: var(--nav-h); }
.nav .brand { margin-right: auto; }
.brand {
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .9375rem; opacity: .82; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.menu-btn {
  display: none; appearance: none; background: none; border: 0; padding: 10px; margin-right: -10px;
  color: var(--ink); cursor: pointer; border-radius: 10px;
}
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px;
    background: #fff; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  }
  .nav.open { background: #fff; }
  .menu-btn .x { display: none; }
  .nav.open .menu-btn .bars { display: none; }
  .nav.open .menu-btn .x { display: inline; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 14px 0; font-size: 1.25rem; font-weight: 600; opacity: 1; border-bottom: 1px solid var(--line); }
}

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -.035em; line-height: 1.04; font-weight: 700; }
.display { font-size: clamp(2.6rem, 7.4vw, 5.6rem); }
.h2 { font-size: clamp(2.2rem, 5.6vw, 4.25rem); }
.h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); letter-spacing: -.02em; line-height: 1.2; }
.lede { font-size: clamp(1.15rem, 2.1vw, 1.5rem); line-height: 1.4; color: var(--muted); letter-spacing: -.01em; max-width: 34ch; }
.eyebrow { font-size: .9375rem; font-weight: 600; color: var(--accent); margin: 0 0 14px; letter-spacing: 0; }
.dark .eyebrow { color: var(--accent-on-dark); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 34px; }
.center .actions { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 1rem;
  text-decoration: none; transition: transform .2s var(--ease), background .2s;
}
.btn:hover { background: #4a2ce0; transform: translateY(-1px); }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.link-arrow::after { content: "\2192"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }
.dark .link-arrow { color: var(--accent-on-dark); }

/* ---------- Sections ---------- */
section { padding: clamp(88px, 13vw, 160px) 0; }
.soft { background: var(--soft); }
.dark { background: var(--dark); color: var(--on-dark); }
.dark .lede { color: var(--on-dark-muted); }

/* Hero */
.hero { padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(72px, 10vw, 120px); overflow: hidden; }
.hero .lede { margin-top: 22px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Chat illustration (original artwork, HTML and CSS) */
.chat {
  position: relative; background: #fff; border-radius: var(--radius); padding: 22px 18px 26px;
  box-shadow: 0 30px 80px -30px rgba(40, 20, 120, .35), 0 0 0 1px rgba(21, 20, 26, .06);
  max-width: 460px; width: 100%; margin: 0 auto;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 0 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 30% 30%, #9d8bff, var(--accent) 60%, #2c1a9e);
}
.chat-head strong { display: block; font-size: .9375rem; letter-spacing: -.01em; }
.chat-head span { font-size: .8125rem; color: var(--muted); }
.bubbles { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 84%; padding: 11px 15px; border-radius: 20px; font-size: .9375rem; line-height: 1.4; }
.bubble.them { align-self: flex-end; background: var(--soft); color: var(--ink); border-bottom-right-radius: 6px; }
.bubble.agent { align-self: flex-start; background: var(--accent); color: #fff; border-bottom-left-radius: 6px; }
.bubble .pill {
  display: inline-block; margin-top: 8px; padding: 6px 12px; background: #fff; color: var(--accent);
  border-radius: 999px; font-weight: 600; font-size: .875rem;
}
.caption { font-size: .8125rem; color: var(--muted); text-align: center; margin: 14px 0 0; }
.dark .caption { color: var(--on-dark-muted); }

/* Statement */
.statement { padding: clamp(96px, 14vw, 180px) 0; }
.statement p { margin: 0; font-size: clamp(2.1rem, 6vw, 4.5rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.06; }
.statement .quiet { color: #8c8a96; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 56px; }
.card { background: var(--dark-2); border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); min-height: 280px; display: flex; flex-direction: column; }
.card .icon { width: 44px; height: 44px; color: var(--accent-on-dark); }
.card h3 { margin-top: 56px; }
.card p { margin: 12px 0 0; color: var(--on-dark-muted); }
.more { margin: 28px 0 0; color: var(--on-dark-muted); }

/* Steps */
.steps { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { border-top: 2px solid var(--ink); padding-top: 22px; }
.step-num { font-size: .9375rem; font-weight: 600; color: var(--accent); }
.steps h3 { margin-top: 10px; }
.steps p { margin: 10px 0 0; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 40px; } }

/* Adam */
.adam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; margin-top: 56px; }
@media (max-width: 860px) { .adam-grid { grid-template-columns: 1fr; } }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.facts li { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-radius: 22px; padding: 22px 24px; font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.facts svg { width: 26px; height: 26px; flex: none; color: var(--accent); margin-top: 1px; }

/* Contact */
.contact .h2 { max-width: 14ch; margin: 0 auto; }

/* Footer */
footer { background: var(--soft); color: var(--muted); font-size: .875rem; padding: 48px 0 56px; }
footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
footer nav ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .legal { margin: 20px 0 0; line-height: 1.7; max-width: 70ch; }
footer .legal p { margin: 0 0 6px; }

/* Long-form pages (privacy) */
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); margin-bottom: 18px; }
.prose h2 { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.25; margin: 48px 0 12px; }
.prose p, .prose li { color: #34323c; }
.prose ul { padding-left: 1.2em; }
.prose .meta { color: var(--muted); }

/* ---------- Hero extras ---------- */
.hero { position: relative; }
.hero-glow {
  position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(122, 92, 255, .22), rgba(122, 92, 255, .08) 45%, transparent 70%);
  filter: blur(10px); z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 .line { display: block; }
.stage { perspective: 1400px; }

/* Typing dots */
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--soft); align-self: flex-start; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a97a6; animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Scrub statement (pinned) */
.scrub .sticky { display: flex; align-items: center; }
.js .scrub { padding: 0; }
.scrub .w { transition: color .25s linear; }
.scrub .quiet .w { color: inherit; }

/* Services orb */
#services { position: relative; overflow: hidden; }
.orb {
  position: absolute; width: 900px; height: 900px; left: 50%; top: 10%; margin-left: -450px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(110, 80, 255, .28), transparent 70%);
}
#services .wrap { position: relative; }

/* Steps progress rail */
.rail { position: relative; height: 2px; background: var(--line); margin-top: 64px; }
.rail span { position: absolute; inset: 0; background: var(--accent); transform-origin: left center; transform: scaleX(var(--p, 1)); }
.steps { margin-top: 0; }
.steps li { border-top: 0; padding-top: 26px; }
.steps .step-num { display: inline-block; }
@media (max-width: 760px) { .rail { display: none; } .steps li { border-top: 2px solid var(--line); } }

/* Adam pinned scene */
.adam-scene .sticky { padding: 40px 0; }

/* ---------- Motion (gentle, scroll-linked, and off for anyone who prefers less motion) ---------- */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .stagger > * { opacity: 0; transform: translateY(48px) scale(.97); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js .stagger.in > * { opacity: 1; transform: none; }
.js .stagger.in > *:nth-child(2) { transition-delay: .12s; }
.js .stagger.in > *:nth-child(3) { transition-delay: .24s; }
.js .stagger.in > *:nth-child(4) { transition-delay: .36s; }

/* Hero: headline lines rise in on load; card straightens and the copy drifts as you scroll */
.js .hero h1 .line { opacity: 0; transform: translateY(.6em); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js .loaded .hero h1 .line { opacity: 1; transform: none; }
.js .loaded .hero h1 .line:nth-child(2) { transition-delay: .1s; }
.js .loaded .hero h1 .line:nth-child(3) { transition-delay: .2s; }
.js .hero .lede, .js .hero .actions, .js .hero .eyebrow { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease) .35s, transform 1.2s var(--ease) .35s; }
.js .loaded .hero .lede, .js .loaded .hero .actions, .js .loaded .hero .eyebrow { opacity: 1; transform: none; }
.js .hero-copy { transform: translateY(calc(var(--p, 0) * -60px)); }
.js .hero .chat-wrap { transform: rotateX(calc((1 - var(--t, 1)) * 18deg)) rotateY(calc((1 - var(--t, 1)) * -10deg)) translateY(calc((1 - var(--t, 1)) * 40px)) scale(calc(.92 + var(--t, 1) * .08)); transform-origin: 50% 80%; will-change: transform; }
.js .hero-glow { transform: translate3d(0, calc(var(--p, 0) * 140px), 0) scale(calc(1 + var(--p, 0) * .25)); }

/* Chat bubbles, revealed in sequence by class */
.js .chat .bubble, .js .chat .typing { opacity: 0; transform: translateY(12px) scale(.97); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .chat .bubble.on, .js .chat .typing.on { opacity: 1; transform: none; }
.js .chat .typing:not(.on) { position: absolute; visibility: hidden; }

/* Statement scrub: words light up as you scroll */
.js .scrub { height: 230vh; }
.js .scrub .sticky { position: sticky; top: 0; height: 100vh; }
.js .scrub .w { color: #8a8796; }
.js .scrub .w.lit { color: var(--ink); }
.js .scrub .quiet .w.lit { color: var(--accent); }

/* Services orb parallax */
.js .orb { transform: translate3d(0, calc((var(--p, .5) - .5) * 300px), 0); }

/* Adam pinned on larger screens */
@media (min-width: 861px) and (min-height: 640px) {
  .js .adam-scene { height: 260vh; }
  .js .adam-scene .sticky { position: sticky; top: var(--nav-h); min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; }
  .js .adam-scene .adam-grid { width: 100%; margin-top: 0; }
  .js .facts li { color: var(--muted); background: rgba(255, 255, 255, .45); transform: scale(.97) translateX(-6px); transition: color .5s var(--ease), background .5s var(--ease), transform .6s var(--ease), box-shadow .5s; }
  .js .facts li svg { color: #a5a2b0; transition: color .5s; }
  .js .facts li.on { color: var(--ink); background: #fff; transform: none; box-shadow: 0 20px 50px -30px rgba(40, 20, 120, .45); }
  .js .facts li.on svg { color: var(--accent); }
}

/* Contact headline grows into place */
.js .grow { transform: scale(calc(.9 + var(--p, 1) * .1)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .stagger > *, .js .hero h1 .line, .js .hero .lede, .js .hero .actions, .js .hero .eyebrow,
  .js .chat .bubble, .js .facts li, .js .grow, .js .hero-copy, .js .hero .chat-wrap, .js .orb, .js .hero-glow {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .js .chat .typing { display: none !important; }
  .js .scrub, .js .adam-scene { height: auto !important; }
  .js .scrub { padding: clamp(96px, 14vw, 180px) 0 !important; }
  .js .scrub .sticky, .js .adam-scene .sticky { position: static !important; height: auto !important; min-height: 0 !important; padding: 0; }
  .js .scrub .w { color: inherit !important; }
  .js .scrub .quiet .w { color: #8c8a96 !important; }
  .typing i { animation: none; }
}

/* Utility classes (no inline styles, for the Content Security Policy) */
.stage, .flush { margin: 0; }
.lede.gap { margin-top: 20px; }
.notfound { min-height: 60vh; display: flex; align-items: center; }
.contact-email { margin-top: 18px; font-weight: 600; }
.contact-email a { color: var(--accent); }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
