/* aiguide.se — built on Menodi V1's actual tokens, read out of the shipping site
   (Menodi/scripts/site_skin.py + the rendered homepage), not from a style guide.

   V1 is: white page, one purple action colour, SF Pro headings at weight ~550 with
   tight negative tracking (sans — NOT serif), solid 8px buttons, 14px cards, cool
   greys. An earlier pass here used a cream/mustard "warm editorial" system borrowed
   from an unrelated design skill; that was the wrong system and has been replaced. */

:root {
  /* surfaces */
  --bg: #fff;
  --soft: #f8f7fa;              /* --v1-soft  */
  --tint: #f2eef8;              /* inner-page lavender */
  --ink: #180A2B;
  --ink-soft: #52456E;
  --muted: #726a80;             /* --v1-muted */

  /* one action colour */
  --action: #6D28D9;            /* --v1-action */
  --action-hover: #5820b2;
  --amber: #9D5CFF;             /* brighter accent, small marks only */

  /* lines */
  --line: #e9e5ee;              /* --v1-line */
  --line-strong: #dcd6e5;
  --border: rgba(24, 10, 43, .09);

  /* geometry */
  --radius-btn: 8px;
  --radius-card: 14px;
  --shadow: 0 3px 10px #28104c12;

  --wrap: 1120px;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

/* V1 headings: sans, heavy-ish, tightly tracked. */
h1, h2, h3 {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.075;
  margin: 0 0 .7rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 5.3vw, 3.6rem); font-weight: 560; letter-spacing: -.055em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 550; letter-spacing: -.04em; margin-top: 3.25rem; }
h3 { font-size: 1.1rem; font-weight: 550; letter-spacing: -.02em; margin-top: 2rem; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1.15rem; }

a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--action-hover); }

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

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px; top: 16px; background: var(--action); color: #fff;
  padding: 12px 16px; border-radius: var(--radius-btn); z-index: 100;
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 66px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 25px; width: auto; }

.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a {
  text-decoration: none; color: var(--muted);
  font-size: .94rem; font-weight: 450; letter-spacing: -.01em;
  padding: 7px 14px; border-radius: var(--radius-btn);
  transition: color .18s, background .18s;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--soft); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 8vw, 96px) 0 12px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .1em;
  font-size: .73rem; font-weight: 550; color: var(--action);
  margin: 0 0 1.05rem;
}
.lede {
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  color: var(--muted); max-width: 62ch; line-height: 1.55;
}

/* ---------- buttons (V1 .v1-button) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; min-height: 46px; padding: 0 22px;
  background: var(--action); color: #fff;
  border: 1px solid var(--action); border-radius: var(--radius-btn);
  font: 500 15px/1.2 var(--sans); text-decoration: none;
  white-space: nowrap; transition: background .18s, box-shadow .18s;
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; box-shadow: var(--shadow); }

/* inline text CTA */
.link-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 550; font-size: .95rem; text-decoration: none;
  color: var(--action); white-space: nowrap;
}
.link-cta:hover { color: var(--action-hover); }
.link-cta::after { content: "\2192"; transition: transform .18s; }
.link-cta:hover::after { transform: translateX(3px); }

/* ---------- cards ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  margin: 2rem 0 2.75rem;
}
.card {
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.55rem 1.6rem 1.5rem;
  transition: border-color .18s, box-shadow .18s;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .95rem; margin: 0 0 1rem; }
.card > p:last-child { margin-top: auto; margin-bottom: 0; }

/* ---------- callout ---------- */
.note {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.65rem;
  margin: 2.25rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* ---------- lists ---------- */
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .6rem; }
li strong { color: var(--ink); font-weight: 550; }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; margin: 1.75rem 0 2.5rem; border: 1px solid var(--line); border-radius: var(--radius-card); }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .95rem; }
th, td { text-align: left; padding: .85rem 1.05rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 550; background: var(--soft);
}
tbody tr:last-child td { border-bottom: 0; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 5rem; padding: 2.25rem 0 1.25rem;
  color: var(--muted); font-size: .92rem;
}
.site-foot a { color: var(--muted); }
/* Oversized brand watermark. This is the real logo.svg, not typed text: an earlier pass set the
   word in SF Pro, which is neither the brand's letterforms nor its Aiguide capitalisation, and
   line-height:.85 pushed the g descender out of its line box. As an image it scales cleanly and
   cannot re-wrap or clip. */
.foot-mark { margin: 2.25rem 0 0; user-select: none; }
.foot-mark img { display: block; width: min(100%, 560px); height: auto; opacity: .07; }

.updated { font-size: .86rem; color: var(--muted); margin-top: 2.5rem; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 13px; padding-bottom: 13px; }
  .brand img { height: 22px; }
  .site-nav { width: 100%; overflow-x: auto; }
  .site-nav a { padding: 7px 11px; font-size: .89rem; }
  h2 { margin-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
