/* LaundryUIN — site-wide stylesheet (all 6 pages).
   Self-contained: replaces css/style.css, css/bootstrap.min.css, and lib/*.
   Warm-local direction: cream + ink + one clay accent. */

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

:root {
  --cream: #f7f1e6;
  --cream-deep: #f0e6d2;
  --surface: #fffdf8;
  --ink: #211c14;
  --ink-muted: #6b6152;
  --clay: #b8502e;
  --clay-deep: #97401f;
  --line: rgba(33, 28, 20, 0.12);

  /* Inverted band (cta-band, first explore-card, team mark). Never flips
     with the theme — it is a fixed dark accent in both light and dark. */
  --band-bg: #211c14;
  --band-fg: #f7f1e6;
  --band-fg-muted: rgba(247, 241, 230, 0.7);

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

/* Dark theme: flip the 8 core tokens. Everything else is expressed in
   terms of them, so components need no per-theme rules.
   System preference when the user hasn't chosen; [data-theme] wins both ways. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #16130e;
    --cream-deep: #201b14;
    --surface: #221d16;
    --ink: #f3ede1;
    --ink-muted: #a99f8c;
    --clay: #c85f38;
    --clay-deep: #d97245;
    --line: rgba(243, 237, 225, 0.14);
  }
}

:root[data-theme="dark"] {
  --cream: #16130e;
  --cream-deep: #201b14;
  --surface: #221d16;
  --ink: #f3ede1;
  --ink-muted: #a99f8c;
  --clay: #c85f38;
  --clay-deep: #d97245;
  --line: rgba(243, 237, 225, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 55% at 25% 12%, rgba(184, 80, 46, 0.08) 0%, transparent 60%),
    var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Bricolage Grotesque", "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-family: "Space Grotesk", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1100; /* above Leaflet panes/controls (max ~1000) on peta.html */
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  background: var(--cream); /* fallback for no color-mix */
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.nav__brand {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.nav__links {
  display: flex;
  gap: 1.6rem;
  align-items: center;
  margin-left: auto;
}

.nav__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto; /* right-aligns the controls when the links collapse (mobile) */
}

.toggle-btn {
  font-family: "Space Grotesk", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  line-height: 1;
  min-width: 2.2rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.toggle-btn:hover {
  border-color: var(--clay);
  color: var(--ink);
}

.nav__links a:not(.btn) {
  font-size: 0.9rem;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}

.nav__links a:not(.btn):hover {
  color: var(--ink);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
}

.btn {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  border: 1px solid var(--clay);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(184, 80, 46, 0.28);
  background: var(--clay-deep);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding-block: clamp(3rem, 10vh, 7rem);
}

.hero__title {
  font-size: clamp(2.75rem, 9vw, 7.5rem);
  max-width: 16ch;
}

.hero__title em {
  font-style: italic;
  color: var(--clay);
}

.hero__sub {
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--ink-muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero__meta {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-family: "Space Grotesk", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Sections ---------- */
main > section {
  padding-block: clamp(4rem, 12vh, 8rem);
}

.section-head {
  max-width: 40ch;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-top: 0.6rem;
}

/* Metric bar */
.metrics {
  padding-block: clamp(3rem, 7vh, 4.5rem);
  border-block: 1px solid var(--line);
  background: var(--cream-deep); /* fallback for no color-mix */
  background: color-mix(in srgb, var(--cream-deep) 55%, transparent);
}

.metrics__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.metric__num {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric__label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.35rem;
}

/* About split */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about__grid p {
  color: var(--ink-muted);
  max-width: 48ch;
  margin-bottom: 1.25rem;
}

.note-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
}

.note-card dl {
  display: grid;
  gap: 0.9rem;
}

.note-card dt {
  font-family: "Space Grotesk", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.note-card dd {
  font-weight: 500;
}

/* Map spotlight */
.map-spot {
  text-align: center;
}

.map-spot .section-head {
  margin-inline: auto;
}

#laundry-map {
  height: clamp(360px, 62vh, 640px);
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(33, 28, 20, 0.12);
  overflow: hidden;
  z-index: 0;
}

/* Featured laundries */
.featured__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.featured__col h3 {
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.featured__col h3 span {
  font-family: "Space Grotesk", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}

.laundry-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s;
}

.laundry-card:hover {
  transform: translateY(-3px);
  border-color: var(--clay);
}

.laundry-card__name {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.laundry-card__addr {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.laundry-card__stats {
  font-family: "Space Grotesk", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.laundry-card__stats b {
  color: var(--clay);
}

/* Explore entry points */
.explore__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.explore-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 220px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}

.explore-card:first-child {
  background: var(--band-bg);
  color: var(--band-fg);
}

.explore-card:hover {
  transform: translateY(-4px);
}

.explore-card__idx {
  font-family: "Space Grotesk", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  opacity: 0.7;
}

.explore-card h3 {
  font-size: 1.4rem;
}

.explore-card p {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.explore-card:first-child p {
  color: var(--band-fg-muted);
}

.explore-card__go {
  margin-top: auto;
  font-family: "Space Grotesk", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* CTA banner */
.cta-band {
  text-align: center;
  background: var(--band-bg);
  color: var(--band-fg);
}

.cta-band h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  max-width: 18ch;
  margin: 0 auto 1.5rem;
}

.cta-band p {
  color: var(--band-fg-muted);
  max-width: 40ch;
  margin: 0 auto 2rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vh, 4rem);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

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

.footer__fine {
  margin-top: 2rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  max-width: 60ch;
}

.footer__fine a {
  border-bottom: 1px solid var(--line);
}

/* ---------- Interior pages (peta / data / kategori / feature / team) ---------- */
.nav__links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

.page-hero {
  padding: clamp(3rem, 9vh, 6rem) 0 clamp(2rem, 5vh, 3rem);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  margin: 0.5rem 0 0.75rem;
}

.page-hero p {
  color: var(--ink-muted);
  max-width: 52ch;
}

.page-body {
  padding-block: clamp(2.5rem, 7vh, 4.5rem);
}

/* Map page: map is the whole page, not a spotlight */
#laundry-map.map--full {
  height: clamp(420px, 78vh, 900px);
  border-radius: 16px;
}

/* Form controls */
.field,
.select {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  width: 100%;
}

.field:focus,
.select:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
}

.filters label {
  display: block;
  font-family: "Space Grotesk", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.filters__field {
  min-width: 220px;
}

.filters__count {
  font-family: "Space Grotesk", monospace;
  font-size: 0.8rem;
  color: var(--ink-muted);
  padding-bottom: 0.7rem;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th {
  text-align: left;
  font-family: "Space Grotesk", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ink);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--cream-deep) 55%, transparent);
}

.data-table .num {
  text-align: right;
  font-family: "Space Grotesk", monospace;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

/* Badge */
.badge {
  display: inline-block;
  font-family: "Space Grotesk", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

.badge--price {
  border-color: var(--clay);
  color: var(--clay-deep);
}

/* Card grid (kategori results, feature list) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
}

.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.info-card__addr {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
}

.info-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.info-card__idx {
  font-family: "Space Grotesk", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--clay);
  margin-bottom: 0.6rem;
  display: block;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Empty state */
.empty {
  color: var(--ink-muted);
  font-size: 0.95rem;
  padding: 2rem 0;
}

/* Person card (team) */
.person {
  max-width: 460px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3rem);
}

.person__mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--band-bg);
  color: var(--band-fg);
  display: grid;
  place-items: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
}

.person h3 {
  font-size: 1.4rem;
}

.person__role {
  color: var(--clay-deep);
  font-size: 0.9rem;
  margin: 0.35rem 0 1rem;
}

.person p {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.person__links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.person__links a {
  font-family: "Space Grotesk", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  transition: border-color 0.2s, color 0.2s;
}

.person__links a:hover {
  border-color: var(--clay);
  color: var(--clay-deep);
}

@media (max-width: 640px) {
  .filters__field {
    min-width: 100%;
  }
}

/* ---------- Hero entrance (runs once on load, CSS-only) ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

.hero > * {
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero > :nth-child(2) {
  animation-delay: 0.08s;
}
.hero > :nth-child(3) {
  animation-delay: 0.16s;
}
.hero > :nth-child(4) {
  animation-delay: 0.24s;
}
.hero > :nth-child(5) {
  animation-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero > * {
    animation: none;
  }
  .btn,
  .laundry-card,
  .explore-card {
    transition: none;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .about__grid,
  .featured__cols {
    grid-template-columns: 1fr;
  }
  .metrics__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
  .explore__grid {
    grid-template-columns: 1fr;
  }
  .explore-card:first-child {
    grid-row: auto;
  }
}

/* Nav collapses to a hamburger early — the two toggle buttons crowd the
   full link row below ~860px. */
@media (max-width: 860px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    background: var(--cream); /* fallback for no color-mix */
    background: color-mix(in srgb, var(--cream) 97%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad) 1.25rem;
    display: none;
  }
  .nav__links.open {
    display: flex;
  }
  .nav__links a:not(.btn) {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .nav__links .btn {
    margin-top: 1rem;
    text-align: center;
  }
  .nav__toggle {
    display: block;
  }
}
