/* -- Brand fonts (Tay Birdie / Tay Sundae are not on Google Fonts) -- */
@font-face {
  font-family: "Tay Birdie";
  src: url("./fonts/TAYBirdieRegular.woff2") format("woff2"),
       url("./fonts/TAYBirdieRegular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tay Sundae";
  src: url("./fonts/TAYSundaeRegular.woff2") format("woff2"),
       url("./fonts/TAYSundaeRegular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
} 

:root {
  --font-size: 16px;
  --container-width: 100%;
  --side-gutter: 0;
  --gutter: clamp(1.5rem, 1.2444rem + 0.7111vw, 2rem);

  /* design fonts: Figtree (body) + custom TAY fonts */
  --ff-body: "Figtree", Arial, sans-serif;
  --ff-display: "Tay Birdie", cursive;
  --ff-accent: "Tay Sundae", serif;

  /* brand colours (from the design) */
  --white: #ffffff;
  --zon: #f2a500;        /* geel / accent */
  --oceaan: #004181;     /* Club */
  --lagune: #7cc6c7;     /* Club soft */
  --grillvuur: #c1563a;  /* Roast accent */
  --drijfhout: #251a0c;  /* Roast dark */

  /* aliases used in this stylesheet */
  --gold: var(--zon);
  --club: var(--oceaan);
  --roast: var(--drijfhout);

  --radius-lg: 2.5rem;
}

@media (min-width: 576px) {
  :root {
    --container-width: 540px;
  }
}
@media (min-width: 768px) {
  :root {
    --container-width: 720px;
  }
}
@media (min-width: 992px) {
  :root {
    --container-width: 960px;
  }
}
@media (min-width: 1200px) {
  :root {
    --container-width: 1140px;
  }
}
@media (min-width: 1400px) {
  :root {
    --container-width: 1320px;
  }
}
@media all and (min-width: 1500px) {
  :root {
    --container-width: 1440px;
  }
}
@media all and (min-width: 1700px) {
  :root {
    --container-width: 1640px;
  }
}
html {
  font-size: var(--font-size);
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--ff-body);
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1rem;
  color: #fff;
  background: #000;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a {
  text-decoration: none;
}

/* -- Container ----------------------------*/
.container {
  max-width: var(--container-width);
  padding-right: var(--gutter);
  padding-left: var(--gutter);
}

.fw-wrapper {
  --bs-gutter-x: 2rem;
  max-width: var(--container-width);
  padding-right: var(--gutter);
  padding-left: var(--gutter);
  margin: 0 auto;
}

.row > * {
  padding-right: calc(var(--gutter) * 0.5);
  padding-left: calc(var(--gutter) * 0.5);
}

/* -- Switch -------------------------------*/
/* Mobile-first: base = phone layout (overlapping collage) */
.site-switch {
  /* shared size for all three cards/columns: 80% of each 1fr column */
  --card-w: 80%;
  --card-ar: 53 / 88;

  display: grid;
  grid-template-columns: 1.5rem 1fr 1rem 1fr 1.5rem;
  grid-template-rows: 1fr 6em min-content min-content;
  gap: 0;
  min-height: 100svh;
  padding-block: 3rem;
  /* keep the collage phone-sized & centered, also on portrait tablets */
  max-width: 30rem;
  margin-inline: auto;
}

.site-switch > * {
  display: grid;
  place-items: center;
}

/* overlapping collage placement */
.site-switch__center { grid-area: 1 / 1 / 3 / 6; z-index: 1; }
.site-switch__left   { grid-area: 2 / 2 / 5 / 4; z-index: 2; }
.site-switch__right  { grid-area: 2 / 3 / 5 / 5; z-index: 3; }

/* small phones: scale the collage down a touch */
@media (max-width: 575.98px) {
  .site-switch {
    max-width: 27rem;
  }
}

/* -- Switch card (Club / Roast) ----------*/
.switch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  width: 100%;
  aspect-ratio: var(--card-ar);
  padding: clamp(3rem, 11vw, 4.5rem) clamp(1.25rem, 8vw, 2rem);
  color: var(--white);
  text-align: center;
  transition: all 0.5s ease-in-out;
}

/* the coloured pill — visible by default on smaller breakpoints,
   only hidden + hover-revealed on desktop */
.switch-card__panel {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--card-color, var(--club));
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 0;
}

.site-switch__right .switch-card {
  top: 20%;
}

.switch-card--club  { --card-color: var(--club); }
.switch-card--roast { --card-color: var(--roast); }

.switch-card__logos,
.switch-card__cta {
  position: relative;
  z-index: 1;
  width: 100%;
}

.switch-card__logo {
  width: 100%;
  height: auto;
}

.switch-card__cta p {
  margin: 0 0 1.25rem;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1rem, 0.7794rem + 0.3922vw, 1.25rem);
  text-transform: uppercase;
  line-height: 1.25;
}

/* arrow pill: outline by default, filled on hover */
.arrow-pill {
  display: grid;
  place-items: center;
  width: clamp(3rem, 2.1176rem + 1.5686vw, 4rem);;
  height: clamp(3rem, 2.1176rem + 1.5686vw, 4rem);;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: var(--white);
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.arrow-pill i {
  font-size: clamp(1.25rem, 1.0294rem + 0.3922vw, 1.5rem);
  transition: transform .5s;
}

.switch-card:hover .arrow-pill i {
  transform: rotate(45deg);
}

/* -- Hover state: desktop only (driven by :has + JS) ----*/
@media (min-width: 1201px) and (hover: hover) {
  /* on desktop the pills start hidden and reveal on hover */
  .switch-card__panel {
    opacity: 0;
    transform: scale(0.96);
  }

  .switch-card:hover {
    gap: clamp(4rem, 8vw, 7rem);
  }

  .switch-card:hover .switch-card__panel {
    opacity: 1;
    transform: scale(1);
  }

  .switch-card:hover .arrow-pill {
    background: var(--white);
    border-color: var(--white);
    color: var(--card-color);
  }

  /* dim the rest when a card is hovered */
  .site-switch:has(.switch-card:hover) .switch-card:not(:hover),
  .site-switch:has(.switch-card:hover) .site-switch__intro {
    opacity: 0;
  }
}

/* -- Center intro -------------------------*/
.site-switch__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  aspect-ratio: var(--card-ar);
  padding: 5rem 2.5rem;
  border: 0.1875rem solid var(--zon);
  border-radius: 999px;
  text-align: center;
  transition: opacity 0.5s ease;
}

/* language switch: plain text, active gets a white outlined pill */
.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-switch__btn {
  margin: 0 0.2rem;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 700;
  padding: 16px 6px;
  border: 2px solid transparent;
  border-radius: 999px;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background .5s;
}

.lang-switch__btn:hover {
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.15);
}

.lang-switch__btn.is-active {
  border: 2px solid var(--white);
  background: none;
}

.site-switch__text {
  margin: 0;
  color: var(--white);
  font-family: var(--ff-display);
  font-size: clamp(1rem, 0.6rem + 1vw, 1.25rem);
  line-height: 1.5;
  text-transform: uppercase;
}

.site-switch__signature {
  margin: 0 0 2rem;
  color: var(--white);
  font-family: var(--ff-accent);
  font-size: clamp(1.4rem, 1.3538rem + 0.2051vw, 1.5rem);
  line-height: 1.5;
}

/* -- Layers -------------------------------*/
.site-wrapper {
  position: relative;
  z-index: 2;
}

.site-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #000;
}

/* dim overlay so text/logos stay legible */
.site-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 30, 0.55);
  z-index: 2;
}

.site-background__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* the photo that fades in on hover */
.site-background__hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 3;
}

.site-background__hover.is-active {
  opacity: 1;
}

/* -- Landscape tablet & desktop: shared card / logo sizing ----*/
@media (min-width: 901px) and (orientation: landscape) {
  .switch-card {
    max-width: var(--card-w);
    padding-inline: clamp(1.5rem, 3vw, 2.75rem);
  }

  /* logos sized by width with natural height (Roast is taller than Club) */
  .switch-card__logos {
    width: 100%;
    display: grid;
    place-items: center;
  }

  .switch-card__logo {
    width: 65%;
    height: auto;
  }

  /* no collage offset when side-by-side */
  .site-switch__right .switch-card {
    top: 0;
  }
}

/* -- Tablet landscape (intro centered, pills overlapping the sides) ----*/
@media (min-width: 901px) and (max-width: 1200px) and (orientation: landscape) {
  .site-switch {
    --overlap: 1.25rem;

    display: flex;
    justify-content: center;
    align-items: center;
    max-width: none;
    height: 100svh;
    padding-block: 0;
    padding-inline: clamp(1.5rem, 4vw, 4rem);
  }

  /* don't let flex squash the ovals out of ratio */
  .site-switch > * {
    flex-shrink: 0;
  }
  
  .switch-card__logo {
    width: 80%;
    height: auto;
  }

  /* pills sit on top and overlap the intro a touch */
  .site-switch__center { z-index: 1; }
  .site-switch__left   { z-index: 2; margin-inline-end: calc(-1 * var(--overlap)); }
  .site-switch__right  { z-index: 2; margin-inline-start: calc(-1 * var(--overlap)); }

  /* explicit width + height (ratio 53/88) so flex can't squash them
     and the height stays the driver to fit the viewport */
  .site-switch__intro {
    --h: min(88svh, 46rem);
    width: calc(var(--h) * 53 / 88);
    height: var(--h);
    max-width: none;
    aspect-ratio: auto;
  }

  .switch-card {
    --h: min(56svh, 30rem);
    width: calc(var(--h) * 53 / 88);
    height: var(--h);
    max-width: none;
    aspect-ratio: auto;
  }
}

/* -- Desktop (three equal ovals, spread & centered) ---------*/
@media (min-width: 1201px) {
  .site-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: center;
    gap: 1rem;
    max-width: 100%;
    height: 100svh;
    padding-block: 0;
    padding-inline: 0;
  }

  /* drop collage placement; lay out left | center | right */
  .site-switch__center,
  .site-switch__left,
  .site-switch__right {
    grid-area: auto;
    z-index: auto;
  }

  .site-switch__right .switch-card {
    top: 0;
  }

  /* ring proportion from the design: min(52rem, 92dvh), ratio 0.5826,
     plus a width-cap so the three ovals never overlap on narrow desktops */
  .site-switch__intro,
  .switch-card {
    --h: min(80svh, 56rem, calc((100vw - 5rem) / 3 / 0.5826));
    width: calc(var(--h) * 0.5826);
    height: var(--h);
    max-width: none;
    aspect-ratio: auto;
  }
}
