/* The shared stylesheet for every CMS-rendered tenant website.
 *
 * LIGHT, and professional rather than decorative: a company that sells AI
 * training data is judged on looking precise, so the work here is hierarchy,
 * rhythm and restraint — not colour. One accent, one neutral ramp, generous
 * whitespace, and real visual anchors (logo, hero artwork, per-card icons) so a
 * page is never an undifferentiated wall of paragraphs.
 *
 * The class names ARE the contract with lib/cms/site-renderer.js. Change one
 * here and change it there, or a band silently loses its styling.
 *
 * Per-tenant colour can be overridden later from globalContent without touching
 * this file; the palette is entirely custom properties for that reason. */

:root {
  --bg:         #ffffff;
  --bg-soft:    #f6f8fb;
  --bg-tint:    #eef4fd;
  --line:       #e3e8f0;
  --line-soft:  #edf1f7;

  --ink:        #0d1b2a;   /* headings */
  --ink-body:   #3d4c5f;   /* body copy */
  --ink-mute:   #61728a;   /* secondary */
  --ink-dim:    #8494a8;   /* tertiary */

  --brand:      #1257c4;
  --brand-dark: #0d419a;
  --brand-tint: #e8f0fd;
  --wa:         #1a8a4d;
  --wa-dark:    #14713f;

  --radius:     14px;
  --radius-sm:  9px;
  --wrap:       1140px;
  --shadow:     0 1px 2px rgba(13, 27, 42, .05), 0 8px 24px rgba(13, 27, 42, .05);
  --shadow-lg:  0 2px 4px rgba(13, 27, 42, .05), 0 18px 46px rgba(13, 27, 42, .09);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink-body);
  font: 16.5px/1.68 -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.02em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 26px; }
.wrap.narrow { max-width: 820px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 0; }

/* Focus must stay visible: a keyboard user on a contact form is a real lead. */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px;
}

/* ── header ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 26px; min-height: 68px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--ink);
  white-space: nowrap; text-decoration: none; letter-spacing: -.01em;
}
.brand .logo { width: 28px; height: 28px; color: var(--brand); flex: none; }
.site-foot .brand .logo { width: 24px; height: 24px; }

.nav-toggle {
  margin-left: auto; display: none; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 14px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
#site-nav { margin-left: auto; }
#site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
#site-nav a, #site-nav button {
  display: block; padding: 9px 13px; font-size: 14.5px; color: var(--ink-mute);
  border-radius: var(--radius-sm); text-decoration: none; background: none; border: 0;
  font-family: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
#site-nav a:hover, #site-nav button:hover { color: var(--brand); background: var(--bg-soft); }
#site-nav a.active { color: var(--brand); background: var(--brand-tint); font-weight: 600; }
#site-nav .has-children { position: relative; }
#site-nav .has-children > ul {
  display: none; position: absolute; top: 100%; left: 0; min-width: 262px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; box-shadow: var(--shadow-lg);
  flex-direction: column; align-items: stretch; gap: 0;
}
/* Hover opens it on a mouse; the click handler sets data-open for touch and
   keyboard, which hover alone never serves. */
#site-nav .has-children:hover > ul,
#site-nav .has-children[data-open="1"] > ul { display: flex; }
#site-nav .has-children > ul a { white-space: nowrap; color: var(--ink-body); font-weight: 500; }
#site-nav .has-children > ul a:hover { background: var(--bg-soft); color: var(--brand); }

.head-wa {
  background: var(--wa); color: #fff; padding: 10px 17px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 650; white-space: nowrap; text-decoration: none;
}
.head-wa:hover { background: var(--wa-dark); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 82px 0 74px; border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(760px 380px at 88% 8%, var(--brand-tint), transparent 66%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 78%);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; margin: 14px 0 0;
  max-width: 17ch;
}
.hero-art svg, .hero-art img { width: 100%; height: auto; }
.hero-art img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

.eyebrow {
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin: 0;
}
.lede { font-size: 19px; color: var(--ink-mute); margin: 20px 0 0; max-width: 58ch; }

/* ── bands ──────────────────────────────────────────────────────────────── */
.band { padding: 68px 0; border-bottom: 1px solid var(--line-soft); }
.band h2 { font-size: clamp(25px, 2.8vw, 34px); margin: 0 0 6px; line-height: 1.2; }
.band .eyebrow { margin-bottom: 11px; }
.band .lede { font-size: 17px; max-width: 74ch; margin: 14px 0 0; }
.prose p { margin: 14px 0 0; max-width: 74ch; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* ── cards ──────────────────────────────────────────────────────────────── */
.cards { display: grid; gap: 18px; margin-top: 34px; grid-template-columns: repeat(auto-fit, minmax(292px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 24px; box-shadow: var(--shadow);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #cfdcf0; }
.card-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-tint); color: var(--brand); margin-bottom: 16px;
}
.ico { width: 23px; height: 23px; }
.card h3 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.35; }
.card p { margin: 9px 0 0; font-size: 15px; color: var(--ink-mute); }
.card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 15px;
  font-size: 14.5px; font-weight: 650; color: var(--brand); text-decoration: none;
}
.card-link span { transition: transform .16s ease; }
.card-link:hover span { transform: translateX(3px); }

/* ── ticks ──────────────────────────────────────────────────────────────── */
.ticks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.ticks li {
  padding: 15px 18px 15px 46px; position: relative; font-size: 15.5px;
  background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.ticks li::before {
  content: ""; position: absolute; left: 18px; top: 21px; width: 13px; height: 7px;
  border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}
.ticks strong { color: var(--ink); font-weight: 650; display: block; }
.ticks span { color: var(--ink-mute); font-size: 15px; }

/* ── stats ──────────────────────────────────────────────────────────────── */
.stats-band { background: var(--bg-soft); }
.stats { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); margin-top: 30px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px; text-align: center; box-shadow: var(--shadow);
}
.stat-value { display: block; font-size: 36px; font-weight: 800; letter-spacing: -.035em; color: var(--brand); line-height: 1.1; }
.stat-label { display: block; margin-top: 8px; color: var(--ink-mute); font-size: 14.5px; }

/* ── faq ────────────────────────────────────────────────────────────────── */
.faqs details {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-top: 13px;
  box-shadow: var(--shadow);
}
.faqs details[open] { border-color: #cfdcf0; }
.faqs summary { cursor: pointer; font-size: 16.5px; color: var(--ink); font-weight: 650; list-style: none; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: "+"; float: right; color: var(--brand); font-weight: 400; font-size: 22px; line-height: 1; }
.faqs details[open] summary::after { content: "–"; }
.faqs details[open] summary { margin-bottom: 6px; }
.faqs .prose p { font-size: 15.5px; }

/* ── cta ────────────────────────────────────────────────────────────────── */
.cta-band {
  padding: 78px 0; border-bottom: 0;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}
.cta-band h2, .cta-band .lede { color: #fff; }
.cta-band .lede { opacity: .9; }
.cta-band .btn { background: #fff; color: var(--brand-dark); }
.cta-band .btn:hover { background: #eef4fd; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }

.btn {
  display: inline-block; margin-top: 28px; background: var(--brand); color: #fff;
  font-weight: 650; padding: 14px 26px; border-radius: var(--radius-sm); font-size: 15px;
  text-decoration: none; border: 0; cursor: pointer; font-family: inherit;
  box-shadow: 0 1px 2px rgba(18, 87, 196, .2), 0 6px 18px rgba(18, 87, 196, .18);
  transition: background .16s ease, transform .16s ease;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-wa { background: var(--wa); box-shadow: 0 1px 2px rgba(26, 138, 77, .2), 0 6px 18px rgba(26, 138, 77, .18); }
.btn-wa:hover { background: var(--wa-dark); }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--brand); }
.cta-row .btn { margin-top: 0; }

/* ── forms ──────────────────────────────────────────────────────────────── */
.enquiry {
  margin-top: 26px; max-width: 520px; display: grid; gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.enquiry label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
.enquiry label:first-of-type { margin-top: 0; }
.enquiry input, .enquiry textarea {
  width: 100%; background: #fff; border: 1px solid #cbd5e3;
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--ink);
  font-size: 15px; font-family: inherit;
}
.enquiry input::placeholder, .enquiry textarea::placeholder { color: var(--ink-dim); }
.form-note { margin: 14px 0 0; font-size: 14px; min-height: 1.4em; font-weight: 600; }
.form-note.ok { color: #157a43; }
.form-note.bad { color: #c02626; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-foot { padding: 52px 0 56px; background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 14.5px; }
.foot-grid { display: grid; gap: 40px; grid-template-columns: minmax(250px, 1fr) 2fr; }
.site-foot .brand { font-size: 14.5px; display: inline-flex; margin-bottom: 12px; }
.site-foot p { margin: 0 0 7px; }
.site-foot a { color: var(--ink-mute); text-decoration: none; }
.site-foot a:hover { color: var(--brand); }
.foot-links ul { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 28px; }
.foot-links li { break-inside: avoid; margin-bottom: 9px; }
.copyright { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-dim); font-size: 13.5px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  #site-nav { display: none; width: 100%; order: 4; padding-bottom: 14px; }
  #site-nav[data-open="1"] { display: block; }
  #site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  #site-nav .has-children:hover > ul { display: none; }
  #site-nav .has-children[data-open="1"] > ul { display: flex; position: static; border: 0; box-shadow: none; padding-left: 14px; }
  .head-row { flex-wrap: wrap; min-height: 0; padding: 12px 0; }
  .hero { padding: 54px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  /* The artwork is decoration, and on a phone it costs a screenful before the
     first sentence. The words come first; the picture follows. */
  .hero-art { order: 2; max-width: 420px; }
  .band { padding: 52px 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .foot-links ul { columns: 2; }
}
@media (max-width: 520px) {
  .foot-links ul { columns: 1; }
  .wrap { padding: 0 18px; }
}
