/* areyouanormie.app. Tokens from the app (android/.../ui/theme/Theme.kt):
   cream and ink by day, night and cream by night; the sticker colors stay the
   same in both. Bricolage Grotesque for display, Inter for text. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night: #1b1a2e;
  --cream: #fff6e5;
  --butter: #ffc93c;
  --lilac: #b79cff;
  --coral: #ff5a36;
  --mint: #8fe3b7;
  --sky: #8fd3ff;
  --pink: #ffa3cf;

  --bg: var(--cream);
  --surface: #ffffff;
  --ink: var(--night);
  --muted: #6e6a80;
  --line: #ebddbf;
  /* Light mode draws ink outlines and hard shadows, like the app. */
  --outline: var(--night);
  --button-shadow: var(--butter);
  --sticker-ink: inline;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;

  color-scheme: light;
}

/* Dark mode: the phone's setting, unless the toggle chose otherwise. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131220;
    --surface: #1f1e33;
    --ink: var(--cream);
    --muted: #a7a2bd;
    --line: #34324f;
    --outline: transparent;
    --button-shadow: var(--coral);
    --sticker-ink: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #131220;
  --surface: #1f1e33;
  --ink: var(--cream);
  --muted: #a7a2bd;
  --line: #34324f;
  --outline: transparent;
  --button-shadow: var(--coral);
  --sticker-ink: none;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(34px, 4.6vw, 54px);
}

h3 {
  font-size: 22px;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

.wrap {
  width: min(1080px, 100% - 40px);
  margin: 0 auto;
}

/* ---------------------------------------------------------------- header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark {
  width: 34px;
  height: 34px;
  background: currentColor;
  -webkit-mask: url("/mascot.svg") center / contain no-repeat;
  mask: url("/mascot.svg") center / contain no-repeat;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-actions a,
.theme {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.top-actions a:hover,
.theme:hover {
  background: var(--line);
}

.theme svg {
  width: 20px;
  height: 20px;
}

/* The toggle shows the theme it switches to. */
.theme .sun {
  display: none;
}

:root[data-theme="dark"] .theme .sun {
  display: block;
}

:root[data-theme="dark"] .theme .moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme .moon {
    display: none;
  }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 5px 0 var(--button-shadow);
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 var(--button-shadow);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--button-shadow);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.btn.secondary:active {
  transform: none;
}

/* ---------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 440px);
  gap: 64px;
  align-items: center;
  padding: 56px 0 120px;
}

.hero .lede {
  margin-top: 24px;
  max-width: 30em;
  font-size: 20px;
  line-height: 1.5;
}

.hero .btn {
  margin-top: 36px;
}

/* The app's results card, with the mascot peeking over it. */

.art {
  position: relative;
  padding-top: 112px;
}

.peek {
  position: absolute;
  top: 0;
  right: 28px;
  width: 148px;
  height: auto;
  /* Mirrored, so he looks at the card like he looks at the question in the app. */
  transform: scaleX(-1);
}

.result {
  position: relative;
  padding: 22px 16px 16px;
  border: 2px solid var(--outline);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 6px 0 var(--outline);
}

.result-q {
  padding: 0 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.result-group {
  margin-top: 6px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.rows {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 18px;
}

.row + .row {
  margin-top: 2px;
}

.row.normie {
  background: var(--butter);
  color: var(--night);
}

.row.niche {
  background: var(--lilac);
  color: var(--night);
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 2px solid var(--night);
  border-radius: 50%;
  background: var(--c);
  color: var(--night);
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
}

.who {
  flex: 1;
  min-width: 0;
}

.name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.normie .name,
.niche .name {
  color: rgba(27, 26, 46, 0.72);
}

.tag {
  padding: 0 7px;
  border: 1.5px solid var(--night);
  border-radius: 999px;
  background: #fff;
  color: var(--night);
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  line-height: 1.5;
}

.answer {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pct {
  flex: none;
  text-align: right;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.pct small {
  display: block;
  color: var(--muted);
  font-family: var(--body);
  font-weight: 600;
  font-size: 12px;
}

.normie .pct small,
.niche .pct small {
  color: rgba(27, 26, 46, 0.62);
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: 104px 0;
  border-top: 2px solid var(--line);
}

.section-lede {
  margin-top: 16px;
  max-width: 34em;
  color: var(--muted);
  font-size: 20px;
}

/* Normie or Niche: the two title stickers from the app. */

.titles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 56px;
}

.title p {
  margin-top: 20px;
  max-width: 21em;
  font-size: 21px;
  line-height: 1.45;
}

.sticker {
  display: block;
  width: 232px;
  height: auto;
  overflow: visible;
  transform: rotate(-6deg);
}

.title + .title .sticker {
  transform: rotate(5deg);
}

.sticker .ink {
  display: var(--sticker-ink);
  fill: var(--night);
  stroke: var(--night);
  stroke-width: 0.25;
  stroke-linejoin: round;
}

.sticker .edge {
  fill: #fff;
  stroke: #fff;
  stroke-width: 0.18;
  stroke-linejoin: round;
}

.sticker text {
  fill: var(--night);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.36px;
  letter-spacing: -0.01px;
}

/* The day: three times, no cards. */

.day {
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.day li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 2px solid var(--line);
}

.day li:last-child {
  padding-bottom: 0;
}

.day time {
  font-family: var(--display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.day p {
  margin-top: 8px;
  max-width: 34em;
  color: var(--muted);
}

/* FAQ */

.faq {
  max-width: 760px;
  margin-top: 40px;
}

.faq details {
  border-top: 2px solid var(--line);
}

.faq details:last-child {
  border-bottom: 2px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 24px;
  line-height: 1.1;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 36em;
  padding-bottom: 22px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer */

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 36px 0 48px;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
}

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

.prose {
  max-width: 700px;
  padding: 40px 0 96px;
}

.prose h1 {
  font-size: clamp(38px, 6vw, 58px);
}

.prose h2 {
  margin-top: 48px;
  font-size: 26px;
}

.prose p,
.prose li {
  margin-top: 12px;
}

.prose ul {
  margin: 0;
  padding-left: 22px;
}

.prose .updated {
  margin-top: 12px;
  color: var(--muted);
}

.prose table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 12px 14px 12px 0;
  border-bottom: 2px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-family: var(--display);
  font-weight: 800;
}

.prose article + article {
  margin-top: 96px;
  padding-top: 64px;
  border-top: 2px solid var(--line);
}

/* ---------------------------------------------------------------- join */

.join {
  display: grid;
  place-items: center;
  min-height: 72vh;
  padding: 24px 0 64px;
  text-align: center;
}

.join .peek-static {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto 20px;
}

.join h1 {
  font-size: clamp(34px, 6vw, 52px);
}

.code {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 24px 10px 32px;
  border: 2px solid var(--outline);
  border-radius: 20px;
  background: var(--butter);
  color: var(--night);
  box-shadow: 0 5px 0 var(--outline);
  font-family: var(--display);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: 0.2em;
}

.join .hint {
  max-width: 26em;
  margin: 24px auto 0;
  color: var(--muted);
}

.join .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- phones */

@media (max-width: 820px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .top {
    padding: 14px 0;
  }

  .brand {
    font-size: 21px;
  }

  .mark {
    width: 30px;
    height: 30px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 28px 0 72px;
  }

  .hero .lede {
    margin-top: 16px;
    font-size: 18px;
  }

  .hero .btn {
    width: 100%;
    margin-top: 28px;
  }

  .art {
    padding-top: 92px;
  }

  .peek {
    right: 20px;
    width: 120px;
  }

  .result {
    padding: 18px 10px 10px;
    border-radius: 24px;
  }

  .result-q {
    font-size: 20px;
  }

  .row {
    gap: 10px;
    padding: 9px 10px;
    border-radius: 16px;
  }

  .avatar {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .answer {
    font-size: 16px;
  }

  .pct {
    font-size: 17px;
  }

  .section {
    padding: 72px 0;
  }

  .section-lede {
    font-size: 18px;
  }

  .titles {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 36px;
  }

  .title {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    align-items: center;
  }

  .sticker {
    width: 120px;
  }

  .title p {
    margin-top: 0;
    font-size: 18px;
  }

  .day {
    margin-top: 32px;
  }

  .day li {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 24px 0;
  }

  .day time {
    font-size: 40px;
  }

  .faq {
    margin-top: 24px;
  }

  .faq summary {
    padding: 16px 0;
    font-size: 18px;
  }

  footer {
    flex-direction: column;
    padding: 28px 0 40px;
  }

  .prose {
    padding: 24px 0 64px;
  }

  .prose table {
    font-size: 14px;
  }

  .code {
    font-size: 32px;
  }

  .join .actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .faq summary::after {
    transition: none;
  }
}
