/* Mosaiva design system
   Colors and type are defined once here; components below use these tokens. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2");
}

/* Script face for short business taglines only. Loads only on pages that show one. */
@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pinyon-script-latin-400-normal.woff2") format("woff2");
}

:root {
  /* Palette matched to the 2026-10-26 example page. Earlier values:
     navy #203748, ivory #F7F5F0, bronze #A48660, slate #64717B, white #FFFFFF, ink #20282D, rule #E3DED3 */
  --navy: #0F2240;
  --ivory: #FAF7F2;
  --bronze: #AE7646;
  --slate: #4A5568;
  --white: #FFFDFA;
  --ink: #16243A;
  --rule: #E6DDD1;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --text: 1.1875rem;     /* 19px body */
  --text-sm: 1.0625rem;  /* 17px, the smallest size used */
  --text-lg: 1.375rem;
  --leading: 1.65;

  --wrap: 72rem;
  --narrow: 44rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --radius: 4px;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

p, ul { margin: 0; }

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

a { color: var(--navy); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

[role="list"] { list-style: none; padding: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* Keeps reading width comfortable while staying aligned with the header. */
.narrow > * { max-width: var(--narrow); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; outline-color: var(--bronze); }

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

.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}

.wordmark {
  color: var(--navy);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-decoration: none;
  padding-block: 0.5rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  color: var(--ink);
  font-size: var(--text-sm);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--bronze); }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section-white { background: var(--white); }
.section-flush { padding-top: 0; }
.page-head + .section-white.section-flush { padding-top: var(--section); }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* ---------- Hero and page headings ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(34rem, calc(100vh - 6rem), 54rem);
  padding-block: clamp(4rem, 8vw, 6rem);
}

/* Photo sits on the right and fades into the page color toward the text. */
.hero-image {
  position: absolute;
  inset: 0 0 0 auto;
  width: 64%;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.55) 22%, #000 48%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.55) 22%, #000 48%);
}
.hero-text { position: relative; }
.hero-text > * { max-width: 34rem; }

.hero h1 { font-size: clamp(2.75rem, 7vw, 5rem); font-weight: 700; }

.page-head h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hero-lines {
  margin-top: 2rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  line-height: 1.6;
}
.hero-lines span { display: block; }

.hero .text-link { margin-top: 2.5rem; }

.page-head { padding-block: clamp(4rem, 10vw, 7rem) clamp(2.5rem, 5vw, 4rem); }
.page-head .lead { margin-top: 1.5rem; max-width: var(--narrow); color: var(--slate); font-size: var(--text-lg); }
.page-head .text-link { margin-top: 2rem; }

/* ---------- Links ---------- */

.text-link {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}
.text-link:hover { text-decoration-color: var(--navy); }
.text-link [aria-hidden] { display: inline-block; margin-left: 0.4rem; text-decoration: none; }

/* ---------- Principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem clamp(1.5rem, 4vw, 3rem);
}

.principle { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.principle h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.principle p { margin-top: 0.75rem; color: var(--slate); }

.principle-foundation {
  grid-column: 1 / -1;
  border-top: 3px solid var(--bronze);
  padding-top: 2rem;
}
.principle-foundation h3 { font-size: var(--text-lg); }
.principle-foundation p { color: var(--ink); font-size: var(--text-lg); }

.principle-detail { padding-block: 2.5rem; border-top: 1px solid var(--rule); }
.principle-detail-foundation { border-top: 3px solid var(--bronze); }
.principle-detail h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.principle-line { margin-top: 0.5rem; color: var(--navy); font-weight: 600; }
.principle-detail p + p { margin-top: 1rem; }

/* ---------- Business directory ---------- */

.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.biz-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.section-white .biz-card { background: var(--ivory); border-color: transparent; }

.biz-logo { height: 64px; margin-bottom: 1.75rem; }
.biz-logo img { height: 64px; width: auto; object-fit: contain; object-position: left center; }

.biz-card h3 { font-size: var(--text-lg); }
/* Bronze passes AA only as large text, so keep this at 24px or more. */
.biz-tagline {
  margin-top: 0.15rem;
  color: var(--bronze);
  font-family: "Pinyon Script", cursive;
  font-size: 2.5rem;
  line-height: 1.1;
}
.biz-summary { margin-top: 0.75rem; color: var(--slate); white-space: pre-line; }
.biz-card .text-link { margin-top: auto; padding-top: 1.25rem; }

.status {
  margin-top: 0.75rem;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--slate);
  border-radius: 999px;
  color: var(--slate);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Promise ---------- */

.promise-lead { margin-top: -1.25rem; margin-bottom: 2rem; color: var(--navy); font-size: var(--text-lg); font-weight: 600; }

.promise-list { list-style: none; padding: 0; }
.promise-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.75rem;
  border-top: 1px solid var(--rule);
}
.promise-list li:last-child { border-bottom: 1px solid var(--rule); }
.promise-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.65rem;
  width: 0.75rem;
  height: 2px;
  background: var(--bronze);
}

.fine { margin-top: 2rem; color: var(--slate); font-size: var(--text-sm); }

/* ---------- Prose pages ---------- */

.prose p + p { margin-top: 1.25rem; }
.prose h2 { margin-top: 2.75rem; margin-bottom: 0.75rem; font-size: 1.375rem; }
.prose h2:first-child { margin-top: 0; }
.contact-email { font-size: var(--text-lg); font-weight: 600; }

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

.site-footer {
  background: var(--navy);
  color: var(--ivory);
  padding-block: 4rem 2.5rem;
}
.site-footer a { color: var(--ivory); }
.site-footer :focus-visible { outline-color: var(--ivory); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
}
.footer-mark { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.24em; }
.footer-tagline { margin-block: 0.25rem 1rem; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}
.footer-nav a {
  display: inline-block;
  padding-block: 0.6rem;
  min-height: 44px;
  text-decoration: none;
}
.footer-nav a:hover,
.footer-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

.footer-legal {
  margin-top: 3rem;
  font-size: 0.9375rem;
  color: #D5DBE0;
}
.footer-legal p:first-child {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 245, 240, 0.2);
}
.footer-legal p + p { margin-top: 0.25rem; }

/* ---------- Responsive ---------- */

@media (max-width: 52rem) {
  .principles { grid-template-columns: 1fr; gap: 2rem; }
  .site-nav { width: 100%; }
  .site-nav ul { margin-left: -0.75rem; }

  /* Phones: text first, photo below it, fading in from the top. */
  .hero { flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: 0; }
  .hero-image { position: static; order: 2; width: 100%; margin-top: 2.5rem; }
  .hero-image img {
    aspect-ratio: 4 / 3;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header nav, .skip-link { display: none; }
  .site-footer { background: none; color: var(--ink); }
  .site-footer a { color: var(--ink); }
}
