/* The public front page. Colours and type are the app's own (src/constants/theme.ts). */

@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/poppins-500Medium.woff') format('woff');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/poppins-600SemiBold.woff') format('woff');
}

:root {
  --bg: #f5f2ec;
  --surface: #ffffff;
  --panel: #eae5dc;
  --border: #dcd5c9;
  --ink: #17140f;
  --muted: #6e685f;
  --like: #1e9462;
  --pass: #d2473c;
  --save: #3466d6;
  --sale: #bf3a26;
  --on-ink: #f5f2ec;
  --tint-a: #e3ede6;
  --tint-b: #efe7d8;
  --tint-c: #e4e8f2;
  --display: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e0c;
    --surface: #1b1916;
    --panel: #26231f;
    --border: #35312b;
    --ink: #f4f1ea;
    --muted: #a39d92;
    --like: #3cc088;
    --pass: #ee6a5e;
    --save: #6e97f2;
    --sale: #f08368;
    --on-ink: #17140f;
    --tint-a: #1f2b25;
    --tint-b: #2b261d;
    --tint-c: #20242e;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p {
  margin: 0;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 420px) {
  .wrap {
    padding: 0 18px;
  }
}

/* The wordmark: "IN MY" over "ROTATION", each O part-way through a roll (src/components/logo.tsx). */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font: 500 30px/1 var(--display);
  color: var(--ink);
  text-decoration: none;
}
.logo-top {
  font-size: 0.29em;
  line-height: 1;
  letter-spacing: 0.18em;
  padding-left: 0.2em;
  margin-bottom: 0.36em;
}
.logo-word {
  display: flex;
  letter-spacing: 0.03em;
}
.logo-o {
  position: relative;
  overflow: hidden;
  display: block;
}
.logo-o > i {
  visibility: hidden;
  font-style: normal;
}
.logo-strip {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 400%;
  display: flex;
  flex-direction: column;
}
.logo-strip b {
  height: 25%;
  font-weight: inherit;
}
.logo-strip .g {
  color: var(--like);
}
.logo-o.up .logo-strip {
  transform: translateY(-6.25%);
  animation: roll-up 7s cubic-bezier(0.6, 0, 0.2, 1) infinite;
}
.logo-o.down .logo-strip {
  transform: translateY(-62.5%);
  animation: roll-down 7s cubic-bezier(0.6, 0, 0.2, 1) infinite;
}
@keyframes roll-up {
  0%, 24% { transform: translateY(-6.25%); }
  36%, 74% { transform: translateY(-31.25%); }
  86%, 100% { transform: translateY(-56.25%); }
}
@keyframes roll-down {
  0%, 12% { transform: translateY(-62.5%); }
  24%, 62% { transform: translateY(-37.5%); }
  74%, 100% { transform: translateY(-12.5%); }
}

/* Top bar */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.beta {
  font: 500 12px/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 520px) {
  .beta {
    display: none;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font: 500 16px/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
}
.button.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.button.quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--border);
}
.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--like);
  outline-offset: 3px;
}

/* A swiped card flies out of the phone; it must not make the page scroll sideways. */
main {
  overflow-x: hidden;
  overflow-x: clip;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 72px;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--like);
}
.lede {
  margin-top: 22px;
  max-width: 30em;
  font-size: 19px;
  color: var(--muted);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.fine {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 20px;
    padding-bottom: 56px;
  }
}

/* The phone: a drawing of the deck, not a screenshot. */
.phone {
  justify-self: center;
  width: 300px;
  max-width: 100%;
  padding: 18px 18px 20px;
  border-radius: 40px;
  background: var(--surface);
  box-shadow: 0 0 0 1.5px var(--border), 0 30px 60px -30px rgba(23, 20, 15, 0.35);
}
.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 14px;
}
.phone-top .logo {
  font-size: 16px;
}
.who {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--panel);
  font: 500 10px/1 var(--display);
  color: var(--muted);
}
.who span {
  padding: 5px 8px;
  border-radius: 999px;
}
.who .on {
  background: var(--ink);
  color: var(--on-ink);
}
.deck {
  position: relative;
  height: 344px;
}
.card {
  position: absolute;
  inset: 0 0 26px 0;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: var(--bg);
  box-shadow: 0 0 0 1.5px var(--border);
  overflow: hidden;
  transform-origin: 50% 110%;
  will-change: transform, opacity;
}
.card:nth-child(1) { z-index: 3; }
.card:nth-child(2) { z-index: 2; transform: translateY(13px) scale(0.94); }
.card:nth-child(3) { z-index: 1; transform: translateY(26px) scale(0.88); }
.art {
  flex: 1;
  display: grid;
  place-items: center;
}
.art svg {
  width: 132px;
  height: 132px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tint-a { background: var(--tint-a); }
.tint-b { background: var(--tint-b); }
.tint-c { background: var(--tint-c); }
.meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 13px;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
}
.meta .name {
  font: 600 14px/1.2 var(--display);
}
.meta .price {
  font: 500 14px/1.2 var(--display);
  white-space: nowrap;
}
.meta .was {
  margin-left: 5px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 500;
}
.meta .now {
  color: var(--sale);
}
.pill {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface);
  font: 500 10px/1 var(--display);
  letter-spacing: 0.04em;
}
.stamp {
  position: absolute;
  top: 18px;
  padding: 5px 10px 4px;
  border: 2px solid currentColor;
  border-radius: 8px;
  font: 600 18px/1 var(--display);
  letter-spacing: 0.08em;
  opacity: 0;
}
.stamp.yes {
  left: 14px;
  color: var(--like);
  transform: rotate(-10deg);
}
.stamp.no {
  right: 14px;
  color: var(--pass);
  transform: rotate(10deg);
}
.actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding-top: 6px;
}
.round {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 1.5px var(--border);
}
.round svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.round.no { color: var(--pass); }
.round.bag { color: var(--save); width: 46px; height: 46px; align-self: center; }
.round.yes { color: var(--like); }

/* Three cards take turns at the front. Each runs the same nine seconds, a third apart:
   front (and swiped away), then at the back, then in the middle, then front again. */
.card { animation: 9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.card:nth-child(1) { animation-name: deal-right; animation-delay: -0.45s; }
.card:nth-child(2) { animation-name: deal-left; animation-delay: -6.45s; }
.card:nth-child(3) { animation-name: deal-right; animation-delay: -3.45s; }
.card .stamp { animation: stamp 9s linear infinite; animation-delay: inherit; }
@keyframes deal-right {
  0%, 20% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; z-index: 4; }
  27% { transform: translate(30%, -1%) rotate(7deg) scale(1); opacity: 1; z-index: 4; }
  31% { transform: translate(135%, -4%) rotate(15deg) scale(1); opacity: 0; z-index: 4; }
  33.3% { transform: translate(0, 26px) rotate(0) scale(0.88); opacity: 0; z-index: 1; }
  38%, 54% { transform: translate(0, 26px) rotate(0) scale(0.88); opacity: 1; z-index: 1; }
  65%, 87% { transform: translate(0, 13px) rotate(0) scale(0.94); opacity: 1; z-index: 2; }
  98%, 100% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; z-index: 3; }
}
@keyframes deal-left {
  0%, 20% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; z-index: 4; }
  27% { transform: translate(-30%, -1%) rotate(-7deg) scale(1); opacity: 1; z-index: 4; }
  31% { transform: translate(-135%, -4%) rotate(-15deg) scale(1); opacity: 0; z-index: 4; }
  33.3% { transform: translate(0, 26px) rotate(0) scale(0.88); opacity: 0; z-index: 1; }
  38%, 54% { transform: translate(0, 26px) rotate(0) scale(0.88); opacity: 1; z-index: 1; }
  65%, 87% { transform: translate(0, 13px) rotate(0) scale(0.94); opacity: 1; z-index: 2; }
  98%, 100% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; z-index: 3; }
}
@keyframes stamp {
  0%, 21% { opacity: 0; }
  25%, 31% { opacity: 1; }
  33%, 100% { opacity: 0; }
}

/* The numbers */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
}
.fact {
  padding: 26px 0;
}
.fact + .fact {
  padding-left: 28px;
  border-left: 1.5px solid var(--border);
}
.fact strong {
  display: block;
  font: 600 clamp(26px, 4.4vw, 40px)/1.05 var(--display);
  letter-spacing: -0.02em;
}
.fact span {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}
@media (max-width: 620px) {
  .facts {
    grid-template-columns: 1fr;
  }
  .fact {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 0;
  }
  .fact + .fact {
    padding-left: 0;
    border-left: 0;
    border-top: 1.5px solid var(--border);
  }
  .fact strong {
    min-width: 4.6em;
  }
  .fact span {
    margin-top: 0;
  }
}

/* Sections */
section.wrap {
  padding-top: 76px;
}
.kicker {
  font: 500 12px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
section h2 {
  margin-top: 14px;
  max-width: 16em;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 18px;
  border-top: 1.5px solid var(--ink);
}
.steps li::before {
  content: counter(step);
  font: 500 14px/1 var(--display);
  color: var(--like);
}
.steps h3 {
  margin-top: 10px;
  font-size: 22px;
}
.steps p,
.touches p {
  margin-top: 8px;
  color: var(--muted);
}
.touches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 28px;
  margin-top: 36px;
}
.touches h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
}
@media (max-width: 860px) {
  .steps,
  .touches {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .touches {
    grid-template-columns: repeat(2, 1fr);
  }
  section.wrap {
    padding-top: 60px;
  }
}
@media (max-width: 520px) {
  .touches {
    grid-template-columns: 1fr;
  }
}

/* Plain dealing: how it makes money, privacy, the stores */
.plain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.plain article {
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1.5px var(--border);
}
.plain h3 {
  font-size: 18px;
}
.plain p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--muted);
}
.plain p + p {
  margin-top: 10px;
}
.plain a {
  color: var(--ink);
  text-underline-offset: 3px;
}
@media (max-width: 860px) {
  .plain {
    grid-template-columns: 1fr;
  }
}

.closing {
  margin-top: 76px;
  padding: 44px 32px;
  border-radius: 28px;
  background: var(--ink);
  color: var(--on-ink);
  text-align: center;
}
.closing h2 {
  margin: 0 auto;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}
.closing p {
  margin-top: 12px;
  opacity: 0.75;
}
.closing .button {
  margin-top: 26px;
  background: var(--on-ink);
  color: var(--ink);
}

footer.wrap {
  margin-top: 56px;
  padding-top: 28px;
  padding-bottom: 44px;
  border-top: 1.5px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.foot a {
  display: inline-block;
  padding: 6px 0;
  text-underline-offset: 3px;
}
.disclosure {
  margin-top: 16px;
  max-width: 60em;
}

/* The privacy page */
.page {
  max-width: 720px;
  padding-top: 28px;
  padding-bottom: 20px;
}
.page h1 {
  font-size: clamp(34px, 6vw, 48px);
  letter-spacing: -0.03em;
}
.page .updated {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.page h2 {
  margin-top: 40px;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.page p {
  margin-top: 12px;
}
.page a {
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .logo-strip,
  .card,
  .card .stamp {
    animation: none !important;
  }
}
