/*
 * Theme Name: 45 Waterloo
 * Author: Chris at P4P Creative
*/

:root {
  --custard: #FFD282;
  --black: #121212;

  /* @link https://utopia.fyi/type/calculator?c=360,16,1.2,1600,18,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

  --font-size--2: clamp(0.6944rem, 0.687rem + 0.033vw, 0.72rem);
  --font-size--1: clamp(0.8333rem, 0.814rem + 0.086vw, 0.9rem);
  --font-size-0: clamp(1rem, 0.9637rem + 0.1613vw, 1.125rem);
  --font-size-1: clamp(1.2rem, 1.1401rem + 0.2661vw, 1.4063rem);
  --font-size-2: clamp(1.44rem, 1.3477rem + 0.4101vw, 1.7578rem);
  --font-size-3: clamp(1.728rem, 1.5918rem + 0.6055vw, 2.1973rem);
  --font-size-4: clamp(2.0736rem, 1.8782rem + 0.8684vw, 2.7466rem);
  --font-size-5: clamp(2.4883rem, 2.214rem + 1.2192vw, 3.4332rem);

  /* @link https://utopia.fyi/space/calculator?c=360,18,1.2,1600,18,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

  --space-3xs: clamp(0.3125rem, 0.3125rem + 0vw, 0.3125rem);
  --space-2xs: clamp(0.5625rem, 0.5625rem + 0vw, 0.5625rem);
  --space-xs: clamp(0.875rem, 0.875rem + 0vw, 0.875rem);
  --space-s: clamp(1.125rem, 1.125rem + 0vw, 1.125rem);
  --space-m: clamp(1.6875rem, 1.6875rem + 0vw, 1.6875rem);
  --space-l: clamp(2.25rem, 2.25rem + 0vw, 2.25rem);
  --space-xl: clamp(3.375rem, 3.375rem + 0vw, 3.375rem);
  --space-2xl: clamp(4.5rem, 4.5rem + 0vw, 4.5rem);
  --space-3xl: clamp(6.75rem, 6.75rem + 0vw, 6.75rem);

  /* One-up pairs */
  --space-3xs-2xs: clamp(0.3125rem, 0.2399rem + 0.3226vw, 0.5625rem);
  --space-2xs-xs: clamp(0.5625rem, 0.4718rem + 0.4032vw, 0.875rem);
  --space-xs-s: clamp(0.875rem, 0.8024rem + 0.3226vw, 1.125rem);
  --space-s-m: clamp(1.125rem, 0.9617rem + 0.7258vw, 1.6875rem);
  --space-m-l: clamp(1.6875rem, 1.5242rem + 0.7258vw, 2.25rem);
  --space-l-xl: clamp(2.25rem, 1.9234rem + 1.4516vw, 3.375rem);
  --space-xl-2xl: clamp(3.375rem, 3.0484rem + 1.4516vw, 4.5rem);
  --space-2xl-3xl: clamp(4.5rem, 3.8468rem + 2.9032vw, 6.75rem);

  /* Custom pairs */
  --space-s-l: clamp(1.125rem, 0.7984rem + 1.4516vw, 2.25rem);

  --transition-time: 0.375s;
  --transition-time-reveal: 0.75s;

  --border-radius: 5px;
}

@keyframes fadeoutoverlay {

  0% {
    opacity: 1;
  }
  
  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

body {
  font-family: "futura-100", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: var(--font-size-0);
  color: var(--black);
  background-color: var(--custard);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 720px;
  position: relative;
  z-index: 0;
  height: 100vh;
  @media (pointer: coarse) {
    height: 100dvh;
  }
  

  &:has(.video-modal[open]) {
    /* block scroll when a dialog is open */
    overflow: hidden;
  }
  
  

  .overlay {
    position: absolute;
    opacity: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    background-color: var(--custard);
    color: white;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    animation: fadeoutoverlay 3s forwards;
    
    h1 {
      text-align: center;
      font-size: var(--font-size-4);
      display: none;
    }
  }

  .hover-grid {
    position: absolute;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr;

    width: 100%;
    height: 100%;

    @media (pointer: coarse) {
      left: var(--space-m);
      right: var(--space-m);

      width: calc(100% - calc(2 * var(--space-m)));
    }

    overflow: hidden;

    @media screen and (max-width: 1440px) {
      grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    @media screen and (max-width: 960px) {
      grid-template-columns: 1fr 1fr 1fr;
    }

    a {
      width: 100%;
      height: 100%;
      /* position: relative; */
      /* pointer-events: none; */
      cursor: default;

      .hover-reveal {
        width: 25%;

        @media screen and (max-width: 1440px) {
          width: 25%;
        }

        @media screen and (max-width: 960px) {
          width: 33.333%;
        }

        height: auto;
        aspect-ratio: 1;
        position: absolute;

        top: 50%;

        z-index: 10;
        opacity: 0;
        transform: scale(0);
        will-change: opacity,
          transform;
        pointer-events: none;
        transform-origin: 0% 0%;
        
        @media (pointer: fine) {
          max-width: 0;
        }

        /* transition: opacity var(--transition-time-reveal) ease-in-out,
        transform var(--transition-time-reveal) ease-in-out; */


        img {
          object-fit: cover;
          width: 100%;
        }



      }

      @media (pointer: coarse) {
        pointer-events: none;

        &:nth-of-type(1)>div.hover-reveal {
          top: 0%;
          animation: fadeincubes 21s infinite linear;
          animation-delay: 14s;
          /* opacity: unset !important;
                    transform: unset !important; */
        }

        &:nth-of-type(2)>div.hover-reveal {
          top: 40%;
          animation: fadeincubes 21s infinite linear reverse;
          animation-delay: 7s;
          /* opacity: unset !important;
                    transform: unset !important; */
        }

        &:nth-of-type(3)>div.hover-reveal {
          top: 10%;
          animation: fadeincubes 21s infinite linear;
          animation-delay: 0s;
          /* opacity: unset !important;
                    transform: unset !important; */
        }

        @media screen and (min-width: 960px) {
          &:nth-of-type(4)>div.hover-reveal {
            top: 30%;
            animation: fadeincubes 21s infinite linear;
            animation-delay: 16.5s;
            /* opacity: unset !important;
                        transform: unset !important; */
          }

          @media screen and (min-width: 1440px) {
            &:nth-of-type(5)>div.hover-reveal {
              top: 60%;
              animation: fadeincubes 21s infinite linear reverse;
              animation-delay: 3.5s;
              /* opacity: unset !important;
                            transform: unset !important; */
            }
          }
        }
      }
    }
  }
}

@keyframes fadeincubes {

  0% {
    transform: scale(0);
    opacity: 0;
  }

  33% {
    transform: scale(0);
    top: 10%;
  }

  35% {
    opacity: 0.6;
    transform: scale(1);

  }

  50% {
    opacity: 1;
  }

  65% {
    opacity: 0.6;
    transform: scale(1);

  }

  67% {
    transform: scale(0);
    opacity: 0;
    top: 60%;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* 

font-family: "presti-text", serif;
font-weight: 400;
font-style: normal; 

font-family: "presti-text", serif;
font-weight: 400;
font-style: italic;

*/

header {
  border-bottom: 1px solid white;
  z-index: 10;
  background-color: var(--custard);
  z-index: 25;
  /* position: sticky;
    top: 0; */

  .wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    >* {
      padding: var(--space-m);
      min-width: 240px;

      @media screen and (max-width: 480px) {
        min-width: unset;
        width: 50%;
      }

      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      height: 100%;
    }

    .logo {
      border-right: 1px solid white;

      @media screen and (max-width: 480px) {
        border-right: unset;
      }

      .logo-svg {
        flex-grow: 1;
        height: 22px;
        width: 180px;

        @media screen and (max-width: 480px) {
          min-width: unset;
          width: 100%;
          height: auto;
        }
      }
    }

    .address {
      font-family: "presti-text", serif;
      font-weight: 400;
      font-style: normal;
      border-left: 1px solid white;

      font-size: var(--font-size--1);
    }
  }
}

a {
  text-decoration: none;
  color: currentcolor;
}

main {
  /* overflow: auto; */
  flex-grow: 1;
  flex-shrink: 1;


  .wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    transition: height 1s ease-in-out;
    gap: var(--space-xl);
    overflow: hidden;
    position: relative;



    h2 {
      width: 100%;
      padding-top: var(--space-m);
      pointer-events: none;

      .the-address {
        width: 102%;
        max-width: unset;
        position: relative;

        img {
          width: 100%;

          &.stroked {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 15;
          }
        }

        &.mobile {
          display: none;
        }

        @media screen and (max-width: 720px) {

          display: none;
          width: 101%;

          &.mobile {
            display: block;
          }
        }
      }
    }

    h3 {
      font-size: var(--font-size-3);
      text-align: center;
      pointer-events: none;
      z-index: 15;
      font-weight: 500;
      line-height: 1.5;
    }
  }
}

.white {
  color: white;
}

footer {
  z-index: 20;
  pointer-events: none;

  /*  */
  .inner {
    width: 100%;
    padding: var(--space-l) var(--space-m);
  }

  .wrapper.buttons {
    pointer-events: all;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto 0;
    border: 1px solid white;
    border-radius: var(--border-radius);
    z-index: 10;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;

    background-color: var(--custard);

    @media screen and (max-width: 720px) {
      grid-template-columns: 1fr 1fr;
    }



    .button {
      text-transform: uppercase;
      padding: var(--space-m);
      text-align: center;
      transition: color var(--transition-time) ease-in-out;
      display: flex;
      flex-direction: row;
      column-gap: 0.35ch;
      justify-content: center;
      align-items: center;
      z-index: 15;

      font-size: var(--font-size--1);
      letter-spacing: 0.1em;

      &:not(:last-child) {
        border-right: 1px solid white;
      }

      @media screen and (max-width: 1080px) {
        flex-direction: column;
      }

      @media screen and (max-width: 720px) {
        flex-direction: row;

        &:not(:last-child) {
          border-right: unset;
        }

        &:not(:nth-child(even)) {
          border-right: 1px solid white;
        }

        &:nth-child(1),
        &:nth-child(2) {
          border-bottom: 1px solid white;
        }
      }

      @media screen and (max-width: 540px) {
        flex-direction: column;
      }

      @media screen and (max-width: 414px) {
        font-size: var(--font-size--2);
      }

      &:hover {
        color: white;
        cursor: pointer;
      }
    }
  }

  #further-information {
    width: 100%;
    height: 0;
    color: var(--custard);
    transition: height 0.75s ease-in-out,
      min-height 0.25s ease-in-out;

    * {
      opacity: 0;
      height: 0;
      transition: height 0.25s ease-in, opacity 0.75s ease-in;
      padding: unset;
    }

  }


  #further-information.expanded {
    pointer-events: all;
    height: 300px;

    @media screen and (max-width: 1200px) {
      height: 350px;
    }

    @media screen and (max-width: 960px) {
      height: 480px;
    }

    @media screen and (max-width: 480px) {
      height: 620px;
    }

    @media screen and (max-width: 400px) {
      height: 620px;
    }

    @media screen and (max-width: 375px) {
      height: 800px;
    }

    * {
      opacity: 1;
      height: auto;
    }

    background-color: var(--black);
    color: white;

    @media screen and (max-width: 1440px) {
      font-size: var(--font-size--1);
    }

    a {
      color: white;
      transition: color var(--transition-time) ease-in-out;

      &:hover {
        color: var(--custard);
      }

    }

    .inner {
      padding: var(--space-l) var(--space-m);
      height: 100%;
    }

    .wrapper {
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;

      display: flex;
      flex-direction: column;
      /* justify-content: space-between; */
      align-items: center;
      gap: var(--space-l);
      height: 100%;

      @media screen and (max-width: 960px) {
        justify-content: unset;
      }

      .header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;

        >* {
          font-weight: 500;
          text-transform: uppercase;
          letter-spacing: 0.1em;
        }

        .close-button {
          border: 1px solid currentColor;
          border-radius: var(--border-radius);
          transition: color var(--transition-time) ease-in-out,
            border-color var(--transition-time) ease-in-out;
          padding: 0.75em;
          line-height: 1.2em;

          font-size: var(--font-size--1);

          @media screen and (max-width: 480px) {
            font-size: var(--font-size--2);
          }

          &:hover {
            color: var(--custard);
            cursor: pointer;
          }
        }
      }

      .grid {
        display: flex;
        flex-direction: row;
        column-gap: var(--space-m);
        row-gap: var(--space-xl);

        height: 180px;
        width: 100%;

        @media screen and (max-width: 1200px) {
          flex-wrap: wrap;
          height: 260px;
        }

        @media screen and (max-width: 960px) {
          flex-direction: column;
          flex-wrap: nowrap;
        }

        #agents_left {
          display: flex;
          flex-direction: row;
          gap: var(--space-m);
          align-items: flex-end;

          @media screen and (max-width: 960px) {
            flex-direction: column;
            align-items: flex-start;
          }

        }

        .agents {
          display: flex;
          flex-direction: row;
          gap: var(--space-m);
        }

        .agent {
          display: flex;
          flex-direction: column;
          gap: var(--space-m);
          align-items: flex-start;
          font-size: var(--font-size--1);


          @media screen and (max-width: 960px) {
            flex-direction: row;

            .image-wrapper {
              min-width: 90px;
            }
          }

          @media screen and (max-width: 480px) {
            flex-direction: column;
          }

          .contacts {
            display: flex;
            flex-direction: row;
            gap: var(--space-l);
            justify-content: space-between;
            /* min-height: 200px;

            @media screen and (max-width: 1200px) {
              min-height: 165px;
            } */

            @media screen and (max-width: 960px) {
              gap: var(--space-m);
              min-height: unset;
            }

            @media screen and (max-width: 640px) {
              flex-direction: row;
            }

            @media screen and (max-width: 375px) {
              flex-direction: column;
            }

            .contact {
              display: flex;
              flex-direction: column;

              >* {
                white-space: nowrap;
              }
            }
          }
        }

        .right {
          display: flex;
          flex-direction: row;
          justify-content: flex-end;
          gap: var(--space-m);
          width: 100%;

          @media screen and (max-width: 1200px) {
            justify-content: flex-start;
          }


          #footer_logo {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: var(--space-m);
            text-align: right;
            justify-content: space-between;
            padding-top: 0.75rem;
            padding-bottom: 1.5rem;
            height: 145px;

            @media screen and (max-width: 1200px) {
              align-items: flex-start;
              text-align: left;
              flex-direction: row;
              height: unset;
            }

            @media screen and (max-width: 400px) {
              /* flex-direction: column; */
              align-items: center;
              .logo-svg {
                width: 100%;
                max-width: 50%;
              }
            }

          }
        }

        @media screen and (max-width: 880px) {

          .right {
            display: grid;
            grid-template-columns: 1fr 1fr;
          }
        }

        @media screen and (max-width: 640px) {

          .right {
            display: grid;
            grid-template-columns: 1fr;
          }
        }
      }
    }
  }
}

#open-misdescriptions {
  text-decoration: underline;
  text-transform: uppercase;
  letter-spacing: 0.1em;

  &:hover {
    cursor: pointer;
  }
}



dialog {

  width: 100%;
  
  

  @media screen and (max-width: 720px) {
      max-width: 95vw;
  }  

  &.video-modal {
    background: linear-gradient(15deg,rgba(248, 191, 91, 1) 0%, rgba(248, 191, 91, 1) 35%, rgba(254, 225, 169, 1) 50%, rgba(254, 225, 169, 1) 60%);
    max-width: 75vw;
    min-width: 340px;
    padding: var(--space-s);
    
    @media screen and (max-width: 960px) {
      max-width: 90vw;
    }
    
    @media screen and (max-width: 720px) {
      max-width: 97vw;
    }
    
  }
  &.misdescriptions{
    background: black;
    max-width: 720px;
    aspect-ratio: 4 / 3;
  }

  &[open] {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    align-items: flex-end;
    /* justify-content: center; */
    border-radius: var(--border-radius);
    border: 1px solid white;
    overflow: auto;
    color: white;
    pointer-events: all;
  }

  &.misdescriptions {
    aspect-ratio: unset;
    height: fit-content;

    &[open] {
      background-color: var(--black);
      align-items: flex-start;
      text-align: left;
      padding: var(--space-m);
    }
  }

  div.video-header,
  div.misdescriptions-header {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    width: 100%;

  }

  div.video-header {
    
    .video-modal-close {
      text-transform: uppercase;
      transition: color var(--transition-time) ease-in-out;

      &:hover {
        color: var(--black);
      }

      &:focus {
        outline: 0px var(--white) solid;
      }
    }
  }

  div.misdescriptions-header {
    justify-content: space-between;
    /* padding: var(--space-m); */

    .video-modal-close {
      text-transform: uppercase;
      transition: color var(--transition-time) ease-in-out;

      &:hover {
        color: var(--custard);
      }
    }
  }

  div.misdescriptions-container {
    width: 100%;
    height: auto;

    /* padding: var(--space-m); */
    h3 {
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }
  }

  div.video-container {
    width: 100%;
    height: auto;
    container-type: inline-size;
    aspect-ratio: 16/9;

    iframe {
      width: 100%;
      height: 56.25cqw;
      aspect-ratio: 16/9;
    }
  }

  &::backdrop {
    background-color: black;
    opacity: 0.55;
  }
}