/* Spotted's pages, built from the app's own design: the lavender wall, navy ink, the red "!" dot,
   yellow price tags and bordered tiles. Colours match Spotted/Design/Theme.swift. */

:root {
  --wall: #e3e6ff;
  --card: #f6f7ff;
  --ink: #15163d;
  --ink-soft: #4a4c80;
  --rule: rgba(21, 22, 61, 0.16);
  --dot: #dc2318;
  --tag: #ffd83d;
  --tag-ink: #15163d;
  --want-low: #17803f;
  --want-mid: #f5b800;
  --want-high: #dc2318;
  --bezel: #15163d;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wall: #191a45;
    --card: #282a63;
    --ink: #f2f3ff;
    --ink-soft: #b8bbea;
    --rule: rgba(242, 243, 255, 0.16);
    --bezel: #0d0e2b;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --wall: #191a45;
  --card: #282a63;
  --ink: #f2f3ff;
  --ink-soft: #b8bbea;
  --rule: rgba(242, 243, 255, 0.16);
  --bezel: #0d0e2b;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--dot);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The app's poster face: heavy, compressed type. */
.poster {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  line-height: 0.95;
  letter-spacing: -0.005em;
}

/* Top bar */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.bar a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

.bar nav {
  display: flex;
  gap: 20px;
}

/* Wordmark: "Spotted" with the "!" drawn as an ink bar over a red sticker dot. */

.wordmark {
  display: inline-block;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}

/* An inline-block with no text sits with its bottom edge on the baseline, so the dot lands where
   the letters do, as in the app. */
.bang {
  display: inline-block;
  margin-left: 0.07em;
  vertical-align: baseline;
}

.bang i {
  display: block;
  width: 0.11em;
  height: 0.46em;
  margin: 0 auto 0.05em;
  border-radius: 1em;
  background: currentColor;
}

.bang b {
  display: block;
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--dot);
}

@media (prefers-reduced-motion: no-preference) {
  .hero .bang b {
    animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
  }

  @keyframes pop {
    0% {
      transform: scale(0);
    }
    60% {
      transform: scale(1.35);
    }
    100% {
      transform: scale(1);
    }
  }
}

/* Hero */

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding-block: clamp(24px, 6vw, 72px) clamp(48px, 8vw, 96px);
}

.hero .wordmark {
  font-size: clamp(5.5rem, 21vw, 10.5rem);
}

.lede {
  max-width: 24ch;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  line-height: 1.3;
}

.soon {
  margin: 28px 0 0;
}

@media (min-width: 920px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
  }
}

/* Price tag and want sticker, as on the app's tiles. */

.price,
.want {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border: 1px solid var(--tag-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price {
  background: var(--tag);
  color: var(--tag-ink);
}

.want {
  color: #fff;
}

.want svg {
  width: 8px;
  height: 10px;
  fill: currentColor;
}

.want.low {
  background: var(--want-low);
}

.want.mid {
  background: var(--want-mid);
  color: var(--tag-ink);
}

.want.high {
  background: var(--want-high);
}

.sticker {
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px solid var(--tag-ink);
  background: var(--tag);
  color: var(--tag-ink);
  font-weight: 700;
  font-size: 0.9375rem;
  transform: rotate(-2deg);
}

/* The phone screen in the hero */

.screen {
  position: relative;
  width: min(390px, 100%);
  margin-inline: auto;
  border: 10px solid var(--bezel);
  border-radius: 46px;
  background: var(--wall);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(21, 22, 61, 0.45);
}

.screen-inner {
  height: 640px;
  padding: 22px 12px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
  mask-image: linear-gradient(#000 82%, transparent);
}

.screen .wordmark {
  display: block;
  text-align: center;
  font-size: 40px;
}

.search {
  display: flex;
  gap: 8px;
  margin: 14px 2px 12px;
}

.search span:first-child {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.search span:last-child {
  width: 40px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--card);
}

.add-dot {
  position: absolute;
  right: 18px;
  bottom: 84px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35), 0 8px 20px -6px rgba(220, 35, 24, 0.6);
  color: #fff;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}

.tabbar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  transform: translateX(-50%);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.tabbar span {
  padding: 9px 16px;
  border-radius: 999px;
}

.tabbar span:first-child {
  background: var(--wall);
}

/* A wall of tiles, laid out like the Feed */

.wall {
  columns: 2;
  column-gap: 10px;
}

.tile {
  display: inline-block;
  width: 100%;
  margin: 0 0 10px;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card);
  break-inside: avoid;
  vertical-align: top;
}

.face {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.face .price {
  position: absolute;
  left: 6px;
  bottom: 6px;
}

.face .want {
  position: absolute;
  right: 6px;
  bottom: 6px;
}

.new {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dot);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  transform: rotate(5deg);
}

.poster-face {
  padding: 12px 12px 34px;
}

.poster-face h3 {
  margin: 0;
  font-size: 1.7rem;
}

.poster-face.yellow {
  background: var(--tag);
  color: var(--tag-ink);
}

.poster-face.ink {
  background: #15163d;
  color: #e3e6ff;
}

.poster-face.plain {
  background: var(--wall);
  color: var(--ink);
}

/* Simple drawn "photos", like flat product shots. */
.photo-face {
  display: grid;
  place-items: center;
  aspect-ratio: 0.76;
}

.photo-face.tote {
  background: #cfe1ee;
}

.photo-face.lamp {
  background: #f0e6cc;
}

.photo-face .object {
  position: relative;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 18%;
  box-shadow: 0 16px 0 -8px rgba(21, 22, 61, 0.14);
}

.photo-face.tote .object {
  background: #b5452e;
}

.photo-face.lamp .object {
  width: 46%;
  aspect-ratio: 0.78;
  background: #3a3c5c;
}

.photo-face .object::before {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 14%;
  width: 10%;
  background: rgba(255, 255, 255, 0.18);
}

.tile-title {
  margin: 8px 2px 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
}

.owner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 2px 2px;
  font-size: 0.75rem;
  line-height: 1.2;
}

.owner small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.6875rem;
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--wall);
  font-size: 0.6875rem;
  font-weight: 800;
}

/* How it works: the same tiles, larger */

.how {
  padding-block: clamp(24px, 5vw, 56px);
}

.how h2,
.promise h2,
.closing h2 {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
}

.how-wall {
  columns: 1;
  column-gap: 16px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .how-wall {
    columns: 2;
  }
}

@media (min-width: 980px) {
  .how-wall {
    columns: 3;
  }
}

.how-wall .tile {
  margin-bottom: 16px;
  padding: 8px;
}

.how-wall .face {
  padding: 16px;
  background: var(--wall);
}

.how-wall h3 {
  margin: 14px 6px 4px;
  font-size: 1.125rem;
  line-height: 1.25;
}

.how-wall p {
  margin: 0 6px 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* App pieces inside the How tiles */

.rows {
  border-radius: 10px;
  background: var(--card);
  font-size: 0.9375rem;
}

.rows > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
}

.rows > div + div {
  border-top: 1px solid var(--rule);
}

.rows .muted {
  color: var(--ink-soft);
}

.rows .tick {
  margin-left: auto;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: 12px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(21, 22, 61, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.segmented span {
  padding: 6px 2px;
  border-radius: 8px;
}

.segmented .on {
  background: var(--card);
  box-shadow: 0 1px 3px rgba(21, 22, 61, 0.15);
}

.slider-card {
  padding: 16px;
  border-radius: 10px;
  background: var(--card);
}

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.slider-head .want {
  font-size: 0.875rem;
}

.meter {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  margin: 14px 0 6px;
}

.meter span {
  height: 10px;
  border-radius: 2px;
  background: rgba(21, 22, 61, 0.12);
  transition: background-color 0.15s;
}

:root[data-theme="dark"] .meter span {
  background: rgba(242, 243, 255, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .meter span {
    background: rgba(242, 243, 255, 0.14);
  }
}

.meter span.on.low {
  background: var(--want-low);
}

.meter span.on.mid {
  background: var(--want-mid);
}

.meter span.on.high {
  background: var(--want-high);
}

.slider-card input[type="range"] {
  width: 100%;
  margin: 6px 0 0;
  accent-color: var(--slider, var(--want-high));
}

.banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: #15163d;
  font-size: 0.875rem;
  line-height: 1.3;
  box-shadow: 0 6px 18px -8px rgba(21, 22, 61, 0.35);
}

.banner img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.banner b {
  display: block;
}

.banner time {
  margin-left: auto;
  align-self: flex-start;
  color: #4a4c80;
  font-size: 0.75rem;
}

.offline {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.offline span:last-child {
  margin-left: auto;
  font-weight: 800;
}

/* The promise: a big ink poster */

.promise {
  margin-block: clamp(32px, 6vw, 64px);
  padding: clamp(28px, 6vw, 64px);
  border-radius: 8px;
  background: #15163d;
  color: #e3e6ff;
}

.promise h2 {
  max-width: 12ch;
}

.promise h2 em {
  font-style: normal;
  color: var(--tag);
}

.promise p {
  max-width: 46ch;
  margin: 22px 0 0;
  color: #b8bbea;
}

.promise a {
  color: #fff;
  font-weight: 600;
}

/* Closing and footer */

.closing {
  padding-block: clamp(16px, 4vw, 40px) 0;
}

.closing p {
  max-width: 44ch;
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 88px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.foot p {
  margin: 0;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* Privacy Policy and Terms of Use */

.doc {
  max-width: 680px;
  margin: clamp(16px, 4vw, 40px) auto 0;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card);
}

.doc h1 {
  margin: 0;
  font-size: clamp(2.75rem, 9vw, 4rem);
}

.doc h2 {
  margin: 36px 0 8px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.doc p,
.doc li {
  margin: 0 0 12px;
}

.doc ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.doc li::marker {
  color: var(--dot);
}

.doc .updated {
  margin-top: 10px;
  color: var(--ink-soft);
}
