/* Colours come from the app icon: coral ground, sun-yellow tag, sky and teal picture. */
:root {
  --coral: #ff5a5f;
  --coral-deep: #e8454b;
  --sun: #ffc21a;
  --sky: #1fd3e0;
  --teal: #12a594;
  --plum: #6b3a5b;
  --ink: #26121b;
  --on-coral: #26121b;

  --bg: #ffffff;
  --surface: #fff1ec;
  --text: #26121b;
  --muted: #6e5560;
  --line: #f1d9d2;
  --chip-text: #26121b;

  --font: 'Bricolage Grotesque', system-ui, sans-serif;
  --wrap: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1c0f15;
    --surface: #2a1820;
    --text: #fbeee9;
    --muted: #c4a9b3;
    --line: #3d2630;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1c0f15;
  --surface: #2a1820;
  --text: #fbeee9;
  --muted: #c4a9b3;
  --line: #3d2630;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}

img {
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 40rem) {
  .wrap {
    padding: 0 2rem;
  }
}

.narrow {
  max-width: 48rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--sun);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus {
  left: 0.5rem;
}

/* Tag chip: a luggage-tag shape with a punched hole, the motif the whole page leans on. */
.chip {
  --hole: 0.22em;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 0.18em 0.6em 0.2em 1.05em;
  margin: 0 0.3em 0.3em 0;
  background: radial-gradient(circle at 0.55em 50%, transparent var(--hole), var(--sun) calc(var(--hole) + 0.5px));
  color: var(--chip-text);
  font-weight: 700;
  font-size: 0.85em;
  line-height: 1.2;
  white-space: nowrap;
  clip-path: polygon(0.45em 0, 100% 0, 100% 100%, 0.45em 100%, 0 50%);
  border-radius: 0 0.3em 0.3em 0;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--coral);
  color: var(--on-coral);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.4rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand img {
  border-radius: 22%;
}

.topbar-links {
  display: flex;
  gap: 1.25rem;
  font-size: 1rem;
  font-weight: 500;
}
.topbar-links a {
  text-decoration: none;
}
.topbar-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
@media (max-width: 40rem) {
  .topbar-links a[href^='#'] {
    display: none;
  }
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 0;
}
@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    padding-top: 3rem;
  }
  .hero-copy {
    padding-bottom: 5rem;
  }
  .phone {
    --w: 23rem;
  }
}

.hero h1 {
  font-size: clamp(3rem, 9vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-bottom: 1.5rem;
  font-variation-settings: 'opsz' 96;
}

.lede {
  font-size: 1.25rem;
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.note {
  font-size: 0.95rem;
  opacity: 0.8;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-hero {
  background: var(--ink);
  color: #fff;
}
.btn-hero:hover {
  background: #000;
}
.btn-end {
  background: var(--ink);
  color: #fff;
}
.btn-end:hover {
  background: #000;
}

/* ---------- Phone mockup ---------- */

.phone-stage {
  display: flex;
  justify-content: center;
  align-self: end;
}

.phone {
  --w: min(19rem, 78vw);
  margin-top: 1rem;
  width: var(--w);
  aspect-ratio: 9 / 17;
  background: var(--ink);
  border-radius: 2.6rem 2.6rem 0 0;
  padding: 0.7rem 0.7rem 0;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.2) inset;
  font-size: calc(var(--w) / 19);
}

.screen {
  position: relative;
  height: 100%;
  border-radius: 2rem 2rem 0 0;
  overflow: hidden;
  background: #f7eeea;
  color: var(--ink);
}

.status {
  display: flex;
  justify-content: space-between;
  padding: 0.6em 1.3em 0.3em;
  font-size: 0.8em;
  font-weight: 600;
}
.status-icons {
  display: flex;
  gap: 0.25em;
  align-items: center;
}
.status-icons i {
  width: 0.8em;
  height: 0.55em;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.75;
}

.scene {
  position: absolute;
  inset: 2.2em 0 0;
  padding: 0.8em;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

/* Scene 1: a meme in a chat, saved */
.scene-save {
  background: #e9e1f2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1em;
}
.chat-bubble {
  background: #fff;
  padding: 0.4em;
  border-radius: 1em 1em 1em 0.2em;
  width: 78%;
}
.chat-bubble .tile figcaption {
  display: none;
}
.toast {
  align-self: center;
  background: var(--ink);
  color: #fff;
  font-size: 0.75em;
  padding: 0.5em 1em;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.phone[data-step='saved'] .toast {
  opacity: 1;
  transform: none;
}

/* Notification */
.notif {
  position: absolute;
  left: 0.5em;
  right: 0.5em;
  top: 2.4em;
  z-index: 2;
  background: #fff;
  border-radius: 1.1em;
  padding: 0.75em 0.85em;
  box-shadow: 0 0.5em 1.5em rgba(38, 18, 27, 0.25);
  font-size: 0.82em;
  transform: translateY(-130%);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.phone[data-step='notif'] .notif,
.phone[data-step='typing'] .notif,
.phone[data-step='sent'] .notif {
  transform: none;
}
.notif-head {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85em;
  color: #6e5560;
}
.notif-head img {
  width: 1.2em;
  height: 1.2em;
  border-radius: 0.3em;
}
.notif-now::before {
  content: '·';
  margin-right: 0.4em;
}
.notif-main {
  display: flex;
  justify-content: space-between;
  gap: 0.6em;
  margin: 0.35em 0 0.6em;
}
.notif-title {
  display: block;
  font-weight: 700;
}
.notif-body {
  display: block;
  color: #6e5560;
  font-size: 0.9em;
  line-height: 1.3;
}
.notif-thumb {
  background: var(--tile);
  flex: none;
  width: 2.6em;
  height: 2.6em;
  border-radius: 0.4em;
}

.reply {
  display: flex;
  align-items: center;
  gap: 0.5em;
  background: #f4ebe7;
  border-radius: 999px;
  padding: 0.45em 0.5em 0.45em 0.9em;
}
.reply-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 600;
}
.reply-ph,
.search-ph {
  color: #9b8790;
  font-weight: 400;
}
.reply-text:not(:empty) ~ .reply-ph,
.search-text:not(:empty) ~ .search-ph {
  display: none;
}
.caret {
  width: 2px;
  height: 1.1em;
  background: var(--coral);
  margin: 0 1px;
  opacity: 0;
}
.phone[data-step='typing'] .caret {
  opacity: 1;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.reply-send {
  flex: none;
  background: var(--coral);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.3em 0.8em;
}
.notif-done {
  display: none;
  font-weight: 700;
  margin-top: 0.1em;
}
.phone[data-step='sent'] .reply {
  display: none;
}
.phone[data-step='sent'] .notif-done {
  display: block;
}
.chip-sm {
  font-size: 0.8em;
  margin-left: 0.2em;
}

/* Scene 2: the Taggy gallery */
.scene-gallery {
  background: #fbf6f4;
  opacity: 0;
  transform: translateY(1.5em);
}
.phone[data-step='gallery'] .scene-gallery,
.phone[data-step='search'] .scene-gallery {
  opacity: 1;
  transform: none;
}
.phone[data-step='gallery'] .scene-save,
.phone[data-step='search'] .scene-save {
  opacity: 0;
}
.search {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  font-size: 0.85em;
  font-weight: 700;
  margin-bottom: 0.7em;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em;
}
.grid .tile {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.grid .tile.is-out {
  opacity: 0.18;
  transform: scale(0.94);
}
.grid .tile.is-new {
  animation: pop 0.6s ease;
}
@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.05);
  }
}

/* Saved-image stand-ins */
.tile {
  margin: 0;
  font-size: 0.7em;
}
.tile-img {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.6em;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.tile-cap {
  position: relative;
  z-index: 1;
  padding: 0.5em 0.5em 0;
  text-align: center;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 0.25em rgba(0, 0, 0, 0.55);
  letter-spacing: -0.01em;
}
.tile svg {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  fill: var(--tile-ink);
}
.tile svg circle {
  fill: var(--tile-sun);
}
.tile figcaption {
  padding-top: 0.3em;
  font-size: 0.85em;
  display: flex;
  flex-wrap: wrap;
}
.tile figcaption .chip {
  margin-bottom: 0.15em;
}
.chat-bubble .tile {
  font-size: 1em;
}
.tone-sun {
  --tile: #ffcf4d;
  --tile-ink: #e0861f;
  --tile-sun: #fff;
}
.tone-sky {
  --tile: #7fe6ee;
  --tile-ink: #12a594;
  --tile-sun: #ffc21a;
}
.tone-teal {
  --tile: #2a5d6b;
  --tile-ink: #12a594;
  --tile-sun: #fbeee9;
}
.tone-coral {
  --tile: #ff9b8f;
  --tile-ink: #e8454b;
  --tile-sun: #ffc21a;
}
.tone-plum {
  --tile: #6b3a5b;
  --tile-ink: #a1527f;
  --tile-sun: #1fd3e0;
}
.tile-img {
  background: var(--tile);
}

/* ---------- Sections ---------- */

.section {
  padding: 4.5rem 0;
}
@media (min-width: 56rem) {
  .section {
    padding: 6rem 0;
  }
}

.section-lede {
  font-size: 1.25rem;
  color: var(--muted);
  margin-top: -0.75rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.5rem;
  counter-reset: step;
}
@media (min-width: 56rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}
.steps p {
  color: var(--muted);
  max-width: 26rem;
}
.step-n {
  display: inline-block;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--coral);
  letter-spacing: -0.05em;
  margin-bottom: 0.75rem;
}

.section-more {
  background: var(--surface);
}
.more {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 3rem;
}
@media (min-width: 40rem) {
  .more {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 64rem) {
  .more {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.more li {
  padding-top: 1rem;
  border-top: 2px solid var(--line);
}
.more p {
  color: var(--muted);
  margin: 0;
}

/* Free vs Pro */
.plans {
  border: 2px solid var(--line);
  border-radius: 1.25rem;
  overflow: hidden;
}
.plans-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 2px solid var(--line);
}
.plans-row:first-child {
  border-top: 0;
}
.plans-head {
  font-weight: 800;
  font-size: 1.3rem;
}
.plans-row [role='rowheader'] {
  font-weight: 600;
}
.plans-row .pro {
  background: color-mix(in srgb, var(--sun) 22%, transparent);
  margin: -1rem -1.25rem -1rem 0;
  padding: 1rem 1.25rem;
}
@media (max-width: 40rem) {
  .plans-head {
    display: none;
  }
  .plans-row {
    grid-template-columns: 1fr 1fr;
  }
  .plans-row [role='rowheader'] {
    grid-column: 1 / -1;
  }
  .plans-row [role='cell']::before {
    content: attr(data-label);
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
  }
}
.fine {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.section-privacy {
  background: var(--teal);
  color: #fff;
}
.privacy-row {
  display: grid;
  gap: 1.5rem;
  align-items: end;
}
@media (min-width: 56rem) {
  .privacy-row {
    grid-template-columns: 1fr auto;
  }
}
.section-privacy p {
  font-size: 1.25rem;
  max-width: 40rem;
  margin: 0;
}
.link {
  font-weight: 700;
  text-underline-offset: 0.2em;
}

details {
  border-top: 2px solid var(--line);
  padding: 1rem 0;
}
details:last-of-type {
  border-bottom: 2px solid var(--line);
}
summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.2rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.section-end {
  background: var(--coral);
  color: var(--on-coral);
}
.end-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.end-row h2 {
  margin: 0;
}

.footer {
  padding: 2rem 0;
  border-top: 2px solid var(--line);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.footer .brand {
  font-size: 1.1rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- Legal pages ---------- */

.legal-top {
  background: var(--coral);
  color: var(--on-coral);
}
.legal {
  max-width: 46rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.legal h1 {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.legal h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 0.75rem;
}
.legal h3 {
  margin-top: 1.5rem;
}
.legal ul {
  padding-left: 1.25rem;
}
.legal li {
  margin-bottom: 0.4rem;
}
.muted {
  color: var(--muted);
}
