/* trance.work — single stylesheet, mobile-first, no external dependencies */

:root {
  /* Palette taken from the business card: white, ink, logo purple, one orange accent */
  --bg: #ffffff;
  --bg-soft: #f4f1fa;        /* QR-plate lavender */
  --surface: #f4f1fa;
  --surface-2: #eae5f6;
  --line: #d9d4ea;           /* card hairline */
  --line-strong: #8e89a6;    /* form-field and ghost-button borders (3:1 on white) */
  --text: #0c0e1b;           /* card ink */
  --muted: #5a5870;          /* card tagline slate */
  --accent: #e8650a;         /* card orange: buttons, dots, large accents */
  --accent-hover: #f47c2a;
  --accent-ink: #0c0e1b;     /* text on orange (white on this orange is only 3.6:1) */
  --purple: #6a2c9e;         /* card wordmark purple: links, focus rings */
  --ice: #1f6fa3;            /* logo mark blue, darkened for text */
  --err: #b3263e;            /* form errors only */
  --why: var(--accent);      /* 4MAT quadrant colours */
  --what: var(--purple);
  --how: var(--ice);
  --if: var(--muted);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --max: 1080px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--purple);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 720px; }
.prose { max-width: 64ch; }   /* a readable text column that lines up with the page's left edge */
/* Present for screen readers and search engines, not shown on screen */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 7vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.6vw, 1.5rem); line-height: 1.25; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 40ch;
}
.lede.wide { max-width: 56ch; }
.muted { color: var(--muted); }

/* 4MAT quadrant tag: WHY / WHAT / HOW / WHAT IF */
.quad {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.quad::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--tag, var(--muted));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tag, var(--muted)) 22%, transparent);
}
.quad.why  { --tag: var(--why); }
.quad.what { --tag: var(--what); }
.quad.how  { --tag: var(--how); }
.quad.if   { --tag: var(--if); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.5rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  padding: 0.35rem 0;
}
.brand span { color: var(--purple); }
.brand img { height: 2.75rem; width: auto; }

.nav {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 0.25rem;
}
.nav a {
  flex: 1;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.7rem 0.4rem;
  min-height: 44px;
  border-radius: 999px;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}
.nav a.nav-cta {
  color: var(--purple);
  font-weight: 600;
}
.nav a.nav-cta[aria-current="page"] { background: var(--surface); }

@media (min-width: 640px) {
  .bar { flex-wrap: nowrap; padding-block: 0.6rem; }
  .nav { width: auto; gap: 0.35rem; }
  .nav a { flex: none; padding: 0.6rem 1.1rem; }
  .nav a.nav-cta {
    background: var(--accent);
    color: var(--accent-ink);
    margin-left: 0.4rem;
  }
  .nav a.nav-cta:hover { background: var(--accent-hover); color: var(--accent-ink); }
  .nav a.nav-cta[aria-current="page"] { background: var(--accent); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); text-decoration: none; }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn.ghost:hover { border-color: var(--purple); background: rgba(106, 44, 158, 0.05); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section.soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head h2 { max-width: 22ch; }
.section-head .lede { margin-top: 0.5rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 11vw, 8rem) clamp(3.5rem, 10vw, 7rem);
  background:
    radial-gradient(ellipse 60% 70% at 88% 50%, rgba(106, 44, 158, 0.10), transparent 70%),
    radial-gradient(ellipse 50% 45% at 10% 100%, rgba(232, 101, 10, 0.08), transparent 70%),
    var(--bg);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--accent); }  /* large text: 3.6:1 passes */

.hero-art {
  /* Sits in the space to the right of the hero text, always fully in view. */
  --side: max(0px, (100vw - var(--max)) / 2);
  --art-right: max(2vw, var(--side) - 200px);
  position: absolute;
  z-index: 0;
  right: var(--art-right);
  top: 50%;
  width: min(720px, 100vw - var(--side) - 657px - var(--art-right));
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-art img {
  position: absolute;
  inset: 11%;
  width: 78%;
  height: 78%;
  animation: drift 120s linear infinite; /* 0.5 rpm */
}
.hero-art .halo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.halo circle {
  fill: none;
  stroke: var(--purple);
  stroke-width: 0.8;
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 9s ease-in-out infinite;
}
.halo circle:nth-child(1) { opacity: 0.55; }
.halo circle:nth-child(2) { animation-delay: 0.8s; opacity: 0.32; }
.halo circle:nth-child(3) { animation-delay: 1.6s; opacity: 0.16; }
@media (max-width: 1099px) {
  /* Not enough room beside the text: show it in full colour below the text instead. */
  .hero { display: flex; flex-direction: column; }
  .hero .container { order: 1; }
  .hero-art {
    order: 2;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: min(82vw, 420px);
    margin: 2.75rem auto 0;
  }
}

@keyframes drift {
  to { transform: rotate(360deg); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
@media (prefers-reduced-motion: reduce) {
  .halo circle, .hero-art img { animation: none; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

.page-hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 5vw, 3rem);
  background: radial-gradient(ellipse 60% 80% at 90% 0%, rgba(106, 44, 158, 0.10), transparent 70%), radial-gradient(ellipse 50% 70% at 15% 0%, rgba(232, 101, 10, 0.06), transparent 70%), var(--bg);
}
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); max-width: 18ch; }

/* ---------- Cards / grids ---------- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--muted); }
.card .more { display: inline-block; margin-top: 1rem; font-weight: 600; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 3.6rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--how);
  color: var(--how);
  font-family: var(--serif);
  font-size: 1.15rem;
}
.steps h3 { margin: 0 0 0.15em; font-size: 1.2rem; }
.steps p { color: var(--muted); }

@media (min-width: 820px) {
  .steps.row { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* Two-column text + aside */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .split.even { grid-template-columns: 1fr 1fr; }
}

/* Pull-quote / scenario (right-mode "connect" moment) */
.scene {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.45;
  padding-left: 1.25rem;
  border-left: 3px solid var(--why);
  margin: 0 0 1.75rem;
  max-width: 34ch;
}

/* Lists */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.7rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.72em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--tick, var(--purple));
}
.ticks.how li::before { --tick: var(--how); }

.creds { list-style: none; margin: 0; padding: 0; }
.creds li {
  display: grid;
  gap: 0.1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.creds li:first-child { border-top: 1px solid var(--line); }
.creds strong { font-weight: 600; }
.creds span { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 560px) {
  .creds li { grid-template-columns: 6.5rem 1fr; gap: 1.25rem; align-items: baseline; }
  .creds time { color: var(--what); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
}
.creds time { color: var(--what); font-size: 0.9rem; }

/* Service blocks */
.service {
  display: grid;
  gap: 1rem 3rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}
.service:first-of-type { border-top: 0; padding-top: 0; }
.service h3 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0; }
.service .tagline { color: var(--how); font-size: 0.9rem; letter-spacing: 0.04em; margin: 0.4rem 0 0; }
@media (min-width: 860px) {
  .service { grid-template-columns: 1fr 1.6fr; }
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 600;
  position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--if);
  font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 1.25rem; max-width: 62ch; }

/* CTA band */
.cta-band {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(106, 44, 158, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 80% at 85% 100%, rgba(232, 101, 10, 0.08), transparent 70%),
    var(--bg-soft);
  border-block: 1px solid var(--line);
}
.cta-band h2 { margin-inline: auto; max-width: 20ch; }
.cta-band .lede { margin-inline: auto; }
.cta-band .actions { justify-content: center; }
.cta-band .quad { justify-content: center; }

/* Notice */
.notice {
  font-size: 0.92rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  background: var(--bg-soft);
}

/* ---------- Form ---------- */

.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--muted); }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;          /* >=16px stops iOS zoom-on-focus */
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  min-height: 48px;
  transition: border-color 0.15s ease;
}
textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 1.3rem) 55%, calc(100% - 0.95rem) 55%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2.5rem; }
input:hover, select:hover, textarea:hover { border-color: var(--purple); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(106, 44, 158, 0.25); }

/* Honeypot — hidden from people, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status {
  border-radius: 12px;
  padding: 1rem 1.15rem;
  font-weight: 500;
  display: none;
}
.status.show { display: block; }
.status.ok { background: rgba(31, 111, 163, 0.08); border: 1px solid var(--ice); color: #0f4a73; }
.status.err { background: rgba(179, 38, 62, 0.08); border: 1px solid var(--err); color: #8a1c30; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.25rem);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--purple); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-links a { padding: 0.35rem 0; }
.fine { margin-top: 1.5rem; font-size: 0.85rem; max-width: 70ch; }

/* ---------- Small utilities (no inline styles: the CSP forbids them) ---------- */
.creds-line { margin-top: 2.25rem; font-size: 0.92rem; }
.after { margin-top: 2rem; }
.ticks.why li::before { --tick: var(--why); }
.ticks.if li::before { --tick: var(--if); }
.who { color: var(--text); }

/* Contact form feedback boxes: shown by JS (.show) or by the URL hash (#sent / #failed) with no JS */
.status:target { display: block; }
.small-print { font-size: 0.88rem; margin: 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); }
.contact .steps { margin-top: 1.5rem; }

/* Captcha widget (Turnstile is 300px wide; scale it down slightly on very small phones) */
.captcha { min-height: 65px; }
@media (max-width: 400px) {
  .captcha .cf-turnstile { transform: scale(0.9); transform-origin: 0 0; height: 59px; }
}
.captcha noscript { font-size: 0.9rem; color: var(--muted); }

/* Footer social icons: quiet, monochrome, 44px touch targets */
.social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.social a:hover { color: var(--purple); border-color: var(--purple); background: rgba(106, 44, 158, 0.05); }
.social svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.after-actions { margin-top: 1rem; font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) { .social a { transition: none; } }

/* Nav CTA: "Book a call" on narrow screens, "Book a discovery call" from 640px up */
@media (max-width: 639px) { .nav a .long { display: none; } .nav a { flex: 1 1 auto; white-space: nowrap; padding-inline: 0.25rem; } }

/* About-page headshot: small on purpose (source is only 400x600), so it can't be zoomed into */
.about-hero { display: grid; gap: 2rem; align-items: center; }
.portrait { margin: 0; width: min(190px, 52vw); }
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(106, 44, 158, 0.12);
}
@media (min-width: 760px) {
  .about-hero { grid-template-columns: 1fr 240px; gap: 3.5rem; }
  .portrait { width: 240px; justify-self: end; }
}

/* Testimonials placeholder */
.coming-soon {
  margin: 0;
  padding: 2rem 1.5rem;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
