/*
 * hundomap.com: one stylesheet for every page.
 * Colors follow the app's Night theme (docs/27-design-system.md, design/tokens.json).
 * Retro character (sun, grid, Kanit) only on the landing hero and the wordmark; legal pages stay plain.
 */

@font-face {
  font-family: "Kanit";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/kanit-800-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  --bg: #0e0a1c;
  --surface-1: #1a1330;
  --surface-2: #241a40;
  --surface-3: #2e2352;
  --separator: rgba(214, 196, 255, 0.12);
  --separator-strong: rgba(214, 196, 255, 0.2);
  --fill-2: rgba(190, 170, 255, 0.14);
  --label: #fff4e8;
  --label-2: rgba(255, 244, 232, 0.72);
  --on-accent: #1b0b1f;
  --flamingo: #ff5fa2;
  --aqua: #37e2d5;
  --sunset: #ff8f4d;
  --sun: #ffd166;
  --violet: #9d7bff;
  --palm: #4be3a0;
  --sky: #6fa8ff;
  --coral: #ff6f61;
  --red: #ff4e45;

  --grad-sunset: linear-gradient(180deg, #ffd166 0%, #ff8f4d 34%, #ff5fa2 66%, #9d7bff 100%);
  --grad-sunset-x: linear-gradient(90deg, #ffd166 0%, #ff8f4d 34%, #ff5fa2 66%, #9d7bff 100%);
  --grad-dusk: linear-gradient(180deg, #120b26 0%, #24104a 38%, #5a1d6b 64%, #c2406f 86%, #ff8f4d 100%);
  --grad-chrome: linear-gradient(180deg, #fff4e8 0%, #ffd3ea 46%, #7fe9e2 54%, #9d7bff 100%);

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Kanit", var(--font-ui);

  --radius: 14px;
  --radius-lg: 20px;
  --gutter: 20px;
  --measure: 680px;
  --wide: 1080px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

@media (min-width: 600px) {
  body {
    font-size: 1.0625rem;
  }
}

main {
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--flamingo);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

::selection {
  background: rgba(255, 95, 162, 0.4);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.375rem;
  margin-top: 2.2em;
}

h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.35em;
}

strong {
  font-weight: 650;
}

code,
kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--fill-2);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--flamingo);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.prose {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 10, 28, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--separator);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--label);
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 32px;
  height: 32px;
}

.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0.01em;
  padding-right: 0.08em;
  background: var(--grad-chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: inline-block;
  padding: 10px 8px;
  color: var(--label-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
}

.site-nav a:hover {
  color: var(--label);
  background: var(--fill-2);
}

.site-nav a[aria-current="page"] {
  color: var(--flamingo);
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--separator);
  background: var(--surface-1);
  padding: 32px 0 40px;
  font-size: 0.9375rem;
  color: var(--label-2);
}

.site-footer .disclaimer {
  max-width: 760px;
  color: var(--label);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer ul a {
  display: inline-block;
  padding: 6px 0;
  font-weight: 600;
}

.site-footer .fine {
  margin: 0;
  font-size: 0.875rem;
}

/* Draft banner: remove the "draft" class from <body> to hide it everywhere on that page. */
.draft-banner {
  display: none;
}

.draft .draft-banner {
  display: block;
  background: var(--sun);
  color: var(--on-accent);
  padding: 10px var(--gutter);
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Legal and help pages */
.page-head {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--separator);
}

.page-head h1 {
  margin-bottom: 0.3em;
}

.meta {
  color: var(--label-2);
  font-size: 0.9375rem;
  margin: 0;
}

.lead {
  font-size: 1.125rem;
  color: var(--label);
}

.toc {
  background: var(--surface-1);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 32px;
}

.toc h2 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--label-2);
  margin: 0 0 8px;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
}

.toc li + li {
  margin-top: 0.2em;
}

.prose section {
  scroll-margin-top: 76px;
}

.prose h2 {
  scroll-margin-top: 76px;
}

.callout {
  background: var(--surface-1);
  border: 1px solid var(--separator-strong);
  border-left: 4px solid var(--aqua);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 1.4em;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout.warn {
  border-left-color: var(--sun);
}

.callout h2,
.callout h3 {
  margin-top: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  min-height: 32px;
}

.steps li + li {
  margin-top: 12px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--label);
  font-weight: 700;
  font-size: 0.9375rem;
}

.path {
  font-weight: 650;
  color: var(--label);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid var(--separator);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--separator);
}

tr:last-child td {
  border-bottom: 0;
}

thead th {
  background: var(--surface-1);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label-2);
}

tbody th {
  font-weight: 650;
}

dl.defs dt {
  font-weight: 650;
  margin-top: 0.8em;
}

dl.defs dd {
  margin: 0.1em 0 0;
  color: var(--label-2);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--flamingo);
  color: var(--on-accent);
}

.button:hover {
  filter: brightness(1.08);
}

.button.secondary {
  background: var(--surface-2);
  color: var(--label);
  border: 1px solid var(--separator-strong);
}

/* FAQ */
.faq details {
  background: var(--surface-1);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  margin: 0 0 10px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 48px 14px 18px;
  font-weight: 650;
  position: relative;
  border-radius: var(--radius);
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--label-2);
  border-bottom: 2px solid var(--label-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq .answer {
  padding: 0 18px 6px;
  color: var(--label);
}

.faq h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--label-2);
  margin: 2em 0 12px;
}

.faq h2:first-child {
  margin-top: 0;
}

/* ---------- Landing ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-dusk);
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 8px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(14, 10, 28, 0.55);
  border: 1px solid var(--separator-strong);
  color: var(--label);
  font-size: 0.875rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(4rem, 20vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  padding: 0 0.1em 0.06em 0;
  background: var(--grad-chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(14, 10, 28, 0.55));
}

.hero .tagline {
  max-width: 34em;
  margin: 14px auto 20px;
  font-size: 1.125rem;
  color: var(--label);
}

.unofficial {
  max-width: 34em;
  margin: 0 auto 24px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(14, 10, 28, 0.72);
  border: 1px solid var(--separator-strong);
  font-size: 0.9375rem;
  color: var(--label);
}

.unofficial strong {
  color: var(--sun);
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.store-links li + li {
  margin-top: 0;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  min-height: 56px;
  padding: 8px 18px 8px 14px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
  text-align: left;
}

.store-badge:hover {
  border-color: #fff;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  fill: currentColor;
}

.store-badge span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge small {
  font-size: 0.72rem;
  opacity: 0.85;
}

.store-badge b {
  font-size: 1.15rem;
  font-weight: 650;
}

.launch-line {
  margin: 0 auto;
  max-width: 34em;
  color: var(--label);
  font-size: 0.9375rem;
}

.launch-line time {
  font-weight: 700;
  color: var(--sun);
}

/* The retro horizon: a striped sun sinking behind a perspective grid. Decorative only. */
.scene {
  position: relative;
  height: 230px;
  margin-top: 16px;
}

.horizon-sun {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(64vw, 300px);
  aspect-ratio: 1;
  transform: translate(-50%, 40%);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd166 0%, #ff8f4d 45%, #ff5fa2 80%, #c2406f 100%);
  box-shadow: 0 0 80px rgba(255, 95, 162, 0.45);
  -webkit-mask-image: linear-gradient(180deg, #000 0 31%, transparent 31% 33%, #000 33% 39%, transparent 39% 42%, #000 42% 47%, transparent 47% 51%, #000 51% 55%, transparent 55% 60%, #000 60%);
  mask-image: linear-gradient(180deg, #000 0 31%, transparent 31% 33%, #000 33% 39%, transparent 39% 42%, #000 42% 47%, transparent 47% 51%, #000 51% 55%, transparent 55% 60%, #000 60%);
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  overflow: hidden;
  background: linear-gradient(180deg, #2a0f3f 0%, var(--bg) 100%);
  border-top: 2px solid var(--flamingo);
  box-shadow: 0 -6px 24px rgba(255, 95, 162, 0.5);
  perspective: 180px;
  perspective-origin: 50% 0;
}

.ground::before {
  content: "";
  position: absolute;
  left: -100%;
  width: 300%;
  top: 0;
  height: 400px;
  transform-origin: 50% 0;
  transform: rotateX(62deg);
  background-image:
    linear-gradient(rgba(255, 95, 162, 0.55) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 95, 162, 0.55) 2px, transparent 2px);
  background-size: 44px 44px;
  background-position: center top;
}

.ground::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(42, 15, 63, 0.6) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
}

/* Sections */
.band {
  padding: 56px 0;
}

.band + .band {
  border-top: 1px solid var(--separator);
}

.band h2 {
  margin-top: 0;
  font-size: 1.625rem;
}

.band .intro {
  max-width: 40em;
  color: var(--label-2);
  margin-bottom: 28px;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.features li + li {
  margin-top: 0;
}

.feature {
  background: var(--surface-1);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.feature h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--label-2);
}

.dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.dot svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dot.sun { background: var(--sun); }
.dot.aqua { background: var(--aqua); }
.dot.flamingo { background: var(--flamingo); }
.dot.violet { background: var(--violet); }

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.plans li + li {
  margin-top: 0;
}

.plan {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-1);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
}

.plan b {
  font-size: 1.25rem;
}

.plan span {
  color: var(--label-2);
}

.plan.best {
  border-color: var(--flamingo);
}

.checks {
  list-style: none;
  padding: 0;
}

.checks li {
  position: relative;
  padding-left: 28px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--palm);
  border-bottom: 2px solid var(--palm);
  transform: rotate(45deg);
}

.small {
  font-size: 0.875rem;
  color: var(--label-2);
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li + li {
  margin-top: 0;
}

/* 404 */
.not-found {
  text-align: center;
  padding-top: 72px;
}

.not-found .link-list {
  justify-content: center;
}

.not-found .code {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 6rem;
  line-height: 1;
  margin: 0 0 8px;
  background: var(--grad-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  .site-nav ul {
    gap: 4px;
  }

  .site-nav a {
    padding: 10px 12px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .hero-copy {
    padding-top: 72px;
  }

  .scene {
    height: 300px;
  }

  .horizon-sun {
    width: 320px;
    bottom: 96px;
  }

  .ground {
    height: 96px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

@media (min-width: 1000px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  .site-header,
  .site-footer nav,
  .skip-link,
  .draft-banner {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
  }
}
