/* Grupo JESDA. Brand colors sampled from the logo; the cut angle is the slope of the J mark. */

:root {
  --navy: #052a5b;
  --navy-deep: #031b3c;
  --grey: #6d6e71;
  --grey-light: #c9cacd;
  --mist: #eceef1;
  --white: #ffffff;
  --muted: #4a5466;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.5rem, 2.2vw, 1.875rem);
  --step-3: clamp(2.25rem, 4.6vw, 4.25rem);
  --step-4: clamp(2.5rem, 5.2vw, 5.25rem);
  --fascia: clamp(3.75rem, 13vw, 12.5rem);

  --cut: 1.75rem;
  --cut-run: calc(var(--cut) / 0.643);

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 82rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
.fascia,
.edition-date,
.next-name a,
.next-days {
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

h3 {
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.15;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--white);
  padding: 0.5rem 1rem;
}

/* The JESDA cut: top-left corner sliced at the J mark's angle */

.cut,
.btn {
  clip-path: polygon(0 var(--cut), var(--cut-run) 0, 100% 0, 100% 100%, 0 100%);
}

/* Buttons */

.btn {
  --cut: 0.85rem;
  display: inline-block;
  padding: 0.95rem 1.6rem 0.95rem 1.9rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-stretch: 110%;
  text-decoration: none;
  transition: background-color 0.15s;
}

.btn:hover {
  background: var(--grey);
}

.btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: -6px;
}

.btn-light {
  background: var(--white);
  color: var(--navy);
}

.btn-light:hover {
  background: var(--grey-light);
}

.btn-light:focus-visible {
  outline-color: var(--navy);
}

.text-link {
  font-weight: 600;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.5rem;
}

.brand img {
  width: 9.5rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 600;
  font-size: 1rem;
}

.nav-link {
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.lang {
  display: flex;
  font-size: var(--step--1);
  font-weight: 700;
}

.lang a,
.lang span {
  padding: 0.3rem 0.65rem;
  text-decoration: none;
  border: 2px solid var(--navy);
}

.lang a + span,
.lang span + a {
  border-left: 0;
}

.lang span {
  background: var(--navy);
  color: var(--white);
}

/* Hero */

.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: min(82vh, 52rem);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.hero h1 {
  font-size: var(--step-4);
  max-width: 13ch;
}

.hero-lede {
  margin-top: 1.75rem;
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 32ch;
  color: #d5dcea;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
}

.hero .text-link:focus-visible {
  outline-color: var(--white);
}

.hero-mark {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.mark-window {
  position: relative;
  isolation: isolate;
  height: min(68vh, 40rem);
  aspect-ratio: 570 / 825;
}

.mark-video,
.mark-tint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mark-video {
  object-fit: cover;
  clip-path: url(#clip-mark);
}

.mark-tint {
  display: block;
  mix-blend-mode: color;
}

.mark-tint-navy {
  background: #1d4f9a;
  clip-path: url(#clip-navy);
}

.mark-tint-grey {
  background: var(--grey);
  clip-path: url(#clip-grey);
}

.video-toggle {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  color: #d5dcea;
  background: none;
  border: 0;
  padding: 0.25rem 0;
  text-decoration: underline;
  text-underline-offset: 0.3em;
  cursor: pointer;
}

.video-toggle:focus-visible {
  outline-color: var(--white);
}

.clip-defs {
  position: absolute;
  width: 0;
  height: 0;
}

/* Next expo strip */

.next-expo {
  background: var(--grey);
  color: var(--white);
}

.next-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  padding-block: 1.6rem;
}

.next-label {
  font-weight: 600;
}

.next-name a {
  font-size: var(--step-2);
  text-decoration: none;
}

.next-name a:hover {
  text-decoration: underline;
}

.next-name a:focus-visible {
  outline-color: var(--white);
}

.next-name span {
  margin-left: 0.75rem;
  font-weight: 500;
}

.next-days {
  font-size: var(--step-2);
}

/* Expos */

.expos {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.expos-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
  align-items: start;
  gap: 2rem 3rem;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.expos-intro h2 {
  font-size: var(--step-3);
}

.expos-intro p {
  max-width: 46ch;
  color: var(--muted);
}

.expo-logo {
  width: 13rem;
  background: var(--navy);
  padding: 1.25rem 1.5rem;
}

.edition + .edition {
  margin-top: clamp(4rem, 9vw, 8rem);
}

.fascia {
  font-size: var(--fascia);
  line-height: 0.85;
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
  margin-left: -0.05em;
}

.edition-flip .fascia {
  text-align: right;
}

.edition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.edition-flip .edition-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
}

.edition-flip .edition-grid > img {
  order: 2;
}

.edition-grid > img {
  --cut: 3.5rem;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.edition-date {
  font-size: var(--step-2);
  line-height: 1.1;
}

.edition-venue {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--grey);
}

.edition-info > p:not(.edition-date):not(.edition-venue):not(.partners-label) {
  margin-top: 1.5rem;
  color: var(--muted);
  max-width: 44ch;
}

.partners-label {
  margin-top: 2rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--grey);
}

.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.partners img {
  height: 2.75rem;
  width: auto;
}

.edition-info .btn {
  margin-top: 2.25rem;
}

/* Services photo essay */

.services {
  background: var(--mist);
  padding-block: clamp(4rem, 9vw, 8rem);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.section-head h2 {
  font-size: var(--step-3);
}

.section-head p {
  color: var(--muted);
  max-width: 40ch;
}

.essay {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 2vw, 1.75rem);
}

.essay figure img {
  --cut: 2.25rem;
  width: 100%;
  object-fit: cover;
}

.essay figcaption {
  margin-top: 1rem;
  max-width: 36ch;
}

.essay h3 {
  font-size: var(--step-1);
}

.essay figcaption p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 1rem;
}

.essay-a {
  grid-column: 1 / 8;
}

.essay-a img {
  aspect-ratio: 4 / 3;
}

.essay-b {
  grid-column: 8 / 13;
  align-self: end;
}

.essay-b img {
  aspect-ratio: 4 / 5;
}

.essay-c {
  grid-column: 1 / 5;
}

.essay-d {
  grid-column: 5 / 9;
  margin-top: 4rem;
}

.essay-e {
  grid-column: 9 / 13;
}

.essay-c img,
.essay-d img,
.essay-e img {
  aspect-ratio: 1 / 1;
}

.essay-f {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.5rem clamp(1rem, 2vw, 1.75rem);
  align-items: end;
}

.essay-f img {
  aspect-ratio: 21 / 9;
  object-position: center 40%;
}

/* Technology */

.tech {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 6px solid var(--navy);
}

.product {
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 4vw, 3rem) clamp(0rem, 3vw, 3rem) 0 0;
}

.product + .product {
  border-left: 6px solid var(--grey);
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
}

.product:last-child {
  padding-right: 0;
}

.product h3 {
  height: 3.25rem;
  display: flex;
  align-items: center;
}

.product h3 img {
  height: 100%;
  width: auto;
}

.planhall-name,
.relevo-name {
  gap: 0.75rem;
  font-size: 2.6rem;
  font-stretch: 100%;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #122b26;
}

.relevo-name {
  color: #0b1120;
}

.product .planhall-name img,
.product .relevo-name img {
  height: 2.5rem;
}

.product-tagline {
  margin-top: 1.5rem;
  font-size: var(--step-2);
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.2;
}

.product > p:not(.product-tagline) {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 46ch;
}

.product ul {
  margin: 1.75rem 0 2.25rem;
  padding: 0;
  list-style: none;
}

.product li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--grey-light);
  font-weight: 500;
}

.product li:first-child {
  border-top: 1px solid var(--grey-light);
}

.product .btn {
  margin-top: auto;
  align-self: flex-start;
  white-space: nowrap;
}

/* Contact */

.contact {
  background: var(--grey);
  color: var(--white);
  padding-block: clamp(4.5rem, 10vw, 8.5rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: end;
}

.contact h2 {
  font-size: var(--step-4);
}

.contact p {
  max-width: 38ch;
}

.contact .btn {
  margin-top: 2rem;
}

/* Footer */

.site-footer {
  background: var(--navy-deep);
  color: #b9c3d6;
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem 3rem;
  padding-block: 2.5rem;
}

.footer-logo {
  width: 8.5rem;
  filter: brightness(0) invert(1);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--white);
  text-underline-offset: 0.25em;
}

.site-footer :focus-visible {
  outline-color: var(--white);
}

/* Responsive */

@media (max-width: 1080px) {
  .expos-intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }

  .expo-logo {
    grid-column: 1;
    grid-row: 2;
  }

  .planhall-name,
  .relevo-name {
    font-size: 2.2rem;
  }
}

@media (max-width: 900px) {
  .site-nav {
    gap: 1.25rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-mark {
    grid-row: 1;
    justify-self: start;
    align-items: flex-start;
  }

  .mark-window {
    height: min(46vh, 22rem);
  }

  .next-grid {
    grid-template-columns: 1fr auto;
  }

  .next-label {
    grid-column: 1 / -1;
  }

  .edition-grid,
  .edition-flip .edition-grid,
  .section-head,
  .contact-grid,
  .products {
    grid-template-columns: 1fr;
  }

  .edition-flip .edition-grid > img {
    order: 0;
  }

  .product + .product {
    border-left: 0;
    border-top: 6px solid var(--grey);
    padding-left: 0;
    margin-top: 3rem;
  }

  .product {
    padding-right: 0;
  }

  .essay-a,
  .essay-b {
    grid-column: 1 / 13;
  }

  .essay-b img {
    aspect-ratio: 4 / 3;
  }

  .essay-c,
  .essay-d {
    grid-column: span 6;
    margin-top: 0;
  }

  .essay-e {
    grid-column: 1 / 13;
  }

  .essay-e img {
    aspect-ratio: 16 / 9;
  }

  .essay-f {
    grid-template-columns: 1fr;
  }

  .essay-f img {
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 640px) {
  .nav-link {
    display: none;
  }

  .brand img {
    width: 8rem;
  }

  .expos-intro {
    grid-template-columns: 1fr;
  }

  .expo-logo {
    grid-row: auto;
  }

  .edition-flip .fascia {
    text-align: left;
  }

  .essay-c,
  .essay-d,
  .essay-e {
    grid-column: 1 / 13;
  }

  .essay-c img,
  .essay-d img,
  .essay-e img {
    aspect-ratio: 4 / 3;
  }

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

  .next-name span {
    display: block;
    margin: 0.35rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
