/* mindcontact.net — brand colours and font from ../mindcontact-identity.
   Mobile first: the base rules are the phone layout, min-width queries scale up
   to tablet (48rem) and desktop (64rem). */

@font-face { font-family: "Source Sans Pro"; font-weight: 400; font-display: swap; src: url("fonts/SourceSansPro-Regular.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-weight: 600; font-display: swap; src: url("fonts/SourceSansPro-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-weight: 700; font-display: swap; src: url("fonts/SourceSansPro-Bold.woff2") format("woff2"); }

:root {
  --navy: #005282;
  --blue: #296DC1;
  --cyan: #50D7EA;
  --red: #FF4E50;
  --ink: #333333;
  --line: #CCCCCC;
  --paper: #F5F8FC;
  --width: 72rem;
  --pad: 1.25rem;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.55 "Source Sans Pro", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: var(--blue); }
a:hover { color: var(--navy); }
img { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.kicker {
  margin: 0 0 .6rem;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 3px;
  margin-right: .55rem;
  vertical-align: middle;
  background: var(--red);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem 1.4rem;
  border: 2px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.button:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.button--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .8); }
.button--ghost:hover { background: #fff; color: var(--blue); border-color: #fff; }
.link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Top bar: brand, language, collapsible menu on phones */
.top { position: sticky; top: 0; z-index: 10; background: var(--blue); color: #fff; }
.top-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: .55rem var(--pad);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand:hover { color: #fff; }
.lang { margin: 0 0 0 auto; display: flex; gap: .5rem; font-size: .9rem; }
.lang a { color: #fff; text-decoration: none; opacity: .85; }
.lang strong { color: var(--cyan); }
.menu summary {
  list-style: none;
  cursor: pointer;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  padding: 0 .9rem;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  font-weight: 600;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: #fff; color: var(--blue); }
.menu nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: grid;
  background: var(--blue);
  border-top: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .35);
}
.menu nav a {
  padding: .9rem var(--pad);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(165deg, var(--blue) 0%, var(--blue) 40%, var(--navy) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: var(--width); margin: 0 auto; padding: 3rem var(--pad) 3.5rem; }
.hero .kicker { color: var(--cyan); }
.hero h1 { color: #fff; font-size: 2.3rem; font-weight: 700; line-height: 1.08; }
.hero .lede { max-width: 38rem; margin: 1.2rem 0 1.8rem; font-size: 1.15rem; color: #e6f0fa; }
.hero-actions { display: flex; flex-direction: column; gap: .75rem; margin: 0; }
.hero-actions .button { border-color: #fff; background: #fff; color: var(--blue); }
.hero-actions .button:hover { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }
.hero-actions .button--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .8); }
.hero-mark { position: absolute; right: -9rem; bottom: -3rem; width: 22rem; opacity: .08; pointer-events: none; }

/* Sections */
.section { max-width: var(--width); margin: 0 auto; padding: 3.5rem var(--pad) 0; }
.section-lede { max-width: 42rem; margin: .9rem 0 0; font-size: 1.1rem; }

.tiles, .cards, .venues, .sites, .chips { list-style: none; margin: 0; padding: 0; }
.tiles { display: grid; gap: 1rem; margin-top: 2rem; }
/* Like the project cards: icon, title and text sit on a subgrid, so the texts start level. */
.tile { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; padding: 1.3rem; border-radius: var(--radius); background: var(--paper); }
.tile-icon {
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: .8rem;
  padding: .55rem;
  border-radius: 10px;
  background: var(--blue);
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile p { margin: .5rem 0 0; }
/* Tiles without an icon: title and text only, still aligned row by row. */
.tiles--text .tile { grid-row: span 2; }
/* Steps of the work, numbered. */
.tiles--steps { counter-reset: step; }
.tiles--steps h3::before { counter-increment: step; content: counter(step) ". "; color: var(--blue); }
.stack-title { margin-top: 2.2rem; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.chips li { padding: .3rem .8rem; border: 1px solid #c9d5e3; border-radius: 999px; font-size: .95rem; font-weight: 600; color: var(--navy); }

/* Interactive systems band */
.band { margin-top: 3.5rem; background: var(--navy); color: #fff; }
.band-inner { max-width: var(--width); margin: 0 auto; padding: 3.5rem var(--pad); }
.band h2, .band h3 { color: #fff; }
.band .kicker { color: var(--cyan); }
.band .section-lede { color: #dbe8f3; }
.band h3 { margin-top: 2.2rem; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.venues { display: grid; gap: .1rem; margin-top: .8rem; }
.venues li { display: grid; align-content: start; gap: .1rem; padding: .8rem 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.venues span { color: #b9d3ea; font-size: .95rem; }

/* Projects */
.cards { display: grid; gap: 1rem; margin-top: 2rem; }
.cards + .cards { margin-top: 1rem; }
/* Each card spans six rows of the list (label, name, text, details, tech, link) through a subgrid,
   so names, details and links line up across a row of cards. */
.card {
  display: grid;
  grid-row: span 6;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: 1.4rem;
  border: 1px solid #dde5ef;
  border-radius: var(--radius);
  background: #fff;
}
.card--lead { border-top: 4px solid var(--blue); }
.role { margin: 0 0 .3rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.card h3 { font-size: 1.4rem; }
.card > p:not(.role) { margin: .7rem 0 0; }
.meta { display: grid; grid-template-columns: auto 1fr; align-content: start; gap: .2rem .7rem; margin: 1rem 0 0; font-size: .92rem; }
.meta dt { font-weight: 700; color: var(--navy); }
.meta dd { margin: 0; }
/* The tech line sits in its own row, after the tallest details of the row of cards. */
.meta .tech { grid-column: 1 / -1; color: #5f6b78; }
.meta:has(.tech) { align-self: end; margin-top: .4rem; }
.card .link { align-self: end; padding-top: 1rem; }
.band-more { margin: 1.8rem 0 0; }
.band .link { color: var(--cyan); }
/* Reading list on the interactive systems page */
.reads { max-width: 46rem; margin: 1.5rem 0 0; padding-left: 1.2rem; }
.reads li { margin: 0 0 .6rem; }
.reads cite { font-style: italic; }
/* Running text on the dedicated pages */
.prose > p:not(.kicker) { max-width: 42rem; margin: .9rem 0 0; font-size: 1.1rem; }
.prose h2 + p { margin-top: 1.2rem; }
/* Key facts in a band: the figure big, the line under it small. */
.facts strong { font-size: 1.5rem; color: var(--cyan); }
.note { margin: 1.5rem 0 0; color: #5f6b78; font-size: .98rem; }

/* Sister sites */
.sites { display: grid; grid-auto-rows: 1fr; gap: 1rem; margin-top: 1.5rem; }
/* Every row has the same height and the link fills its list item, so all boxes match. */
.sites li { display: grid; }
.sites a {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: .25rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  border-left: 4px solid var(--cyan);
}
.sites a:hover { background: #eaf2fb; }
.sites strong { color: var(--blue); font-size: 1.2rem; }
/* Same call to action as the project cards, always at the bottom of the box. */
.sites .go { align-self: end; padding-top: .6rem; font-weight: 600; color: var(--blue); }
.sites a:hover .go { text-decoration: underline; }

/* About */
.about { display: grid; gap: 1.2rem; }
.about-mark { width: 4.5rem; }
.about p { max-width: 42rem; }

/* Contact form: the widget of ../mindcontact-forms, coloured with its --mcf-* properties */
.contact { padding-bottom: 4rem; }
[data-mc-contact] { margin-top: 1.8rem; --mcf-accent: var(--blue); --mcf-ink: var(--ink); --mcf-border: #c9d5e3; }
[data-mc-contact] .mcf-field > span { color: var(--navy); }

/* Footer */
.foot { background: var(--ink); color: var(--line); font-size: .92rem; }
.foot-inner { max-width: var(--width); margin: 0 auto; padding: 2.5rem var(--pad); display: grid; gap: 1.2rem; }
.foot p { margin: .2rem 0; }
.foot a { color: #fff; }

/* Tablet */
@media (min-width: 48rem) {
  :root { --pad: 2rem; }
  h2 { font-size: 2.2rem; }
  .hero-inner { padding: 5rem var(--pad) 5.5rem; }
  .hero h1 { font-size: 3.4rem; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-mark { right: -6rem; bottom: auto; top: 50%; width: 30rem; transform: translateY(-50%); }
  .section { padding-top: 5rem; }
  .band { margin-top: 5rem; }
  .band-inner { padding: 5rem var(--pad); }
  .tiles, .cards, .sites { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .cards + .cards { margin-top: 1.25rem; }
  .cards--major > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sites > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .venues { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .about { grid-template-columns: auto 1fr; gap: 2rem; align-items: start; }
  .about-mark { width: 6rem; margin-top: 2rem; }
  .foot-inner { grid-template-columns: auto 1fr; align-items: center; gap: 2rem; }
}

/* Desktop: the menu becomes a plain inline nav */
@media (min-width: 64rem) {
  .top-inner { flex-wrap: nowrap; gap: 2rem; }
  .menu { order: 2; margin-left: auto; }
  /* site.js keeps the <details> open here; without JavaScript the toggle stays visible. */
  .js .menu summary { display: none; }
  .menu nav { position: static; display: flex; gap: 1.4rem; background: none; border: 0; box-shadow: none; }
  .menu nav a { padding: 0; border: 0; opacity: .88; }
  .menu nav a:hover { opacity: 1; }
  .lang { order: 3; margin-left: 0; }
  .hero h1 { font-size: 4rem; }
  .hero-mark { right: -2rem; width: 36rem; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tiles--steps { grid-template-columns: repeat(5, 1fr); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  /* Five main products: three on the first row; on the second, the wide one takes twice the room. */
  .cards--major { grid-template-columns: repeat(6, 1fr); }
  .cards--major > * { grid-column: span 2; }
  .cards--major > .card--wide, .cards--major > .card--wide:last-child:nth-child(odd) { grid-column: span 4; }
  /* Five partners: three on the first row, two wider ones on the second. */
  .sites--five { grid-template-columns: repeat(6, 1fr); grid-auto-rows: auto; }
  .sites--five > * { grid-column: span 2; }
  .sites--five > :nth-child(n+4), .sites--five > :last-child:nth-child(odd) { grid-column: span 3; }
  .venues { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
