/* Notaría Pública No. 37 — styles. Tokens from BRAND.md §4. */

@font-face { font-family: "Redaction"; src: url("assets/fonts/Redaction-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Redaction"; src: url("assets/fonts/Redaction-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Redaction"; src: url("assets/fonts/Redaction-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --chamoisee: #a67c52;
  --onyx: #444444;
  --timberwolf: #cacabe;
  --paper: #f7f6f1;
  --white: #ffffff;
  --chamoisee-text: #8a6844;

  --font: "Redaction", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --gutter: 20px;
  color-scheme: only light;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--onyx); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--onyx);
  font-family: var(--font);
  font-size: 1.1875rem;
  line-height: 1.5;
}

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

a { color: var(--onyx); text-decoration-color: var(--chamoisee-text); text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
a:hover { color: var(--chamoisee-text); }

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

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

main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px var(--gutter); }

.stage { --gap: 32px; position: relative; container-type: inline-size; width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); justify-items: stretch; }
/* decorative hairline between the stacked card and map (mobile) */
.stage .card::after { content: ""; display: block; width: 56px; height: 1px; margin-top: 24px; background: var(--chamoisee); }
.map { margin: 0 auto; width: 100%; max-width: 480px; }
.map > a { display: block; overflow: hidden; border: 1px solid var(--timberwolf); border-radius: 20px; line-height: 0; }
.map img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.map figcaption { margin-top: 8px; text-align: right; font-size: 0.8125rem; line-height: 1.3; }
.map figcaption a { color: var(--chamoisee-text); }
.card { width: 100%; max-width: 480px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo { display: block; width: 100%; max-width: 440px; }
/* top: the PNG has ~1.8% transparent padding, pulled out so the map can align with the ink. translateX: optical centering, the wordmark (N stem to the 7 diagonal, ink x 23-1150 of 1200) sits 1.1% left of the box center because the feather and signature tail overhang right. */
.logo img { width: 100%; margin-top: -1.8%; transform: translateX(1.1%); }

.role { margin: 20px 0 0; font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.3; color: var(--chamoisee-text); }
.place { margin: 2px 0 0; font-style: italic; font-size: 1.1rem; line-height: 1.3; }
.nf-title { margin: 4px 0 0; font-size: 1.75rem; line-height: 1.2; }

/* Contacto */
.contact { width: fit-content; max-width: 100%; margin: 20px auto 0; text-align: left; font-style: normal; font-size: 1.25rem; }
.line { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.line a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.ico { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--chamoisee); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.addr { align-items: flex-start; margin-top: 4px; line-height: 1.4; }
.addr .ico { margin-top: calc((1.4em - 20px) / 2); }
.addr p { margin: 0; }
.map-link { display: inline-block; padding: 12px 2px; font-size: 1.05rem; }

.line.save { margin-top: 12px; font-size: 1.05rem; }
.save a { color: var(--chamoisee-text); }
.save a:hover { color: var(--onyx); }

/* 404 (centered single column) */
.nf { align-items: center; text-align: center; }
.nf .logo img { margin: 0; }
.nf .save { margin: 0; font-size: 1.05rem; }
.nf .save a { display: inline-flex; align-items: center; min-height: 44px; }

/* Footer */
.site-footer { background: var(--onyx); border-top: 3px solid var(--chamoisee); color: var(--white); text-align: center; padding: 14px var(--gutter); }
.site-footer p { margin: 0; font-size: 0.9rem; line-height: 1.4; }

@media (max-width: 400px) {
  .contact { font-size: 1.1rem; }
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  main { padding-top: 48px; padding-bottom: 48px; }
  .role { margin-top: 28px; }
  .contact { margin-top: 28px; }
}

@media (min-width: 768px) {
  .stage { --gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .stage .card::after { display: none; }
  /* decorative hairline centered in the column gap, vertically centered on the map panel (map height = 3/4 of its width, width = min(480px, column)) */
  .stage::before { content: ""; position: absolute; left: 50%; top: calc(min(480px, (100cqw - var(--gap)) / 2) * 0.375 - 70px); width: 1px; height: 140px; background: var(--chamoisee); pointer-events: none; }
}

@media (min-width: 1000px) {
  .stage { --gap: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
