/* Charles brand, carried over from the Bubble site: Inter, purple #7069ED,
   lavender highlight #A8B0F9, near-black #18181B, soft lavender wash behind the hero. */

:root {
  --purple: #7069ed;
  --purple-deep: #5650d6;
  --lavender: #a8b0f9;
  --wash: #eef0fd;
  --ink: #18181b;
  --muted: #52525b;
  --line: #e4e4ef;
  --card: #fff;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 17px; line-height: 1.6; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--purple); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 800px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 1.4rem + 4.5vw, 4rem); letter-spacing: -0.035em; line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
h3 { font-size: 1.2rem; }
.lede { font-size: 1.15rem; color: var(--muted); }

/* Buttons: purple pill, as on the old site */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--purple); color: #fff; font: 600 1rem/1 'Inter', sans-serif; text-decoration: none;
  padding: 0.95em 1.6em; border-radius: 999px; border: 2px solid var(--purple); transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--purple-deep); border-color: var(--purple-deep); }
.btn-lg { font-size: 1.1rem; padding: 1.05em 1.9em; }
.btn-sm { font-size: 0.92rem; padding: 0.7em 1.2em; }
.btn-outline { background: transparent; color: var(--purple); }
.btn-outline:hover { background: var(--wash); color: var(--purple-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.actions.center { justify-content: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand img { border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav > a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.96rem; }
.nav > a:not(.btn):hover { color: var(--purple); }
@media (max-width: 760px) { .nav > a:not(.btn) { display: none; } }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 20% 0%, #e3e6fc 0%, transparent 60%), linear-gradient(180deg, var(--wash), #fff 85%); text-align: center; }
.hero .wrap { padding-top: clamp(56px, 9vw, 112px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero h1 { max-width: 24ch; margin: 0 auto; }
.underlined { white-space: nowrap; background-image: linear-gradient(transparent 62%, var(--lavender) 62%, var(--lavender) 88%, transparent 88%); }
.hero .lede { max-width: 40ch; margin: 1.4rem auto 0; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); }
.hero .actions { justify-content: center; }
.video { max-width: 880px; margin: clamp(40px, 6vw, 64px) auto 0; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(60, 50, 160, .45); aspect-ratio: 16 / 9; background: #111; }
.video iframe, .yt { display: block; width: 100%; height: 100%; border: 0; }
.yt { position: relative; cursor: pointer; padding: 0; background: #111; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; background: var(--purple); box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .15s; }
.play::after { content: ''; position: absolute; left: 34px; top: 26px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #fff; }
.yt:hover .play { transform: scale(1.06); }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.tint { background: #f7f7fe; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head .lede { margin-top: 1rem; }
.eyebrow { color: var(--purple); font-weight: 600; margin-bottom: .6rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split .lede { margin-top: 1rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.shot { border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 30px 60px -36px rgba(60, 50, 160, .4); max-width: 520px; justify-self: center; }

.ticks { list-style: none; display: grid; gap: 12px; margin-top: 1.5rem; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks.big li { font-size: 1.05rem; }
.tick { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--wash); fill: var(--purple); margin-top: 2px; }

/* Testimonials */
.quotes { columns: 3 300px; column-gap: 24px; }
.quote { break-inside: avoid; margin-bottom: 24px; display: flex; flex-direction: column; gap: 20px; }
.quote blockquote p { color: var(--ink); }
.quote blockquote p + p { margin-top: .8em; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption img, .avatar-blank { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-blank { background: linear-gradient(135deg, var(--lavender), var(--purple)); }
.quote figcaption strong { display: block; font-size: .98rem; }
.quote figcaption span span { color: var(--muted); font-size: .9rem; }
.co-logo { height: 28px; width: auto; max-width: 70%; align-self: flex-start; object-fit: contain; object-position: left center; }
.stack { display: grid; gap: 20px; }
.stack .quote { margin: 0; }

/* Extensions */
.ext { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.ext:hover { border-color: var(--lavender); }
.ext img { border-radius: 14px; flex: none; }
.ext strong { display: block; }
.ext span span { color: var(--muted); font-size: .95rem; }
.more { text-align: center; color: var(--muted); margin-top: 28px; }

/* Steps (a real sequence, so numbered) */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 16px; }
.step-n { width: 44px; height: 44px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 1.1rem; }
.step p { color: var(--muted); margin-top: .4rem; }
.steps.compact { grid-template-columns: 1fr; gap: 22px; }
.steps.compact .step { flex-direction: row; }
.steps.compact .step-n { flex: none; width: 36px; height: 36px; font-size: 1rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .steps .step { flex-direction: row; } .step-n { flex: none; } }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--purple); font-size: 1.5rem; font-weight: 500; }
.faq details[open] summary::after { content: '\2212'; }
.answer { padding: 0 22px 20px; color: var(--muted); }
.answer p + p, .answer p + ul, .answer ul + p { margin-top: .8em; }
.answer ul { padding-left: 1.2em; }
.answer li + li { margin-top: .3em; }

/* Pricing */
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan .ticks { margin: 1.25rem 0 1.75rem; flex: 1; }
.plan .ticks li span { color: var(--ink); }
.price { color: var(--muted); margin-top: .5rem; }
.price span { font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.plan-note { color: var(--purple) !important; font-weight: 600; font-size: .95rem; margin-top: .25rem; }
.plan.featured { border: 2px solid var(--purple); box-shadow: 0 24px 48px -30px rgba(80, 70, 210, .5); }

/* Inner pages */
.page-head { background: linear-gradient(180deg, var(--wash), #fff); }
.page-head .wrap { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(24px, 4vw, 40px); }
.page-head .lede { margin-top: 1rem; }
.download { display: grid; gap: 24px; padding: clamp(24px, 4vw, 40px); }
.download h2 { font-size: 1.5rem; }
.meta { color: var(--muted); margin-top: .3rem; }
.licence-note { font-size: .92rem; color: var(--muted); }
.next-title { font-size: 1.5rem; margin: 56px 0 24px; }
.prose p + p, .prose p + pre, .prose pre + p { margin-top: 1em; }
.prose pre, .licence { background: #f4f4fb; border: 1px solid var(--line); border-radius: 12px; padding: 18px; overflow-x: auto; font-size: .88rem; line-height: 1.55; }
.licence { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 12px; font-size: .95rem; }
.site-footer h2 { font-size: .9rem; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a:not(.brand) { color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-footer a:not(.brand):hover { color: var(--purple); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-base a { margin-left: 16px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
