/* Sewaa Consulting website
   Tokens: change the brand colours here. */
:root {
  --paper: #f6f8f9;
  --white: #ffffff;
  --ink: #17212b;
  --slate: #536170;
  --mist: #d9e1e7;
  --spruce: #1e5b52;
  --spruce-deep: #123a34;
  --spruce-tint: #e3efec;
  --signal: #d9952b;
  --signal-tint: #fbefd9;
  --healthy: #4fb48c;

  --font-ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-code: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --measure: 68ch;
  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius-s: 6px;
  --radius-l: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--spruce); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--spruce-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Type scale (ratio ~1.25) */
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--slate); max-width: 52ch; }

/* Header */
.site-header { border-bottom: 1px solid var(--mist); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand img { width: auto; height: 44px; }
.brand small { font-weight: 500; color: var(--slate); font-size: 0.85rem; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--spruce); }
.nav a[aria-current="page"] { color: var(--spruce); box-shadow: inset 0 -2px 0 var(--spruce); }
.nav-toggle { display: none; background: none; border: 1px solid var(--mist); border-radius: var(--radius-s); padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }

/* Buttons */
.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; padding: 13px 22px; border-radius: var(--radius-s); border: 2px solid var(--spruce); cursor: pointer; line-height: 1.2; transition: background-color .15s, color .15s; }
.btn-primary { background: var(--spruce); color: #fff; }
.btn-primary:hover { background: var(--spruce-deep); border-color: var(--spruce-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--spruce); }
.btn-ghost:hover { background: var(--spruce-tint); color: var(--spruce-deep); }
.nav .btn { padding: 9px 16px; color: #fff; }
.nav .btn:hover { color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero-note { margin-top: 22px; color: var(--slate); font-size: 0.95rem; }

/* The content-tree health check (the one bold element) */
.tree { margin: 0; background: var(--spruce-deep); color: #dfe9e6; border-radius: var(--radius-l); padding: 26px 26px 20px; font-family: var(--font-code); font-size: 0.86rem; line-height: 1; box-shadow: 0 30px 60px -30px rgba(18, 58, 52, 0.55); }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); opacity: 0; animation: grow .45s ease-out forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
.tree li:last-child { border-bottom: 0; }
.tree .node { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree .node::before { content: ""; display: inline-block; width: calc(var(--d, 0) * 18px); }
.tree .d1 { --d: 1; } .tree .d2 { --d: 2; }
.tree .d1 .node::after, .tree .d2 .node::after { content: none; }
.tree .branch { color: rgba(255,255,255,0.35); margin-right: 8px; }
.st { position: relative; flex: none; display: inline-grid; padding: 6px 10px; border-radius: 999px; font-size: 0.78rem; font-family: var(--font-ui); font-weight: 600; background: rgba(79,180,140,0.16); color: #9fe0c4; }
.st > span { grid-area: 1 / 1; }
.st.flip { background: rgba(217,149,43,0.18); color: #f3c57d; animation: heal .4s ease forwards; animation-delay: calc(1.5s + var(--i) * 420ms); }
.st.flip .now { opacity: 0; animation: show .3s ease forwards; animation-delay: inherit; }
.st.flip .was { animation: hide .2s ease forwards; animation-delay: inherit; }
.tree figcaption { font-family: var(--font-ui); font-size: 0.8rem; color: rgba(223,233,230,0.6); margin-top: 16px; line-height: 1.4; }
@keyframes grow { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes heal { to { background: rgba(79,180,140,0.16); color: #9fe0c4; } }
@keyframes show { to { opacity: 1; } }
@keyframes hide { to { opacity: 0; } }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-white { background: var(--white); border-top: 1px solid var(--mist); border-bottom: 1px solid var(--mist); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--slate); }

/* Audience split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--ink); }
.split > div { padding: 28px 32px 8px 0; }
.split > div + div { padding-left: 32px; border-left: 1px solid var(--mist); }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 7px; border-left: 2px solid var(--spruce); border-bottom: 2px solid var(--spruce); transform: rotate(-45deg); }

/* Problem → fix rows */
.fixes { border-top: 1px solid var(--mist); }
.fix { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; padding: 22px 0; border-bottom: 1px solid var(--mist); }
.fix h3 { margin: 0; display: flex; gap: 12px; align-items: baseline; }
.fix h3::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); transform: translateY(-1px); }
.fix p { margin: 0; color: var(--slate); }

/* Steps (a real sequence) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--spruce); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-weight: 700; font-size: 2rem; color: var(--spruce); line-height: 1; margin-bottom: 12px; }
.steps p { color: var(--slate); margin: 0; font-size: 0.98rem; }

/* Article list */
.posts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--mist); }
.posts li { border-bottom: 1px solid var(--mist); }
.posts a { display: grid; grid-template-columns: 1fr auto; gap: 8px 32px; padding: 24px 0; text-decoration: none; color: var(--ink); }
.posts a:hover h3 { color: var(--spruce); text-decoration: underline; text-underline-offset: 4px; }
.posts h3 { margin: 0; font-size: 1.3rem; }
.posts p { grid-column: 1; margin: 0; color: var(--slate); max-width: 70ch; }
.posts .meta { grid-row: 1 / span 2; grid-column: 2; color: var(--slate); font-size: 0.9rem; white-space: nowrap; align-self: center; }

/* FAQ */
.faq { max-width: 820px; border-top: 1px solid var(--mist); }
.faq details { border-bottom: 1px solid var(--mist); }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.5rem; font-weight: 400; color: var(--spruce); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: var(--slate); max-width: 70ch; }

/* CTA band */
.cta { background: var(--spruce); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 8px; max-width: 22ch; }
.cta p { margin: 0; color: rgba(255,255,255,0.8); max-width: 50ch; }
.cta .btn-primary { background: #fff; color: var(--spruce-deep); border-color: #fff; }
.cta .btn-primary:hover { background: var(--spruce-tint); border-color: var(--spruce-tint); color: var(--spruce-deep); }

/* Page header (inner pages) */
.page-head { padding: clamp(44px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { max-width: 20ch; }
.crumbs { font-size: 0.9rem; color: var(--slate); margin-bottom: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--mist); }
.crumbs a { color: var(--slate); }

/* Services */
.service { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 5vw, 64px); padding: 44px 0; border-top: 1px solid var(--mist); scroll-margin-top: 90px; }
.service:first-of-type { border-top: 2px solid var(--ink); }
.service h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.service .answer { color: var(--slate); }
.service h3 { font-size: 1rem; margin: 0 0 10px; color: var(--slate); font-weight: 600; letter-spacing: 0; }
.fit { background: var(--spruce-tint); border-radius: var(--radius-s); padding: 14px 18px; font-size: 0.97rem; margin-top: 8px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; padding: 0; list-style: none; }

.models { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--mist); }
.models th, .models td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--mist); vertical-align: top; }
.models thead th { background: var(--ink); color: #fff; font-weight: 600; }
.models tbody th { font-weight: 600; width: 22%; }
.models tr:last-child th, .models tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* Article */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.article { font-family: var(--font-read); font-size: 1.15rem; line-height: 1.72; max-width: var(--measure); }
.article h2 { font-family: var(--font-ui); font-size: 1.6rem; margin-top: 2em; scroll-margin-top: 90px; }
.article h3 { font-family: var(--font-ui); margin-top: 1.6em; }
.article li { margin-bottom: 0.45em; }
.article code { font-family: var(--font-code); font-size: 0.85em; background: var(--white); border: 1px solid var(--mist); border-radius: 4px; padding: 1px 5px; }
.article pre { background: var(--ink); color: #e6edf3; padding: 18px 20px; border-radius: var(--radius-s); overflow-x: auto; font-size: 0.85rem; line-height: 1.55; }
.article pre code { background: none; border: 0; padding: 0; color: inherit; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--slate); font-size: 0.95rem; }
.short-answer { font-family: var(--font-ui); background: var(--white); border: 1px solid var(--mist); border-left: 4px solid var(--spruce); border-radius: var(--radius-s); padding: 18px 22px; margin: 0 0 2em; font-size: 1.05rem; line-height: 1.6; }
.short-answer strong { display: block; margin-bottom: 4px; }
.toc { position: sticky; top: 96px; font-size: 0.93rem; border-left: 2px solid var(--mist); padding-left: 18px; }
.toc p { font-weight: 600; margin-bottom: 8px; }
.toc ol { list-style: none; padding-left: 0; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--slate); text-decoration: none; }
.toc a:hover { color: var(--spruce); text-decoration: underline; }
.author { display: flex; gap: 18px; align-items: flex-start; border-top: 1px solid var(--mist); margin-top: 3em; padding-top: 1.6em; font-family: var(--font-ui); font-size: 1rem; }
.author .mark { flex: none; width: 52px; height: 52px; border-radius: 50%; }
.author p { margin: 0 0 4px; color: var(--slate); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.form { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-l); padding: clamp(22px, 4vw, 36px); }
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--slate); font-size: 0.9rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #b9c5cf; border-radius: var(--radius-s); padding: 12px 14px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--spruce-tint); border-color: var(--spruce); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hidden { position: absolute; left: -9999px; }
.next-steps { list-style: none; padding: 0; margin: 0 0 32px; counter-reset: n; }
.next-steps li { counter-increment: n; position: relative; padding-left: 44px; margin-bottom: 20px; }
.next-steps li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--spruce); color: var(--spruce); font-weight: 700; display: grid; place-items: center; font-size: 0.9rem; }
.next-steps p { margin: 2px 0 0; color: var(--slate); font-size: 0.97rem; }

/* Footer */
.site-footer { background: var(--ink); color: #b8c3cd; padding: 56px 0 32px; font-size: 0.95rem; }
.site-footer a { color: #e6edf3; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer .brand { margin-bottom: 14px; }
.site-footer .brand img { height: 40px; }
.site-footer .brand small { color: #b8c3cd; }
.site-footer h2 { font-size: 1rem; color: #fff; letter-spacing: 0; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.legal { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 20px; font-size: 0.85rem; color: #8a97a3; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap, .split, .fix, .service, .article-wrap, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .split > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--mist); }
  .fix { gap: 8px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .toc { position: static; order: -1; }
  .posts a { grid-template-columns: 1fr; }
  .posts .meta { grid-row: auto; grid-column: 1; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--mist); flex-direction: column; align-items: flex-start; padding: 20px var(--gutter) 24px; gap: 18px; }
  .nav.open { display: flex; }
  .steps, .row-2 { grid-template-columns: 1fr; }
  .tree { font-size: 0.78rem; padding: 20px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition: none !important; }
}
@media print {
  .site-header, .cta, .site-footer, .toc { display: none; }
}
