@font-face {
  font-family: "Big Shoulders Display";
  src: url("assets/BigShouldersDisplay.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #F4F4EF;
  --navy: #14213D;
  --ink2: #33405A;
  --gold: #F6B700;
  --red: #B3261E;
  --blue: #2B4C9B;
  --rule: #D5D8DE;
  --display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
}

body::before {
  content: "";
  flex: none;
  height: 10px;
  background: repeating-linear-gradient(135deg, var(--red) 0 20px, var(--paper) 20px 40px, var(--blue) 40px 60px, var(--paper) 60px 80px);
}

/* The legal pages' text stays selectable: an address or an ID there is meant to be copied. */
.bar, .hero, .foot { -webkit-user-select: none; user-select: none; }

a { color: inherit; text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.bar {
  flex: none;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px var(--gutter);
}
.bar__mark {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.bar__tag {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink2);
}

.hero {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  /* Full width so that a card in flight is cut at the window's edge, not at the 1280px measure. */
  padding: 16px max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))) 40px;
  overflow-x: clip;
}
.hero__copy { min-width: 0; }
.hero__h {
  margin: 0 0 0.22em;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3.5rem, min(9.2vw, 16vh), 8rem);
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.hero__h em { font-style: normal; box-shadow: inset 0 -0.14em 0 var(--gold); }
.hero__p { margin: 0 0 1.5em; max-width: 26em; font-size: 1.2rem; color: var(--ink2); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 20px 10px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--paper);
  line-height: 1.1;
  text-decoration: none;
}
.store small { font-size: 0.68rem; letter-spacing: 0.04em; }
.store b { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.cta__note { margin: 0; max-width: 15em; font-size: 0.9rem; line-height: 1.35; color: var(--ink2); }

.deck-wrap {
  justify-self: center;
  width: min(100% - 32px, 500px, 58vh);
  margin: 24px 0 8px;
  display: grid;
  gap: 30px;
}
.deck {
  --rx: 0;
  --ry: 0;
  display: grid;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.deck:focus-visible { outline: 2px solid var(--blue); outline-offset: 18px; }
.deck.is-live { cursor: pointer; }

.post {
  grid-area: 1 / 1;
  position: relative;
  margin: 0;
  padding: 14px 14px 0;
  background: #FFFFFF;
  box-shadow: 0 10px 22px rgba(20, 33, 61, 0.14), 0 1px 3px rgba(20, 33, 61, 0.18);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease, box-shadow 0.35s ease;
}
.post[data-p="0"] {
  z-index: 4;
  transform: perspective(900px) rotateX(calc(var(--rx) * 1deg)) rotateY(calc(var(--ry) * 1deg)) rotate(3deg);
  box-shadow: 0 24px 44px rgba(20, 33, 61, 0.22), 0 2px 5px rgba(20, 33, 61, 0.2);
}
.post[data-p="1"] { z-index: 3; transform: translate(calc(-10px + var(--ry) * -0.7px), calc(8px + var(--rx) * 0.7px)) rotate(-2.5deg); }
.post[data-p="2"] { z-index: 2; transform: translate(calc(12px + var(--ry) * -1.2px), calc(10px + var(--rx) * 1.2px)) rotate(4.5deg); }
.post[data-p="3"] { z-index: 1; transform: translate(0, 10px) rotate(1deg); opacity: 0; }
.deck.is-lit .post[data-p="0"] { transition-duration: 0.14s, 0.35s, 0.35s; }
/* Until the visitor touches the deck, the top card leans as it will under a pointer. */
.deck.is-idle .post[data-p="0"] { animation: beckon 3.8s ease-in-out 1.2s infinite; }
@keyframes beckon {
  0%, 52%, 100% { transform: perspective(900px) rotateX(0deg) rotateY(0deg) rotate(3deg); }
  66% { transform: perspective(900px) rotateX(4deg) rotateY(-8deg) rotate(3deg) translateY(-6px); }
  82% { transform: perspective(900px) rotateX(-2deg) rotateY(6deg) rotate(3deg) translateY(-3px); }
}
.post:not([data-p="0"]) .post__line { opacity: 0; }
.post__line { transition: opacity 0.3s ease; }

.post__view { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; -webkit-user-drag: none; -webkit-touch-callout: none; }
.post__line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post__line span { flex: 1 1 0; }
.post__line small {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--ink2);
  white-space: nowrap;
}
.deck__hint {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink2);
  transition: opacity 0.5s ease;
}
.deck__hint::before {
  content: "";
  width: 7px;
  height: 7px;
  border-left: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: translateY(2px) rotate(45deg);
  animation: point 1.6s ease-in-out infinite;
}
@keyframes point {
  0%, 100% { transform: translateY(3px) rotate(45deg); }
  50% { transform: translateY(-2px) rotate(45deg); }
}
.deck__hint-touch { display: none; }
@media (hover: none) {
  .deck__hint-hover { display: none; }
  .deck__hint-touch { display: inline; }
}
.deck-wrap.is-touched .deck__hint { opacity: 0; }
.deck__said { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .post { transition: none; }
  .deck__hint::before { animation: none; }
}

.foot {
  flex: none;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 14px var(--gutter);
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink2);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.doc {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding: 24px var(--gutter) 72px;
  overflow-wrap: break-word;
}
.doc h1 {
  margin: 0 0 0.3em;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.doc h2 { margin: 2em 0 0.4em; font-size: 1.15rem; }
.doc a { color: var(--blue); }
.doc ul { padding-left: 1.2em; }
.doc code { font-size: 0.9em; overflow-wrap: anywhere; }
.doc .updated { margin-bottom: 2.5em; font-size: 0.9rem; color: var(--ink2); }
.doc .email { margin: 1.5em 0; font-size: 1.2rem; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; align-content: center; gap: 24px; padding-top: 8px; }
  .hero__h { font-size: clamp(3.25rem, 19vw, 8rem); }
  .deck-wrap { width: min(100% - 56px, 500px); margin: 28px auto 12px; }
}
@media (max-width: 560px) {
  .cta__long { display: none; }
  .post__line { font-size: 1.1rem; }
  .post[data-p="1"] { transform: translate(calc(-6px + var(--ry) * -0.7px), calc(8px + var(--rx) * 0.7px)) rotate(-2deg); }
  .post[data-p="2"] { transform: translate(calc(8px + var(--ry) * -1.2px), calc(12px + var(--rx) * 1.2px)) rotate(4deg); }
}
