/* CloudFumes — site styles */
:root {
  --ink: #15232d;
  --ink-2: #3a4a55;
  --ink-3: #62717b;
  --paper: #f4f6f3;
  --paper-2: #eaeeea;
  --mist: #dde4e0;
  --line: #c9d3ce;
  --teal: #0f7a6c;
  --teal-deep: #0a5a50;
  --teal-soft: #d6ebe6;
  --ember: #e39b2d;
  --white: #ffffff;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;

  --wrap: 72rem;
  --measure: 38rem;
  --radius-sm: 6px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01";
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--teal-soft); }

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); letter-spacing: -0.022em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 var(--s4); }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
.muted { color: var(--ink-3); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: var(--s3) var(--s4); z-index: 100; }
.skip:focus { left: var(--s4); top: var(--s4); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.25rem; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--white); color: var(--ink); }
.btn-small { padding: 0.55rem 0.95rem; font-size: 0.95rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(244,246,243,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: var(--s5); height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: var(--s5); margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.nav-cta { display: flex; gap: var(--s2); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.45rem 0.7rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

@media (max-width: 920px) {
  .menu-btn { display: inline-block; }
  .nav-links, .nav-cta { display: none; }
  .nav.open { flex-wrap: wrap; height: auto; padding-block: var(--s3) var(--s5); }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: var(--s4); width: 100%; margin: var(--s4) 0 0; order: 3; }
  .nav.open .nav-cta { display: flex; width: 100%; order: 4; margin-top: var(--s4); }
  .nav.open .menu-btn { order: 2; }
}

/* Hero */
.hero { padding: var(--s8) 0 var(--s8); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: var(--s7); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lede { margin-top: var(--s5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero-note { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s5); color: var(--ink-3); font-size: 0.95rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 4px rgba(227,155,45,.18); flex: none; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: var(--s7); } }

/* Stack diagram */
.stack { width: 100%; max-width: 30rem; margin-inline: auto; }
.stack .slab rect { fill: var(--white); stroke: var(--line); stroke-width: 1.5; }
.stack .slab.accent rect { fill: var(--teal-soft); stroke: var(--teal); }
.stack .slab text { font-family: var(--font); font-size: 15px; font-weight: 700; fill: var(--ink); }
.stack .slab text.sub { font-size: 12.5px; font-weight: 400; fill: var(--ink-3); }
.stack .spine { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 4 5; }
.stack .fume { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.stack .packet { fill: var(--ember); }
.stack .node { fill: var(--paper); stroke: var(--teal); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .stack .slab { opacity: 0; transform: translateY(10px); animation: rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
  .stack .slab:nth-of-type(4) { animation-delay: .05s; }
  .stack .slab:nth-of-type(3) { animation-delay: .2s; }
  .stack .slab:nth-of-type(2) { animation-delay: .35s; }
  .stack .slab:nth-of-type(1) { animation-delay: .5s; }
  .stack .fume { stroke-dasharray: 90; stroke-dashoffset: 90; animation: drift 3.2s ease-out 1.5s infinite; }
  .stack .fume.f2 { animation-delay: 2.1s; }
  .stack .fume.f3 { animation-delay: 2.7s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drift {
  0% { stroke-dashoffset: 90; opacity: 0; }
  25% { opacity: .6; }
  100% { stroke-dashoffset: -90; opacity: 0; }
}

/* Sections */
.section { padding: var(--s9) 0; }
.section-tight { padding: var(--s8) 0; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--mist); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: end; margin-bottom: var(--s7); }
.section-head p { color: var(--ink-2); margin: 0; max-width: var(--measure); }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; gap: var(--s4); } .section { padding: var(--s8) 0; } }

/* Service index (rows, not cards) */
.service-index { list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--ink); }
.service-index li { border-bottom: 1px solid var(--line); }
.service-row { display: grid; grid-template-columns: 3.25rem 1.1fr 1.4fr auto; gap: var(--s5); align-items: start; padding: var(--s5) 0; color: inherit; text-decoration: none; }
.service-row:hover { color: inherit; }
.service-row:hover h3 { color: var(--teal-deep); }
.service-row .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); display: grid; place-items: center; color: var(--teal); }
.service-row .icon svg { width: 22px; height: 22px; }
.service-row h3 { font-size: 1.35rem; transition: color .15s; }
.service-row p { margin: 0; color: var(--ink-2); }
.service-row .tools { font-size: 0.9rem; color: var(--ink-3); margin-top: var(--s2); }
.service-row .go { font-weight: 600; color: var(--teal-deep); white-space: nowrap; padding-top: 0.15rem; }
@media (max-width: 820px) {
  .service-row { grid-template-columns: 3rem 1fr; }
  .service-row > div:nth-child(3), .service-row .go { grid-column: 2; }
}

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { padding: var(--s5) var(--s5) var(--s5) 0; border-top: 1.5px solid var(--ink); position: relative; }
.steps li + li { padding-left: var(--s5); border-left: 1px solid var(--line); }
.steps .num { font-size: 2.6rem; font-weight: 800; color: var(--teal); letter-spacing: -0.03em; line-height: 1; display: block; margin-bottom: var(--s4); }
.steps h3 { margin-bottom: var(--s2); }
.steps p { color: var(--ink-2); font-size: 0.98rem; margin: 0; }
.steps .time { display: block; margin-top: var(--s3); font-size: 0.9rem; color: var(--ink-3); }
@media (max-width: 920px) { .steps { grid-template-columns: 1fr 1fr; } .steps li:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li + li { padding-left: 0; border-left: 0; } }

/* Engagement models */
.models { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: var(--s5); }
.model { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s6); display: flex; flex-direction: column; }
.model.lead { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.model.lead p, .model.lead li { color: #c8d3d0; }
.model h3 { margin-bottom: var(--s3); }
.model .for { font-size: 0.95rem; color: var(--ink-3); margin-bottom: var(--s4); }
.model.lead .for { color: #9fb2ad; }
.model ul { padding-left: 1.1rem; margin: 0 0 var(--s5); color: var(--ink-2); font-size: 0.98rem; }
.model li { margin-bottom: var(--s2); }
.model .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 920px) { .models { grid-template-columns: 1fr; } }

/* Proof / why */
.why { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--s8); align-items: start; }
.why-list { display: grid; gap: var(--s6); }
.why-list h3 { font-size: 1.15rem; margin-bottom: var(--s2); }
.why-list p { margin: 0; color: var(--ink-2); }
.stack-cloud { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s6); }
.chip { font-size: 0.9rem; padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink-2); }
@media (max-width: 820px) { .why { grid-template-columns: 1fr; gap: var(--s6); } }

/* FAQ */
.faq { max-width: 50rem; border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: var(--s5) var(--s7) var(--s5) 0; font-weight: 600; font-size: 1.12rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 var(--s7) var(--s5) 0; color: var(--ink-2); max-width: var(--measure); }

/* CTA band */
.cta-band { background: var(--ink); color: var(--paper); padding: var(--s8) 0; position: relative; overflow: hidden; }
.cta-band .wrap { display: grid; grid-template-columns: 1.3fr auto; gap: var(--s6); align-items: center; }
.cta-band h2 { color: var(--white); max-width: 20ch; }
.cta-band p { color: #b9c6c2; margin: var(--s4) 0 0; max-width: var(--measure); }
.cta-band .actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
.cta-band .btn-ghost { color: var(--paper); border-color: #4b5d68; }
.cta-band .btn-ghost:hover { border-color: var(--paper); color: var(--white); }
@media (max-width: 820px) { .cta-band .wrap { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: #0f1a22; color: #a9b7b3; padding: var(--s8) 0 var(--s6); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--s6); }
.site-footer .brand { color: var(--white); }
.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: var(--s4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.site-footer a { color: #cfd9d6; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid #263540; color: #7f918c; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Inner page header */
.page-head { padding: var(--s8) 0 var(--s7); border-bottom: 1px solid var(--line); }
.crumbs { font-size: 0.92rem; color: var(--ink-3); margin-bottom: var(--s5); }
.crumbs a { color: var(--ink-3); }
.page-head h1 { max-width: 18ch; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.page-head .lede { margin-top: var(--s5); }

/* Service detail */
.detail { display: grid; grid-template-columns: 1fr 20rem; gap: var(--s8); align-items: start; }
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.7rem; margin: var(--s7) 0 var(--s4); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: var(--s2); }
.aside { position: sticky; top: 6rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s6); }
.aside h3 { font-size: 1.1rem; margin-bottom: var(--s3); }
.aside p { color: var(--ink-2); font-size: 0.98rem; }
.aside .btn { width: 100%; justify-content: center; margin-top: var(--s2); }
.deliverables { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); list-style: none; padding: 0 !important; }
.deliverables li { padding-left: 1.6rem; position: relative; margin: 0; }
.deliverables li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.8rem; height: 0.45rem; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
@media (max-width: 920px) { .detail { grid-template-columns: 1fr; } .aside { position: static; } }
@media (max-width: 560px) { .deliverables { grid-template-columns: 1fr; } }

.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.related a { display: block; padding: var(--s5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-decoration: none; color: var(--ink); }
.related a:hover { border-color: var(--teal); color: var(--ink); }
.related strong { display: block; font-size: 1.08rem; margin-bottom: var(--s1); }
.related span { color: var(--ink-3); font-size: 0.95rem; }
@media (max-width: 820px) { .related { grid-template-columns: 1fr; } }

/* About */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); border-top: 1.5px solid var(--ink); padding-top: var(--s6); }
.values h3 { font-size: 1.2rem; margin-bottom: var(--s2); }
.values p { color: var(--ink-2); margin: 0; }
@media (max-width: 820px) { .values { grid-template-columns: 1fr; } }

/* Forms */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--s8); align-items: start; }
.form { display: grid; gap: var(--s5); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: var(--s2); }
.field .hint { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.hp { position: absolute; left: -5000px; }
.form-status { font-weight: 600; min-height: 1.5em; margin: 0; }
.form-status.ok { color: var(--teal-deep); }
.form-status.err { color: #a2381f; }
.contact-side { display: grid; gap: var(--s6); }
.contact-side h3 { font-size: 1.05rem; margin-bottom: var(--s2); }
.contact-side p { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } .form .row { grid-template-columns: 1fr; } }

/* Ask panel (assistant) */
.ask-launcher {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--ink); color: var(--white); border: 0; border-radius: 999px;
  padding: 0.8rem 1.15rem 0.8rem 0.95rem; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(21,35,45,.55);
}
.ask-launcher:hover { background: var(--teal-deep); }
.ask-launcher svg { width: 20px; height: 20px; }
.ask-panel {
  position: fixed; right: 1.25rem; bottom: 5.25rem; z-index: 61;
  width: min(24rem, calc(100vw - 2.5rem)); max-height: min(36rem, calc(100vh - 7rem));
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(21,35,45,.45);
  display: none; flex-direction: column; overflow: hidden;
}
.ask-panel.open { display: flex; }
@media (prefers-reduced-motion: no-preference) { .ask-panel.open { animation: pop .18s ease-out; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ask-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); background: var(--ink); color: var(--white); }
.ask-head strong { display: block; font-size: 1rem; }
.ask-head span { font-size: 0.85rem; color: #b9c6c2; }
.ask-close { background: none; border: 0; color: var(--white); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; }
.ask-log { flex: 1; overflow-y: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); background: var(--paper); }
.msg { max-width: 88%; padding: 0.65rem 0.85rem; border-radius: 12px; font-size: 0.96rem; line-height: 1.5; }
.msg p { margin: 0 0 0.4rem; } .msg p:last-child { margin: 0; }
.msg.bot { background: var(--white); border: 1px solid var(--mist); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--teal); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg a { color: var(--teal-deep); }
.suggest { display: flex; flex-wrap: wrap; gap: var(--s2); }
.suggest button { font: inherit; font-size: 0.88rem; background: var(--white); color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.75rem; cursor: pointer; }
.suggest button:hover { border-color: var(--teal); color: var(--ink); }
.ask-form { display: flex; gap: var(--s2); padding: var(--s3); border-top: 1px solid var(--mist); background: var(--white); }
.ask-form input { flex: 1; font: inherit; font-size: 0.98rem; border: 1.5px solid var(--line); border-radius: 8px; padding: 0.6rem 0.75rem; min-width: 0; }
.ask-form input:focus { outline: none; border-color: var(--teal); }
.ask-form button { font: inherit; font-weight: 600; background: var(--teal); color: var(--white); border: 0; border-radius: 8px; padding: 0 0.95rem; cursor: pointer; }
.lead-form { display: grid; gap: var(--s2); margin-top: var(--s2); }
.lead-form input, .lead-form textarea { font: inherit; font-size: 0.93rem; border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 0.6rem; width: 100%; }
.lead-form button { font: inherit; font-weight: 600; font-size: 0.93rem; background: var(--ink); color: var(--white); border: 0; border-radius: 6px; padding: 0.55rem; cursor: pointer; }
@media (max-width: 480px) { .ask-launcher span { display: none; } .ask-launcher { padding: 0.85rem; } }

.legal { max-width: var(--measure); }
.legal h2 { font-size: 1.35rem; margin: var(--s6) 0 var(--s3); }
