/* WonderTwin Maintenance: one stylesheet for every page.
   Colours come from the original 2000s graphics: header blue, black nav boxes,
   orange hover/current, grey body text. */

:root {
  --blue: #50bed5;        /* header + page background (from WonderTwins_header.gif) */
  --blue-text: #1d8fb8;   /* headings: the old #50bdf6, darkened enough to read on white */
  --orange: #ff6600;
  --text: #333;
  --muted: #666;
  --black: #000;
  --white: #fff;
  --brand-font: "Century Gothic", "Avenir Next", Avenir, Futura, "Trebuchet MS", sans-serif;
  --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Geneva, Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--blue);
  color: var(--text);
  font: 1.0625rem/1.6 var(--body-font);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 0.15em; }
a:hover, a:focus-visible { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }

.wrap { max-width: 980px; margin: 0 auto; padding-inline: 16px; }

/* ---------- Header ---------- */

.site-header .wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto auto;
  column-gap: 1.25rem;
  padding-top: 0.75rem;
}

.twins {
  grid-row: 1 / -1;
  align-self: end;
  width: 228px;
}

.brand {
  align-self: end;
  justify-self: end;
  text-align: right;
  text-decoration: none;
  padding-bottom: 0.4rem;
  font-family: var(--brand-font);
}
.brand:hover .wordmark, .brand:focus-visible .wordmark { color: var(--black); }

.wordmark {
  display: block;
  font-size: clamp(1.6rem, 4.2vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--black);
  white-space: nowrap;
}
.wordmark span { color: var(--white); }

.tagline {
  display: block;
  margin-top: 0.35rem;
  color: var(--white);
  font-size: clamp(0.75rem, 1.6vw, 0.875rem);
}

/* dotted rule under the wordmark, like the original header */
.site-header .rule {
  grid-column: 2;
  border: 0;
  border-top: 3px dotted var(--white);
  margin: 0;
  align-self: end;
}

.site-nav { grid-column: 2; align-self: end; padding: 1.25rem 0 1.5rem; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.site-nav a {
  display: block;
  background: var(--black);
  color: var(--white);
  border: 2px dotted var(--white);
  outline: 2px solid var(--black);
  padding: 0.45rem 0.9rem;
  font-family: var(--brand-font);
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--orange); }

/* ---------- Page body ---------- */

.page {
  background: var(--white);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  padding: 2rem 2.5rem 2.5rem;
}

main { min-width: 0; max-width: 40rem; }

h1, h2 {
  font-family: var(--brand-font);
  color: var(--blue-text);
  line-height: 1.25;
  margin: 0 0 0.75rem;
}
h1 { font-size: 1.9rem; text-transform: lowercase; }
h1.headline { text-transform: none; font-size: 1.6rem; }
h2 { font-size: 1.35rem; margin-top: 2rem; }
p, ul { margin: 0 0 1rem; }
li { margin-bottom: 0.25rem; }

.cta { font-family: var(--brand-font); font-size: 1.25rem; font-weight: bold; margin-top: 1.5rem; }
.cta a { color: var(--blue-text); }
.cta a:hover { color: var(--orange); }

.services dt { font-weight: bold; margin-top: 1rem; }
.services dd { margin: 0.15rem 0 0; }

blockquote.quote { margin: 1.5rem 0; font-weight: bold; text-align: center; }
blockquote.quote footer { font-weight: normal; }

/* organization tip: the dotted rounded box from box_top/middle/bottom.gif */
.tip-col { order: -1; }
.tip {
  border: 3px dotted #9a9a9a;
  border-radius: 28px;
  padding: 1.25rem 1.4rem 1.4rem;
  font-size: 0.95rem;
}
.tip h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.tip p:last-child { margin-bottom: 0; }
.tip-col .cta { text-align: center; }

/* contact */
.contact-card { font-size: 1.15rem; margin: 1.5rem 0; }
.contact-card strong { display: block; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 1.5rem; }
.button {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  border: 2px dotted var(--white);
  outline: 2px solid var(--black);
  padding: 0.6rem 1.1rem;
  font-family: var(--brand-font);
  text-decoration: none;
}
.button:hover, .button:focus-visible { color: var(--orange); }

/* portfolio before/after pairs */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 0 1rem; }
.pair figure { margin: 0; }
.pair figcaption { font-weight: bold; margin-bottom: 0.35rem; }
.pair img { width: 100%; border-radius: 4px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--white);
  border-top: 3px dotted var(--blue);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 1.25rem 1rem 2rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; }
.site-footer p { margin: 0.25rem 0; }
.page-end { height: 2rem; }

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
  .page { grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem 1.25rem 2rem; }
  .tip-col { order: 0; }
  main { max-width: none; }
  h1 { font-size: 1.6rem; }
  h1.headline { font-size: 1.4rem; }
}

@media (max-width: 640px) {
  .site-header .wrap { column-gap: 0.75rem; }
  .twins { width: 96px; grid-row: 1; }
  .brand { min-width: 0; justify-self: start; text-align: left; align-self: center; padding-bottom: 0; }
  /* "wondertwinmaintenance" is one unbreakable word (~11.5em wide): size it to the space beside the twins */
  .wordmark { font-size: min(1.6rem, calc((100vw - 32px - 96px - 12px) / 11.5)); }
  .tagline { font-size: 0.75rem; }
  .site-header .rule { grid-column: 1 / -1; grid-row: 2; }
  .site-nav { grid-column: 1 / -1; padding: 0.9rem 0 1rem; }
  .site-nav li { flex: 1 1 auto; }
  .site-nav a { text-align: center; padding-inline: 0.6rem; font-size: 1rem; }
  .pair { grid-template-columns: 1fr; }
}
