/* Serveringen — clean, minimal: white cards on a light field, one accent per product. */

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

:root {
  --bg:       #fafafa;
  --surface:  #ffffff;
  --ink:      #1a1d1c;
  --ink-soft: #5f6764;   /* 5.6:1 on white */
  --line:     #e4e6e4;
  --accent:   var(--ink);

  --display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --body:    "Instrument Sans", "Helvetica Neue", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "Courier New", monospace;
}

body {
  overflow-x: clip;   /* the ring is wider than a phone */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.frame {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

/* ---------- head ---------- */
.masthead { text-align: center; padding-top: clamp(32px, 8vh, 80px); }

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tagline {
  margin: 10px auto 0;
  max-width: 52ch;
  color: var(--ink-soft);
}

.tagline em { font-style: normal; color: var(--ink); font-weight: 600; }

.place {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- the ring ----------
   Cards stand on a slowly turning carousel. Each one is rotated to its slot
   (--i of --n) and pushed out by --r, which is the radius at which n cards of
   width --w sit edge to edge with a 24px gap: (w + gap) / (2 tan(180°/n)). */
.stage {
  flex: 1;
  min-height: calc(var(--h) + 60px);
  display: grid;
  place-items: start center;   /* sits up under the title; slack collects below */
  perspective: 1200px;
  --w: 260px;
  --h: 440px;
  --r: calc((var(--w) + 24px) * 1.207);   /* 1 / (2 tan 22.5°), for n = 8 */
}

.ring {
  position: relative;
  width: var(--w);
  height: var(--h);
  transform-style: preserve-3d;
  animation: spin 48s linear infinite;
}

/* Hovering anywhere on the stage stops the turn so a card can be read. */
.stage:hover .ring,
.stage:focus-within .ring { animation-play-state: paused; }

@keyframes spin {
  from { transform: translateZ(calc(-1 * var(--r))) rotateX(-6deg) rotateY(0deg); }
  to   { transform: translateZ(calc(-1 * var(--r))) rotateX(-6deg) rotateY(-360deg); }
}

.card {
  position: absolute;
  inset: 0;
  transform: rotateY(calc(var(--i) * 360deg / var(--n)))
             translateZ(var(--r));
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

a.card { color: inherit; text-decoration: none; }

a.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

a.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.06);
}

/* Lets the poster, title and copy sit directly in the card's flex column. */
.card-body { display: contents; }

.kicker {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* The poster becomes the tinted panel. Its bed and cutouts take the same
   tint, so only the accent-coloured shapes remain. */
.poster {
  --tint: color-mix(in srgb, var(--accent) 8%, #fff);
  flex: 1;
  width: 100%;
  min-height: 0;
  margin: 16px 0;
  padding: 20px 0;
  background: var(--tint);
  border-radius: 8px;
}

.poster .bed  { fill: var(--tint); }
.poster .mark { fill: var(--accent); }

.card h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 8px;
  text-wrap: balance;
}

.desc {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- foot ---------- */
.baseboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

.maker { font-family: var(--mono); font-size: 12px; }
.maker span { color: var(--ink); }

/* Desktop: whole page fits the viewport, no scroll. */
@media (min-width: 1101px) and (min-height: 700px) {
  .frame { height: 100dvh; padding-block: 32px; }
}

@media (max-width: 560px) {
  .stage { --w: 200px; --h: 360px; }
  .tagline br { display: none; }
}

/* No motion: the ring lays itself flat into a plain grid. */
@media (prefers-reduced-motion: reduce) {
  .ring { animation: none; transform: none; width: 100%; height: auto;
          display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .card { position: static; transform: none; transition: none; min-height: var(--h); }
}

@media (prefers-contrast: more) {
  :root { --ink-soft: var(--ink); --line: #9aa09d; }
}
