/*
 * Landstats — landstats.app
 *
 * Earth tones lifted from the apps' shared theme (Android ui/theme/Theme.kt,
 * iOS Landstats/Theme.swift) so the site and the app read as one product.
 */

:root {
  --forest: #2e5d43;
  --deep-green: #1b3a2a;
  --amber: #ffc93e;
  --cream: #f9f2ec;
  --bark: #3e2723;
  --mint: #8fd3a6;

  --bg: var(--cream);
  --bg-raised: #ffffff;
  --text: var(--bark);
  --text-dim: #6d5750;
  --accent: var(--forest);
  --on-accent: #ffffff;
  --line: #e3d7cd;

  --radius: 14px;
  --radius-lg: 22px;
  --measure: 62ch;
  --shadow: 0 1px 2px rgba(62, 39, 35, 0.06), 0 8px 24px -12px rgba(62, 39, 35, 0.18);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14201a;
    --bg-raised: #1c2c24;
    --text: #e8f0ea;
    --text-dim: #a2b5a9;
    --accent: var(--mint);
    --on-accent: var(--deep-green);
    --line: #2c4033;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

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

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

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

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.1rem);
}

h2 {
  font-size: clamp(1.4rem, 3.6vw, 1.9rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0;
  text-wrap: pretty;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.stack > * + * {
  margin-top: var(--gap, 1rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- site header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.94rem;
}

.site-header nav a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  /* Faint parcel-boundary lattice, the amber the app draws its lines in. */
  background-color: var(--deep-green);
  background-image:
    linear-gradient(to bottom, rgba(27, 58, 42, 0.55), rgba(27, 58, 42, 0.95)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffc93e' stroke-width='1.1' stroke-opacity='.28'%3E%3Cpath d='M0 34h48V0M48 34v42H0M48 76h34v44M82 76h38M82 34h38v42h-38z'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--cream);
  padding-block: clamp(3rem, 9vw, 5.5rem);
  text-align: center;
}

.hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 21px;
  margin-inline: auto;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6);
}

.hero h1 {
  margin-top: 0.5rem;
}

.hero .hero-title {
  margin-top: 1.4rem;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero .tagline {
  margin-top: 0.9rem;
  margin-inline: auto;
  max-width: 54ch;
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  color: color-mix(in srgb, var(--cream) 80%, transparent);
}

/* ---------- store buttons ---------- */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 2rem;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--bark);
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  min-height: 54px;
}

.store-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.45);
}

.store-button.disabled {
  background: color-mix(in srgb, var(--cream) 45%, gray);
  color: color-mix(in srgb, var(--bark) 50%, gray);
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.75;
}

.store-button.disabled:hover {
  transform: none;
  box-shadow: none;
}

.store-button svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: currentColor;
}

/* Stroked glyphs, e.g. the Open-in-app pin, opt out of the fill above. */
.store-button svg.outline {
  fill: none;
}

.store-button .label {
  display: grid;
  text-align: left;
  line-height: 1.15;
}

.store-button .label small {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.72;
}

.store-button .label strong {
  font-size: 1.02rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.hero .store-buttons .store-button {
  flex: 1 1 0;
  justify-content: center;
}

.hero .store-buttons {
  min-width: min(100%, 30rem);
}

/* Larger sizing for the hero store buttons. */
.hero .store-button {
  gap: 1rem;
  padding: 1rem 2rem;
  min-height: 68px;
}

.hero .store-button svg {
  width: 34px;
  height: 34px;
}

.hero .store-button .label small {
  font-size: 0.85rem;
}

.hero .store-button .label strong {
  font-size: 1.35rem;
}

/* On light card surfaces rather than the dark hero. */
.store-button.on-surface {
  background: var(--accent);
  color: var(--on-accent);
}

.store-button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

/* ---------- sections ---------- */

section {
  padding-block: clamp(2.75rem, 7vw, 4.5rem);
}

section > .wrap > h2 + p {
  margin-top: 0.7rem;
  color: var(--text-dim);
  max-width: var(--measure);
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 1.1rem;
  margin-top: 2rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.shots figure {
  margin: 0;
  scroll-snap-align: center;
}

.shots img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.shots figcaption {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-dim);
  text-wrap: pretty;
}

.features {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.features li {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.features h3 {
  color: var(--accent);
}

.features p {
  margin-top: 0.4rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.alt {
  background: var(--bg-raised);
  border-block: 1px solid var(--line);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.steps li {
  counter-increment: step;
  padding-top: 3rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  font-size: 0.95rem;
}

.steps p {
  margin-top: 0.35rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.callout {
  margin-top: 2rem;
  border-left: 3px solid var(--amber);
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
}

.callout code {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

/* ---------- share / parcel page ---------- */

.share-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.share-main {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 6vw, 3.5rem) 0;
}

.share-card {
  width: 100%;
  max-width: 470px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 2.25rem);
  text-align: center;
}

.share-card .pin {
  width: 58px;
  height: 58px;
  margin-inline: auto;
  color: var(--accent);
}

.share-card h1 {
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  margin-top: 1.1rem;
}

.share-card .lede {
  margin-top: 0.6rem;
  color: var(--text-dim);
  font-size: 0.98rem;
}

.parcel-id {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: var(--bg);
  text-align: left;
}

.parcel-id dt {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.parcel-id dd {
  margin: 0.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.84rem;
  word-break: break-all;
  line-height: 1.45;
}

.share-card .store-buttons {
  margin-top: 1.5rem;
  flex-direction: column;
  align-items: stretch;
}

.share-card .store-button {
  justify-content: center;
}

.share-card .fine-print {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-wrap: pretty;
}

.copy-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.copy-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}

.copy-row button {
  flex: none;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.copy-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
