@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* Workshop: the photo's own blacks */
  --night: #0e0f10;
  --chalk: #f2f2ee;
  --chalk-dim: #a9aca4;

  /* Registration card stock */
  --paper: #d6d8d0;
  --paper-hi: #e1e3dc;
  --ink: #1b1c1a;
  --ink-soft: #4b5048;
  --rule: rgb(27 28 26 / 0.32);
  --rule-strong: rgb(27 28 26 / 0.7);

  /* Swiss cross: stamp and logo badge only */
  --cross: #d52b1e;

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

  --gutter: clamp(16px, 4vw, 48px);
  --pad: clamp(20px, 3.2vw, 44px);
  --h1: clamp(2.25rem, 5.6vw, 4.75rem);
  --peek-air: 34px;
  --peek: calc(var(--pad) + 2 * 0.95 * var(--h1) + var(--peek-air));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  scrollbar-color: #4a4d49 var(--night);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-stretch: 100%;
  caret-color: currentColor;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--chalk); color: var(--night); }
.card ::selection { background: var(--ink); color: var(--paper); }

img, svg { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 3px;
  border-radius: 2px;
}
.card :focus-visible { outline-color: var(--ink); }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.num { font-variant-numeric: tabular-nums lining-nums; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  padding: 10px 14px;
  background: var(--paper); color: var(--ink);
  font-weight: 600; text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 12px; }

/* ---------- Masthead ---------- */

.masthead {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: clamp(18px, 3vw, 36px) var(--gutter) 0;
}

.brand { flex: none; display: block; width: clamp(148px, 15vw, 224px); }
.brand img { width: 100%; height: auto; filter: drop-shadow(0 2px 10px rgb(0 0 0 / 0.45)); }

.nav { padding-top: clamp(4px, 0.8vw, 12px); }
.nav ul {
  display: flex; gap: clamp(20px, 3vw, 44px);
  margin: 0; padding: 0 0 10px; list-style: none;
  border-bottom: 1px solid rgb(242 242 238 / 0.45);
}
.nav a {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; font-weight: 600; font-stretch: 112%;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--chalk);
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.6);
  padding-block: 6px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -11px;
  height: 2px; background: var(--chalk);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.nav a[aria-current="page"]::after,
.nav a:hover::after { transform: scaleX(1); }

.i-out { width: 0.85em; height: 0.85em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; }

/* ---------- Stage: sticky photo, card rises over it ---------- */

.stage { position: relative; isolation: isolate; timeline-scope: --card; }

.plate {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--night);
}
.plate img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 58%;
}
.plate::after {
  /* Keeps the logo and nav legible against the ceiling lights */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgb(8 9 10 / 0.55), rgb(8 9 10 / 0) 26%);
  pointer-events: none;
}

.ausweis {
  position: relative; z-index: 1;
  margin-top: calc(-1 * var(--peek));
  padding: 0 var(--gutter) clamp(64px, 10vw, 140px);
  view-timeline: --card block;
}

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

.card {
  position: relative;
  max-width: 1120px; margin-inline: auto;
  padding: var(--pad);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(170deg, rgb(255 255 255 / 0.32), rgb(255 255 255 / 0) 40%),
    url("assets/img/guilloche.svg");
  background-size: 100% 100%, 600px 300px;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.35),
    0 1px 2px rgb(0 0 0 / 0.35),
    0 28px 70px -24px rgb(0 0 0 / 0.75);
  transform-origin: 0 0;
}

.card a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.card a:hover { text-decoration-thickness: 2px; }

.card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 34ch);
  column-gap: clamp(24px, 4vw, 64px);
  align-items: end;
  /* The head rule must sit below the first-viewport fold */
  padding-bottom: calc(var(--peek-air) + 8px);
  border-bottom: 2px solid var(--ink);
}


h1 {
  margin: 0;
  font-size: var(--h1);
  line-height: 0.95;
  font-weight: 800; font-stretch: 78%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
.lede {
  margin: 0;
  max-width: 34ch;
  font-size: 1rem; line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.card-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--rule-strong);
}

.fields {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 0;
  border-right: 1px solid var(--rule-strong);
}

.field {
  margin: 0;
  padding: clamp(14px, 1.6vw, 20px) clamp(14px, 1.8vw, 22px) clamp(16px, 2vw, 26px);
  border-bottom: 1px solid var(--rule);
}
.fields .field:nth-child(odd):not(.field--wide) { border-right: 1px solid var(--rule); }
.fields .field:last-child,
.fields .field:nth-last-child(2):not(.field--wide) { border-bottom: 0; }
.field--wide { grid-column: 1 / -1; }
.fields .field--wide,
.fields .field:nth-child(3) { padding-left: 0; }

.field dt, .field figcaption {
  margin-bottom: 8px;
  font-size: 0.6875rem; font-weight: 600; font-stretch: 118%;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.field dd {
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 600; line-height: 1.3;
  overflow-wrap: anywhere;
}
.field address { font-style: normal; }
.field--wide:has(.stamp) { position: relative; }

.sub-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  font-size: 0.875rem; font-weight: 600; font-stretch: 112%;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.field--photo {
  padding: clamp(14px, 1.6vw, 20px) 0 clamp(16px, 2vw, 26px) clamp(14px, 1.8vw, 22px);
  border-bottom: 0;
  display: flex; flex-direction: column;
}
.field--photo img {
  flex: 1; width: 100%; min-height: 0;
  aspect-ratio: 1671 / 857;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--rule);
  filter: saturate(0.92) contrast(1.02);
}

.stamp {
  position: absolute;
  width: clamp(104px, 10vw, 136px); height: auto;
  right: 12%; top: 50%;
  color: var(--cross);
  opacity: 0.82;
  mix-blend-mode: multiply;
  transform: translateY(-50%) rotate(-14deg);
  pointer-events: none;
}
.stamp text {
  font-family: var(--sans); font-size: 19px; font-weight: 700; font-stretch: 112%;
  letter-spacing: 0.14em; fill: currentColor;
}

/* The primary action is a field printed solid */
.offer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center; gap: 4px clamp(16px, 2.4vw, 32px);
  margin-top: clamp(20px, 2.6vw, 32px);
  padding: clamp(18px, 2.2vw, 26px) clamp(18px, 2.4vw, 30px);
  background: var(--ink);
  color: var(--paper) !important;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.offer-value {
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  font-weight: 700; font-stretch: 88%;
  line-height: 1.1; letter-spacing: -0.005em;
}
.i-arrow {
  width: clamp(28px, 3vw, 38px); height: auto;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square;
  transition: transform 0.45s var(--ease-out);
}
.offer:hover { background: #000; box-shadow: inset 0 0 0 1px rgb(242 242 238 / 0.18); }
.offer:hover .i-arrow { transform: translate(4px, -4px); }
.offer:active { box-shadow: inset 0 3px 12px rgb(0 0 0 / 0.6); }
.offer:focus-visible { outline-offset: 4px; }


/* ---------- Footer ---------- */

.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px 24px;
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid rgb(242 242 238 / 0.12);
  font-size: 0.875rem;
  color: var(--chalk-dim);
  position: relative; z-index: 1; background: var(--night);
}
.foot p { margin: 0; }
@media (max-width: 60rem) {
  .foot { grid-template-columns: 1fr; }
}
.foot a { text-underline-offset: 0.22em; }
.foot a:hover { color: var(--chalk); }

/* ---------- Signature motion: the card is laid down over the photo ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .card {
      animation: card-settle linear both;
      animation-timeline: --card;
      animation-range: entry calc(var(--peek) + 24px) cover 42%;
    }
    .plate img {
      animation: plate-recede linear both;
      animation-timeline: --card;
      animation-range: entry calc(var(--peek) + 24px) cover 50%;
    }
  }
}
@keyframes card-settle {
  from { transform: rotate(1.5deg); }
  to   { transform: none; }
}
@keyframes plate-recede {
  from { filter: none; transform: none; }
  to   { filter: brightness(0.45) blur(2px); transform: scale(1.04); }
}

/* On load the peeking card eases in once, before scroll takes over */
@media (prefers-reduced-motion: no-preference) {
  .ausweis { animation: peek-in 1.1s var(--ease-out) 0.25s both; }
}
@keyframes peek-in {
  from { translate: 0 var(--peek); }
  to   { translate: 0 0; }
}

/* ---------- Narrow ---------- */

@media (max-width: 60rem) {
  /* Stays under the card-head row-gap so the fold never cuts the lede */
  :root { --peek-air: 8px; }
  .card-head { padding-bottom: 22px; }
  .card-head { grid-template-columns: 1fr; row-gap: 14px; }
  .card-body { grid-template-columns: 1fr; }
  .fields { border-right: 0; border-bottom: 1px solid var(--rule); }
  .field--photo { padding-left: 0; }
}

@media (max-width: 34rem) {
  .plate img { object-position: 28% 50%; }
  .nav ul { gap: 18px; }
  .nav a { font-size: 0.75rem; letter-spacing: 0.1em; }
  .fields { grid-template-columns: 1fr; }
  .fields .field { padding-left: 0 !important; border-right: 0 !important; border-bottom: 1px solid var(--rule) !important; }
  .fields .field:last-child { border-bottom: 0 !important; }
  .stamp { width: 96px; right: 2%; }
  }
