/*
 * The Lostalgia landing page (/about and /ja/about). Plain HTML and CSS,
 * served by Cloudflare straight from dist/client: no app, no scripts.
 * Colours follow src/constants/theme.ts.
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/lp/fonts/PlusJakartaSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/lp/fonts/PlusJakartaSans_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/lp/fonts/PlusJakartaSans_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  --brand: #f2755b;
  --lost: #c4472e;
  --found: #1f6fb2;
  --found-bright: #5aa7e8;
  --ink: #17110e;
  --ink-2: #221a16;
  --ink-line: rgba(255, 248, 243, 0.12);
  --cream: #fff8f3;
  --surface: #ffffff;
  --border: #eadfd6;
  --text: #2a211c;
  --text-2: #6e5d52;
  --on-dark: #fff8f3;
  --on-dark-2: rgba(255, 248, 243, 0.68);
  --radius: 20px;
  --max: 1120px;
  --font: 'Plus Jakarta Sans', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', system-ui,
    -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:lang(ja) body,
body:lang(ja) {
  line-height: 1.8;
  word-break: auto-phrase;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
}

:focus-visible {
  outline: 3px solid var(--found-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Header */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-dark);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang {
  color: var(--on-dark-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
}
.lang:hover {
  color: var(--on-dark);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--lost);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(242, 117, 91, 0.7);
}
.btn-primary:hover {
  background: #d0503a;
}
.btn-ghost {
  color: var(--on-dark);
  box-shadow: inset 0 0 0 1.5px var(--ink-line);
}
.btn-ghost:hover {
  box-shadow: inset 0 0 0 1.5px rgba(255, 248, 243, 0.4);
}
.btn-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(31, 111, 178, 0.35), transparent 70%),
    radial-gradient(50% 55% at 10% 90%, rgba(242, 117, 91, 0.28), transparent 70%),
    var(--ink);
  color: var(--on-dark);
  padding: 140px 0 96px;
}
.hero::before {
  /* A faint street grid. */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 70% at 60% 40%, #000 30%, transparent 80%);
  opacity: 0.5;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.hero .eyebrow {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(242, 117, 91, 0.12);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: ping 2.4s ease-out infinite;
}
h1 {
  margin: 22px 0 20px;
  font-size: clamp(42px, 6.4vw, 76px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}
:lang(ja) h1 {
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.c-lost {
  color: var(--brand);
}
.c-found {
  color: var(--found-bright);
}
.lead {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: 19px;
  color: var(--on-dark-2);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--on-dark-2);
}
.hero-notes li::before {
  content: '✓';
  margin-right: 6px;
  color: var(--found-bright);
  font-weight: 800;
}

/* The map in the hero */

.map {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: 32px;
  background: #241b17;
  box-shadow:
    0 0 0 1px var(--ink-line),
    0 40px 80px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.map svg.streets {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pin {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -30px 0 0 -15px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.pin::after {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
}
.pin.lost {
  background: var(--brand);
}
.pin.found {
  background: var(--found);
}
.pulse {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  color: var(--brand);
  animation: ping 2.4s ease-out infinite;
}
.pulse.found {
  color: var(--found-bright);
  animation-delay: 1.2s;
}
.map .route {
  stroke-dasharray: 6 8;
  animation: dash 1.6s linear infinite;
}
.toast {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 6%;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 248, 243, 0.96);
  color: var(--text);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  animation: rise 0.9s 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--found);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}
.toast strong {
  display: block;
  font-size: 15px;
}
.toast div span {
  display: block;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.45;
}
.chip {
  position: absolute;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(23, 17, 14, 0.85);
  color: var(--on-dark);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 0 1px var(--ink-line);
}
.switch {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 248, 243, 0.96);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6);
}
.switch span {
  padding: 6px 18px;
  border-radius: 999px;
  color: var(--text-2);
}
.switch .on {
  background: var(--found);
  color: #fff;
}

/* Sections */

section {
  padding: 112px 0;
}
.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
h2 {
  margin: 14px 0 16px;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}
:lang(ja) h2 {
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.section-head p {
  margin: 0;
  font-size: 19px;
  color: var(--text-2);
}

/* Lost / Found paths */

.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.path {
  position: relative;
  padding: 40px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  overflow: hidden;
}
.path::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
}
.path.lost::before {
  background: var(--brand);
}
.path.found::before {
  background: var(--found);
}
.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.path.lost .tag {
  background: #fde7e1;
  color: #9e3522;
}
.path.found .tag {
  background: #e3eef8;
  color: #17548a;
}
.path h3 {
  margin-top: 18px;
  font-size: 28px;
}
.steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0 0 18px 48px;
  counter-increment: step;
  color: var(--text-2);
}
.steps li:last-child {
  padding-bottom: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.path.lost .steps li::before {
  background: var(--lost);
}
.path.found .steps li::before {
  background: var(--found);
}
.steps strong {
  display: block;
  color: var(--text);
}

/* "Is this yours?" */

.dark {
  background: var(--ink);
  color: var(--on-dark);
}
.dark .section-head p,
.dark .muted {
  color: var(--on-dark-2);
}
.match {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.match .section-head {
  margin-bottom: 32px;
}
.points {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.points li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}
.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 248, 243, 0.08);
  box-shadow: inset 0 0 0 1px var(--ink-line);
  color: var(--brand);
}
.points li:nth-child(2) .icon {
  color: var(--found-bright);
}
.points strong {
  display: block;
  font-size: 17px;
}
.points span {
  color: var(--on-dark-2);
  font-size: 16px;
}

.phone {
  position: relative;
  width: min(340px, 100%);
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  padding: 14px;
  border-radius: 48px;
  background: #0d0907;
  box-shadow:
    0 0 0 2px #3a2e28,
    0 50px 100px -30px rgba(0, 0, 0, 0.9),
    0 0 120px -20px rgba(31, 111, 178, 0.45);
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(31, 111, 178, 0.55), transparent 70%),
    linear-gradient(#2a1f1a, #120d0b);
  padding: 64px 14px 14px;
}
.clock {
  text-align: center;
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--on-dark);
}
.date {
  text-align: center;
  font-size: 14px;
  color: var(--on-dark-2);
  margin: 6px 0 36px;
}
.notice {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 248, 243, 0.92);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 10px;
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.notice:nth-child(2) {
  animation-delay: 0.25s;
  opacity: 0.85;
}
.notice-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.notice-top img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}
.notice-top time {
  margin-left: auto;
}
.notice strong {
  display: block;
  font-size: 14.5px;
}

/* Privacy */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.card .big {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: #fde7e1;
  color: var(--lost);
}
.card:nth-child(2) .big {
  background: #e3eef8;
  color: var(--found);
}
.card:nth-child(3) .big {
  background: #f1ece6;
  color: var(--text);
}
.card p {
  margin: 0;
  color: var(--text-2);
}

/* Thanks and tips */

.thanks {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.bubble {
  padding: 14px 20px;
  border-radius: 22px 22px 22px 6px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  font-weight: 700;
}
.bubble:nth-child(even) {
  border-radius: 22px 22px 6px 22px;
  background: #e3eef8;
  box-shadow: none;
  color: #17548a;
}
.bubble.tip {
  background: var(--lost);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(196, 71, 46, 0.8);
}
.fine {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-2);
}

/* Venues and developers */

.panel {
  display: flex;
  flex-direction: column;
  max-width: 760px;
  padding: 40px;
  border-radius: 28px;
  background: var(--ink-2);
  color: var(--on-dark);
}
.panel p {
  margin: 0 0 24px;
  color: var(--on-dark-2);
}
.panel .eyebrow {
  margin-bottom: 14px;
}
.panel h3 {
  font-size: 26px;
}
.panel .soon {
  margin-top: auto;
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 248, 243, 0.08);
  color: var(--on-dark-2);
}

/* Closing */

.closing {
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(50% 80% at 50% 120%, rgba(242, 117, 91, 0.45), transparent 70%),
    radial-gradient(40% 60% at 80% 0%, rgba(31, 111, 178, 0.35), transparent 70%),
    var(--ink);
  color: var(--on-dark);
}
.closing h2 {
  font-size: clamp(36px, 5.6vw, 68px);
}
.closing p {
  margin: 0 auto 36px;
  max-width: 32em;
  color: var(--on-dark-2);
  font-size: 19px;
}
.closing .cta {
  justify-content: center;
}

footer {
  padding: 40px 0 56px;
  background: var(--ink);
  color: var(--on-dark-2);
  font-size: 14px;
  border-top: 1px solid var(--ink-line);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--on-dark);
}

/* Motion */

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  80%,
  100% {
    box-shadow: 0 0 0 22px transparent;
  }
}
@keyframes dash {
  to {
    stroke-dashoffset: -28;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Narrow screens */

@media (max-width: 920px) {
  .hero {
    padding: 112px 0 72px;
  }
  .hero .wrap,
  .match,
  .thanks,
  .paths {
    grid-template-columns: 1fr;
  }
  .hero .wrap {
    gap: 48px;
  }
  .map {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  section {
    padding: 80px 0;
  }
  .match {
    gap: 48px;
  }
}
@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .wrap {
    padding: 0 16px;
  }
  .lead,
  .section-head p,
  .closing p {
    font-size: 17px;
  }
  .path,
  .panel {
    padding: 28px 24px;
  }
  .card {
    padding: 24px;
  }
  .top .btn-small {
    display: none;
  }
  :lang(ja) h2 {
    font-size: 28px;
  }
  :lang(ja) h1 {
    font-size: 34px;
  }
  .cta .btn {
    flex: 1 1 100%;
  }
}

.nb {
  /* A phrase that wraps as one piece (Japanese headings). */
  display: inline-block;
}

/* Where the pins and labels sit on the hero map. */
.at-lost {
  left: 32.5%;
  top: 39%;
}
.at-found {
  left: 67%;
  top: 49%;
}
.chip-lost {
  left: 12%;
  top: 25%;
}
.chip-found {
  left: 54%;
  top: 55%;
}
section.flush {
  padding-top: 0;
}
.thanks .section-head {
  margin-bottom: 0;
}
