/* Konnexsion website styles. One file for the whole site.
   Colours come from the Konnexsion mark: four connected strokes (two greens, two blues)
   and the wordmark's deep blue. The four stroke colours also colour-code the
   Property Manager connection groups. */

:root {
  --k-green-deep: #0e673b;   /* mark: deep green stroke */
  --k-green: #4bb085;        /* mark: light green stroke */
  --k-blue-deep: #1b5667;    /* mark: deep blue stroke + wordmark */
  --k-blue: #77a4b7;         /* mark: light blue stroke */
  --k-teal: #3c8e82;         /* previous site's primary colour */

  --ink: #0f2a33;
  --muted: #536a72;
  --brand: var(--k-blue-deep);
  --brand-dark: #123f4c;
  --brand-soft: #eef5f4;
  --action: var(--k-green-deep);
  --action-hover: #0a5230;
  --aiwb: #1268e8;           /* AI WorkBook blue, only on AI WorkBook cards */
  --paper: #ffffff;
  --soft: #f5f8f7;
  --line: #dbe6e4;
  --todo: #fff6d6;
  --todo-line: #e3b341;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(15, 42, 51, 0.08);
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
img, video, iframe { max-width: 100%; }
img, video { display: block; height: auto; }
a { color: var(--brand); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.3rem, 4.8vw, 4.2rem); line-height: 1.04; letter-spacing: -0.035em; margin-bottom: 20px; color: var(--k-blue-deep); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 16px; color: var(--k-blue-deep); }
h3 { font-size: 1.18rem; line-height: 1.3; margin-bottom: 8px; }

.skip-link { position: absolute; left: -999px; top: 8px; }
.skip-link:focus { left: 8px; z-index: 50; padding: 8px 12px; background: var(--paper); }

.wrap { width: var(--wrap); margin: 0 auto; }
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section.soft { background: var(--soft); }
.section-head { max-width: 780px; margin-bottom: 36px; }
.section-head p, .lead { color: var(--muted); font-size: 1.15rem; }
.eyebrow { display: inline-block; margin-bottom: 14px; color: var(--k-green-deep); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border-radius: 10px; font-weight: 750; text-decoration: none; }
.button.primary { color: #fff; background: var(--action); }
.button.primary:hover { background: var(--action-hover); }
.button.secondary { color: var(--ink); border: 1px solid var(--line); background: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Portfolio bar: the route back from a product to the Konnexsion parent */
.portfolio-bar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px clamp(16px, 4vw, 48px); background: var(--k-blue-deep); color: #d6e6ea; font-size: 0.85rem; }
.portfolio-bar a { color: #fff; font-weight: 650; text-decoration: none; }
.portfolio-bar a:hover { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; min-height: 72px; padding: 10px clamp(16px, 4vw, 48px); background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--k-blue-deep); font-size: 1.35rem; font-weight: 800; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-stack { display: grid; line-height: 1.05; font-size: 1.2rem; }
.brand-stack small { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; font-weight: 650; }
.nav > a, .nav summary { color: var(--ink); text-decoration: none; cursor: pointer; border-bottom: 2px solid transparent; }
.nav > a:hover, .nav > a[aria-current="page"] { border-color: var(--k-green); }
.nav-menu { position: relative; }
.nav-menu summary { list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: " ▾"; font-size: 0.8em; }
.nav-menu-panel { position: absolute; top: calc(100% + 14px); left: -16px; display: grid; gap: 4px; width: 340px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.nav-menu-panel a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.nav-menu-panel a:hover { background: var(--soft); }
.nav-menu-panel span { color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-signin { color: var(--ink); font-weight: 650; text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-weight: 650; }

/* Hero */
.hero { padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 6vw, 72px); background: linear-gradient(180deg, var(--brand-soft), #fff); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero .lead { max-width: 660px; }
.hero-mark { justify-self: center; width: min(320px, 70%); }
.tagline { color: var(--k-green-deep); font-weight: 700; font-size: 1.1rem; }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card { display: block; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.card p { color: var(--muted); margin-bottom: 0; }
a.card:hover { border-color: var(--k-blue); }
.card.product { display: grid; gap: 12px; align-content: start; box-shadow: var(--shadow); }
.card.product.aiwb { border-top: 4px solid var(--aiwb); }
.card.product.kpm { border-top: 4px solid var(--k-green-deep); }
.card a.more { font-weight: 700; text-decoration: none; }
.feature-list { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.feature-list li { margin-bottom: 6px; }
.stat { font-size: 2rem; font-weight: 800; color: var(--k-blue-deep); }

/* Anchored content sections (features, audiences, connections) */
.topic { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 110px; }
.topic:first-of-type { border-top: 0; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.subnav a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 0.92rem; text-decoration: none; }
.related { margin-top: 14px; font-size: 0.95rem; }

/* Connection groups: each takes one colour of the Konnexsion mark */
.conn { --c: var(--k-blue-deep); }
.conn.c-green-deep { --c: var(--k-green-deep); }
.conn.c-green { --c: var(--k-green); }
.conn.c-blue-deep { --c: var(--k-blue-deep); }
.conn.c-blue { --c: var(--k-blue); }
.conn h2 { color: var(--c); }
.conn .conn-tag { display: inline-block; width: 40px; height: 6px; margin-bottom: 16px; border-radius: 3px; background: var(--c); }
.conn .media-slot { border-color: var(--c); }
.subnav a.conn { border-color: var(--c); }
.subnav a.conn::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--c); }
.conn-hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.conn-hub .card { border-left: 6px solid var(--c); }

/* Illustration placeholders: replace with drawn concept illustrations (no screenshots). */
.media-slot { display: grid; place-items: center; min-height: 240px; padding: 20px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--soft); color: var(--muted); font-size: 0.95rem; text-align: center; }

/* Placeholder copy: visible in preview so nothing ships by accident. publish_site.py validate --release fails while any remain. */
.todo { padding: 10px 14px; border-left: 4px solid var(--todo-line); background: var(--todo); color: #5c4400; font-size: 0.95rem; }
.todo::before { content: "TODO: "; font-weight: 800; }

/* CTA band */
.cta-band { padding: clamp(48px, 6vw, 80px) 0; background: var(--k-blue-deep); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe0e5; }
.cta-band .button.primary { background: var(--k-green); color: #08301d; }
.cta-band .button.secondary { color: var(--ink); }

/* Blog */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font: inherit; font-size: 0.82rem; }
button.chip { cursor: pointer; }
button.chip.active { background: var(--k-blue-deep); border-color: var(--k-blue-deep); color: #fff; }
.post-list { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; }
.post-card { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.post-card[hidden] { display: none; }
.post-card img, .post-card-img { width: 220px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--brand-soft); }
.post-card-img { display: block; }
.post-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card p { color: var(--muted); margin-bottom: 0; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.post-wrap { max-width: 820px; }
.post h1 { font-size: clamp(2rem, 4vw, 3rem); }
.post-crumbs a { text-decoration: none; font-weight: 650; }
.post-archive-note { padding: 10px 14px; border-left: 4px solid var(--k-blue); background: var(--soft); color: var(--muted); font-size: 0.92rem; }
.post-feature { width: 100%; margin: 24px 0; border-radius: var(--radius); }
.post-body { font-size: 1.07rem; overflow-wrap: anywhere; }
.post-body img { max-width: 100%; height: auto !important; }
.post-body table { max-width: 100% !important; width: auto !important; }
.post-body iframe { width: 100%; }
.post-body h2 { font-size: 1.6rem; margin-top: 1.6em; }
.post-body h3 { margin-top: 1.4em; }

/* Legal pages */
.legal-body { max-width: 860px; }
.legal-body h2 { font-size: 1.4rem; margin-top: 1.8em; }
.legal-body h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal-body table { width: 100%; border-collapse: collapse; }
.legal-body td, .legal-body th { padding: 6px 8px; border: 1px solid var(--line); vertical-align: top; }
.legal-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.legal-list a { font-weight: 650; }
.legal-updated { color: var(--muted); font-size: 0.92rem; }
.booking { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
/* Calendly sizes its iframe to 100% of this box, so the box needs a fixed height (as on aiworkbook.io). */
.calendly-inline-widget { min-width: 320px; height: 760px; }
@media (max-width: 900px) { .calendly-inline-widget { min-width: 0; height: 1000px; } }

/* Footer */
.site-footer { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 48px clamp(16px, 4vw, 48px) 32px; background: var(--soft); border-top: 1px solid var(--line); }
.site-footer nav { display: grid; align-content: start; gap: 8px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.footer-brand p { color: var(--muted); max-width: 340px; margin-top: 12px; }
.footer-legal { grid-column: 1 / -1; margin: 16px 0 0; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .hero-grid, .topic, .grid.two, .grid.three, .grid.four, .conn-hub { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav, .header-actions .header-signin { display: none; }
  .site-header { flex-wrap: wrap; }
  .site-header.open .nav { display: grid; width: 100%; gap: 14px; margin: 8px 0; }
  .nav-menu-panel { position: static; width: auto; margin-top: 8px; box-shadow: none; }
  .site-header.open .header-actions { width: 100%; }
  .site-header.open .header-actions .header-signin { display: inline; }
  .post-card { grid-template-columns: 1fr; }
  .post-card img, .post-card-img { width: 100%; }
}
@media (max-width: 520px) {
  .header-actions .button { display: none; }
  .site-header.open .header-actions .button { display: inline-flex; }
  .site-footer { grid-template-columns: 1fr; }
}
.legal-body iframe { width: 100%; height: 80vh; border: 0; }
.nav > a, .nav summary, .header-actions a { white-space: nowrap; }
/* The product header has more links, so it collapses into the menu earlier. */
@media (max-width: 1240px) {
  .product-header .nav-toggle { display: inline-flex; }
  .product-header .nav, .product-header .header-actions .header-signin { display: none; }
  .product-header { flex-wrap: wrap; }
  .product-header.open .nav { display: grid; width: 100%; gap: 14px; margin: 8px 0; }
  .product-header.open .header-actions { width: 100%; }
  .product-header.open .header-actions .header-signin { display: inline; }
}
@media (max-width: 520px) { .portfolio-bar-sep { display: none; } .portfolio-bar { display: grid; gap: 2px; } }
.section > .topic { padding: 0; border-top: 0; }
.lead.answer { max-width: 820px; padding: 16px 20px; border-left: 5px solid var(--k-green); background: #fff; border-radius: 0 12px 12px 0; color: var(--ink); }
ol.feature-list { padding-left: 22px; }
.media-slot.illustration { font-style: italic; background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 12px, #fff 12px, #fff 24px); }

/* Concept illustrations (tools/illustrations.py): drawn ideas, never screenshots. */
.illustration { margin: 0; }
.illustration img { width: 100%; height: auto; display: block; }
