/*
 * privateparcel.co placeholder, in the app's visual language (src/app/globals.css):
 * a survey plat printed as a diazo blueline. The plat plots itself once on load;
 * everything else holds still.
 */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src:
    url('/archivo-latin-wdth-normal.woff2') format('woff2-variations'),
    url('/archivo-latin-wdth-normal.woff2') format('woff2');
}

:root {
  --paper: #f2f4f7;
  --sheet: #fbfcfd;
  --ink: #27307a;
  --ink-soft: #5b6190;
  --rule: #cdd3e4;
  --gutter: clamp(12px, 2.4vw, 28px);
  --inset: clamp(18px, 4vw, 48px);
  color-scheme: light dark;
}

/* At night the drawing becomes a blueprint: pale linework on blue. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161b4d;
    --sheet: #1b2159;
    --ink: #e9ecf7;
    --ink-soft: #a9b0d8;
    --rule: #343c80;
  }
}

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--gutter);
  display: flex;
}

.sheet {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: var(--inset);
  padding: var(--inset);
  background: var(--sheet);
  border: 1px solid var(--rule);
}

/* The plat ---------------------------------------------------------------- */

.plat {
  display: block;
  justify-self: center;
  width: 100%;
  max-width: 46rem;
  height: auto;
  max-height: 58vh;
  overflow: visible;
}

.plat text {
  fill: var(--ink-soft);
  font-size: 13px;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
}

.hatch {
  stroke: var(--rule);
  stroke-width: 1.1;
}

.boundary {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: plot 2.2s cubic-bezier(0.45, 0.05, 0.25, 1) 0.2s forwards;
}

.monuments circle {
  fill: var(--sheet);
  stroke: var(--ink);
  stroke-width: 1.8;
  opacity: 0;
  animation: settle 0.5s ease-out 2.3s forwards;
}

.bearings {
  opacity: 0;
  animation: settle 0.9s ease-out 2.5s forwards;
}

.bearings text {
  text-anchor: middle;
}

.plat .area {
  fill: var(--ink);
  font-size: 15px;
}

.pob line {
  stroke: var(--ink-soft);
  stroke-width: 1;
}

.pob text {
  text-anchor: middle;
}

.north path {
  fill: var(--ink);
}

.plat .north text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}

.scale-filled {
  fill: var(--ink);
}

.scale-open {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}

.plat .scale text {
  font-size: 11px;
  text-anchor: middle;
}

/* The title block --------------------------------------------------------- */

.title-block {
  align-self: end;
  width: 100%;
  max-width: 26rem;
  justify-self: center;
  border: 1.5px solid var(--ink);
}

.title-block > * {
  margin: 0;
  padding: 14px 18px;
}

.title-block > * + * {
  border-top: 1px solid var(--ink);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 600;
  font-stretch: 87.5%;
  letter-spacing: -0.005em;
}

.wordmark svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.wordmark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.wordmark circle {
  fill: var(--sheet);
  stroke: currentColor;
  stroke-width: 1.6;
}

h1 {
  padding-block: 18px 20px;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 3.5rem);
  font-weight: 600;
  font-stretch: 87.5%;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.about p {
  margin: 0;
}

.about .quiet {
  color: var(--ink-soft);
}

/* Wide screens: plat and title block side by side, title block at the foot,
   where a surveyor would put it. */
@media (min-width: 60rem) {
  .sheet {
    grid-template-columns: minmax(0, 1fr) 22rem;
    align-content: stretch;
    align-items: center;
  }

  .plat {
    max-height: calc(100dvh - 2 * var(--gutter) - 2 * var(--inset));
  }

  .title-block {
    align-self: end;
  }
}

/* Small screens: the lettering would be too small to read; the drawing keeps its outline. */
@media (max-width: 34rem) {
  .bearings,
  .pob,
  .scale {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boundary {
    animation: none;
    stroke-dashoffset: 0;
  }

  .monuments circle,
  .bearings {
    animation: none;
    opacity: 1;
  }
}

@keyframes plot {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes settle {
  to {
    opacity: 1;
  }
}
