/*
 * Great GTA Houses
 * Base styles first, responsive overrides at the bottom.
 * Fonts are loaded from Google Fonts in each HTML page.
 */

/* SITE SETTINGS — Edit colors, page gutters, and heading sizes here. */
:root {
  --ink: #260e58;
  --purple: #977dd1;
  --button: #9683c9;
  --gray: #ebebeb;
  --gutter: 3vw;
  --h1: calc(2rem + 2.35vw);
  --h2: calc(1.75rem + 1.22375vw);
  --h3: calc(1.4rem + .94vw);
  --h4: calc(1.2rem + .47vw);
}

/* BASE ELEMENTS — Shared typography, spacing, and accessibility. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 300 16px/1.8 Poppins,Arial,sans-serif;
}

h1,h2,h3,h4 {
  font-family: Roboto,Arial,sans-serif;
  font-weight: 500;
  margin: 0;
}

h1 {
  font-size: var(--h1);
  line-height: 1.232;
}

h2,.page-title {
  font-size: var(--h2);
  line-height: 1.299;
}

h3 {
  font-size: var(--h3);
  line-height: 1.333;
}

h4 {
  font-size: var(--h4);
  line-height: 1.366;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-underline-offset: 7px;
  text-decoration-thickness: 1px;
}

button {
  font: inherit;
  cursor: pointer;
}

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

section,footer {
  padding: 42px var(--gutter);
}

a:focus-visible,button:focus-visible,summary:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 5px;
}

.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  background: #fff;
  padding: 10px;
  z-index: 20;
}

.skip:focus {
  top: 10px;
}

/* HEADER AND NAVIGATION */
.site-header {
  height: 126px;
  padding: 32px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  position: relative;
}

.site-header.over-hero {
  position: absolute;
  inset: 0 0 auto;
  color: white;
}

.brand {
  font: 500 32px/1.2 Roboto,Arial,sans-serif;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav>a {
  text-decoration: none;
}

nav>a[aria-current=page]:not(.button) {
  text-decoration: underline;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 34px;
  background: var(--button);
  color: white;
  text-decoration: none;
  font: 500 14px/1.8 Poppins,Arial,sans-serif;
  min-height: 62px;
}

.button:hover {
  opacity: .85;
}

nav .button {
  margin-left: 10px;
  min-width: 128px;
}

.menu-toggle {
  display: none;
}

/* SECTION COLORS */
.dark,footer {
  background: var(--ink);
  color: #fff;
}

.purple {
  background: var(--purple);
  color: white;
}

/* HOME — Hero image and headline */
.hero {
  height: max(56.85vw,650px);
  max-height: 1000px;
  background: linear-gradient(#0003,#0003),url('assets/stephen-mabbs---b8ytq4wei-unsplash.webp') center/cover no-repeat;
  color: white;
  padding-top: 164px;
}

.hero-copy {
  width: 50%;
}

.hero h1 {
  max-width: 610px;
}

.hero h4 {
  margin-top: 30px;
  white-space: nowrap;
}

.hero h2 {
  margin-top: 39px;
}

/* HOME — Introduction */
.intro {
  background: var(--gray);
  padding-top: 84px;
  padding-bottom: 84px;
  display: grid;
  grid-template-columns: 20.1% 62.2%;
  gap: 5.1%;
}

.intro .highlight {
  text-decoration: underline;
  text-decoration-color: var(--purple);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

/* SHARED COLUMN LAYOUT */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 11px;
}

/* HOME — Services */
.services {
  min-height: 405px;
}

.services .three-columns {
  margin-top: 84px;
}

.services p {
  margin-top: 25px;
  max-width: 360px;
}

/* LISTINGS — These rules apply to every copied listing block. */
.listing-heading {
  padding-top: 36px;
  padding-bottom: 37px;
  color: var(--purple);
}

.listing-heading h2 {
  text-align: left;
}

.listing {
  color: var(--purple);
  padding-bottom: 42px;
}

.listing>h2 {
  margin-bottom: 11px;
}

.listing-grid {
  display: grid;
  grid-template-columns: 1fr 2.028fr;
  gap: 11px;
}

.listing p {
  color: var(--ink);
}

.listing-facts h3 {
  margin-bottom: 25px;
}

.listing-facts p {
  margin-bottom: 16px;
}

.listing-facts strong {
  font-weight: 500;
}

.description {
  min-height: 247px;
}

.map {
  display: block;
  border: 0;
  width: 100%;
  height: 247px;
  filter: grayscale(1);
}

/* LISTING PHOTOS — Two columns on desktop; each gallery has its own viewer. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
  padding-top: 36px;
  padding-bottom: 80px;
}

.gallery-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.5;
  object-fit: cover;
}

.gallery-photo {
  overflow: hidden;
}

.gallery-photo:hover img {
  opacity: .9;
}

/* HOME — Neighborhood maps */
.neighborhoods {
  padding-top: 42px;
  padding-bottom: 84px;
}

.neighborhoods .three-columns {
  margin-top: 48px;
  gap: 5.1%;
}

.neighborhoods .three-columns>div {
  padding-right: 0;
}

.neighborhoods h3 {
  margin-bottom: 20px;
}

.neighborhoods .map {
  height: 431px;
}

/* HOME — Local offers */
.offers {
  position: relative;
  display: grid;
  grid-template-columns: 37% 28.5%;
  gap: 13.5%;
  padding: 42px 10.9%;
  min-height: 732px;
  overflow: hidden;
  align-items: end;
}

.offers>img {
  width: 100%;
  height: 647px;
  object-fit: cover;
  border-radius: 10px;
  grid-column: 1;
  position: relative;
  z-index: 1;
}

.offers {
  grid-template-columns: 44.4% 34.3%;
  gap: 16.3%;
}

.offers-copy {
  padding-bottom: 31px;
  text-align: center;
  position: relative;
  z-index: 3;
}

.offers-copy .button {
  display: flex;
  margin: 10px 15% 43px;
}

.offers-copy p:first-child {
  text-align: left;
}

.solicitation {
  font-size: 16px;
}

.marquee {
  position: absolute;
  top: 75px;
  left: 0;
  width: 100%;
  z-index: 2;
  overflow: hidden;
  font: 500 var(--h1)/1.4 Roboto,Arial,sans-serif;
}

.marquee>div {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
}

.marquee span {
  padding-right: 50px;
  white-space: nowrap;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }

}

/* HOME — Frequently asked questions */
.faq {
  display: grid;
  grid-template-columns: 28.5% 58%;
  gap: 9.3%;
  padding-top: 42px;
  padding-bottom: 42px;
}

.faq details {
  border-bottom: 1px solid #ffffff80;
}

.faq details:first-child {
  border-top: 1px solid #ffffff80;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  font: 500 var(--h4)/1.366 Roboto,Arial,sans-serif;
  padding: 28px 50px 28px 0;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:after {
  content: '+';
  position: absolute;
  right: 0;
  top: 24px;
  font: 300 32px Arial;
}

.faq details[open] summary:after {
  content: '−';
}

.faq details p {
  padding: 0 45px 24px 0;
}

/* FOOTER */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 136px auto;
  gap: 11px;
}

.footer-grid>h2 {
  grid-column: 1/3;
}

.broker-logo {
  grid-column: 3;
  object-fit: contain;
}

.contact-details {
  grid-column: 1;
}

.broker-details {
  grid-column: 3;
}

.contact-details h4,.broker-details h4 {
  margin-bottom: 26px;
}

.contact-details p {
  margin-bottom: 20px;
}

.broker-details img {
  object-fit: contain;
  margin-top: 22px;
}

.legal {
  margin: 48px 0 0;
  font-size: 14px;
  line-height: 1.8;
  max-width: 100%;
}

footer {
  min-height: 622px;
}

/* ABOUT PAGE */
.about-intro {
  padding-top: 42px;
  padding-bottom: 42px;
}

.page-title {
  text-decoration: underline;
  text-decoration-color: var(--button);
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}

.about-intro h3 {
  margin-top: 48px;
  max-width: 1102px;
}

.two-columns {
  display: grid;
  grid-template-columns: 41.13% 41.13%;
  gap: 9.33%;
}

.about-approach {
  padding-bottom: 118px;
}

.certifications .three-columns {
  margin-top: 48px;
  row-gap: 40px;
}

.certifications p {
  margin-top: 24px;
}

.expertise {
  padding-top: 60px;
  padding-bottom: 60px;
}

.about-goal {
  background: var(--gray);
  text-align: center;
  padding: 90px 14.85%;
  min-height: 475px;
}

.about-goal .button {
  margin-top: 46px;
  min-width: 292px;
}

/* CONTACT PAGE */
.contact-page {
  padding-top: 86px;
  padding-bottom: 85px;
  min-height: 675px;
  grid-template-columns: 41.13% 49.55%;
}

.contact-page .lead {
  font-size: 24px;
  line-height: 1.8;
  margin-top: 32px;
}

.contact-page p {
  margin-bottom: 20px;
}

.direct-contact {
  padding: 0 0 30px;
}

.direct-contact h3 {
  margin-bottom: 30px;
}

.direct-contact .button {
  margin-top: 22px;
}

/* 404 PAGE */
.not-found {
  min-height: 50vh;
}

.not-found .button {
  margin-top: 40px;
}

/* PHOTO VIEWER — One shared dialog; photos are grouped by listing. */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  padding: 60px 80px;
  background: white;
  color: var(--ink);
}

.lightbox::backdrop {
  background: #fff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox figure {
  margin: 0;
  text-align: center;
}

.lightbox img {
  max-height: calc(100dvh - 130px);
  max-width: calc(100vw - 160px);
  object-fit: contain;
  margin: auto;
}

.lightbox figcaption {
  margin-top: 15px;
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: inherit;
  font: 300 48px Arial;
  padding: 8px 16px;
}

.lightbox-close {
  right: 16px;
  top: 12px;
}

.lightbox-previous {
  left: 12px;
  top: 45%;
}

.lightbox-next {
  right: 12px;
  top: 45%;
}

body.modal-open {
  overflow: hidden;
}

/* LARGE SCREENS — Overrides for widths of 1600px and above. */
@media(min-width:1600px) {
  :root {
    --gutter: max(3vw,calc((100vw - 1500px)/2));
    --h1: 72px;
    --h2: 48px;
    --h3: 38px;
    --h4: 27px;
  }

}

/* MOBILE — Overrides for widths of 767px and below. */
@media(max-width:767px) {
  :root {
    --gutter: 6vw;
    --h1: 42px;
    --h2: 34px;
    --h3: 28px;
    --h4: 22px;
  }

  .site-header {
    height: 106px;
    padding: 25px 6vw;
  }

  .brand {
    font-size: 27px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: none;
    border: 0;
    padding: 12px 0 12px 12px;
    color: inherit;
  }

  .menu-toggle span {
    height: 2px;
    width: 28px;
    background: currentColor;
  }

  /* Fade and slide the menu without changing the page layout. */
  .site-header nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 200ms ease,
      transform 200ms ease,
      visibility 200ms;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    color: white;
    padding: 30px 6vw;
  }

  .site-header nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header nav .button {
    margin: 0;
  }

  .hero {
    height: auto;
    min-height: 710px;
    max-height: none;
    padding-top: 150px;
    padding-bottom: 100px;
    background-position: 54% center;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    max-width: 550px;
  }

  .hero h4 {
    white-space: normal;
    margin-top: 30px;
  }

  .hero h2 {
    margin-top: 40px;
  }

  .intro {
    display: block;
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .intro>h4 {
    margin-bottom: 38px;
  }

  .intro h2 {
    font-size: 30px;
  }

  .three-columns,.two-columns,.listing-grid,.faq {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .services {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .services .three-columns {
    margin-top: 45px;
    gap: 35px;
  }

  .services p {
    margin-top: 16px;
    max-width: none;
  }

  .listing-heading {
    padding: 40px 6vw 15px;
  }

  .listing {
    padding-top: 25px;
  }

  .listing>h2 {
    margin-bottom: 30px;
  }

  .description {
    min-height: 0;
  }

  .map {
    height: 270px;
  }

  .gallery {
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 45px;
  }

  .gallery-photo img {
    aspect-ratio: 1.5;
  }

  .neighborhoods {
    padding: 45px 6vw;
  }

  .neighborhoods .three-columns {
    gap: 40px;
    margin-top: 35px;
  }

  .neighborhoods .map {
    height: 350px;
  }

  .offers {
    padding: 45px 6vw;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 35px;
    align-items: stretch;
  }

  .offers>img {
    height: 460px;
    width: 100%;
    max-width: none;
  }

  .marquee {
    top: 85px;
  }

  .offers-copy {
    padding: 0;
  }

  .offers-copy p:first-child {
    text-align: center;
  }

  .offers-copy .button {
    margin: 22px auto 28px;
    max-width: 245px;
  }

  .faq {
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .faq summary {
    padding-top: 25px;
    padding-bottom: 25px;
  }

  .footer-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .footer-grid h2 {
    margin-bottom: 8px;
  }

  .broker-logo {
    order: 2;
  }

  .contact-details {
    order: 1;
  }

  .broker-details {
    order: 3;
  }

  .broker-details img {
    margin-top: 25px;
  }

  .legal {
    margin-top: 35px;
  }

  footer {
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .about-intro {
    padding-top: 40px;
  }

  .about-intro h3 {
    margin-top: 40px;
  }

  .about-approach {
    padding-top: 15px;
    padding-bottom: 55px;
    gap: 15px;
  }

  .certifications {
    padding-top: 45px;
  }

  .certifications .three-columns {
    gap: 25px;
  }

  .certifications p {
    margin-top: 15px;
  }

  .expertise {
    padding-top: 30px;
    padding-bottom: 45px;
    gap: 20px;
  }

  .about-goal {
    padding: 60px 6vw;
    min-height: 0;
  }

  .about-goal .button {
    min-width: 220px;
  }

  .contact-page {
    padding-top: 45px;
    min-height: 0;
  }

  .contact-page .lead {
    font-size: 22px;
  }

  .direct-contact {
    padding-top: 15px;
    overflow-wrap: anywhere;
  }

  .lightbox {
    padding: 60px 36px;
  }

  .lightbox img {
    max-width: calc(100vw - 72px);
  }

  .lightbox button {
    font-size: 38px;
    padding: 8px;
  }

  .lightbox-previous {
    left: 0;
  }

  .lightbox-next {
    right: 0;
  }

}

/* ACCESSIBILITY — Respect reduced-motion preferences. */
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee>div {
    animation: none;
  }

  .site-header nav {
    transition: none;
  }

}
