* {
  box-sizing: border-box;
}

/* Targets site when in Light Mode */
:root:not([data-theme="dark"]),
[data-theme="light"] {
  --pico-primary: #dad5ca; /*links & primary buttons */
  --pico-primary-hover: #dad5ca; /* when user hovers over a button */
  --pico-primary-background: #138099;

  --pico-background-color: #ffffff; /* main background */
  --pico-color: #454545; /* text colour */
}

/* Targets site when in Dark Mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pico-primary: #8cb899;
    --pico-primary-hover: #a3c9ae;
    --pico-primary-background: #4a7c59;

    --pico-background-color: #1a241e; /* main background */
    --pico-color: #e2ebd5; /* text colour */
  }
}

:root {
  --pico-border-radius: 0; /* change the roudness of corners*/
  --pico-box-shadow: none;
  --pico-card-box-shadow: none;
  --button-hover-text-color: var(--pico-background-color);
  --service-copy-border-color: #e8a87c;
  --service-copy-border-width: 0rem;
  --service-image-border-color: transparent;
  --service-image-border-width: 0;
}

/*makes wider page content*/
body > main {
  max-width: 1400px;
  padding: 0 1rem;
}

p {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

header .primary-navigation > li {
  padding-left: 2rem;
  padding-right: 2rem;
}

h1 {
  font-size: 4rem;
}

img {
  max-width: 100%; /* Stops image from being wider than the screen */
  height: auto; /* Maintains orig proportions */
  border-radius: var(
    --pico-border-radius
  ); /* Automatically matches corner roundness of buttons */
  box-shadow: none;
}

article,
figure {
  box-shadow: none;
}

header > nav {
  --button-hover-text-color: #fdf7f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: #fdf7f2; /* match to primary background color*/
  padding: 1rem 1.5rem;
  border-radius: var(--pico-border-radius);
}

header > nav strong,
header > nav a {
  font-family: "Montserrat";
  color: #454545; /* match to text colour*/
  text-decoration: none;
}

header > nav a:hover,
header > nav a:focus {
  color: #454545a6; /* create slighly darker colour than background colour*/
  text-decoration: none;
  border-bottom: #1a241e;
}

/* Let the header reach both sides and top of the screen */
body > header {
  max-width: none;
  padding: 0;
  /*padding-left: 1rem;
  padding-right: 1rem; instead of padding: 0; if want to gap between menu bar and sides of screen*/
}

/* Keep some space inside the menu items */
header > nav {
  border-radius: 0; /* adjusts roundness of menu bar corners */
  padding: 1rem clamp(1rem, 5vw, 4rem); /* adjusts distance between menu items and edges of screen */
}

.site-brand {
  --site-logo-size: clamp(7rem, 8vw, 5.5rem);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.site-brand .site-logo {
  display: block;
  width: var(--site-logo-size);
  height: var(--site-logo-size);
  object-fit: contain;
}

.primary-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.menu-toggle {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid #454545;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  header > nav {
    position: relative;
    min-height: 4.5rem;
    padding: 0.75rem 1rem;
  }

  .site-brand {
    --site-logo-size: clamp(3.25rem, 15vw, 4rem);
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 1px solid #454545;
    border-radius: 0;
    background: transparent;
    color: #454545;
  }

  .menu-toggle-icon,
  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    display: block;
    width: 1.25rem;
    height: 1px;
    background: currentColor;
    content: "";
    transition:
      transform 180ms ease,
      opacity 180ms ease;
  }

  .menu-toggle-icon {
    position: relative;
  }

  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    position: absolute;
    left: 0;
  }

  .menu-toggle-icon::before {
    top: -0.4rem;
  }

  .menu-toggle-icon::after {
    top: 0.4rem;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-icon {
    background: transparent;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
    transform: translateY(0.4rem) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
    transform: translateY(-0.4rem) rotate(-45deg);
  }

  .primary-navigation {
    display: none;
    position: absolute;
    z-index: 10;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.5rem 1rem 1rem;
    background: #fdf7f2;
    border-top: 1px solid #45454533;
    box-shadow: 0 0.5rem 0.75rem #00000012;
  }

  .primary-navigation.is-open {
    display: flex;
  }

  header .primary-navigation > li {
    width: 100%;
    padding: 0;
    text-align: center;
  }

  .primary-navigation > li > a {
    display: block;
    padding: 0.75rem 1rem;
  }

  .primary-navigation > li > a.button {
    display: inline-block;
    width: fit-content;
    margin-top: 0.5rem;
    padding: 0.65rem 1.1rem;
  }
}

/* Stack image and text on smaller screens */
@media (max-width: 768px) {
  .services {
    flex-direction: column;
    align-items: stretch;
  }

  .services img {
    width: 100%;
  }
}

.full-width-image {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  border-radius: 0; /* adjust roundess of corners */
}

.hero-section {
  padding-bottom: var(--hero-bottom-padding, 0);
}

/* Keeps text positioned over an image. */
.image-with-text {
  position: relative;
  overflow: hidden;
}

.image-with-text img {
  display: block;
  width: 100%;
  border-radius: 0;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1.5rem;
  background-color: rgba(162, 52, 96, 0.161);
  color: #f6f8fa;
  text-align: center;
}

.hero-content > :where(h1, h2, h3, h4, h5, h6, p) {
  margin: 0;
  padding: 0;
  color: inherit;
}

.hero-content h1 {
  /* Tune values to adjust hero heading without,--hero-title-offset moves up or down (- = up)   */
  --hero-title-size: clamp(2.2rem, 5.5vw, 3.6rem);
  --hero-title-weight: 600;
  --hero-title-offset: -1rem;
  max-width: 16ch;
  font-size: var(--hero-title-size);
  font-weight: var(--hero-title-weight);
  line-height: 1.12;
  text-wrap: balance;
  transform: translateY(var(--hero-title-offset));
}

@media (min-width: 1024px) {
  .hero-content h1 {
    max-width: 28ch;
  }

  .hero-content .hero-title-mobile-break {
    display: none;
  }
}

.hero-content > * + * {
  margin-top: 1rem;
}

/* The home-page image and copy side-by-side feature. Set
   --counsellor-image-width in index.html to resize portrait column. */
.counsellor-introduction {
  display: grid;
  grid-template-columns: minmax(0, var(--counsellor-image-width, 40%)) minmax(
      0,
      43rem
    );
  justify-content: center;
  align-items: start;
  gap: 0;
  max-width: 1280px;
  margin: clamp(4rem, 8vw, 9rem) auto 0;
}

.counsellor-image {
  width: 100%;
  height: auto;
  border: var(--counsellor-image-border-width, 0) solid
    var(--counsellor-image-border-color, transparent);
  object-fit: contain;
}

.counsellor-copy {
  --button-hover-text-color: #fdf7f2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--counsellor-copy-min-height, clamp(34rem, 54vw, 48rem));
  margin: clamp(3rem, 6vw, 6rem) 0 0;
  padding: clamp(2.5rem, 5vw, 6rem);
  background: #fdf7f2;
  border: 1px solid #454545;
  text-align: center;
  /*border: var(--service-copy-border-width) solid
    var(--service-copy-border-color);*/
}

@media (max-width: 768px) {
  .counsellor-introduction {
    grid-template-columns: 1fr;
    margin-top: 3rem;
    padding: 0;
  }

  .counsellor-image {
    display: block;
    width: 100%;
  }

  .counsellor-copy {
    min-height: 0;
    margin: 0;
    padding: 2rem 1.25rem;
  }
}

/* About-page introduction: text on left, image on right. */
body > main.about-page {
  max-width: none;
  padding: 0;
}

.about-introduction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(
      0,
      var(--about-image-width, 38rem)
    );
  align-items: center;
  gap: var(--about-column-gap, clamp(2rem, 6vw, 7rem));
  margin: 0;
  min-height: var(--about-section-min-height, 48rem);
  padding: var(--about-section-padding-top, clamp(2rem, 7vw, 7rem))
    var(--about-section-padding-right, clamp(1rem, 7vw, 8rem))
    var(--about-section-padding-bottom, clamp(2rem, 7vw, 7rem))
    var(--about-section-padding-left, clamp(1rem, 7vw, 8rem));
  background: #e6e4e2;
}

.about-introduction {
  --about-section-padding-top: 7rem;
  --about-section-padding-right: clamp(1.25rem, 4vw, 4rem);
  --about-section-padding-bottom: 7rem;
  --about-section-padding-left: clamp(1.25rem, 4vw, 4rem);
  /* Tune values to change text/photo balance on desktop. */
  --about-column-gap: clamp(1.5rem, 4vw, 3rem);

  --about-image-width: clamp(20rem, 35vw, 30rem);
  --about-copy-side-padding: 3rem;
  --about-image-border-width: 1px;
  --about-image-border-color: #454545;

  --about-copy-border-width: 0;
  --about-copy-border-color: #454545;
  --about-copy-padding-top: 5rem;
  --about-copy-padding-right: var(--about-copy-side-padding, 5rem);
  --about-copy-padding-bottom: 5rem;
  --about-copy-padding-left: var(--about-copy-side-padding, 5rem);

  /* existing layout properties below */
}

.about-copy {
  --button-hover-text-color: #fdf7f2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: var(--about-copy-padding-top, 4rem)
    var(--about-copy-padding-right, 4rem) var(--about-copy-padding-bottom, 4rem)
    var(--about-copy-padding-left, 4rem);
  background: #fdf7f2;
  border: var(--about-copy-border-width, 0) solid
    var(--about-copy-border-color, transparent);
}

.about-heading {
  margin-top: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #1a241e;
  display: inline-block;
}

.about-copy .button {
  align-self: flex-start;
  margin-top: 2rem;
}

.about-image {
  width: 100%;
  height: auto;
  border: var(--about-image-border-width, 0) solid
    var(--about-image-border-color, transparent);
  object-fit: contain;
}

/* Long About-page copy goes from the left column into right column. */
.about-details {
  --about-details-column-gap: 7rem;
  margin: 0;
  padding: var(--about-details-padding-top, clamp(3rem, 7vw, 7rem))
    var(--about-details-padding-right, clamp(1rem, 7vw, 8rem))
    var(--about-details-padding-bottom, clamp(3rem, 7vw, 7rem))
    var(--about-details-padding-left, clamp(1rem, 7vw, 8rem));
  background: #ecded7;
}

.about-details-copy {
  column-count: 2;
  column-gap: var(--about-details-column-gap);
  margin: 0;
  padding: 0;
  background: transparent;
}

.about-details-copy p {
  margin: 0;
}

/* Full-width home-page copy, same look as About. */
.home-details {
  width: 100vw;
  max-width: none;
  margin: clamp(4rem, 8vw, 9rem) 0 0 calc(50% - 50vw);
  padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 7vw, 8rem);
  background: #ecded7;
}

.home-details-copy {
  column-count: 2;
  column-gap: 7rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.home-details-copy p {
  margin: 0;
}

.home-details-copy .home-details-lead {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: #a29985;
}

@media (max-width: 768px) {
  .about-introduction {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 2rem;
    padding: 2rem 1rem;
  }

  .about-copy {
    padding: 2rem 1.25rem;
  }

  .about-details-copy {
    column-count: 1;
  }

  .home-details {
    margin-top: 3rem;
    padding: 3rem 1.25rem;
  }

  .home-details-copy {
    column-count: 1;
  }
}

/* Shared outlined button style. */
.button {
  display: inline-block;
  align-self: center;
  width: fit-content;
  background: transparent;
  color: #454545;
  padding: 0.65rem 1.1rem;
  border: 1px solid #454545;
  border-radius: 0;
  text-decoration: none;
  font-weight: 600;
  font-family: "Playfair Display", serif;
}

/* The navigation button is anchor inside a list item. */
.button > a {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

/* Use same font for any form buttons added later. */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  font-family: "Playfair Display", serif;
}

.button:is(:hover, :focus, :focus-within) {
  background: #454545;
  color: var(--button-hover-text-color);
}

.button:is(:hover, :focus, :focus-within) > a {
  color: inherit;
}

/* Home-page counselling highlights displayed as three matching vertical cards.
   the shared minimum height is set with --highlight-card-min-height in index.html. */
.service-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: clamp(1rem, 2vw, 2rem);
  max-width: 1200px;
  margin: clamp(4rem, 8vw, 9rem) auto;
}

.service-highlight {
  --button-hover-text-color: #fdf7f2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: var(--highlight-card-min-height, 32rem);
  margin: 0;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
  background: #fdf7f2;
  border: 1px solid #454545;
  text-align: center;
}

.service-highlight h2 {
  margin-top: 0;
}

/* Split card titles into two balanced lines on wide screens. .service-highlight .highlight-title-break {
  display: none;
} */

@media (min-width: 1200px) {
  .service-highlight .highlight-title-break {
    display: block;
  }
}

.service-highlight p {
  margin-bottom: 2rem;
}

.service-highlight .button {
  margin-top: auto;
}

.in-person-counselling-highlight {
  --button-hover-text-color: #ecded7;
  background: #ecded7;
}

.online-counselling-highlight {
  --button-hover-text-color: #e6e4e2;
  background: #e6e4e2;
}

.walk-and-talk-highlight {
  --button-hover-text-color: #f8f6ed;
  background: #f8f6ed;
}

@media (max-width: 768px) {
  .service-highlights {
    grid-template-columns: 1fr;
    margin: 3rem auto;
  }

  .service-highlight {
    padding: 2rem 1.25rem;
  }
}

/* Full service panels with white content card. */
body > main.services-page {
  max-width: none;
  padding: var(--services-page-top-gap, 0) 0 0;
}

.services-page .services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  background: #f5f1ee;
}

.services-page .services:nth-child(even) img {
  order: 2;
  justify-self: end;
}

.services-page .services img {
  width: var(--service-image-width, 100%);
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: var(--service-image-padding-top, 0)
    var(--service-image-padding-right, 0) var(--service-image-padding-bottom, 0)
    var(--service-image-padding-left, 0);
  border: var(--service-image-border-width) solid
    var(--service-image-border-color);
  border-radius: 0;
  align-self: center;
  object-fit: contain;
}

.services-page .service-copy {
  --button-hover-text-color: #faf3ee;
  align-self: center;
  margin: var(--service-copy-margin-top, clamp(2rem, 7vw, 8rem))
    var(--service-copy-margin-right, clamp(2rem, 7vw, 8rem))
    var(--service-copy-margin-bottom, clamp(2rem, 7vw, 8rem))
    var(--service-copy-margin-left, clamp(2rem, 7vw, 8rem));
  padding: var(--service-copy-padding-top, clamp(2rem, 4vw, 5rem))
    var(--service-copy-padding-right, clamp(2rem, 4vw, 5rem))
    var(--service-copy-padding-bottom, clamp(2rem, 4vw, 5rem))
    var(--service-copy-padding-left, clamp(2rem, 4vw, 5rem));
  background: #faf3ee;
  border-width: 0;
  /*border: var(--service-copy-border-width) solid
    var(--service-copy-border-color);
  border-radius: 0;*/
}

.services-page .service-copy h2 {
  margin-top: 0;
}

/* Service panel colours. */
.services-page .in-person-counselling {
  background: #ecded7;
}

.services-page .in-person-counselling img {
  justify-self: end;
}

.services-page .online-counselling {
  background: #e6e4e2;
  padding-block: clamp(1rem, 2vw, 2rem);
}

.services-page .online-counselling .service-copy {
  --service-copy-margin-top: 0;
  --service-copy-margin-bottom: 0;
}

.services-page .walk-and-talk {
  background: #e7f1e7;
}

.services-page .walk-and-talk img {
  width: var(--service-image-width, 68%);
  justify-self: center;
}

/* Full-width fees area with six rate columns. */
.fees-section {
  margin: 0;
  padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 5vw, 4rem);
  background: #ecded7;
  text-align: center;
}

.fees-section h2 {
  margin-top: 0;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.fees-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 1400px;
  margin: 0 auto;
}

.fee-item {
  margin: 0;
  padding: 1rem clamp(0.75rem, 2vw, 2rem);
  background: transparent;
  border: 0;
  border-left: 1px solid #45454566;
}

.fee-item:first-child {
  border-left: 0;
}

.fee-item h3 {
  margin-top: 0;
}

.fee-item p {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .services-page .services {
    grid-template-columns: 1fr;
  }

  .services-page .services:nth-child(even) img {
    order: initial;
    justify-self: stretch;
  }

  .services-page .services img {
    width: 100%;
    padding: 0;
  }

  .services-page .walk-and-talk img {
    width: var(--service-image-width, 68%);
    justify-self: center;
  }

  .fees-grid {
    grid-template-columns: 1fr;
  }

  .fee-item,
  .fee-item:first-child {
    padding: 1.5rem 0;
    border-top: 1px solid #45454566;
    border-left: 0;
  }

  .fee-item:first-child {
    border-top: 0;
  }

  .services-page .service-copy {
    margin: 0;
    padding: 2rem 1.25rem;
  }
}

p {
  font-family: Montserrat;
  font-weight: 300;
}

li {
  font-family: Montserrat;
  font-weight: 300;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Playfair Display;
  font-weight: 400;
}

/* Full-width site footer with a constrained, three-column inner layout. */
body > footer.site-footer {
  --button-hover-text-color: #d9ad90;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #d9ad90;
  color: #454545;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 6rem);
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 4rem);
}

.site-footer :where(section, nav) {
  margin: 0;
}

.site-footer :where(h2, p) {
  margin-top: 0;
}

.site-footer h2 {
  font-size: 1.1rem;
}

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

.site-footer a:not(.button):hover,
.site-footer a:not(.button):focus {
  color: #454545a6;
}

.footer-brand a {
  font-family: "Montserrat", sans-serif;
}

/* Reuse .footer-image for footer logos, badges, or other small images.
   Set --footer-image-width on an image to adjust preferred size. */
.site-footer .footer-image {
  display: block;
  width: min(100%, var(--footer-image-width, 12rem));
  height: auto;
  object-fit: contain;
  margin-top: 1rem;
}

.footer-navigation {
  display: block;
}

.footer-navigation h2 {
  margin-bottom: 1rem;
}

.footer-navigation ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-contact .button {
  --button-hover-text-color: #d9ad90;
  align-self: flex-start;
  margin: 0;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 5vw, 4rem);
  border-top: 1px solid #45454566;
}

@media (max-width: 768px) {
  .hero-section .image-with-text img {
    height: clamp(28rem, 110vw, 42rem);
    object-fit: cover;
    object-position: center;
  }

  .hero-content {
    padding: clamp(1rem, 5vw, 2rem);
  }

  .hero-content h1 {
    --hero-title-size: clamp(2.1rem, 8vw, 3.5rem);
    max-width: 14ch;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.25rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: clamp(2.35rem, 12vw, 3rem);
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-content > * + * {
    margin-top: 0.5rem;
  }

  .footer-bottom {
    padding: 1.25rem;
  }
}

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

.service-highlight-title {
  font-family: Playfair Disply;
  font-weight: bold;
}
