/* The landing plate: a portrait, the mark, and the links around them. */

/* This stylesheet belongs to the plate alone, so it can speak for the root
   element: the page is one fixed screen. Saying it here too stops the mobile
   browsers that ignore it on <body> from scrolling it. A pinch still zooms;
   a double tap on a pill does not. */
html {
  height: 100%;
  overflow: hidden;
  touch-action: manipulation;
  overscroll-behavior: none;
}

.plate {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
  font-size: var(--micro);
  line-height: 1.6;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

@supports not (height: 100svh) {
  .plate {
    min-height: 100vh;
  }
}

.plate > * {
  position: absolute;
}

/* --------------------------------------------------------------- layers */

.trace,
.rails {
  inset: 0;
  pointer-events: none;
}

/* --cell-w / --cell-h are written on :root by site.js so the ruler ticks
   divide the screen evenly. */
.trace {
  width: 100%;
  height: 100%;
}

.rails > i {
  position: absolute;
  display: block;
}

.rail {
  background-repeat: repeat;
}

.rail--top {
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  background-image: repeating-linear-gradient(to right, var(--rule) 0 1px, transparent 1px 8px);
}

.rail--left {
  top: 0;
  bottom: 0;
  left: 0;
  width: 9px;
  background-image: repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 8px);
}

.ticks {
  opacity: 0.55;
}

.ticks--top {
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background-size: var(--cell-w, 72px) 100%;
  background-image: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 100%);
}

.ticks--left {
  top: 0;
  bottom: 0;
  left: 0;
  width: 16px;
  background-size: 100% var(--cell-h, 72px);
  background-image: repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 100%);
}

/* corner crop marks */
.crop {
  width: 26px;
  height: 26px;
}

.crop::before,
.crop::after {
  content: '';
  position: absolute;
  background: var(--ink);
}

.crop::before {
  width: 26px;
  height: 1px;
}

.crop::after {
  width: 1px;
  height: 26px;
}

.crop--tl { top: var(--edge); left: var(--edge); }
.crop--tr { top: var(--edge); right: var(--edge); }
.crop--bl { bottom: var(--edge); left: var(--edge); }
.crop--br { bottom: var(--edge); right: var(--edge); }

.crop--tl::before, .crop--tl::after { top: 0; left: 0; }
.crop--tr::before { top: 0; right: 0; }
.crop--tr::after { top: 0; right: 0; }
.crop--bl::before { bottom: 0; left: 0; }
.crop--bl::after { bottom: 0; left: 0; }
.crop--br::before { bottom: 0; right: 0; }
.crop--br::after { bottom: 0; right: 0; }

.reticle {
  top: 24px;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.reticle::before,
.reticle::after {
  content: '';
  position: absolute;
  background: var(--ink);
}

.reticle::before {
  top: 50%;
  left: -7px;
  right: -7px;
  height: 1px;
}

.reticle::after {
  left: 50%;
  top: -7px;
  bottom: -7px;
  width: 1px;
}

/* ------------------------------------------------------------- readouts */

.readout {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}

.readout p {
  margin: 0;
  display: flex;
  gap: 18px;
  align-items: baseline;
}

/* The four corners share one inset: the crop marks stand at --edge, and
   whatever sits in a corner keeps the same distance from its mark, across
   and down alike (--inset). Text lines carry a few pixels of leading above
   and below the letters, so text corners pull in by --lead to put the
   visible letters, not the line box, on the inset. */
.plate {
  --inset: calc(var(--edge) + 16px);
  --lead: 4px;
}

.readout--tl {
  top: calc(var(--inset) - var(--lead));
  left: var(--inset);
}

.readout--tr {
  top: calc(var(--inset) + 32px);
  right: var(--inset);
  align-items: flex-end;
}

/* top right: two squares of one size — the LinkedIn page in its blue, and
   the language in ink, which opens a small list of the three */
.topbar {
  top: var(--inset);
  right: var(--inset);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.linkedin,
.lang__current {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  color: #ffffff;
  transition: background-color 140ms ease;
}

.linkedin {
  background: #0a66c2;
}

.linkedin svg {
  width: 11px;
  height: 11px;
}

.linkedin:hover,
.linkedin:focus-visible {
  background: #004182;
}

.lang {
  position: relative;
  margin: 0;
}

.lang__current {
  background: var(--ink);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.lang__current::-webkit-details-marker {
  display: none;
}

.lang__current:hover,
.lang[open] .lang__current {
  background: #3a3a3a;
}

.linkedin:focus-visible,
.lang__current:focus-visible {
  outline: 1px dashed var(--ink);
  outline-offset: 3px;
}

/* the list: a small glass card under the square */
.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 132px;
  padding: 6px;
  border: 1px solid rgb(10 10 10 / 12%);
  border-radius: 10px;
  background: rgb(255 255 255 / 80%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 80%) inset, 0 14px 32px -14px rgb(10 10 10 / 30%);
}

.lang__menu a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--mute);
  font-weight: 500;
  transition: color 140ms ease, background-color 140ms ease;
}

.lang__menu a span {
  color: var(--faint);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
}

.lang__menu a:hover,
.lang__menu a:focus-visible {
  color: var(--ink);
  background: rgb(10 10 10 / 5%);
}

.lang__menu a[aria-current='true'] {
  color: var(--ink);
}

.readout--bl {
  bottom: calc(var(--inset) - var(--lead));
  left: var(--inset);
  gap: 2px;
}

.ink {
  color: var(--ink);
  font-weight: 500;
}

/* the one link among the readouts: as quiet as the labels around it, with a
   hit area larger than its ten pixels of type */
.readout a {
  margin: -8px 0 -8px -12px;
  padding: 8px 0 8px 12px;
  color: inherit;
  transition: color 140ms ease;
}

.readout a:hover,
.readout a:focus-visible {
  color: var(--ink);
}

/* ------------------------------------------------- elements of the posts */

/* Three marks borrowed from the goossens.ai social posts (brand/kit/elements):
   the studio coordinates under the address, a status chip under the cursor
   readout and "GOOSSENS" in hex bytes up the right edge. All in the readout
   voice, none of them clickable. */
.coords {
  color: var(--faint);
}

.readout .status {
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  padding: 1px 7px 1px 6px;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 500;
}

.status i {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00efcb;
  animation: status-beat 2.4s ease-in-out infinite;
}

@keyframes status-beat {
  50% { opacity: 0.3; }
}

.edge {
  top: 50%;
  right: calc(var(--edge) - 6px);
  margin: 0;
  color: var(--faint);
  letter-spacing: 0.2em;
  text-transform: none; /* 0x47, not 0X47 */
  white-space: nowrap;
  writing-mode: vertical-rl;
  translate: 0 -50%;
  pointer-events: none;
}

.edge span {
  color: var(--rule);
}

/* ----------------------------------------------------------------- card */

.card {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 32px;
  pointer-events: none;
}

.card__frame {
  position: relative;
}

/* the photo and the mark together: one target that turns the portrait */
.card__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 4svh, 40px);
  pointer-events: auto;
}

/* the portrait sits on white like the page, so it needs no frame of its own;
   until it arrives the slot is a hairline plate with a centre mark */
.card__photo {
  position: relative;
  width: min(36svh, 67vw, 322px);
  min-width: 140px;
  aspect-ratio: 1856 / 2304;
  margin: 0;
}

/* both portraits share one box, so turning round cannot move anything; the
   front one lies on top and only it fades — the back one stays opaque under
   it, so the crossfade never shows white through */
.portrait {
  position: absolute;
  inset: 0;
  display: block;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portrait--front {
  opacity: 0;
  transition: opacity 200ms ease;
}

.card__stage.is-front .portrait--front {
  opacity: 1;
}

/* during the glitch the canvas does the transition; the swap under it is
   instant */
.card__stage.is-glitching .portrait--front {
  transition: none;
}

.portrait__glitch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* invisible, over the photo and the mark: the hit area, the keyboard stop
   and the pressed state for assistive tech */
.card__turn {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card__turn:focus-visible {
  outline: 1px dashed var(--ink);
  outline-offset: 8px;
}

.card__photo.is-empty {
  border: 1px solid var(--line);
}

.card__photo.is-empty::before,
.card__photo.is-empty::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--rule);
}

.card__photo.is-empty::before {
  width: 22px;
  height: 1px;
  margin-left: -11px;
}

.card__photo.is-empty::after {
  width: 1px;
  height: 22px;
  margin-top: -11px;
}

.card__mark {
  margin: 0;
  color: var(--ink);
  line-height: 0;
}

.wordmark {
  display: block;
  width: clamp(150px, 24vw, 268px);
  height: auto;
  overflow: visible;
  /* the burst of the logo animation scales it from its middle */
  transform-origin: 50% 50%;
}

/* ---------------------------------------------------------------- chips */

/* Six glass pills around the portrait. On white the glass reads as a frosted
   plate with a hairline; over the photo it blurs what is under it. They
   float a few pixels, each on its own beat. */
.chips {
  position: absolute;
  inset: 0 0 auto;
  height: var(--stage-h, 100%);
  pointer-events: none;
}

.chip {
  position: absolute;
  z-index: 2;
  pointer-events: auto;
  /* on load the pills roll in one by one once the portrait and the mark
     are standing: --i is each pill's place in the queue */
  animation: chip-in 560ms cubic-bezier(0.2, 0.7, 0.2, 1) calc(450ms + var(--i, 0) * 100ms) both;
}

.chip--1 { --i: 0; }
.chip--2 { --i: 1; }
.chip--3 { --i: 2; }
.chip--4 { --i: 3; }
.chip--5 { --i: 4; }
.chip--6 { --i: 5; }

@keyframes chip-in {
  from {
    opacity: 0;
    translate: 0 10px;
    scale: 0.94;
  }
}

/* three on the left of the portrait, three on the right, never over it */
.chip--1 { top: 6%; right: calc(100% + 56px); --beat: -1.1s; }
.chip--2 { top: 36%; right: calc(100% + 28px); --beat: -3.4s; }
.chip--3 { top: 66%; right: calc(100% + 64px); --beat: -5.2s; }
.chip--4 { top: 16%; left: calc(100% + 40px); --beat: -2.3s; }
.chip--5 { top: 46%; left: calc(100% + 64px); --beat: -4.6s; }
.chip--6 { top: 76%; left: calc(100% + 32px); --beat: -0.4s; }

@keyframes chip-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

.chip__pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 9px 15px 9px 12px;
  border: 1px solid rgb(10 10 10 / 12%);
  border-radius: 999px;
  background: rgb(255 255 255 / 55%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 80%) inset, 0 8px 24px -10px rgb(10 10 10 / 22%);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--track);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  animation: chip-float 6.5s ease-in-out var(--beat, 0s) infinite;
}

/* one signal stop per pill */
.chip__pill::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--dot, var(--ink));
}

.chip--1 { --dot: #ff2383; }
.chip--2 { --dot: #360cfe; }
.chip--3 { --dot: #00efcb; }
.chip--4 { --dot: #1cb3ff; }
.chip--5 { --dot: #f7ce00; }
.chip--6 { --dot: #0a0a0a; }

.chip__pill:hover,
.chip.is-active .chip__pill {
  border-color: rgb(10 10 10 / 32%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 80%) inset, 0 10px 28px -10px rgb(10 10 10 / 30%);
}

.chip__pill[aria-expanded='true'] {
  border-color: var(--ink);
}

.chip__pill:focus-visible {
  outline: 1px dashed var(--ink);
  outline-offset: 4px;
}

/* The one panel. It always stands in the same place, under the mark, and
   only its text changes from pill to pill. */
.chips__panel {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  z-index: 4;
  width: min(440px, calc(100vw - 40px));
  padding: 14px 18px 15px 34px;
  border: 1px solid rgb(10 10 10 / 12%);
  border-radius: 14px;
  background: rgb(255 255 255 / 72%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 80%) inset, 0 18px 40px -16px rgb(10 10 10 / 28%);
  color: var(--mute);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-transform: none;
  -webkit-user-select: text;
  user-select: text;
  opacity: 0;
  visibility: hidden;
  translate: -50% -4px;
  transition: opacity 160ms ease, translate 160ms ease, visibility 0s linear 160ms;
}

/* the active pill's stop, so the panel says whose text it is */
.chips__panel::before {
  content: '';
  position: absolute;
  top: 21px;
  left: 18px;
  width: 6px;
  height: 6px;
  background: var(--dot, var(--ink));
}

.chips__panel.is-open {
  opacity: 1;
  visibility: visible;
  translate: -50% 0;
  transition: opacity 160ms ease, translate 160ms ease;
}

.chips__panel p {
  margin: 0;
}

.chips__panel p:first-child {
  color: var(--ink);
  font-weight: 500;
}

.chips__panel p + p {
  margin-top: 4px;
}

/* -------------------------------------------------------------- palette */

.palette {
  bottom: calc(var(--inset) + 28px);
  right: var(--inset);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.palette p {
  margin: 0;
  display: flex;
  gap: 14px;
  align-items: baseline;
  white-space: nowrap;
}

.palette__stops {
  display: flex;
  border: 1px solid var(--line);
}

.palette__stops i {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  transform-origin: bottom;
  transition: transform 120ms ease;
}

/* the five stops, in CSS so they survive with scripting off */
.palette__stops i:nth-child(1) { background: #ff2383; }
.palette__stops i:nth-child(2) { background: #360cfe; }
.palette__stops i:nth-child(3) { background: #00efcb; }
.palette__stops i:nth-child(4) { background: #1cb3ff; }
.palette__stops i:nth-child(5) { background: #f7ce00; }

.palette__stops:hover i:hover,
.palette__stops i.is-lit {
  transform: scaleY(1.45);
}

.palette__foot {
  color: var(--faint);
}

/* -------------------------------------------------------------- privacy */

/* bottom right, under the stops, and the one readout set in ink so it is
   found without looking for it */
.privacy {
  /* its underline hangs below the letters, so it is the ink that keeps the inset */
  bottom: calc(var(--inset) - var(--lead) + 3.5px);
  right: var(--inset);
  margin: 0;
}

.privacy a {
  display: inline-block;
  margin: -10px -8px;
  padding: 10px 8px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.privacy a:hover,
.privacy a:focus-visible {
  text-decoration-thickness: 2px;
}

/* ---------------------------------------------------------- small plate */

@media (max-width: 900px) {
  :root {
    --edge: 20px;
  }
}

@media (max-width: 900px), (max-height: 640px) {
  .edge { display: none; }
}

@media (max-width: 620px) {
  .readout--tr { display: none; }

  /* a thumb needs 24 px */
  .linkedin,
  .lang__current { width: 24px; height: 24px; }
  /* privacy and cookie settings stack in two lines, so the address keeps
     the bottom left to itself; the stops move up by that second line */
  .palette { bottom: calc(var(--inset) + 56px); }
  .privacy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    row-gap: 10px;
  }
  .privacy > span[aria-hidden] { display: none; }
  .palette__stops i { width: 26px; height: 26px; }
  .card { padding: 120px 20px 128px; }

  /* no room for the top reticle or the stop counter on a phone */
  .rails > .reticle,
  .palette > .palette__foot,
  .palette [data-field='swatch-value'] {
    display: none;
  }
}

/* Below a wide desktop the pills cannot stand beside the portrait: they
   wrap in rows under the mark, and the panel has its own fixed place under
   them, kept free so opening it moves nothing. */
@media (max-width: 1099px) {
  .card__frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(14px, 2.4svh, 24px);
  }

  .chips {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    height: auto;
    max-width: min(560px, 100%);
  }

  .chip {
    position: static;
  }

  .card__photo {
    width: min(28.8svh, 60vw, 322px);
  }

  .chip__pill {
    gap: 7px;
    padding: 6px 10px 6px 8px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .chips__panel {
    position: relative;
    top: auto;
    left: auto;
    width: min(440px, calc(100vw - 40px));
    min-height: 92px;
    font-size: 11.5px;
    translate: 0 -4px;
  }

  .chips__panel.is-open {
    translate: 0 0;
  }
}

/* landscape on a phone: the plate cannot scroll, so the card has to fit */
@media (max-height: 520px) {
  .card {
    padding: 56px 28px;
  }

  .card__frame {
    padding: 24px 32px;
  }

  .card__stage {
    flex-direction: row;
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chip,
  .chip__pill,
  .status i {
    animation: none;
  }

  .palette__stops i,
  .chip__pill,
  .chips__panel,
  .linkedin,
  .lang__current,
  .lang__menu a,
  .readout a {
    transition: none;
  }
}
