/* marcusoft.uk: one shared stylesheet. No framework, no CDN.
   Shell tokens (--shell-*) never change. Brand tokens (--brand-*) are overridden by [data-brand]
   on <body> (brand pages) or on a card (home). Header and footer use only --shell-* tokens. */
:root {
  /* Marcusoft neutral shell (placeholder identity: no Marcusoft logo yet) */
  --shell-ink: #1f2328;        /* 14.5:1 on paper */
  --shell-muted: #5a606b;      /* 5.8:1 on paper, 6.3:1 on white */
  --shell-paper: #f6f5f2;
  --shell-panel: #ffffff;
  --shell-tint: #ecebe7;
  --shell-line: #dcd9d3;
  --shell-accent: #2f4a6d;     /* links, focus: 8.3:1 on paper */
  --shell-footer-bg: #1f2328;
  --shell-footer-ink: #c9ccd1; /* 9.8:1 on footer */
  --shell-footer-link: #ffffff;
  --font-shell: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* App palettes (values from /workspace/wireframes/assets/styles.css and the holding pages) */
  --utl-fill: #30cccc; --utl-on-fill: #303030; --utl-strong: #147878; --utl-link: #0f6a6a;
  --utl-ink: #303030; --utl-paper: #f3fafa; --utl-tint: #e3f6f6;
  --tw-fill: #e07a3d; --tw-on-fill: #1a1a1a; --tw-strong: #c2581c; --tw-text: #9a3f0a;
  --tw-ink: #303030; --tw-paper: #fbf6f1; --tw-tint: #fdeee2; --tw-navy: #1f3a5f;
  --font-app: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* Brand slots: default = neutral shell (home, about, legal, 404) */
  --brand-fill: var(--shell-ink); --brand-on-fill: #ffffff;
  --brand-strong: var(--shell-ink);   /* large text, marks, borders */
  --brand-text: var(--shell-accent);  /* small text in brand colour */
  --brand-link: var(--shell-accent);
  --brand-ink: var(--shell-ink);
  --brand-paper: var(--shell-paper); --brand-tint: var(--shell-tint);
  --brand-font: var(--font-shell);
  --accent-strip: linear-gradient(90deg, var(--utl-fill) 0 50%, var(--tw-fill) 50% 100%);

  --radius: 12px; --max: 1120px; --gap: clamp(1rem, 3vw, 2rem);
  --shadow: 0 1px 2px rgba(31,35,40,.06), 0 6px 20px rgba(31,35,40,.06);
  color-scheme: light;
}
[data-brand="uptolet"] {
  --brand-fill: var(--utl-fill); --brand-on-fill: var(--utl-on-fill);
  --brand-strong: var(--utl-strong); --brand-text: var(--utl-strong); --brand-link: var(--utl-link);
  --brand-ink: var(--utl-ink); --brand-paper: var(--utl-paper); --brand-tint: var(--utl-tint);
  --brand-font: var(--font-app); --accent-strip: var(--utl-fill);
}
[data-brand="tradeworks"] {
  --brand-fill: var(--tw-fill); --brand-on-fill: var(--tw-on-fill);
  --brand-strong: var(--tw-strong);   /* #c2581c = 4.46:1 on white: large text / marks / borders only */
  --brand-text: var(--tw-text); --brand-link: var(--tw-text);   /* #9a3f0a = 6.8:1: small text and links */
  --brand-ink: var(--tw-ink); --brand-paper: var(--tw-paper); --brand-tint: var(--tw-tint);
  --brand-font: var(--font-app); --accent-strip: var(--tw-fill);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font-shell); font-size: 1.0625rem; line-height: 1.6; color: var(--shell-ink); background: var(--shell-paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--shell-accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gap); }
.wrap.narrow > * { max-width: 46rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: .5rem; top: -3rem; background: var(--shell-ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: .5rem; }

/* ---------- Header (neutral on every page) ---------- */
.site-header { background: var(--shell-panel); border-bottom: 1px solid var(--shell-line); position: relative; }
.site-header::after { content: ""; display: block; height: 4px; background: var(--accent-strip); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; color: var(--shell-ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; font-family: var(--font-shell); min-height: 44px; }
.wordmark img { width: 30px; height: 30px; }
.nav-toggle { display: none; margin-left: auto; min-height: 44px; min-width: 44px; padding: .5rem .9rem; border: 1px solid var(--shell-line); border-radius: 10px; background: var(--shell-panel); color: var(--shell-ink); font: inherit; font-weight: 600; cursor: pointer; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .8rem; border-radius: 8px; color: var(--shell-ink); text-decoration: none; font-weight: 500; font-family: var(--font-shell); }
.site-nav a:hover { background: var(--shell-tint); }
.site-nav a[aria-current="page"] { background: var(--shell-tint); box-shadow: inset 0 -3px 0 var(--shell-ink); }

/* ---------- Footer (neutral on every page) ---------- */
.site-footer { background: var(--shell-footer-bg); color: var(--shell-footer-ink); font-family: var(--font-shell); font-size: .95rem; margin-top: 4rem; }
.site-footer::before { content: ""; display: block; height: 4px; background: var(--accent-strip); }
.site-footer .wrap { padding-top: 2.25rem; padding-bottom: 2.25rem; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.site-footer a { color: var(--shell-footer-link); }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark img { filter: invert(1); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.site-footer ul a { display: inline-flex; min-height: 44px; align-items: center; }
.site-footer p { margin: .2rem 0; }
.legal-line { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; font-size: .9rem; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.tint { background: var(--shell-tint); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--shell-muted); margin: 0 0 .5rem; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .75rem; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--shell-muted); max-width: 40rem; }
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: 1fr 1fr; }
.card { background: var(--shell-panel); border: 1px solid var(--shell-line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .7rem 1.25rem; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--brand-fill); color: var(--brand-on-fill); }
.btn-secondary { background: transparent; color: var(--brand-ink); border-color: var(--brand-strong); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Home hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero .wrap { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: center; }
.hero-art { display: grid; gap: 1rem; }
.hero-chip { display: flex; align-items: center; justify-content: center; background: var(--shell-panel); border: 1px solid var(--shell-line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); border-top: 6px solid var(--brand-fill); min-height: 120px; }
.hero-chip img { max-height: 56px; width: auto; }

/* Brand cards on home */
.brand-card { display: flex; flex-direction: column; gap: .75rem; border-top: 6px solid var(--brand-fill); }
.brand-card .logo { height: 56px; display: flex; align-items: center; }
.brand-card .logo img { max-height: 48px; width: auto; }
.brand-card h3 { font-family: var(--brand-font); color: var(--brand-ink); }
.brand-card .btn { margin-top: auto; align-self: flex-start; }

/* What we build strip */
.strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.strip li { background: var(--shell-panel); border: 1px solid var(--shell-line); border-radius: var(--radius); padding: 1.1rem; }
.strip svg { width: 28px; height: 28px; color: var(--shell-accent); display: block; margin-bottom: .5rem; }
.strip strong { display: block; }
.strip span { display: block; color: var(--shell-muted); margin-top: .25rem; }

/* People (only shown when company.json showPeople is true) */
.person { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
.person .photo { width: 100%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.role { color: var(--shell-muted); font-weight: 600; margin: -.4rem 0 .75rem; }
.contact dt { font-weight: 600; }
.contact dd { margin: 0; }

/* ---------- Brand pages (scoped by body[data-brand]) ---------- */
.brand-hero { background: var(--brand-paper); border-bottom: 1px solid var(--shell-line); padding: clamp(2.5rem, 7vw, 5rem) 0; }
.brand-hero .wrap { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
.brand-hero .app-logo { height: 56px; width: auto; margin-bottom: 1.25rem; }
[data-brand] main h1, [data-brand] main h2, [data-brand] main h3 { font-family: var(--brand-font); color: var(--brand-ink); }
[data-brand] .brand-hero h1 .accent { color: var(--brand-strong); }
.brand-panel h2 { font-size: 1.35rem; }
.brand-panel p:last-child { margin-bottom: 0; }
.brand-panel { background: var(--shell-panel); border-radius: var(--radius); border: 1px solid var(--shell-line); box-shadow: var(--shadow); padding: 1.5rem; border-top: 6px solid var(--brand-fill); }
.feature { border-left: 4px solid var(--brand-fill); }
.feature .num { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); font-weight: 700; margin-bottom: .6rem; }
.cta-band { background: var(--brand-fill); color: var(--brand-on-fill); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); display: grid; gap: 1rem; }
.cta-band h2 { color: var(--brand-on-fill) !important; margin: 0; }
.cta-band p { margin: 0; }
.cta-band .actions { margin-top: .25rem; }
.cta-band .btn-primary { background: var(--brand-on-fill); color: #fff; }
.cta-band .btn-secondary { color: var(--brand-on-fill); border-color: var(--brand-on-fill); }
.small { font-size: .9rem; } .muted { color: var(--shell-muted); }
.err { text-align: center; padding: 5rem 0; }
.err .actions { justify-content: center; }
.err .code { font-size: 4rem; font-weight: 800; color: var(--shell-muted); margin: 0; }
.legal h2 { margin-top: 2rem; }

/* ---------- Breakpoints: mobile first ---------- */
@media (max-width: 767.98px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: .4rem; }
  .js .site-nav { display: none; width: 100%; margin: 0; padding-bottom: .75rem; }
  .js .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { width: 100%; padding: .65rem .8rem; }
}
@media (min-width: 600px) {
  .g4, .strip { grid-template-columns: repeat(2, 1fr); }
  .person { grid-template-columns: 220px 1fr; }
}
@media (min-width: 768px) {
  .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); }
  .site-footer .wrap { grid-template-columns: 1.2fr 1fr; }
  }
@media (min-width: 1024px) {
  .hero .wrap, .brand-hero .wrap { grid-template-columns: 1.25fr 1fr; }
  .g4, .strip { grid-template-columns: repeat(4, 1fr); }
  .person { grid-template-columns: 280px 1fr; gap: 2.5rem; }
}
@media print { .site-header::after, .site-footer::before, .nav-toggle { display: none; } }
.hero-chip[data-brand="uptolet"] img { height: 72px; width: auto; max-height: none; }
.hero-chip[data-brand="tradeworks"] img { height: 40px; width: auto; }
.brand-card[data-brand="uptolet"] .logo img { height: 56px; max-height: none; }
[data-brand="uptolet"] .brand-hero .app-logo { height: 88px; }
[data-brand="tradeworks"] .brand-hero .app-logo { height: 48px; }
