/* site.css — shared stylesheet for muse-holdings.com (v1, 2026-08-22)
   Extracted from index.html when the site became multi-page. Three pages each carrying
   their own copy of these 170 lines would drift within a week; this cannot.
   The "clone per domain with no build step" property is unchanged — you clone the folder.
   No url() references live here, so it is safe in assets/. Page-specific rules stay in
   a small <style> block on the page that needs them. */
/* ---- Design tokens: violet sampled from the logo ribbon + near-black ink ---- */
    :root {
      --violet-900:#3F0F85;  /* derived darker — hover states only                       */
      --violet-700:#5816B7;  /* OFFICIAL logo "Accent" — 9.5:1 on white, safe for any text */
      --violet-500:#915CF7;  /* OFFICIAL logo "Graphic" — 4.1:1, DECORATIVE/large only     */
      --violet-200:#D8C0FC;  /* pale highlight sampled from inside the ribbon             */
      --violet-50: #F5EFFE;  /* tinted panel                                             */
      --ink:       #14121A;  /* near-black, nudged violet so it harmonises          */
      --ink-soft:  #55505F;
      --paper:     #FFFFFF;
      --paper-2:   #FAF8FE;
      --line:      #E7E2F0;
      --maxw:      1120px;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    /* WebP with a PNG fallback. display:contents keeps <picture> from generating a box,
       so the <img> stays the direct flex child and every existing rule still applies. */
    picture { display: contents; }
    img { max-width: 100%; }
    html { scroll-behavior: smooth; }

    body {
      background: var(--paper);
      color: var(--ink);
      font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
    @media (max-width: 560px){ .wrap { padding: 0 20px; } }

    /* ---------- Header ---------- */
    header {
      position: sticky; top: 0; z-index: 50;
      backdrop-filter: blur(10px);
      background: rgba(255,255,255,0.85);
      border-bottom: 1px solid var(--line);
    }
    .nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
    /* The lockup is 5:1 and must never be squeezed. It IS a flex item, so without flex:none the
       header shrinks it when the links don't fit, and the global img{max-width:100%} then clamps
       the width while height stays fixed — i.e. it distorts rather than overflowing. At 375px that
       crushed a 151px-wide lockup to 24px (2026-08-29). flex:none + max-width:none makes that
       impossible; the nav wraps instead (see the 560px query below). */
    .nav .logo { flex: 0 0 auto; }
    /* 38px is inherited from the old lockup, where anything under ~34px turned the
       "A FAMILY OF COMPANIES" microtext to mud. That tagline came out of the artwork
       2026-08-31, so that floor no longer applies — 38px is simply the chosen size now
       and can be re-tuned freely. The MUSE wordmark is the legibility constraint. */
    .nav .logo img { height: 38px; width: auto; max-width: none; display: block; }
    /* nav links — added 2026-08-22 when the site went multi-page.
       Combo/state classes use the Finsweet `is-` prefix, matching the house convention. */
    .navlinks { display: flex; align-items: center; gap: 26px; }
    .navlinks a {
      font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
      white-space: nowrap; transition: color .2s ease;
    }
    .navlinks a:hover { color: var(--violet-700); }
    .navlinks a.is-current { color: var(--violet-700); }
    /* MOBILE HEADER (John, 2026-08-29). The 5:1 lockup needed 171px of a 335px row at 375px, which
       forced the links onto a second row and made the header 109px tall. Below 680px the header now
       shows the ribbon MARK instead (see the <picture> in each page's header) and drops Admin, which
       gets one row back at 67px. MEASURED requirements, against (viewport - 40px of gutters):
           lockup + Home/About/Admin + pill   472px  — needs a 512px viewport
           mark   + Home/About/Admin + pill   373px  — needs 413px
           mark   + Home/About + pill         302px  — needs 342px   <- what this is
       Admin is NOT lost: it is in the footer of all four pages, which is where an internal-tools
       link belongs anyway. */
    @media (max-width: 680px){
      /* padding-block only — .nav and .wrap are the SAME element, so a `padding` shorthand here
         silently wipes .wrap's side padding and the header goes edge-to-edge. */
      .nav { flex-wrap: wrap; height: auto; padding-top: 11px; padding-bottom: 11px; row-gap: 10px; }

      /* The <img> still carries the LOCKUP's width/height attrs (900x179), so before the mark
         loads the browser would reserve 5:1 and shift the row. Pin the mark's real ratio. */
      .nav .logo img { height: 32px; aspect-ratio: 640 / 302; }

      /* flex:1 1 auto (not 1 1 100%) is deliberate: the links sit BESIDE the mark whenever they
         fit and drop to their own row when they don't — so the ~342px floor above enforces itself
         at whatever width the fonts actually render, instead of at a breakpoint I guessed. Below
         that it degrades to two rows; it can never overflow. */
      .navlinks { flex: 1 1 auto; justify-content: flex-end; gap: 10px; }

      /* Admin lives in the footer on phones — see the note above. */
      .navlinks a[href*="admin.muse-holdings.com"] { display: none; }

      /* Horizontal trims only — vertical padding stays 10px so the tap target keeps its height.
         At 360px (very common on Android) the row was 9px short; these recover ~19px. */
      .nav { column-gap: 12px; }
      .nav a.contact { padding: 10px 12px; font-size: 11.5px; letter-spacing: .04em; }
    }
    @media (max-width: 560px){
      .navlinks a { font-size: 13px; }
    }
    /* 360px — the most common Android width — landed 1.1px short of a single row. Shave only this
       band; 375px and up keep the roomier spacing (they have 14px+ to spare). Below ~345px nothing
       fits regardless and the nav wraps to two rows on its own. */
    @media (max-width: 374px){
      .navlinks { gap: 8px; }
      .nav a.contact { padding: 10px 11px; font-size: 11px; }
    }

    .nav a.contact {
      font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
      color: var(--paper); text-decoration: none; white-space: nowrap;
      padding: 11px 22px; border-radius: 100px; background: var(--ink);
      transition: background .2s ease, transform .2s ease;
    }
    .nav a.contact:hover { background: var(--violet-700); transform: translateY(-1px); }
    /* No small-screen logo rule any more: the mark has no microtext, so it stays legible at the
       single 32px set above. The old 30/34px steps existed only to mitigate the squeeze. */

    /* ---------- Hero ---------- */
    .hero { padding: 88px 0 96px; position: relative; overflow: hidden; text-align: center; }

    /* soft violet wash — gives the hero warmth without repeating the ribbon that is
       already the dominant shape inside the logo directly on top of it */
    .hero::after {
      content: ""; position: absolute; top: -18%; left: 50%;
      width: min(1180px, 140vw); aspect-ratio: 1 / 1;
      transform: translateX(-50%);
      background: radial-gradient(circle,
                    rgba(145,92,247,0.16) 0%,
                    rgba(145,92,247,0.06) 42%,
                    rgba(145,92,247,0) 68%);
      pointer-events: none; z-index: 0;
    }
    /* NOTE: a ghosted copy of the ribbon mark was tried here and removed — on white it
       fragments into disconnected grey smudges (its pale sections vanish, its mid-tones
       don't), and it competes with the ribbon already inside the hero logo. The wash above
       carries the brand colour on its own. assets/muse-mark-ribbon.png is unreferenced by the page
       but kept as a source asset — it is what the favicons were cut from.
    */
    .hero .wrap { position: relative; z-index: 1; }

    .hero .logo-hero img {
      width: min(400px, 74vw); height: auto; display: block; margin: 0 auto 36px;
    }
    .hero h1 {
      font-weight: 800; font-size: clamp(25px, 4.2vw, 42px);
      line-height: 1.22; letter-spacing: -0.02em;
      /* This number has been re-tuned for every copy change (20ch at 45 chars, 24ch at 60).
         The 2026-08-29 copy is 26 characters and wants ONE line on desktop, so the cap is now
         wide enough not to break it — it only constrains if the headline grows again. Narrow
         phones still wrap it on their own, and text-wrap:balance keeps that break even. */
      max-width: 30ch; margin: 0 auto; text-wrap: balance;
    }
    .hero h1 em { font-style: normal; color: var(--violet-700); }
    .hero p {
      margin: 22px auto 0; max-width: 56ch;
      font-size: clamp(15.5px, 1.9vw, 17.5px); color: var(--ink-soft);
    }
    .hero-actions {
      margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
    }
    .btn {
      display: inline-flex; align-items: center; gap: 9px;
      font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer;
      padding: 14px 28px; border-radius: 100px; border: 2px solid transparent;
      transition: all .2s ease;
    }
    .btn-primary { background: var(--violet-700); color: #fff; }
    .btn-primary:hover { background: var(--violet-900); transform: translateY(-2px); }
    .btn-ghost { border-color: var(--ink); color: var(--ink); }
    .btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

    /* ---------- Section scaffolding ---------- */
    section.block { padding: 84px 0 96px; border-top: 1px solid var(--line); background: var(--paper-2); }
    /* plain variant — lets sections alternate tinted / white down a longer page */
    section.block.block-plain { background: var(--paper); }
    .section-head { margin-bottom: 44px; }
    .section-head h2 {
      font-weight: 800; font-size: clamp(21px, 3vw, 30px); letter-spacing: -0.01em;
    }

    /* ---------- Brand cards ---------- */
    /* 2x2 since the 4th venture (The Safety Newsletter) was added 2026-08-25. Four across was
       tried and rejected: 250px a card wraps the headings and the Visit links. */
    .brands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: stretch; }
    /* Currently a no-op (same as the base) — kept so the tablet step still exists if the base
       column count ever changes again. */
    @media (max-width: 940px){ .brands { grid-template-columns: 1fr 1fr; } }
    @media (max-width: 640px){ .brands { grid-template-columns: 1fr; } }

    .brand {
      position: relative; overflow: hidden;
      background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
      padding: 32px 28px 28px; display: flex; flex-direction: column;
      text-decoration: none; color: inherit;
      transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    }
    /* violet rule that wipes across the top edge on hover */
    .brand::before {
      content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
      background: linear-gradient(90deg, var(--violet-700), var(--violet-500));
      transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
    }
    .brand:hover {
      transform: translateY(-4px); border-color: var(--violet-200);
      box-shadow: 0 22px 50px -26px rgba(88,22,183,0.42);
    }
    .brand:hover::before { transform: scaleX(1); }

    .brand-logo { height: 62px; margin-bottom: 20px; display: flex; align-items: center; }
    .brand-logo img { max-width: 175px; width: auto; object-fit: contain; object-position: left center; display: block; }
    .brand-logo img.mark-square { max-height: 60px; }   /* compact icon — can run tallest      */
    .brand-logo img.mark-wide   { max-height: 42px; }   /* wordmark — reads big, so cap lower  */
    .brand-logo img.tile { max-height: 58px; border-radius: 11px; }  /* Green Post has no transparent logo — its mark sits on its own teal ground */

    .brand .kicker {
      font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
      color: var(--violet-700); font-weight: 800;
    }
    .brand h3 { font-weight: 800; font-size: 21px; margin: 9px 0 14px; letter-spacing: -0.01em; }
    .brand p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; flex: 1; }
    .brand .go {
      margin-top: 24px; font-weight: 700; font-size: 13.5px; color: var(--violet-700);
      display: inline-flex; align-items: center; gap: 8px;
    }
    .brand .go .arr { transition: transform .2s ease; }
    .brand:hover .go .arr { transform: translateX(5px); }

    /* ---------- Footer ---------- */
    footer { padding: 56px 0 60px; border-top: 1px solid var(--line); }
    .foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
    /* margin-bottom was the gap to the "Making useful, original things." tagline, dropped
       2026-08-29 (John). Left in, it would trail 12px under the logo and — because .foot is
       align-items:flex-end — shove the left column below the right one. */
    .foot .fm img { height: 36px; width: auto; display: block; }
    .foot .meta { font-size: 13px; color: var(--ink-soft); }
    .foot .right { text-align: right; }
    @media (max-width: 560px){ .foot .right { text-align: left; } }
    .foot a { color: var(--violet-700); text-decoration: none; font-weight: 600; }
    .foot a:hover { text-decoration: underline; }

    /* respect reduced-motion preferences */
    @media (prefers-reduced-motion: reduce){
      html { scroll-behavior: auto; }
      * { transition: none !important; }
    }

    /* Divider between the footer's two links. Decorative only — hidden from screen readers. */
    .foot .sep { color: var(--ink-soft); opacity: .5; }
