@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --fm-sand: #eee6da;
  --fm-paper: #faf7f1;
  --fm-stone: #e3d6c6;
  --fm-service: #e8ded2;
  --fm-hero: var(--fm-stone);
  --fm-ink: #3d4448;
  --fm-clay: #a97961;
  --fm-muted: #777570;
  --fm-rule: rgba(61, 68, 72, 0.17);
  --fm-radius: 12px;
  --fm-space: clamp(22px, 5vw, 76px);
  --fm-page-hero-padding: clamp(88px, 10vw, 136px);
  --fm-page-title-size: clamp(42px, 4.8vw, 62px);
  --fm-after-hero-space: clamp(48px, 6vw, 80px);
  --fm-width: 1280px;
  --fm-body: "DM Sans", Arial, sans-serif;
  --fm-display: "DM Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--fm-sand); color: var(--fm-ink); font-family: var(--fm-body); font-size: clamp(17px, 1.45vw, 20px); line-height: 1.4; letter-spacing: -0.018em; }
.fm-wrap { width: min(100%, var(--fm-width)); margin-inline: auto; padding-inline: var(--fm-space); }
.fm-display { font-family: var(--fm-display); font-weight: 500; line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.fm-label { font: 700 0.7rem/1.2 var(--fm-body); letter-spacing: 0.13em; text-transform: uppercase; color: var(--fm-clay); }
.fm-surface { background: var(--fm-paper); border: 1px solid var(--fm-rule); border-radius: var(--fm-radius); }
.fm-surface--secondary { background: var(--fm-stone); }
.fm-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding-inline: 24px; border: 1px solid var(--fm-ink); border-radius: 6px; background: var(--fm-ink); color: var(--fm-paper); font-weight: 600; text-decoration: none; }
.fm-button:hover { background: var(--fm-clay); border-color: var(--fm-clay); color: white; }
.fm-rule { border-color: var(--fm-rule); }
.fm-visual { color: var(--fm-clay); border: 1px solid var(--fm-rule); background: var(--fm-stone); }

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

/* Universal Fraser Media page treatment */
body { background: var(--fm-sand) !important; color: var(--fm-ink) !important; font-family: var(--fm-body) !important; }

/* Subtle hero separation shared across every page type. */
section.hero.wrap,
header.hero.wrap,
.cv-hero,
.portfolio-hero,
main > .hero {
  background: var(--fm-hero) !important;
  box-shadow: 0 0 0 100vmax var(--fm-hero);
  clip-path: inset(0 -100vmax);
}
.nav { background: var(--fm-hero) !important; color: var(--fm-ink) !important; border-color: transparent !important; backdrop-filter: blur(14px); }
.wordmark { color: var(--fm-ink) !important; font-family: var(--fm-body) !important; }
h1, h2, h3, h4, blockquote { color: inherit; font-family: var(--fm-display) !important; }
h1, h2, h3, blockquote { font-weight: 600 !important; letter-spacing: -0.035em !important; }
.button, .nav__cta, .download { background: var(--fm-ink) !important; border-color: var(--fm-ink) !important; border-radius: 6px !important; color: var(--fm-paper) !important; box-shadow: none !important; }
.button:hover, .nav__cta:hover, .download:hover { background: var(--fm-clay) !important; border-color: var(--fm-clay) !important; color: #fff !important; }
.story, .fact, .facts, .service, .services-copy__card, .services-summary__panel, .cv td, .recommendation, .testimonial { border-color: var(--fm-rule) !important; box-shadow: none !important; }
.story, .cv td, .recommendation { background: var(--fm-paper) !important; color: var(--fm-ink) !important; }
.service,
.services-copy__card {
  background: var(--fm-service) !important;
  border-color: var(--fm-rule) !important;
  color: var(--fm-ink) !important;
}
.service h3, .service p, .service__detail, .service .case-link,
.services-copy__card h3, .services-copy__card p, .services-copy__card .services-copy__case {
  color: var(--fm-ink) !important;
}
.service p,
.services-copy__card p {
  color: var(--fm-muted) !important;
}
.service:hover,
.services-copy__card:hover {
  background: var(--fm-stone) !important;
  border-color: var(--fm-clay) !important;
}
.service__detail,
.services-copy__detail {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 16px 19px !important;
  border: 1px solid var(--fm-rule);
  border-radius: var(--fm-radius) !important;
  background: var(--fm-stone) !important;
  color: var(--fm-ink) !important;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.55 !important;
}
.facts, .fact { background: var(--fm-stone) !important; color: var(--fm-ink) !important; }
.facts {
  background: #8d6251 !important;
  color: var(--fm-paper) !important;
}
.facts .facts__head {
  border-color: rgba(250, 247, 241, 0.32) !important;
}
.facts h2,
.facts .fact p {
  color: var(--fm-paper) !important;
}
.facts .facts__grid {
  background: rgba(250, 247, 241, 0.28) !important;
}
.facts .fact {
  background: #8d6251 !important;
  color: var(--fm-paper) !important;
}
.services-summary__panel { background: var(--fm-stone) !important; color: var(--fm-ink) !important; }
.footer, footer { background: transparent !important; color: var(--fm-ink) !important; border-color: var(--fm-rule) !important; }
.closing, .services-copy__closing {
  background: var(--fm-stone) !important;
  color: var(--fm-ink) !important;
  border-top: 1px solid var(--fm-rule);
}
.closing h2, .services-copy__closing h2 { color: var(--fm-ink) !important; }
.testimonial blockquote {
  max-width: 34ch !important;
  font-size: clamp(20px, 2.4vw, 35px) !important;
  line-height: 1.14 !important;
}

/* Keep homepage work previews compact when canonical blurbs vary in length. */
.selected-work__grid .work-card {
  min-height: 430px !important;
  padding: clamp(26px, 2.4vw, 34px) !important;
}
.selected-work__grid .work-card h3 {
  margin-top: clamp(34px, 3.5vw, 48px) !important;
}
.selected-work__grid .work-card__summary {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 28px !important;
  padding-bottom: 0 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.selected-work__grid .work-card__result {
  height: 92px !important;
  flex-basis: 92px !important;
  padding-top: 22px !important;
}

/* The CV predates the shared site theme; keep its typography explicitly unified. */
.cv,
.cv * {
  font-family: var(--fm-body) !important;
}
.cv .testimonial blockquote,
.cv .testimonial--long blockquote {
  max-width: 820px !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  letter-spacing: -0.02em !important;
}
.cv .testimonial figcaption,
.cv .testimonial--long figcaption {
  font-size: 14px !important;
  line-height: 1.4 !important;
}

/* Display scale: approximately 20% smaller than the original system. */
section.hero.wrap h1 {
  font-size: clamp(37px, 4.32vw, 59px) !important;
}
header.hero.wrap h1,
.services-copy__hero h2 {
  font-size: clamp(38px, 5.92vw, 75px) !important;
}
.selected-work__head h2,
.services-summary h2 {
  font-size: clamp(30px, 3.84vw, 50px) !important;
}
.closing h2,
.services-copy__closing h2 {
  font-size: clamp(30px, 4.32vw, 56px) !important;
}
.facts h2 {
  font-size: clamp(30px, 4vw, 51px) !important;
}
.next h2 {
  font-size: clamp(34px, 5.2vw, 66px) !important;
}
.cv-hero h1 {
  font-size: clamp(34px, 4vw, 48px) !important;
}
.index-hero h1 {
  font-size: clamp(51px, 8vw, 77px) !important;
}
main > .hero .wrap h1 {
  font-size: clamp(38px, 5.76vw, 75px) !important;
}
.services-hero,
.portfolio-hero {
  padding-block: var(--fm-page-hero-padding) !important;
}
.services-hero .wrap h1,
.portfolio-hero h1 {
  max-width: 1100px;
  font-size: var(--fm-page-title-size) !important;
  line-height: 1.02 !important;
}
.services-hero + .services,
.portfolio-hero + .filters {
  padding-top: var(--fm-after-hero-space) !important;
}
.result + .next h2 {
  font-size: clamp(30px, 4vw, 56px) !important;
}
a:focus-visible { outline-color: var(--fm-clay) !important; }

/* Canonical site navigation */
.fm-nav {
  position: sticky !important;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--fm-hero) !important;
  border-bottom: 1px solid var(--fm-rule) !important;
  backdrop-filter: blur(14px);
}

.fm-nav__inner {
  display: flex;
  align-items: center;
  width: min(100%, var(--fm-width));
  min-height: 76px;
  margin-inline: auto;
  padding-inline: var(--fm-space);
  gap: 28px;
}

.fm-nav__wordmark {
  margin-right: auto !important;
  color: var(--fm-ink) !important;
  font-size: 21px !important;
  text-decoration: none;
}

.fm-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.fm-nav__link {
  padding-block: 5px;
  border-bottom: 1px solid transparent;
  color: var(--fm-ink) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.fm-nav__link:hover,
.fm-nav__link[aria-current="page"] {
  border-color: var(--fm-clay);
}

.fm-nav__cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 22px;
  border: 1px solid var(--fm-ink);
  border-radius: 6px;
  background: var(--fm-ink);
  color: var(--fm-paper) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.fm-nav__cta:hover {
  border-color: var(--fm-clay);
  background: var(--fm-clay);
}

@media (max-width: 700px) {
  .fm-nav__inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-block: 14px 12px;
    gap: 12px 18px;
  }

  .fm-nav__links {
    order: 3;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .fm-nav__link {
    display: inline-flex !important;
    font-size: 12px;
  }

  .fm-nav__cta {
    min-height: 38px;
    padding-inline: 16px;
    font-size: 12px;
  }
}
