/* ==========================================================================
   Aldersgate House
   Sizes are in rem. On desktop 1rem = 16px at the 1728px design width and
   scales with the viewport, so the layout matches the Figma at any width.
   ========================================================================== */

/* PP Fragment (headings) - add the licensed web font files to /fonts */
@font-face {
  font-family: "PP Fragment";
  src: url("../fonts/PPFragment-TextRegular.woff2") format("woff2"),
       url("../fonts/PPFragment-TextRegular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #FF705C;
  --pink: #FFE9EA;
  --burgundy: #5D1A26;
  --serif: "PP Fragment", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "stevie-sans", "Helvetica Neue", Arial, sans-serif;
  /* Adobe Fonts kit qfo8wrn has Stevie Sans Regular (500) and Bold (700).
     The design also uses Medium for the download buttons, the developer name
     and the credit line. Medium isn't in the kit yet, so it uses Regular for
     now; once Medium is added, set this to its weight. */
  --w-regular: 500;
  --w-medium: 500;
  --w-bold: 700;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 0.9259259vw; /* 16px at 1728px */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: var(--w-regular);
  color: var(--burgundy);
  background-color: var(--pink);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a[href^="mailto:"]:hover, .small a:hover { text-decoration: underline; }
address { font-style: normal; }
strong { font-weight: var(--w-bold); }
.fw-medium { font-weight: var(--w-medium); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.load-hidden { visibility: hidden; }
.no-js .load-hidden { visibility: visible; }

.image-fill { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

.bg-pink { background-color: var(--pink); }
.bg-burgundy { background-color: var(--burgundy); color: var(--pink); }

.frame { border: 1px solid var(--red); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 6rem;
  line-height: 1.1458em;
  text-transform: uppercase;
}
.display-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 4.375rem;
  line-height: 1.0857em;
  text-transform: uppercase;
}

/* Intro ------------------------------------------------------------------ */

.intro {
  position: relative;
  overflow: hidden;
  background: #FFD0D0 url("../img/bg-texture.jpg") center / cover no-repeat;
}
.intro-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1728 / 1027;
}
.intro-word, .intro-logo { position: absolute; height: auto; max-width: none; }

/* positions are the Figma coordinates as a percentage of the 1728 x 1027 stage */
.intro-word { transition: transform 0.8s ease-out; will-change: transform; }
.intro-word-1 { left: 4.2245%;  top: 18.2083%; width: 90.8565%; transform: translateX(-110vw); }
.intro-word-2 { left: 4.1088%;  top: 42.0643%; width: 48.2639%; transform: translateX(-110vw); }
.intro-word-3 { left: 72.6273%; top: 42.0643%; width: 23.2639%; transform: translateX(110vw); }
.intro-word-4 { left: 4.1088%;  top: 65.8228%; width: 91.7245%; transform: translateX(110vw); }

.intro-logo {
  left: 35.0116%; top: 26.0954%; width: 29.9769%;
  transition: left 0.8s ease-out, top 0.8s ease-out, width 0.8s ease-out;
}

.intro.is-open .intro-word { transform: none; }
.intro.is-open .intro-logo { left: 56.1574%; top: 41.1879%; width: 12.037%; }

/* Connected Workspace ---------------------------------------------------- */

.about { padding: 3.75rem; text-align: center; }
.about .frame { padding: 7rem 2.875rem 2.8125rem; }
.about-copy {
  width: 67rem;
  max-width: 100%;
  margin: 2.8125rem auto 0;
  font-size: 1.75rem;
  line-height: 1.2em;
}
.about-copy p + p { margin-top: 1.875rem; }
.about-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4.9375rem;
}
.roundel { width: 4.375rem; height: 4.375rem; }

/* Gallery ---------------------------------------------------------------- */

.gallery { position: relative; overflow: hidden; background-color: var(--burgundy); }
.gallery-slide { position: relative; height: 60rem; }
.gallery-frame {
  position: absolute;
  top: 3.75rem; right: 3.75rem; bottom: 3.75rem; left: 3.75rem;
  border: 1px solid var(--red);
  pointer-events: none;
  z-index: 5;
}
.gallery-caption {
  position: absolute;
  left: 5.375rem;
  bottom: 5.375rem;
  font-size: 2rem;
  line-height: 1em;
  color: var(--pink);
  pointer-events: none;
  z-index: 6;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 4.375rem;
  height: 4.375rem;
  margin-top: -2.1875rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  z-index: 10;
}
.gallery-arrow svg { display: block; width: 100%; height: 100%; }
.gallery-arrow path { fill: var(--pink); transition: fill 0.3s ease-out; }
.gallery-prev { left: 5.8125rem; transform: rotate(180deg); }
.gallery-next { right: 5.75rem; }
.gallery-arrow:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* Get in touch ----------------------------------------------------------- */

.contact { padding: 3.75rem 3.75rem 4.375rem; }
.contact .frame { padding: 5.4375rem 4.1875rem 4.75rem; }

.contact-main { display: flex; justify-content: space-between; }
.contact-left { width: 29.3125rem; flex: none; }
.contact-right { width: 54.4375rem; flex: none; padding-top: 0.75rem; }

.downloads { margin-top: 4.9375rem; }
.download-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
  padding: 0 1.25rem 0 1.0625rem;
  font-size: 1.5rem;
  font-weight: var(--w-medium);
  line-height: 1em;
  color: var(--pink);
  border: 1px solid var(--pink);
  transition: border-color 0.3s ease-out;
}
.download-link + .download-link { margin-top: 1.625rem; }
.download-link .text { transition: transform 0.3s ease-out; }
.download-arrow { width: 1.75rem; height: 1.5625rem; flex: none; transition: transform 0.3s ease-out; }
.download-arrow path { fill: var(--pink); transition: fill 0.3s ease-out; }
.download-link:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

.rule-top { border-top: 1px solid var(--red); padding-top: 0.75rem; }
.info-block h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2em;
  text-transform: uppercase;
}
.info-block p { margin-top: 1.25rem; font-size: 1.25rem; line-height: 1.2em; }

.agents { display: flex; margin-top: 2.75rem; }
.agent { width: 20.9375rem; font-size: 1.25rem; line-height: 2rem; }
.agent-logo { display: flex; align-items: flex-end; height: 3.9375rem; margin-bottom: 2.8125rem; }
.agent01 { height: 3.9375rem; width: auto; }
.agent02 { height: 2.1875rem; width: auto; }
.agent p + p { margin-top: 2rem; }

.info-row { display: flex; justify-content: space-between; margin-top: 3.5625rem; }
.info-row .info-block { width: 25.125rem; }
.developer .ucg { width: 11.5rem; height: auto; margin: 1.6875rem 0 1rem 0.1875rem; }
.developer p { margin-top: 0; line-height: 2rem; }

.contact-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 4.5rem;
}
.address { width: 29.3125rem; font-size: 1.75rem; line-height: 1.2em; color: var(--red); }
.small { width: 54.5625rem; font-size: 0.875rem; line-height: 1em; }
.small p + p { margin-top: 0.875rem; }

/* Hover states ----------------------------------------------------------- */

@media (hover: hover) {
  .gallery-arrow:hover path { fill: var(--red); }
  .download-link:hover { border-color: var(--red); }
  .download-link:hover .text { transform: translateX(0.5rem); }
  .download-link:hover .download-arrow { transform: rotate(90deg); }
  .download-link:hover .download-arrow path { fill: var(--red); }
}

.d-mobile { display: none; }

/* Mobile ------------------------------------------------------------------
   1rem = 16px at 400px wide, as on the previous scheme's site.
   ------------------------------------------------------------------------ */

@media (max-width: 767px) {
  html { font-size: 4vw; }
  .d-desktop { display: none; }
  .d-mobile { display: block; }

  .display { font-size: 2.5rem; line-height: 1.1em; }
  .display-sm { font-size: 2.5rem; line-height: 1.1em; }

  .intro { padding: 5.5rem 0; }

  .about { padding: 1rem; }
  .about .frame { padding: 3rem 1.25rem 1.25rem; }
  .about-copy { margin-top: 1.75rem; font-size: 1.125rem; line-height: 1.3333em; }
  .about-copy p + p { margin-top: 1.25rem; }
  .about-icons { margin-top: 2.5rem; }
  .roundel { width: 3rem; height: 3rem; }

  .gallery-slide { height: 22.5rem; }
  .gallery-frame { top: 1rem; right: 1rem; bottom: 1rem; left: 1rem; }
  .gallery-caption { left: 1.75rem; bottom: 1.75rem; font-size: 1.125rem; }
  .gallery-arrow { width: 2.75rem; height: 2.75rem; margin-top: -1.375rem; }
  .gallery-prev { left: 1.75rem; }
  .gallery-next { right: 1.75rem; }

  .contact { padding: 1rem; }
  .contact .frame { padding: 2.5rem 1.25rem 2rem; }
  .contact-main { display: block; }
  .contact-left, .contact-right { width: 100%; }
  .contact-right { padding-top: 0; margin-top: 3rem; }

  .downloads { margin-top: 2rem; }
  .download-link { height: 3.5rem; padding: 0 1rem; font-size: 1.125rem; }
  .download-link + .download-link { margin-top: 1rem; }
  .download-arrow { width: 1.25rem; height: 1.125rem; }

  .info-block h3 { font-size: 1.25rem; }
  .info-block p { margin-top: 0.75rem; font-size: 1rem; }

  .agents { display: block; margin-top: 2rem; }
  .agent { width: 100%; font-size: 1rem; line-height: 1.5rem; }
  .agent + .agent { margin-top: 2.5rem; }
  .agent-logo { height: auto; margin-bottom: 1.25rem; }
  .agent01 { height: 3rem; }
  .agent02 { height: 1.625rem; }
  .agent p + p { margin-top: 1rem; }

  .info-row { display: block; margin-top: 2.5rem; }
  .info-row .info-block { width: 100%; }
  .info-row .info-block + .info-block { margin-top: 2.5rem; }
  .developer .ucg { width: 8.5rem; margin: 1.25rem 0 0.75rem; }
  .developer p { line-height: 1.5rem; }

  .contact-foot { display: block; margin-top: 3rem; }
  .address { width: 100%; font-size: 1.25rem; }
  .small { width: 100%; margin-top: 1.5rem; font-size: 0.75rem; line-height: 1.2em; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-word, .intro-logo, .download-link .text, .download-arrow { transition: none; }
}

/* Exterior CGI is taller than the slide: keep the top of the tower and the street in view */
.pos-exterior { object-position: 50% 28%; }
