/* AI4S-SMB site — see notes/design-a4s-site.md for the plan behind these tokens. */

:root {
  --ground: #F2F4F6;
  --surface: #FBFCFD;
  --ink: #0F1720;
  --body: #2A333D;
  --muted: #556270;
  --line: #DBE1E6;
  --accent: #1891DB;
  --accent-deep: #0B6CA8;
  --mast: #0B1622;

  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body-face: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.97rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.1rem, 1.04rem + 0.3vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.35rem + 2.2vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.45rem + 4.4vw, 4.4rem);

  --mast-h: 64px;
  --gutter: clamp(1rem, 0.7rem + 1.6vw, 2.5rem);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font: var(--step-0)/1.62 var(--body-face);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--display); color: var(--ink); }

h1 {
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 1.1rem;
  max-width: 15ch;
  text-wrap: balance;
}

p { max-width: 66ch; text-wrap: pretty; }

a { color: var(--accent-deep); }

.wrap {
  width: min(1240px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--mast);
  color: #fff;
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--mast-h);
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; }

/* Owner-supplied lockups. These files are white artwork sitting on a solid black matte, so a
   wrapper crops down to the ink box and `screen` composites the matte away against the navy
   surface — white stays white, black becomes transparent. Only ever use them on a dark
   background; on light they need a transparent-background replacement.
   Geometry is driven by --h; the multipliers are the ink offsets measured in each source file:
     AI4SMB      1024x576, ink x42-974  y194-350  (933x157, ratio 5.9427)
     AI CONNEX   1024x768, ink x140-884 y316-450  (745x135, ratio 5.5185)
     CONNEX mark 1024x203, ink x172-354 y10-192   (183x183, ratio 1) */
.lockup {
  --h: 24px;
  display: block;
  overflow: hidden;
  height: var(--h);
  width: calc(var(--h) * var(--ratio));
}
.lockup img {
  display: block;
  height: auto;
  width: calc(var(--h) * var(--w));
  margin-left: calc(var(--h) * var(--mx));
  margin-top: calc(var(--h) * var(--my));
  mix-blend-mode: screen;
}
/* --ratio is ink width/height, --w is full-image width in --h units, --mx/--my are negative
   ink offsets in --h units, so one crop works at any requested height. */
.lockup--ai4smb { --ratio: 5.9427; --w: 6.5223; --mx: -0.2675; --my: -1.2357; }
.lockup--connex { --ratio: 5.5185; --w: 7.5852; --mx: -1.0370; --my: -2.3407; }
.lockup--connexmark { --ratio: 1; --w: 5.5956; --mx: -0.9399; --my: -0.0546; }

.topnav { display: flex; gap: clamp(1rem, 2vw, 1.9rem); align-items: center; height: 100%; }
.topnav a {
  display: inline-flex; align-items: center; height: 100%;
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color 0.15s ease;
}
.topnav a:hover { color: #fff; }
.topnav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.6rem, 5vw, 4.6rem) clamp(1.4rem, 2.6vw, 2.2rem); }
.hero-inner { padding-block: clamp(2.4rem, 4.5vw, 4.2rem) clamp(1.4rem, 2.5vw, 2rem); }

.brandline {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 clamp(1.2rem, 2.6vw, 2.2rem);
  max-width: 56ch;
}

.lede {
  margin: 0;
  max-width: 60ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: #39434D;
}

/* Home hero headline. The owner's wording is the headline plus a paragraph, both inside one <h1>:
   the tagline as the h1's own text, the description in a .h1-sub block beneath it. That structure
   is deliberate and comes from the preview editor, so the CSS has to serve it rather than a
   conventional h1 + p pair.
   Two consequences worth knowing before editing:
   - .hero-h1 must NOT carry a narrow max-width. It used to be 24ch (a measure tuned for a
     four-word headline); with a paragraph nested inside, that cap squeezed the paragraph into a
     skinny column. The measure now lives on .h1-sub instead, so the headline wraps at the
     .hero-copy width and the paragraph keeps a readable line length of its own.
   - .h1-sub is set in the body face at the old --step-1 size and #39434D, i.e. the look the
     separate .lede paragraph used to have, so the page reads exactly as it did before the merge.
     `text-wrap: pretty` overrides the `balance` the h1 sets, which is right for a headline but
     wrong for a multi-line paragraph. */
.hero-h1 {
  max-width: none;
  line-height: 1.02;
  margin-bottom: 1.25rem;
}
.h1-sub {
  display: block;
  margin-top: 0.7rem;
  max-width: 58ch;
  font-family: var(--body-face);
  font-size: var(--step-1);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.55;
  color: #39434D;
  text-wrap: pretty;
}

.reveal { animation: reveal 0.8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } }

/* ---------- the wall of verticals ---------- */

.wall-section { padding-bottom: clamp(3rem, 6vw, 5.5rem); }

.wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.tile {
  display: flex;
  flex-direction: column;
  min-height: clamp(158px, 12vw, 186px);
  padding: clamp(1.15rem, 2vw, 1.7rem);
  background: var(--ground);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.17s var(--ease), color 0.17s var(--ease);
}
.tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: auto;
}
.tile-mark {
  width: 40px; height: 40px;
  color: var(--v, var(--accent));
  flex: none;
  transition: color 0.17s var(--ease);
}
.tile-num {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  color: var(--v, var(--accent));
  padding-top: 2px;
  transition: color 0.17s var(--ease);
}
.tile-name {
  margin: 0.9rem 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.06rem, 1.45vw, 1.34rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.tile-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.tile:hover, .tile:focus-visible { background: var(--v); color: #fff; }
.tile:hover .tile-mark, .tile:focus-visible .tile-mark,
.tile:hover .tile-num, .tile:focus-visible .tile-num { color: #fff; }
.tile:hover .tile-meta, .tile:focus-visible .tile-meta { color: #fff; }
.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: -7px; }

/* ---------- index bar ---------- */

.indexbar {
  position: sticky;
  top: var(--mast-h);
  z-index: 40;
  background: rgba(251, 252, 253, 0.94);
  backdrop-filter: blur(8px);
  border-block: 1px solid var(--line);
}
.indexbar-inner {
  display: flex;
  gap: 0.1rem;
  overflow-x: auto;
  padding-block: 0.35rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
}
.indexbar-inner::-webkit-scrollbar { display: none; }
.indexbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 0.58rem;
  border-radius: 3px;
  color: #4A5560;
  text-decoration: none;
  font-size: 0.82rem;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.indexbar a::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--v, var(--accent));
  opacity: 0.5;
  flex: none;
}
.indexbar a:hover { background: rgba(24, 145, 219, 0.07); color: #17202b; }
.indexbar a.is-current {
  color: #0d151e;
  background: color-mix(in srgb, var(--v) 10%, transparent);
  box-shadow: inset 0 -2px 0 var(--v);
  font-weight: 600;
}
.indexbar a.is-current::before { opacity: 1; }

/* ---------- vertical sections ---------- */

.v {
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--mast-h) + 58px);
}

.v-grid {
  position: relative;
  padding-block: clamp(2.3rem, 4.2vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 4.5rem);
  align-items: start;
}

.v-grid::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 58px; height: 3px;
  background: var(--v);
}

.v-head { position: sticky; top: calc(var(--mast-h) + 78px); }
.v-num {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--v);
  margin: 0 0 0.6rem;
}
.v-mark { width: 40px; height: 40px; color: var(--v); display: block; margin-bottom: 0.9rem; }
.v h2 {
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 0.75rem;
}
.v-intro { margin: 0; font-size: 0.99rem; line-height: 1.58; color: #3A4550; max-width: 36ch; }

.v-list { list-style: none; margin: 0; padding: 0; }
.v-case {
  padding-block: 1.05rem 1.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}
.v-case:first-child { border-top: 0; padding-top: 0.2rem; }
.v-case h3 {
  font-family: var(--body-face);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
}
.v-case p { margin: 0; max-width: 68ch; color: #39434D; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.2rem; }
.tag {
  font-size: 0.73rem;
  line-height: 1.3;
  padding: 0.2rem 0.42rem;
  border: 1px solid color-mix(in srgb, var(--v) 38%, var(--line));
  background: color-mix(in srgb, var(--v) 6%, transparent);
  color: color-mix(in srgb, var(--v) 72%, var(--ink));
  border-radius: 3px;
  white-space: nowrap;
}

/* ---------- tools ---------- */

.tools {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.6rem, 4.5vw, 4.2rem);
  background: var(--surface);
}
.tools h2 {
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.7rem;
}
.tools-lede { color: #3A4550; margin: 0 0 clamp(1.6rem, 3vw, 2.4rem); max-width: 62ch; }
.toolgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2.2rem;
  margin: 0;
}
.toolgrid dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.toolgrid dd { margin: 0; font-size: 0.94rem; line-height: 1.5; color: #4B5762; max-width: 34ch; }

/* ---------- footer ----------
   Two columns, one row, both stretched to the same height: left is the stacked brand lockup,
   right is the contact line with the socials under it. A copyright line sits centred at the
   bottom. See the notes on .footgrid/.footside for why this is a single stretched row. */

.sitefoot {
  background: var(--mast);
  color: rgba(255, 255, 255, 0.78);
  padding-block: clamp(2.2rem, 3.6vw, 3rem) clamp(1.3rem, 2vw, 1.7rem);
}
/* One row, two columns, both items STRETCHED to the row height. Stretching is what makes the
   left logo stack and the right contact/social block exactly the same height, so their top and
   bottom edges line up. Each column then uses `justify-content: space-between` internally to push
   its first item to the top edge and its last to the bottom edge.
   This replaced a two-row grid (brand+contact in row 1, socials in row 2). That version left the
   brand centred against row 1 only while the socials lengthened the right column into row 2, so
   the two columns ended up 70px vs 91px tall with their centres 33px apart. */
.footgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  column-gap: 2.5rem;
}

/* brand lockups, left. Both are the owner's white-on-black files cropped and screen-composited.
   Stacked, not side by side: AI4SMB on row 1, then "by" + a deliberately larger AI CONNEX
   lockup on row 2. A column (not a wrapping row) is what keeps the two brands reading as one
   endorsed lockup at every width — a wrapping row would shove AI CONNEX onto the same line as
   AI4SMB on wide screens and below it only when it ran out of room. */
.footbrand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;   /* AI4SMB to the top edge, "by AI CONNEX" to the bottom */
  gap: 0.5rem;
}
.footbrand .lockup--ai4smb { --h: 24px; }

/* "by" sits on the AI CONNEX cap line, not the middle of its ink: the wordmark is optically
   heavy, so centring the small word against the whole logo looks high. Baseline-aligned flex
   with a 1px nudge reads level. */
.footby {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.footby .by {
  font-size: 0.8rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.5);
}
.footbrand .lockup--connex { --h: 38px; }   /* deliberately larger than the AI4SMB lockup */

/* contact + socials, right. One block, so it can be stretched to match the brand column and its
   own two lines can spread to the top and bottom edges the way the brand stack does. */
.footside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.7rem;
  text-align: right;
}

.footcontact { margin: 0; font-size: 0.95rem; color: rgba(255, 255, 255, 0.7); }
.footlabel { color: #fff; font-weight: 600; }
.footcontact a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 1px;
}
.footcontact a:hover, .footcontact a:focus-visible { border-bottom-color: var(--accent); }

.socials { display: flex; align-items: center; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.social {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.social svg { width: 15px; height: 15px; display: block; fill: currentColor; }
.social:hover, .social:focus-visible {
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, 0.2));
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

/* legal line, centred at the bottom of the footer, under both columns */
.footlegal { margin-top: clamp(1.1rem, 1.8vw, 1.5rem); text-align: center; }
.footlegal p { margin: 0 auto; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); }

/* ---------- responsive ---------- */

@media (min-width: 1101px) {
  .indexbar a { padding: 0 0.5rem; }
  .indexbar a::before { display: none; }
  .indexbar a.is-current { box-shadow: inset 0 -3px 0 var(--v); }
}

@media (max-width: 1100px) {
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .v-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; padding-block: 2.2rem 2.6rem; }
  .v-grid::before { display: none; }
  .v-head { position: static; }
  .v h2 { font-size: var(--step-3); }
  .v-intro { max-width: 60ch; }
  .toolgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --mast-h: 58px; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 136px; padding: 0.95rem; }
  .tile-mark { width: 30px; height: 30px; }
  .tile-num { font-size: 0.72rem; }
  .tile-name { font-size: 1.02rem; }
  /* The hero headline needs its own size on phones. At the inherited --step-4 it wrapped to three
     lines and stranded "businesses." alone on the last one. Dropping it here keeps it to two
     balanced lines, and lifting the measure cap lets it use the full column width. */
  .hero-h1 { font-size: clamp(1.85rem, 1.25rem + 3.1vw, 2.5rem); max-width: none; line-height: 1.06; }
  .h1-sub { margin-top: 0.5rem; }
  .brand .lockup { --h: 21px; }
  .footbrand { gap: 0.4rem; }
  .footbrand .lockup--ai4smb { --h: 20px; }
  .footby { gap: 0.4rem; }
  .footby .by { font-size: 0.74rem; }
  .footbrand .lockup--connex { --h: 30px; }
  /* On phones the footer centres as one stack. The markup has exactly two grid children now —
     .footbrand and .footside — so collapsing to a single column stacks those two, and the
     right-hand block's own contact line and socials stack inside it. Centring is then a matter
     of `justify-items: center` per column plus `align-items: center` inside each of them; the
     old grid-template-areas approach no longer applies because .footcontact/.socials stopped
     being direct grid children when they were wrapped in .footside. */
  .footgrid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-items: center;
    row-gap: 1.1rem;
    text-align: center;
  }
  .footbrand { align-items: center; justify-content: flex-start; }
  .footby { justify-content: center; }
  .footside { align-items: center; justify-content: flex-start; text-align: center; }
  .footcontact { text-align: center; }
  .footlegal { text-align: center; }
  .footlegal p { margin-inline: auto; }
  .topnav a { font-size: 0.9rem; }
  .lede { font-size: 1.02rem; }
  .hero { padding-top: 2.4rem; }
  .v-case p { max-width: 60ch; }
  .toolgrid { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
}

@media (max-width: 380px) {
  .tile-name { font-size: 0.95rem; }
  .masthead-inner { gap: 0.6rem; }
  .topnav { gap: 0.85rem; }
  .topnav a { font-size: 0.84rem; white-space: nowrap; }
  .brand .lockup { --h: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- product screenshots (decorative, aria-hidden) ---------- */

.hero-copy { max-width: 780px; }

.hero-visual {
  margin: clamp(2rem, 4vw, 3.2rem) 0 0;
}
@media (min-width: 1101px) {
  .hero-visual { margin-bottom: 3.4rem; }
}
.hero-visual + * { margin-top: 0; }

.shot {
  border-radius: 12px;
  overflow: hidden;
  background: #12161C;
  border: 1px solid #0B0F14;
  box-shadow: 0 34px 74px -40px rgba(11, 22, 34, 0.46), 0 2px 8px rgba(11, 22, 34, 0.06);
}
.shot-top {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  background: #12161C;
}
.shot-dots { display: flex; gap: 6px; }
.shot-dots i { width: 9px; height: 9px; border-radius: 50%; background: #39414D; display: block; }
.shot-url {
  flex: 1;
  max-width: 340px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1C222A;
  border-radius: 5px;
  padding: 0 9px;
  font-family: var(--body);
  font-size: 10px;
  color: #8D97A6;
  overflow: hidden;
  white-space: nowrap;
}
.shot-url svg { width: 9px; height: 9px; flex: none; }
.shot-top .shot-tag {
  margin-left: auto;
  font-family: var(--body);
  font-size: 10px;
  color: #6C7684;
  letter-spacing: 0.01em;
}
.shot picture { display: block; }
.shot img { display: block; width: 100%; height: auto; }
.shot-note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

/* one output screen per vertical */

/* ---------- dark AI workspace (tools page hero) ----------
   The Genspark AI Workspace 6.0 in dark mode, rendered as vector (images/genspark-workspace.svg).
   Because the artwork is already a full app screen with its own chrome, it gets a plain rounded
   frame — never the .shot fake-window treatment used on the home page. The SVG carries its own
   viewBox and width/height, so it simply fills the frame and stays sharp at any zoom or DPI;
   no fixed max-width or upscaling blur to guard against. */

.ws-shot {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1B1E25;
  background: #0B0C0F;
  box-shadow: 0 34px 74px -40px rgba(11, 22, 34, 0.5), 0 2px 8px rgba(11, 22, 34, 0.06);
}
.ws-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- AI tools page ---------- */

.workspace { padding-bottom: clamp(1.6rem, 3vw, 2.4rem); }

.workspace-caption {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.section-kicker {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 0.5rem;
}

.section-heading {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0;
}
.section-lede { margin: 0.7rem 0 0; color: #3A4550; max-width: 62ch; }

/* jump-to-group nav */
.groups { padding-block: clamp(2rem, 3.4vw, 2.8rem) 0; }
.groupnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: clamp(1.1rem, 2vw, 1.5rem) 0 0;
}
.groupnav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.72rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: #3A4550;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease),
              background 0.16s var(--ease);
}
.groupnav a:hover,
.groupnav a:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  color: var(--accent-deep);
}

/* one block per catalogue group */
.toolgroups { padding-block: clamp(1.4rem, 2.4vw, 2rem) clamp(3rem, 5vw, 4.5rem); }
.toolgroup {
  padding-block: clamp(1.5rem, 2.6vw, 2.2rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--mast-h) + 18px);
}
.toolgroup:first-child { border-top: 0; padding-top: 0.4rem; }
.toolgroup-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: clamp(0.9rem, 1.6vw, 1.3rem);
}
.toolgroup-head .section-heading { font-size: var(--step-1); letter-spacing: -0.02em; }
.tool-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
}

.toolcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.4vw, 1.15rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: clamp(1.05rem, 1.6vw, 1.45rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.17s var(--ease), box-shadow 0.17s var(--ease);
}
.tool-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 10px 26px -20px rgba(11, 22, 34, 0.4);
}

/* Colourful tool glyphs, like the tiles on genspark.ai/agents. Each card gets its own
   hue, cycled in document order, and a soft tint of the same hue behind the stroke.
   Hue lives entirely in CSS so the generated markup stays exactly what build.py emits:
   every integer is covered by the 7n(+k) rules, and --h on .tool-card is the fallback. */
.tool-card { --h: 214; }
.tool-card:nth-child(7n + 2) { --h: 268; }
.tool-card:nth-child(7n + 3) { --h: 176; }
.tool-card:nth-child(7n + 4) { --h: 146; }
.tool-card:nth-child(7n + 5) { --h: 32; }
.tool-card:nth-child(7n + 6) { --h: 8; }
.tool-card:nth-child(7n) { --h: 330; }

.tool-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.35rem;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(160deg, hsl(var(--h) 92% 61%), hsl(var(--h) 78% 43%));
  border: 1px solid hsl(var(--h) 74% 47%);
  box-shadow: 0 4px 12px -7px hsl(var(--h) 72% 40% / 0.65);
  transition: box-shadow 0.17s var(--ease), transform 0.17s var(--ease);
}
.tool-card:hover .tool-badge {
  box-shadow: 0 6px 16px -6px hsl(var(--h) 72% 40% / 0.75);
}
.tool-ic {
  width: 22px;
  height: 22px;
  display: block;
  /* a hair of shadow keeps the white stroke crisp on the lighter end of the gradient */
  filter: drop-shadow(0 1px 1px hsl(var(--h) 60% 22% / 0.35));
}

.tool-card h3 {
  font-family: var(--display);
  font-size: 1.01rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}
.tool-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #4B5762;
  max-width: 34ch;
}

@media (max-width: 940px) {
  .toolcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .toolcards { grid-template-columns: minmax(0, 1fr); }
  .tool-card p { max-width: none; }
}

.v-mock { margin: clamp(1.2rem, 2vw, 1.6rem) 0 0; }
.v-mock img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #DDE3E8;
  background: #FBFCFD;
  box-shadow: 0 16px 38px -28px rgba(11, 22, 34, 0.34);
}
@media (max-width: 1100px) {
  .v-mock img { max-width: 460px; }
}
@media (max-width: 720px) {
  .hero-visual { margin-top: 1.6rem; }
  .shot-top { height: 30px; padding: 0 11px; }
  .shot-url { max-width: none; }
  .shot-tag { display: none; }
  .shot img { aspect-ratio: 840 / 1240; }
  .v-mock { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .v-mock img { max-width: 100%; border-radius: 0; border-left: 0; border-right: 0; }
}

/* ---------- contact page ----------
   Two columns on desktop: the copy sits left and stays put while the form scrolls, the card
   sits right. The form is a plain <form> — no JS is required to type in it — and every message
   about it (validation, success, failure) is written into [data-error] next to the field or
   into #form-status, which is a live region so it is announced. */

.contact-page { padding-bottom: clamp(3rem, 5vw, 4.5rem); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: start;
  padding-block: clamp(2.2rem, 4vw, 3.4rem) 0;
}

.contact-copy { padding-top: 0.3rem; }
.contact-copy h1 { max-width: 13ch; margin-bottom: 1.1rem; }
.contact-copy .lede { max-width: 46ch; }

/* the response promise, as a short list rather than a paragraph */
.contact-points { margin: clamp(1.6rem, 3vw, 2.2rem) 0 0; padding: 0; list-style: none; display: grid; gap: 0.9rem; }
.contact-points li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0.7rem; align-items: start; }
.contact-points svg { width: 20px; height: 20px; color: var(--accent-deep); margin-top: 1px; }
.contact-points strong { display: block; font-family: var(--display); font-size: 0.98rem; font-weight: 600; color: var(--ink); letter-spacing: -0.012em; }
.contact-points span { font-size: 0.92rem; line-height: 1.5; color: var(--muted); }

/* direct-contact block under the points, on the navy chrome */
.contact-direct {
  margin-top: clamp(1.8rem, 3vw, 2.4rem);
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border-radius: 8px;
  background: var(--mast);
  color: rgba(255, 255, 255, 0.74);
}
.contact-direct .direct-label {
  display: block;
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.5rem;
}
.contact-direct a.mail {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  padding-bottom: 2px;
}
.contact-direct a.mail:hover, .contact-direct a.mail:focus-visible { border-bottom-color: var(--accent); }
.contact-direct p { margin: 0.6rem 0 0; font-size: 0.88rem; line-height: 1.5; max-width: 40ch; }

/* the card */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.3rem, 2.4vw, 2.1rem);
  box-shadow: 0 24px 54px -40px rgba(11, 22, 34, 0.34);
}

.field { display: grid; gap: 0.35rem; margin-bottom: 1.05rem; }
.field:last-of-type { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.field .optional { font-weight: 400; color: var(--muted); font-size: 0.82rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.6rem 0.7rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field.has-error input,
.field.has-error textarea { border-color: #B3261E; box-shadow: inset 0 0 0 1px #B3261E; }
[data-error] { min-height: 0; font-size: 0.82rem; line-height: 1.4; color: #B3261E; }
[data-error]:empty { display: none; }

/* honeypot: present for bots, invisible and unreachable for people */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(1.2rem, 2vw, 1.6rem);
}
.form-foot .btn-send {
  font: inherit;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent-deep);
  border: 1px solid var(--accent-deep);
  border-radius: 5px;
  padding: 0.72rem 1.5rem;
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.form-foot .btn-send:hover { background: #095a8d; border-color: #095a8d; }
.form-foot .btn-send:disabled { cursor: progress; opacity: 0.62; }
.form-note { margin: 0; font-size: 0.79rem; line-height: 1.45; color: var(--muted); max-width: 30ch; }

/* status line: live region, styled per state, hidden while empty */
.form-status { margin-top: 1rem; font-size: 0.9rem; line-height: 1.55; border-radius: 6px; padding: 0.7rem 0.85rem; }
.form-status:empty { display: none; padding: 0; margin: 0; }
.form-status strong { font-weight: 600; }
.form-status a { color: inherit; text-decoration: underline; }
.form-status.is-pending { background: color-mix(in srgb, var(--accent) 8%, transparent); color: #1B4A69; }
.form-status.is-ok { background: #E7F5EC; color: #1B5E33; }
.form-status.is-ok a { color: #14532d; }
.form-status.is-error { background: #FCEBEA; color: #8E1D17; }

/* no-JS: the form still works as a normal GET, so say so rather than lying */
.noscript-note {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #E4C97A;
  background: #FDF6E3;
  border-radius: 6px;
  font-size: 0.87rem;
  line-height: 1.5;
  color: #6B4E00;
}

@media (max-width: 940px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(1.6rem, 3vw, 2.2rem); }
  .contact-copy h1 { max-width: 18ch; }
  .contact-copy .lede { max-width: 58ch; }
  .form-card { padding: clamp(1.1rem, 3vw, 1.6rem); }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form-foot { align-items: stretch; }
  .form-foot .btn-send { width: 100%; }
  .form-note { max-width: none; }
}
