/* Base rules from the canonical design (docs/prototype/Home - copy - final.dc.html).
   The sections themselves carry inline styles straight from the design, so this
   file stays deliberately small — page ground, type default, and link colours. */
body {
  margin: 0;
  background: #FBF3EA;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  color: #2E4636;
}

a {
  color: #24402E;
  text-decoration: none;
}

a:hover {
  color: #E8583C;
}

main {
  display: block;
}

/* Every section on these pages carries desktop-only inline styles straight
   from the design comp (fixed grid tracks, unwrapped flex rows) — see
   BRAND.md's own admission that grids "starve below ~1100px". Below one
   breakpoint, force every explicit grid to a single column and let every
   flex row wrap; every layout here already reads correctly stacked
   vertically, so this is safe as a blanket rule rather than a per-page fix. */
.marketing-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.marketing-nav-toggle {
  display: none;
}

@media (max-width: 860px) {
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* A grid/flex item with a fixed-width child (e.g. the artwork pieces' own
     inline width:NNNpx) won't shrink below that child's intrinsic size by
     default — min-width:0 is the standard fix so the 1fr track (or a
     column-direction flex item) above can actually collapse to viewport
     width instead of forcing an overflow. */
  [style*="grid-template-columns"] > *,
  [style*="display:flex"] > * {
    min-width: 0;
  }

  [style*="display:flex"] {
    flex-wrap: wrap !important;
  }

  /* The artwork partial's wrapper carries an explicit width:NNNpx from every
     caller (300-410px depending on placement). max-width:100% alone doesn't
     reliably cap it inside an auto-sized grid track (percentages don't
     resolve cleanly against a track still being sized), so force the width
     itself on mobile instead of just capping it. */
  .artwork-piece {
    width: 100% !important;
  }

  .marketing-nav-toggle {
    display: inline-flex;
  }

  .marketing-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #FDF8F2;
    border-bottom: 1px solid rgba(36, 64, 46, .09);
    padding: 12px 24px 20px;
  }

  .marketing-nav-links.is-open {
    display: flex;
  }

  .marketing-nav-links a {
    padding: 10px 4px;
  }
}
