/* fonts.css is linked directly from each page so the two stylesheets
   download in parallel rather than chaining behind an @import. */

/* ---------------------------------------------------------------
   Bedrock at Home — bedrockathome.net
   Palette sampled from the logo artwork and the original site CSS.
   --------------------------------------------------------------- */

:root {
  --teal-900: #02363a;
  --teal-800: #04474c;
  --teal-700: #055358;   /* primary */
  --teal-600: #096d73;
  --teal-100: #e0e9ea;
  --rust: #d05020;       /* logo wordmark */
  --rust-700: #b8431a;   /* darkened for AA contrast against white text */
  --charcoal: #303040;   /* logo mountain */
  --ink: #1b1b1b;
  --body: #474747;
  --muted: #5e5e5e;
  --rule: #e2e2e2;
  --surface: #f6f6f6;
  --white: #fff;

  --font-head: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 6px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .12);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--teal-900);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 600; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--rust-700); }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
/* Keep in-page anchors clear of the sticky header. */
[id] { scroll-margin-top: 6rem; }
.section--tint { background: var(--teal-100); }
.section--surface { background: var(--surface); }

.section__head { max-width: 46rem; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.section__head p { color: var(--muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--teal-900); color: var(--white);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--white); }

/* ---------------------------------------------------- header / nav */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .75rem;
}
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: 150px; height: auto; }
@media (min-width: 48rem) { .brand img { width: 190px; } }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  font: inherit; font-size: .9375rem; color: var(--teal-900);
  padding: .5rem .75rem; cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 18px; height: 2px; background: currentColor; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav { display: none; }
.nav.is-open { display: block; }
.nav ul {
  list-style: none; margin: 0; padding: 0 0 1rem;
  display: flex; flex-direction: column; gap: .25rem;
}
.nav a {
  display: block; padding: .6rem .25rem;
  font-family: var(--font-head); font-weight: 600; font-size: .9375rem;
  letter-spacing: .02em; text-transform: uppercase;
  color: var(--teal-900); text-decoration: none;
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--rust-700); }

@media (min-width: 56rem) {
  .nav-toggle { display: none; }
  .nav, .nav.is-open { display: block; }
  .nav ul { flex-direction: row; align-items: center; gap: 1.75rem; padding: 0; }
}

/* Mobile: nav drops below the bar */
@media (max-width: 55.999rem) {
  .site-header__inner { flex-wrap: wrap; }
  .nav { flex-basis: 100%; }
}

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 600; font-size: .9375rem;
  letter-spacing: .02em;
  padding: .8rem 1.6rem; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--teal-700); color: var(--white); }
.btn--primary:hover { background: var(--teal-900); color: var(--white); }
.btn--accent { background: var(--rust-700); color: var(--white); }
.btn--accent:hover { background: #97370f; color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--teal-700); background: none; }
.btn--ghost:hover { background: var(--teal-700); color: var(--white); }

/* -------------------------------------------------------------- hero */

.hero { position: relative; background: var(--teal-900); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.hero__inner {
  position: relative;
  display: flex; align-items: center;
  min-height: clamp(24rem, 62vh, 36rem);
  padding-block: clamp(3rem, 9vw, 6rem);
}
.hero__card {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(3px);
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 34rem;
  text-align: center;
}
.hero__card h1 { margin-bottom: .3em; color: var(--teal-700); }
.hero__tagline {
  font-family: var(--font-head); font-size: clamp(1.0625rem, 2vw, 1.375rem);
  color: var(--charcoal); margin-bottom: 1.5rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

@media (min-width: 56rem) {
  .hero__card { text-align: left; margin-inline: 0; }
  .hero__actions { justify-content: flex-start; }
}

/* ------------------------------------------------------------- prose */

.prose { max-width: 52rem; margin-inline: auto; }
.prose--lead p:first-child { font-size: 1.1875rem; color: var(--ink); }

/* ------------------------------------------------------ pillar cards */

.pillars { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
@media (min-width: 62rem) { .pillars { grid-template-columns: repeat(3, 1fr); } }

.pillar {
  background: var(--white);
  border-top: 4px solid var(--teal-600);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.pillar h3 { color: var(--teal-700); }
.pillar p { font-size: 1rem; }

/* --------------------------------------------------- service cards */

.services { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }
@media (min-width: 48rem) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .services { grid-template-columns: repeat(3, 1fr); } }

.service {
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.service__media { aspect-ratio: 1 / 1; background: var(--teal-100); }
.service__media img { width: 100%; height: 100%; object-fit: cover; }
.service__body {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  flex: 1;
  display: flex; flex-direction: column; align-items: flex-start;
}
.service__body h3 { color: var(--teal-700); }
.service__body p { font-size: 1rem; }

/* Expander: content is always in the DOM, so it reads fine without JS. */
.service__more { display: block; }
.service[data-collapsible='true'] .service__more[hidden] { display: none; }
.service__toggle {
  margin-top: auto;      /* keeps the control on the card's baseline */
  background: none; border: 0;
  padding: 1rem 0 0;
  font-family: var(--font-head); font-weight: 600; font-size: .9375rem;
  color: var(--rust-700); cursor: pointer;
  display: none;
}
.service[data-collapsible='true'] .service__toggle { display: inline-flex; align-items: center; gap: .4rem; }
.service__toggle:hover { color: var(--teal-700); }
.service__toggle::after { content: '▾'; font-size: .8em; }
.service__toggle[aria-expanded='true']::after { content: '▴'; }

/* ------------------------------------------------------------ stats */

.stats { display: grid; gap: 1.5rem; text-align: center; }
@media (min-width: 42rem) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat { padding: 1.5rem; }
.stat__figure {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 3.5rem); line-height: 1;
  color: var(--rust); display: block;
}
.stat__label { font-size: 1rem; color: var(--muted); margin-top: .5rem; }

/* ----------------------------------------------------------- contact */

.contact { background: var(--teal-900); color: rgba(255, 255, 255, .88); }
.contact h2 { color: var(--white); }
.contact a { color: var(--white); }
.contact a:hover { color: var(--teal-100); }
.contact__lead { font-size: 1.1875rem; max-width: 44rem; margin-inline: auto; text-align: center; }

.contact__grid {
  display: grid; gap: 2rem; margin-top: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
@media (min-width: 48rem) { .contact__grid { grid-template-columns: repeat(3, 1fr); } }

.contact__label {
  font-family: var(--font-head); font-weight: 600; font-size: .8125rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal-100); margin-bottom: .4rem;
}
.contact__value { font-size: 1.125rem; }
.contact__value a { text-decoration: none; }
.contact__value a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ footer */

.site-footer { background: var(--surface); padding-block: clamp(2.5rem, 6vw, 4rem); font-size: .9375rem; }

/* The footer is a single centred copyright line at every width. */
.site-footer__bar {
  border-top: 1px solid var(--rule); padding-top: 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
  align-items: center; text-align: center;
  color: var(--muted);
}
.site-footer__bar p { margin: 0; }

/* --------------------------------------------------------- text page */

.page-header { background: var(--teal-100); padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-header h1 { font-size: clamp(1.875rem, 5vw, 2.75rem); margin: 0; }

.legal { max-width: 48rem; margin-inline: auto; }
.legal h2 {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .5rem; }
.legal a { word-break: break-word; }

/* ------------------------------------------------------------- error */

.error-page { text-align: center; padding-block: clamp(4rem, 14vw, 8rem); }
.error-page__code {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(4rem, 16vw, 8rem);
  line-height: 1; color: var(--teal-100); display: block;
}
