/* maybrook.ie - the one stylesheet every page shares.
   Colours, type and spacing follow BRAND.html. Pages are generated by
   tools/build-pages.py, which links this file with a version stamp, so
   returning visitors always get the current copy. */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/ebgaramond-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/ebgaramond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground:   #faf7f1;
  --ink:      #1c1917;
  --ink-soft: #4f4941;
  --accent:   #7a3b2c;
  --rule:     #ded5c6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:   #15130f;
    --ink:      #efe9de;
    --ink-soft: #b5ab9c;
    --accent:   #d29a7c;
    --rule:     #35302a;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 41rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header: the lockup, the small-caps line, the menu ---------- */

header.site {
  padding: 3rem 0 0;
  text-align: center;
}

.lockup {
  display: inline-block;
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
}

/* The middle dot is part of the brand lockup: give it air on both sides and
   let it sit in the accent colour rather than at full ink weight. */
.dot {
  margin-inline: 0.16em;
  color: var(--accent);
  font-size: 0.78em;
  vertical-align: 0.08em;
}

.sub {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

nav.menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin: 1.6rem 0 0;
  padding: 1.1rem 0 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

nav.menu a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}

nav.menu a:hover,
nav.menu a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.45em;
}

main { padding: 3rem 0 0; }

/* ---------- Text ---------- */

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.85rem, 6.5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h2 {
  margin: 2.6rem 0 0.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

h3 {
  margin: 1.6rem 0 0.3rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

p { margin: 0 0 0.9rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.2em; }
li { margin: 0 0 0.45rem; }
li::marker { color: var(--ink-soft); }

strong { font-weight: 600; }

.lede {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.small { font-size: 1rem; color: var(--ink-soft); }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.19em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

a:hover { text-decoration-color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Small-caps label above a block, e.g. "Fees". */
.label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- The quiet button ---------- */

.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--accent);
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.button:hover {
  background: var(--accent);
  color: var(--ground);
}

.cta {
  margin: 2.8rem 0 0;
  padding: 2rem 0 0;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.cta p { margin: 0 0 0.6rem; }
.cta .small { margin-top: 0.9rem; }

/* ---------- Home ---------- */

.home main { text-align: center; }

.home h1 {
  font-size: clamp(2.1rem, 8.5vw, 3rem);
  line-height: 1.12;
}

.home .lede {
  max-width: 31rem;
  margin: 1rem auto 0;
}

.promises {
  margin: 2.6rem auto 0;
  padding: 0;
  list-style: none;
  font-size: 1.25rem;
}

.promises li { margin: 0 0 0.35rem; }

.routes {
  display: grid;
  gap: 0;
  margin: 3rem 0 0;
  border-top: 1px solid var(--rule);
}

.route { padding: 2rem 1rem; text-align: center; }
.route + .route { border-top: 1px solid var(--rule); }

.route h2 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.route .price {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.3;
}

.route p { margin: 0 0 1.2rem; color: var(--ink-soft); }

@media (min-width: 40rem) {
  .routes { grid-template-columns: 1fr 1fr; }
  .route + .route { border-top: 0; border-left: 1px solid var(--rule); }
}

.intro {
  margin: 2.6rem auto 0;
  max-width: 31rem;
}

.intro .name { margin: 0 0 0.3rem; font-weight: 600; }
.intro p { color: var(--ink-soft); }

/* ---------- Content pages ---------- */

.price-line {
  margin: 0.4rem 0 1rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.faq h3 { margin-top: 1.4rem; }

.meta {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.meta p { margin: 0; }

.summary {
  margin: 1.75rem 0 0.5rem;
  padding: 1.25rem 0 0.4rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.table-wrap { overflow-x: auto; margin: 0.5rem 0 1.1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.0625rem;
  line-height: 1.45;
}

th, td {
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

footer.site {
  margin: 4rem 0 0;
  padding: 1.6rem 0 3rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

footer.site p { margin: 0 0 0.3rem; }
footer.site .nowrap { white-space: nowrap; }
footer.site .emergency { margin-top: 0.9rem; color: var(--ink); }

/* ---------- Small screens and print ---------- */

@media (max-width: 32rem) {
  body { font-size: 1.0625rem; }
  header.site { padding-top: 2.25rem; }
  main { padding-top: 2.25rem; }
  .wrap { padding: 0 1rem; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
  td { padding: 0.1rem 0; border: 0; }
  td:first-child { font-weight: 600; }
}

@media print {
  :root {
    --ground: #fff; --ink: #1c1917; --ink-soft: #4f4941;
    --accent: #1c1917; --rule: #ded5c6;
  }
  body { font-size: 12pt; }
  nav.menu, .cta .button { display: none; }
  a { text-decoration: none; }
}
