/* RationalAI — rational-logic theme. Structured reasoning, decision trees, formal logic, calm light surfaces. */
@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --slate: #334155;
  --green: #059669;
  --green-dark: #047857;
  --paper: #FFFFFF;
  --graphite: #1F2937;
  --copper: #B45309;
  --panel: #F8FAFC;
  --panel-2: #F1F5F9;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --muted: #64748B;
  --maxw: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Work Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--graphite);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Zilla Slab', Georgia, serif; line-height: 1.14; color: var(--graphite); font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { color: var(--slate); }
a { color: var(--green-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--graphite); }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
section { padding: clamp(54px, 7vw, 96px) 0; position: relative; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem;
  color: var(--green-dark); font-weight: 600; font-family: 'Work Sans', sans-serif;
  border-left: 3px solid var(--green); padding-left: 10px;
}
.lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--slate); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.center .eyebrow { border-left: none; border-bottom: 3px solid var(--green); padding-left: 0; padding-bottom: 4px; }

/* Buttons — fill green, hover slate, white text. Squared, structured. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 4px; font-weight: 600;
  font-family: 'Work Sans', sans-serif; cursor: pointer; border: 2px solid transparent;
  font-size: .96rem; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--green); color: #FFFFFF; }
.btn-primary:hover { background: var(--slate); color: #FFFFFF; }
.btn-ghost { background: #FFFFFF; color: var(--slate); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--slate); color: #FFFFFF; border-color: var(--slate); }

/* Header / nav — white, clean, slab logo */
header.site {
  position: sticky; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Zilla Slab', serif; font-weight: 700; font-size: 1.4rem; color: var(--graphite); }
.logo .mark { width: 30px; height: 30px; background: var(--green); position: relative; border-radius: 3px; }
.logo .mark::before { content: ""; position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; background: #fff; transform: translateX(-50%); }
.logo .mark::after { content: ""; position: absolute; left: 8px; top: 16px; width: 14px; height: 8px; border: 2px solid #fff; border-top: none; border-radius: 0 0 3px 3px; }
.logo b { color: var(--green-dark); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--slate); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--green-dark); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--graphite); transition: .3s; }

/* Hero — structured reasoning engine + decision tree */
.hero { background: linear-gradient(180deg, #FFFFFF 0%, var(--panel) 100%); padding: clamp(50px, 7vw, 90px) 0 clamp(54px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--green-dark); }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta div { border-left: 3px solid var(--green); padding-left: 12px; }
.hero-meta b { font-family: 'Zilla Slab', serif; font-size: 1.5rem; color: var(--graphite); display: block; line-height: 1.1; }
.hero-meta span { font-size: .8rem; color: var(--muted); }

/* Decision tree diagram (CSS) */
.tree { background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; padding: 28px 24px; box-shadow: 0 18px 50px rgba(15, 23, 42, .07); }
.tree-top { display: flex; justify-content: center; }
.node { background: var(--green); color: #fff; font-family: 'Zilla Slab', serif; font-weight: 600; font-size: .92rem; padding: 10px 18px; border-radius: 4px; text-align: center; }
.node.alt { background: #fff; color: var(--slate); border: 2px solid var(--line-strong); }
.node.copper { background: var(--copper); color: #fff; }
.tree-branches { display: flex; justify-content: center; gap: 40px; margin-top: 30px; position: relative; }
.tree-branches::before { content: ""; position: absolute; top: -16px; left: 25%; right: 25%; height: 2px; background: var(--line-strong); }
.branch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.branch::before { content: ""; position: absolute; top: -16px; width: 2px; height: 16px; background: var(--line-strong); }
.leaf { font-size: .78rem; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); padding: 7px 12px; border-radius: 4px; }

/* generic section heads */
.sec-head { max-width: 680px; margin-bottom: 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec-head h2 { margin: 14px 0 12px; }

/* Grids */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Rational cards — white, green left rule 4px, premise/conclusion labels */
.rcard {
  background: #FFFFFF; border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 6px; padding: 26px; transition: box-shadow .25s ease, transform .25s ease;
}
.rcard:hover { box-shadow: 0 16px 40px rgba(15, 23, 42, .08); transform: translateY(-3px); }
.rcard .label { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--green-dark); margin-bottom: 10px; }
.rcard .label.conclusion { color: var(--copper); }
.rcard .num { font-family: 'Zilla Slab', serif; font-weight: 700; font-size: 1.1rem; color: var(--green); }
.rcard h3 { margin: 6px 0 8px; }
.rcard p { color: var(--slate); font-size: .96rem; }

/* Premise blocks — numbered logical steps */
.premises { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.premise { display: flex; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.premise:last-child { border-bottom: none; background: var(--panel); }
.premise .pn { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: 'Zilla Slab', serif; font-weight: 700; color: var(--green-dark); }
.premise:last-child .pn { background: var(--copper); border-color: var(--copper); color: #fff; }
.premise .ptag { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 600; }
.premise:last-child .ptag { color: var(--copper); }
.premise h3 { margin: 2px 0 5px; }
.premise p { font-size: .95rem; }

/* Calm large image band */
.figure { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 22px 60px rgba(15, 23, 42, .08); }
.figure img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.figure figcaption { padding: 16px 22px; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* Solutions short list */
.sol-list { display: grid; gap: 0; }
.sol-row { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.sol-row:last-child { border-bottom: none; }
.sol-row .sn { font-family: 'Zilla Slab', serif; font-weight: 700; color: var(--green); font-size: 1rem; flex: 0 0 42px; }
.sol-row h3 { flex: 0 0 230px; margin: 0; }
.sol-row p { color: var(--slate); margin: 0; font-size: .95rem; }

/* Services rows */
.srow { display: grid; grid-template-columns: 56px 1fr; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.srow:last-child { border-bottom: none; }
.srow .sic { width: 56px; height: 56px; border-radius: 6px; background: var(--green); color: #fff; display: grid; place-items: center; font-family: 'Zilla Slab', serif; font-weight: 700; font-size: 1.1rem; }
.srow.support .sic { background: var(--copper); }
.srow h3 { margin-bottom: 5px; }
.srow p { color: var(--slate); font-size: .96rem; }

/* image card (catalog) */
.cat-card { background: #FFFFFF; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s ease, transform .25s ease; }
.cat-card:hover { box-shadow: 0 20px 48px rgba(15, 23, 42, .1); transform: translateY(-3px); }
.cat-card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.cat-body { padding: 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.cat-cat { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--green-dark); font-weight: 600; }
.cat-card h3 { margin: 0; }
.cat-ref { font-family: 'Work Sans', monospace; font-size: .76rem; color: var(--muted); letter-spacing: .02em; }
.cat-meta { list-style: none; font-size: .86rem; color: var(--slate); display: grid; gap: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 4px 0; }
.cat-meta li b { color: var(--graphite); font-weight: 600; }
.cat-price { font-family: 'Zilla Slab', serif; font-size: 1.3rem; color: var(--graphite); font-weight: 700; margin-top: auto; }
.cat-price span { color: var(--green-dark); font-size: .8rem; font-family: 'Work Sans', sans-serif; font-weight: 600; display: block; text-transform: uppercase; letter-spacing: .1em; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-btn { background: #FFFFFF; border: 1px solid var(--line-strong); color: var(--slate); padding: 9px 16px; border-radius: 4px; cursor: pointer; font-family: inherit; font-size: .86rem; font-weight: 500; transition: .2s; }
.filter-btn:hover { border-color: var(--green); color: var(--green-dark); }
.filter-btn.active { background: var(--green); color: #FFFFFF; border-color: var(--green); }

/* testimonial (single, minimal) */
.testi { max-width: 880px; margin: 0 auto; text-align: center; border-top: 3px solid var(--green); border-bottom: 1px solid var(--line); padding: 14px 0 0; }
.testi q { display: block; font-family: 'Zilla Slab', serif; font-size: clamp(1.4rem, 3vw, 2.05rem); color: var(--graphite); font-style: normal; line-height: 1.35; margin: 28px 0; }
.testi .who { color: var(--muted); font-size: .95rem; padding-bottom: 28px; }
.testi .who b { color: var(--graphite); display: block; font-family: 'Work Sans', sans-serif; }

/* FAQ accordion */
.faq { max-width: 820px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-q { width: 100%; text-align: left; background: #FFFFFF; border: none; cursor: pointer; padding: 20px 24px; font-family: 'Zilla Slab', serif; font-weight: 600; font-size: 1.08rem; color: var(--graphite); display: flex; justify-content: space-between; align-items: center; gap: 16px; transition: background .2s ease; }
.faq-q:hover { background: var(--panel); }
.faq-ic { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 4px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; transition: transform .25s ease, background .2s ease; }
.faq-item.open .faq-ic { transform: rotate(45deg); background: var(--copper); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; background: var(--panel); }
.faq-a p { padding: 0 24px; color: var(--slate); font-size: .96rem; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { margin: 18px 0; }

/* CTA band — green */
.cta-band { background: var(--green); border-radius: 10px; padding: clamp(40px, 6vw, 64px); text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 180px; height: 180px; border: 24px solid rgba(255,255,255,.08); border-radius: 8px; transform: rotate(15deg); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #FFFFFF; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 560px; margin: 14px auto 26px; }
.cta-band .btn-primary { background: #FFFFFF; color: var(--green-dark); }
.cta-band .btn-primary:hover { background: var(--graphite); color: #FFFFFF; }

/* inline contact email block */
.inline-contact { text-align: center; }
.inline-contact .mail { font-family: 'Zilla Slab', serif; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--green-dark); font-weight: 600; }
.inline-contact .mail:hover { color: var(--graphite); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 26px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px; background: #fff; }
.stat b { font-family: 'Zilla Slab', serif; font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--graphite); display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }

/* page hero (inner) */
.page-hero { background: linear-gradient(180deg, #FFFFFF, var(--panel)); padding: clamp(40px, 5vw, 64px) 0; border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green-dark); }
.page-hero h1 { margin: 14px 0 16px; }

/* split editorial */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(15,23,42,.08); }
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }

/* check list */
.check-list { list-style: none; display: grid; gap: 11px; }
.check-list li { padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px; display: flex; gap: 12px; align-items: flex-start; color: var(--slate); font-size: .95rem; }
.check-list li::before { content: "✓"; color: var(--green); font-weight: 700; }

/* Forms */
.form-card { background: #FFFFFF; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 8px; padding: clamp(26px, 4vw, 40px); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; color: var(--graphite); font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 5px; border: 1px solid var(--line-strong);
  background: #FFFFFF; color: var(--graphite); font-family: inherit; font-size: .95rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(5,150,105,.14); }
.field textarea { min-height: 130px; resize: vertical; }
.field .err { color: #B91C1C; font-size: .82rem; margin-top: 6px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #B91C1C; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.success-msg { display: none; text-align: center; padding: 30px 10px; }
.success-msg.show { display: block; animation: fadein .6s ease; }
.success-msg .ic { width: 60px; height: 60px; border-radius: 8px; background: var(--green); display: grid; place-items: center; margin: 0 auto 18px; font-size: 1.8rem; color: #FFFFFF; }
@keyframes fadein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* contact info cards */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.info-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px; padding: 20px; }
.info-card small { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; font-weight: 600; }
.info-card p { color: var(--graphite); margin-top: 6px; font-size: .95rem; }

/* legal / prose */
.prose { max-width: 820px; }
.prose h2 { margin: 36px 0 12px; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.prose h3 { margin: 24px 0 8px; color: var(--green-dark); font-size: 1.15rem; }
.prose p, .prose li { color: var(--slate); margin-bottom: 11px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose strong { color: var(--graphite); }
.prose .updated { color: var(--muted); font-size: .9rem; border-left: 3px solid var(--green); padding-left: 12px; }

/* Footer */
footer.site { background: var(--graphite); border-top: 4px solid var(--green); padding: 56px 0 26px; color: #CBD5E1; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px; }
footer.site .logo { color: #FFFFFF; }
footer.site .logo b { color: #6EE7B7; }
.foot-grid h4 { color: #FFFFFF; margin-bottom: 15px; font-size: 1rem; font-family: 'Zilla Slab', serif; }
.foot-links { list-style: none; display: grid; gap: 9px; }
.foot-links a { color: #94A3B8; font-size: .9rem; }
.foot-links a:hover { color: #6EE7B7; }
.foot-about p { color: #94A3B8; font-size: .9rem; margin-top: 14px; }
.foot-contact p { color: #94A3B8; font-size: .88rem; margin-bottom: 7px; }
.foot-contact b { color: #FFFFFF; }
.foot-bottom { border-top: 1px solid rgba(148,163,184,.25); margin-top: 42px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #94A3B8; font-size: .84rem; }

/* Cookie banner */
.cookie { position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 560px; margin: 0 auto; background: #FFFFFF; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 8px; padding: 20px 22px; z-index: 200; display: none; box-shadow: 0 22px 60px rgba(15,23,42,.2); }
.cookie.show { display: block; animation: fadein .5s ease; }
.cookie p { font-size: .88rem; color: var(--slate); }
.cookie .row { display: flex; gap: 12px; margin-top: 14px; align-items: center; }
.cookie .btn { padding: 10px 20px; font-size: .88rem; }
.cookie a { font-size: .88rem; font-weight: 600; }

/* scroll animations — step reveal, visible by default, hidden only when html.js */
.slide-up, .fade-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
html.js .slide-up { opacity: 0; transform: translateY(24px); }
html.js .fade-in { opacity: 0; }
html.js .slide-up.visible, html.js .fade-in.visible { opacity: 1; transform: translateY(0); }
/* tree branch expand on scroll */
html.js .tree-branches .branch { opacity: 0; transform: scaleY(.6) translateY(-8px); transform-origin: top center; transition: opacity .6s ease, transform .6s ease; }
html.js .tree-branches.visible .branch { opacity: 1; transform: none; }
html.js .tree-branches .branch:nth-child(2) { transition-delay: .12s; }
html.js .tree-branches .branch:nth-child(3) { transition-delay: .24s; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .split, .about-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; top: 72px; left: 0; right: 0; background: #FFFFFF; flex-direction: column; padding: 22px; gap: 16px; border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(15,23,42,.1); transform: translateY(-150%); transition: transform .35s ease; }
  .nav-links.open { transform: translateY(0); }
  .burger { display: flex; }
  .nav-cta .btn { display: none; }
  .grid-3, .grid-2, .info-grid, .form-row { grid-template-columns: 1fr; }
  .sol-row { flex-wrap: wrap; gap: 6px 16px; }
  .sol-row h3 { flex: 1 1 100%; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .tree-branches { gap: 18px; }
}
