/* ==========================================================
   Terraceous LLC — site styles
   Brand: Mandowla brand guide (2024-11-06, TerraceousBG.pdf)
     Ground #FFFFFF  Text #000000  Pink #D174AE  Yellow #ECEA69
     Logo: designer's full-color primary PNG, unaltered
     Statement: Lato Regular · Everything else: Inconsolata
   Text is #000000 on white (21:1). Pink is underlines and small
   marks only, never text. Yellow is not used for marks on white.
   Background: plain white for launch. A faint, oversized coneflower
   backdrop is built but switched off (see body rule) until the
   designer supplies a clean high-resolution transparency.
   Posture: presented, not explained. No boxes, no glow,
   no centering, no greeting. Structure comes from the index.
   No JavaScript. Motion stops if the visitor asks for less motion.
   ========================================================== */

/* ---------- Fonts (self-hosted, no outside requests) ---------- */

/* Lato Regular: the one large statement per page */
@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inconsolata";
  src: url("/assets/fonts/inconsolata/Inconsolata-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inconsolata Expanded";
  src: url("/assets/fonts/inconsolata/Inconsolata_Expanded-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Colors ---------- */

:root {
  color-scheme: light;
  --ground: #FFFFFF;
  --text: #000000;
  --rule: #000000;
  --pink: #D174AE;
  --yellow: #ECEA69;
  --mono: "Inconsolata", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --mono-wide: "Inconsolata Expanded", var(--mono);
}

/* ---------- Base ---------- */

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--ground);
  /* Flower backdrop is OFF for launch (Terra, 2026-11-24). To turn it back on,
     uncomment these four lines and the two "Flower backdrop" blocks under
     Narrower screens. The image is kept at assets/img/flower-drop.png.
  background-image: url("/assets/img/flower-drop.png");
  background-repeat: no-repeat;
  background-size: 1200px auto;
  background-position: left calc(50vw - 207px) top -583px;
  */
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.1875rem;
  line-height: 1.6;
  overflow-x: clip;
}

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

a:hover,
a:focus-visible {
  text-decoration-color: #000000;
}

:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 4px;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  /* One centered column: equal margins left and right at every width */
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header: plain brown band over the flower ---------- */

.topbar {
  background: var(--ground);
  color: var(--text);
}

.topbar .wrap {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.topbar .logo img {
  display: block;
  width: 100%;
  max-width: 24rem;
  height: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 1.25rem;
}

nav a {
  font-family: var(--mono-wide);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover,
nav a:focus-visible {
  border-bottom-color: var(--pink);
}

nav a[aria-current="page"] {
  border-bottom-color: var(--pink);
}

/* ---------- Main ---------- */

main.wrap {
  position: relative;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

/* The one large statement on each page */
h1 {
  font-family: "Lato", system-ui, sans-serif;
  font-weight: 400;
  font-size: 2.75rem;
  line-height: 1.15;
  margin: 0 0 1.5rem;
}

h2 {
  font-family: var(--mono-wide);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 2.75rem 0 0.75rem;
}

.prose {
  max-width: none;
}

/* ---------- Index (numbered, ruled list) ---------- */

.index {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  counter-reset: item;
}

.index li {
  display: grid;
  grid-template-columns: 3rem 9rem 1fr;
  align-items: baseline;
  gap: 0 0.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.index li::before {
  content: counter(item, decimal-leading-zero);
  counter-increment: item;
  font-family: var(--mono-wide);
  font-weight: 600;
  font-size: 0.875rem;
  color: #000000;
}

.index h2 {
  margin: 0;
}

.index p {
  margin: 0;
}

/* Column-header row above an index, like a ledger */
.index-head {
  display: grid;
  grid-template-columns: 3rem 9rem 1fr;
  gap: 0 0.5rem;
  margin: 3rem 0 0;
  padding-bottom: 0.4rem;
  font-family: var(--mono-wide);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.index-head + .index {
  margin-top: 0;
}

/* Home has no visible headline: the index starts right under the header */
.visually-hidden + .index-head {
  margin-top: 0;
}

/* Privacy clauses: same grid, numbered P1, P2, P3 */
.clauses li::before {
  content: counter(item);
}

/* Clause text may run to several paragraphs */
.clauses li > div p {
  margin: 0 0 0.75rem;
}

.clauses li > div p:last-child {
  margin-bottom: 0;
}

/* Registration details, last-updated dates */
.fine {
  font-size: 0.9375rem;
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--pink);
}

/* ---------- Footer ---------- */

footer .wrap {
  padding-top: 0;
  padding-bottom: 2.5rem;
  font-size: 0.875rem;
}

footer p {
  margin: 0 0 0.25rem;
}

.colophon {
  margin-top: 0.75rem;
}

/* ---------- Links that open a new tab ---------- */

a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.2em;
  vertical-align: -0.05em;
  background-color: currentColor;
  -webkit-mask: url("/assets/icons/external.svg") no-repeat center / contain;
  mask: url("/assets/icons/external.svg") no-repeat center / contain;
}

/* Hidden on screen, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Narrower screens ---------- */

/* Flower backdrop (off):
@media (max-width: 56rem) {
  body {
    background-size: 1000px auto;
    background-position: left calc(50vw - 97px) top -463px;
  }
}
*/

@media (max-width: 36rem) {
  .topbar .logo img { max-width: 17rem; }
  h1 { font-size: 2.125rem; }
  /* Flower backdrop (off): body { background-size: 900px auto; background-position: left 71px top -371px; } */
  .index li { grid-template-columns: 2.5rem 1fr; }
  .index li p, .index li > div { grid-column: 2; }
  .index-head { grid-template-columns: 2.5rem 1fr; }
  .index-head span:last-child { display: none; }
}

/* ---------- Print: a clean one-page catalogue sheet ---------- */

@page {
  margin: 2cm;
}

@media print {
  body { background: none; color: #000000; font-size: 11pt; }
  nav { display: none; }
  .topbar .wrap { padding-top: 0; }
  main.wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .wrap { max-width: none; padding: 0; }
  a { color: #000000; text-decoration: none; }
  a[target="_blank"]::after { content: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .index li, .index-head { break-inside: avoid; }
}

/* ---------- Less motion when the visitor asks for it ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* Catalogue codes in the No. column */
.coded li::before { content: attr(data-no); }
.coded li, .coded-head { grid-template-columns: 3rem 11rem 1fr; }
@media (max-width: 40rem) { .coded li, .coded-head { grid-template-columns: 2.5rem 1fr; } }
/* Same column widths on every page so the grid lines up across the site */
.index li, .index-head { grid-template-columns: 3rem 11rem 1fr; }
@media (max-width: 40rem) { .index li, .index-head { grid-template-columns: 2.5rem 1fr; } }

/* Page code: one catalog code for a whole page, set like a ledger row */
.page-code {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
  margin: 0 0 2.5rem;
  font-family: var(--mono-wide);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.4;
}
.page-code + .index-head { margin-top: 0; }

/* Unnumbered clauses keep the No. column empty so the grid still lines up */
.unnumbered li::before { content: ""; }

/* Sundries page: no grid, clause name above its text, rules between */
.notice { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.notice li { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.notice h2 {
  margin: 0 0 0.6rem;
  font-family: var(--mono-wide);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.notice p { margin: 0 0 0.75rem; }
.notice p:last-child { margin-bottom: 0; }

/* Example listing */
.ex li, .ex-head { grid-template-columns: 6.5rem 1fr 14rem; }
.ex h2 { text-transform: none; letter-spacing: 0.02em; }
.ex .lnk { display:block; }
@media (max-width: 40rem) { .ex li, .ex-head { grid-template-columns: 6rem 1fr; } .ex-head span:last-child{display:none} }
/* Entry record */
.entry { display:grid; grid-template-columns: 7rem 1fr; gap:0; margin:0; border-top:1px solid var(--rule); }
.entry dt, .entry dd { margin:0; padding:0.7rem 0; border-bottom:1px solid var(--rule); }
.entry dt { font-family: var(--mono-wide); font-weight:600; font-size:0.6875rem; text-transform:uppercase; letter-spacing:0.16em; padding-top:0.95rem; }

/* Codes keep their own case (00:sun:001 stays lowercase) */
.page-code span:first-child { text-transform: none; }

/* Small tables inside a notice: no doubled rules, codes keep their case */
.notice .entry { border-top: 0; margin-top: 0.4rem; }
.notice .entry dt:last-of-type, .notice .entry dd:last-of-type { border-bottom: 0; }
.notice .entry dt { text-transform: none; letter-spacing: 0.06em; font-size: 0.8125rem; padding-top: 0.8rem; }

/* Footer sits at the same depth on every page: main is as tall as the longest page (Privacy) */
main.wrap { min-height: 37.5rem; box-sizing: border-box; }
@media (max-width: 36rem) { main.wrap { min-height: 49rem; } }
@media print { main.wrap { min-height: 0; } }

/* Last revision date: plain text at the right end of the menu bar */
nav .revised {
  margin-left: auto;
  font-family: var(--mono-wide);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
@media (max-width: 36rem) { nav { row-gap: 0.6rem; } nav .revised { margin-left: 0; flex-basis: 100%; } }
@media print { nav { display: flex; } nav a { display: none; } nav .revised { margin-left: 0; } }

/* Page-to-page moves without a flash (no JavaScript).
   Supporting browsers swap pages in place; header and footer stay still.
   Other browsers simply load the next page as usual. */
@view-transition { navigation: auto; }
.topbar { view-transition-name: masthead; }
footer { view-transition-name: colophon; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 120ms; }
::view-transition-group(masthead),
::view-transition-group(colophon) { animation: none; }
::view-transition-old(masthead),
::view-transition-old(colophon) { display: none; }
::view-transition-new(masthead),
::view-transition-new(colophon) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
