/* Marketing site. Same look as rationlab.com: IBM Plex Sans, porcelain hero, green accent. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: hsl(222 45% 12%);
  --muted: hsl(222 20% 32%);
  --accent: hsl(158 64% 36%);
  --accent-soft: hsl(158 64% 36% / 0.06);
  --accent-line: hsl(158 64% 36% / 0.18);
  --button: #10b981;
  --button-hover: #34d399;
  --porcelain: #f4f6f2;
  --surface: #fff;
  --border: hsl(215 30% 90%);
  --app-bg: hsl(215 45% 98%);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--app-bg); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 48rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 60; background: #fff; padding: .5rem .75rem; border-radius: .5rem; }

/* Nav */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(244, 246, 242, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-row { display: flex; align-items: center; gap: 1.75rem; min-height: 4rem; flex-wrap: wrap; padding-top: .4rem; padding-bottom: .4rem; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo small { display: block; font-size: .72rem; font-weight: 600; color: var(--accent); letter-spacing: .02em; line-height: 1.1; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.nav-cta { margin-left: auto; display: flex; gap: .75rem; align-items: center; }
.btn-login { display: inline-flex; align-items: center; height: 2.5rem; padding: 0 1rem; border-radius: .75rem; border: 1px solid var(--accent-line); background: rgba(255,255,255,.8); color: var(--accent); font-weight: 600; font-size: .92rem; text-decoration: none; }
.btn-login:hover { background: var(--accent-soft); }
@media (max-width: 760px) {
  .nav-links { order: 3; width: 100%; gap: 1.1rem; padding-bottom: .4rem; }
  .nav-row { gap: .75rem 1rem; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 3.5rem; padding: 0 2.25rem; border-radius: .9rem; font-weight: 600; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--button); color: var(--ink); }
.btn-primary:hover { background: var(--button-hover); }
.btn-secondary { background: rgba(255,255,255,.75); color: var(--ink); border: 1px solid var(--accent-line); }
.btn-secondary:hover { background: #fff; }
.btn-sm { height: 2.5rem; padding: 0 1.1rem; border-radius: .75rem; font-size: .92rem; }
.btn[disabled] { opacity: .6; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* Hero */
.hero { position: relative; background: var(--porcelain); padding: 7rem 1.25rem 7rem; overflow: hidden; text-align: center; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.25rem; background: var(--accent); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; margin: 0; position: relative; z-index: 2; }
.hero h1 span { display: block; color: var(--accent); margin-top: .5rem; }
.hero .lead { max-width: 38rem; margin: 2.5rem auto 0; font-size: 1.2rem; color: #344a43; position: relative; z-index: 2; }
.hero .actions { margin-top: 2.5rem; position: relative; z-index: 2; }
.hero .note { margin-top: 1.25rem; font-size: .92rem; color: var(--muted); position: relative; z-index: 2; }
.doodle { position: absolute; z-index: 1; width: clamp(4rem, 8vw, 7.5rem); opacity: .95; pointer-events: none; user-select: none; }
.d1 { top: 9%; left: 6%; transform: rotate(-12deg); } .d2 { top: 14%; right: 7%; transform: rotate(10deg); }
.d3 { bottom: 16%; left: 10%; transform: rotate(8deg); } .d4 { bottom: 13%; right: 11%; transform: rotate(-8deg); }
.d5 { top: 46%; left: 2%; width: clamp(3rem, 6vw, 5.5rem); } .d6 { top: 50%; right: 2.5%; width: clamp(3rem, 6vw, 5.5rem); }
.d7 { top: 6%; left: 40%; width: 2.2rem; } .d8 { bottom: 22%; right: 34%; width: 2rem; }
@media (max-width: 760px) { .d3, .d4, .d5, .d6, .d7, .d8 { display: none; } .d1 { top: 2%; left: 2%; } .d2 { top: 3%; right: 2%; } .hero { padding: 5rem 1.25rem 5.5rem; } }

/* Page header for inner pages */
.page-head { background: var(--porcelain); padding: 4.5rem 1.25rem 3.5rem; text-align: center; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
.page-head p { max-width: 40rem; margin: 1.25rem auto 0; color: var(--muted); font-size: 1.1rem; }

/* Sections */
section.block { padding: 5rem 0; }
section.white { background: var(--surface); }
section.tint { background: hsl(158 64% 36% / 0.03); border-top: 1px solid hsl(158 64% 36% / 0.1); border-bottom: 1px solid hsl(158 64% 36% / 0.1); }
h2.title { font-size: clamp(1.8rem, 3.5vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 2.5rem; text-align: center; }
h2.title + p.sub { margin: -1.5rem auto 2.5rem; text-align: center; color: var(--muted); max-width: 40rem; }
.prose h2 { font-size: 1.45rem; margin: 2.5rem 0 .75rem; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.1rem; margin: 1.75rem 0 .5rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); }

dl.features { margin: 0 auto; max-width: 56rem; border-top: 1px solid var(--accent-line); }
dl.features > div { padding: 1.6rem 0; border-bottom: 1px solid var(--accent-line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 2.5rem; }
dl.features dt { font-weight: 700; font-size: 1.2rem; line-height: 1.35; }
dl.features dd { margin: 0; color: var(--muted); }
@media (max-width: 700px) { dl.features > div { grid-template-columns: 1fr; gap: .5rem; } }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.75rem; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; width: 2.25rem; height: 2.25rem; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 1rem; }
.step h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.step p { margin: 0; color: var(--muted); }

.panel { border: 1px solid hsl(158 64% 36% / 0.2); background: hsl(158 64% 36% / 0.02); border-radius: 1.25rem; padding: 2rem 2.25rem; max-width: 48rem; margin: 0 auto; }
.panel p { color: var(--muted); }
.panel p:first-child { margin-top: 0; } .panel p:last-child { margin-bottom: 0; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.75rem; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.card p, .card li { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }

.pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; }
.pages figure { margin: 0; }
.pages img { border-radius: .5rem; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; display: block; }
.pages figcaption { margin-top: .75rem; color: var(--muted); font-size: .95rem; }
.pages figcaption strong { color: var(--ink); display: block; }

details.faq { background: #fff; border: 1px solid var(--border); border-radius: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden; }
details.faq summary { cursor: pointer; padding: 1.2rem 1.5rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "\2212"; }
details.faq .a { padding: 0 1.5rem 1.25rem; color: var(--muted); }
details.faq .a p { margin: 0 0 .75rem; } details.faq .a p:last-child { margin: 0; }
.faq-group { font-size: 1.3rem; margin: 2.5rem 0 1rem; }
.faq-group:first-child { margin-top: 0; }

.draft { background: #fdf0d8; color: #4a3200; border: 1px solid #f2d59b; border-radius: 1rem; padding: 1rem 1.25rem; margin: 0 0 2rem; }
.draft strong { color: #4a3200; }

form.enquiry { background: #fff; border: 1px solid var(--border); border-radius: 1.25rem; padding: 2rem; box-shadow: var(--shadow); }
form.enquiry label { display: block; font-weight: 600; font-size: .92rem; margin: 1.1rem 0 .35rem; }
form.enquiry label.check { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start; color: var(--muted); }
form.enquiry label.check input { margin-top: .35rem; }
form.enquiry input[type=text], form.enquiry input[type=email], form.enquiry select, form.enquiry textarea { width: 100%; padding: .7rem .85rem; border: 1px solid #c9d1ce; border-radius: .7rem; font: inherit; background: #fff; color: var(--ink); }
form.enquiry textarea { min-height: 8rem; resize: vertical; }
form.enquiry .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
form.enquiry .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-top: 1rem; white-space: pre-line; }
.form-msg.error { color: #a61b1b; }
.form-done { background: #dff3ea; color: #12603f; border-radius: 1rem; padding: 1.25rem 1.5rem; }

.cta { background: var(--porcelain); border-top: 1px solid var(--border); padding: 5.5rem 1.25rem; text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); margin: 0; letter-spacing: -0.02em; }
.cta p { color: var(--muted); max-width: 38rem; margin: 1.25rem auto 2rem; font-size: 1.1rem; }
.cta .small { font-size: .92rem; margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--ink); color: hsl(215 30% 85%); padding: 3rem 0 2rem; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; }
.footer-row p { margin: .5rem 0 0; max-width: 28rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; align-content: start; }
.fine { margin-top: 2rem; color: hsl(215 20% 65%); font-size: .82rem; }
@media (max-width: 700px) { .footer-row { grid-template-columns: 1fr; } }
