/* insurances.co.nz brand layer over site.css: Elementor kit tokens, the
   Metropolis faces WordPress declared and actually used, and the kit's type
   scale. Loaded after site.css and before any page stylesheet. */

@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Metropolis-Regular.woff2") format("woff2"),
       url("/fonts/Metropolis-Regular.woff") format("woff");
}

@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Metropolis-Medium.woff2") format("woff2"),
       url("/fonts/Metropolis-Medium.woff") format("woff");
}

@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Metropolis-Bold.woff2") format("woff2"),
       url("/fonts/Metropolis-Bold.woff") format("woff");
}

:root {
  --header-height-compact: 66px;
  --color-primary: #283B9E;
  --color-heading: #1B2247;
  --color-accent: #EFC31F;
  /* WordPress turns links and buttons to the primary blue on hover, never to
     the lighter yellow #FFDA52 the kit also defines. */
  --color-accent-hover: #283B9E;
  --color-text: #5D5B5B;
  --color-bg-light: #F0F6FC;
  --color-bg-shaded: #F9F9F9;
  --color-border-light: #E3E3E3;
  --color-lc-nav-bg: #BFDBF7;
  /* "teal" is the mcnz divider and accent colour; on WordPress the hero and
     page dividers and footer link hovers are the kit's secondary yellow. */
  --color-teal: #EFC31F;
  /* Used for text on the pale LC nav, where yellow would not be legible. */
  --color-teal-dark: #283B9E;
}

body {
  font-family: "Metropolis", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Metropolis", sans-serif;
}

h1 { font-size: 43px; line-height: 1.06; letter-spacing: 0.02em; }
h2 { font-size: 37px; }
h3 { font-size: 29px; line-height: 1.08; }
h4 { font-size: 28px; font-weight: 600; letter-spacing: 0.7px; }
h5 { font-size: 22px; letter-spacing: 0.2px; }
h6 { font-size: 17px; letter-spacing: 0.2px; text-transform: none; }

.btn {
  color: var(--color-primary);
  font-weight: 500;
}

/* --- Header --- */

.header-logo img {
  width: 240px;
}

/* As on WP, the header shrinks after the first 70px of scroll on desktop and
   tablet. Only the fixed header changes size, so the page never moves. */
@media (min-width: 768px) {
  .site-header {
    transition: height 0.3s ease-in-out;
  }
  .header-logo img,
  .quote-cta {
    transition: width 0.3s ease-in-out, padding 0.3s ease-in-out;
  }
  .site-header--compact {
    height: var(--header-height-compact);
  }
  .site-header--compact .header-logo img {
    width: 182px;
  }
  .site-header--compact .quote-cta {
    padding-block: 0.35em;
  }
  /* Tied to the header edge, not --header-height, so it follows the
     transition in both directions. */
  .mobile-nav {
    inset-block-start: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .header-logo img,
  .quote-cta {
    transition: none;
  }
}

.header-nav > ul > li > a::after,
.header-nav > ul > li > span::after {
  background: var(--color-primary);
}

.header-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.header-nav > ul > li > a[aria-current="page"]::after {
  transform: scaleX(1);
  opacity: 1;
}

.header-search,
.menu-toggle {
  color: var(--color-primary);
}

.header-nav > ul > li > a,
.header-nav > ul > li > span {
  font-size: 16px;
  text-align: center;
}

.quote-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding-block: 0.55em;
  padding-inline: 1.6em;
  background: var(--color-primary);
  border-radius: 8px;
  line-height: 1.1;
  letter-spacing: normal;
  text-decoration: none;
  white-space: nowrap;
}

.quote-cta:hover,
.quote-cta:focus-visible {
  background: var(--color-heading);
}

.quote-cta-eyebrow {
  color: var(--color-accent);
  font-size: 15px;
  font-weight: 500;
}

.quote-cta-label {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Below this width the full-size button and nav padding push the two-word nav
   entries onto two lines. They still wrap below about 1150px. */
@media (max-width: 1299px) {
  .quote-cta {
    padding-inline: 1em;
  }
  .quote-cta-eyebrow {
    font-size: 12px;
  }
  .quote-cta-label {
    font-size: 16px;
  }
  .header-nav > ul > li > a,
  .header-nav > ul > li > span {
    padding-inline: 8px;
  }
}

/* --- Footer --- */

.site-footer {
  background: var(--color-heading);
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

.footer-bottom .footer-credit {
  color: #B1B1B17D;
}

.footer-bottom .footer-credit a {
  color: inherit;
  text-decoration: none;
}

.footer-nav {
  gap: 0;
}

.footer-nav ul {
  box-sizing: border-box;
}

.footer-nav ul:first-child {
  width: 208px;
}

.footer-nav ul:last-child {
  width: 215px;
}

.footer-nav a {
  padding-block: 2px;
}

/* --- Sister-site box (article sidebar and archive sidebars) --- */

.sister-site {
  margin-block: 20px;
  padding: 20px 15px;
  background-color: var(--color-bg-light);
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.sister-site-heading {
  color: #002B39;
  font-size: 22px;
  line-height: 1.1;
  margin-block: 0 10px;
}

.sister-site img {
  display: block;
  height: auto;
  margin-inline: auto;
}

.sister-site-photo {
  max-width: 80%;
}

.sister-site-logo {
  max-width: 66%;
  margin-block: -8px 0;
}

.sister-site p {
  font-size: 14px;
  line-height: 1.5;
  padding-block: 6px 13px;
  margin: 0;
}

.sister-site-btn {
  background-color: #AA4E87;
  color: #fff;
}

.sister-site-btn:hover,
.sister-site-btn:focus {
  background-color: #CE3D96;
  color: #fff;
}

/* --- Post cards: WordPress cuts excerpts to a word count rather than a line
   count, so the mcnz four-line clamp would hide part of a short excerpt. --- */

.archive-main .article-card p,
.author-article-grid .article-card p,
.related-articles .article-card p {
  display: block;
  -webkit-line-clamp: none;
}

/* The WP site custom CSS adds this to every posts-widget excerpt. */
.archive-main .article-card p:not(.featured-card-author)::after,
.author-article-grid .article-card p::after,
.related-articles .article-card p::after {
  content: " ...";
}

/* --- Boxed hero ---
   The Elementor page heroes are a 1366px boxed container on the page gutter,
   and the heading column keeps the right of the photo clear, so the heading
   and its 30% divider sit on the gutter. Pages that keep more clear space on
   small screens, and the divider spacing, are set in the page sheets. */

.boxed-hero {
  padding-inline: max(50px, calc((100% - 1366px) / 2));
}

.boxed-hero .page-hero-content {
  flex: 1;
  max-width: none;
  padding-inline-end: 700px;
}

.boxed-hero .hero-divider {
  inline-size: 30%;
}

@media (max-width: 1024px) {
  .boxed-hero {
    padding: 50px 30px;
  }

  .boxed-hero .page-hero-content {
    padding-inline-end: 150px;
  }
}

@media (max-width: 767px) {
  .boxed-hero {
    padding: 10px 20px;
  }

  .boxed-hero .page-hero-content {
    padding-inline-end: 0;
  }
}

/* --- Heading over a grid of cards ---
   The doubled class outranks `.related-articles h2` in the shared
   article.css, which loads after this file. */

.cards-heading.cards-heading {
  margin-block: 0 30px;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--color-primary);
  font-size: 30px;
  line-height: 1;
}

@media (max-width: 1024px) {
  .cards-heading.cards-heading {
    margin-block-end: 20px;
    font-size: 26px;
  }
}

@media (max-width: 767px) {
  .cards-heading.cards-heading {
    margin-block-end: 14px;
  }
}

/* --- Author pages (over the mcnz author.css) --- */

.author-bio .heading-accent {
  border-inline-start: 2px solid var(--color-primary);
}

.author-bio .linkedin-link svg {
  background: var(--color-accent);
}

.author-bio .author-name {
  margin-block-end: 10px;
}

.author-bio .author-text-col p {
  font-size: inherit;
  line-height: inherit;
}

/* Expertise and Experience are Elementor heading widgets on a <p>, so they
   keep the body grey rather than the kit's navy heading colour. */
.author-bio .author-text-col h3 {
  font-size: 22px;
  line-height: 1.1;
  color: var(--color-text);
  margin-block: 20px 10px;
}

.author-articles .author-article-grid {
  margin-block-start: 0;
}

.author-article-grid .article-card img {
  height: auto;
  aspect-ratio: 2 / 1;
}

.author-article-grid .article-card h3 {
  line-height: 1.1;
}

.author-article-grid .article-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #777;
  margin-block-end: 8px;
}

.author-article-grid .article-card .read-more {
  line-height: 1.6;
  padding-block: 0 9px;
}

/* --- 404 --- */

.not-found-hero {
  min-block-size: 100dvh;
}

.not-found-hero .page-hero-content {
  max-width: 560px;
}

.not-found-hero h1 {
  font-size: 40px;
}

.not-found-hero p {
  font-size: 17px;
}

/* --- Responsive --- */

@media (max-width: 1024px) {
  .menu-toggle {
    padding: 0;
    margin-inline-start: 14px;
  }
  .hamburger-icon,
  .close-icon {
    width: 44px;
    height: 44px;
    stroke-width: 2.2;
  }
  .footer-about {
    font-size: 14px;
    line-height: 21px;
  }
  .not-found-hero {
    padding-inline: 20px;
  }
  .not-found-hero .page-hero-content {
    max-width: 800px;
  }
  .not-found-hero p {
    font-size: 16px;
  }
  .not-found-hero .page-hero-bg {
    object-fit: none;
    object-position: 50% 100% !important;
  }
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  h1 { font-size: 40px; }
  h2 { font-size: 34px; }
  h3 { font-size: 28px; }
  h4 { font-size: 26px; }
  .author-article-grid .article-card img { aspect-ratio: 100 / 35; }
  .author-bio .author-name { font-size: 34px; }
  section.author-bio { padding: 60px 30px; }
  section.author-articles { padding: 60px 30px; }
  .author-articles .author-articles-inner { padding-inline: 0; }
  .author-articles .author-article-grid { grid-template-columns: repeat(2, 1fr); }
  .author-article-grid .article-card .read-more { line-height: 1.5; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .author-bio .author-bio-layout { row-gap: 0; }
}

@media (max-width: 767px) {
  body {
    line-height: 1.5;
  }
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  h3 { font-size: 24px; }
  h4 { font-size: 24px; }
  h5 { font-size: 20px; }
  .author-article-grid .article-card img { aspect-ratio: 2 / 1; }
  .author-bio .author-name { font-size: 30px; }
  section.author-bio { padding: 30px 20px; }
  section.author-articles { padding: 30px 20px; }
  .author-articles .author-article-grid { grid-template-columns: 1fr; }
  .author-article-grid .article-card .read-more { font-size: 16px; }
  .header-logo img { width: min(220px, 40vw); }
  .header-cta { display: inline-flex; }
  .quote-cta {
    padding-block: 0.45em;
    padding-inline: 0.9em;
    border-radius: 6px;
  }
  .quote-cta-eyebrow { font-size: 11px; }
  .quote-cta-label { font-size: 14px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .not-found-hero {
    min-block-size: 1000px;
  }
  .footer-top,
  .footer-disclaimer,
  .footer-bottom {
    padding-inline: 30px;
  }
  .footer-nav {
    flex: 0 0 auto;
  }
  .footer-nav ul:first-child,
  .footer-nav ul:last-child {
    width: auto;
    padding-inline: 20px 12px;
    border-inline-start: 1px solid rgb(255 255 255 / 0.14);
  }
  .footer-nav a {
    padding-block: 5px;
  }
  .footer-bottom .footer-inner {
    flex-wrap: nowrap;
    gap: 12px;
    font-size: 12px;
  }
  .footer-bottom .footer-inner > * {
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .site-header {
    padding-inline: 16px;
  }
  .not-found-hero h1 {
    font-size: 36px;
  }
  .not-found-hero .page-hero-bg {
    object-position: 50% 50% !important;
  }
  .footer-nav ul:first-child,
  .footer-nav ul:last-child {
    width: auto;
    padding-inline: 0 24px;
  }
  .footer-nav a {
    padding-block: 5px;
  }
}

@media (max-width: 400px) {
  .header-logo img {
    width: 120px;
  }
  .header-search {
    display: none;
  }
  .header-cta {
    margin-inline-start: auto;
  }
}
