/*
 * Jardim da Mata — site styles
 * Edge-to-edge, vertically stacked bands. Uses the semantic tokens from
 * design-system/tokens.css only.
 */

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

html { scroll-padding-top: 6rem; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  /* Footer sits at the bottom even on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex: 1; display: flex; flex-direction: column; }
main > :last-child { flex: 1; } /* last band fills any leftover height */

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

p, ul, ol { margin: 0; }

a { color: var(--color-link); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

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

/* ---------------------------------------------------------------
 * Header: the mark and the navigation stay pinned to the top
 * ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-3) var(--gutter);
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-text);
}

.site-logo { flex: none; display: block; }
.site-logo img { display: block; width: 3.25rem; height: auto; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1) var(--space-5);
}
.site-nav a {
  color: var(--color-text);
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 4px;
  text-underline-offset: 0.35em;
}

/* ---------------------------------------------------------------
 * Bands: full-width sections stacked vertically
 * ------------------------------------------------------------- */
.band {
  padding: clamp(var(--space-7), 8vw, var(--space-9)) var(--gutter);
  background: var(--band-bg, var(--color-bg));
}
.band--surface { --band-bg: var(--color-surface); }

/* Pastel bands: headings switch to ink, because orange-deep is too faint on them */
.band--projeto, .band--apjm, .band--calendario, .band--newsletter { color: var(--color-on-section); }
.band--projeto    { --band-bg: var(--color-section-projeto); }
.band--apjm       { --band-bg: var(--color-section-apjm); }
.band--calendario { --band-bg: var(--color-section-calendario); }
.band--newsletter { --band-bg: var(--color-section-newsletter); }
:is(.band--projeto, .band--apjm, .band--calendario, .band--newsletter) a { color: inherit; }

/* Page title band */
.hero { display: grid; gap: var(--space-5); padding-top: clamp(var(--space-8), 12vw, 10rem); }
.hero h1 { font-size: var(--text-display); }
/* Large text, so it stays legible on every pastel, lilac included */
.lead { max-width: var(--measure); font-size: var(--text-lg); line-height: 1.4; font-weight: var(--weight-bold); }

.band h2 { font-size: var(--text-3xl); margin-bottom: var(--space-6); }
.band:not([class*="band--"]) h2,
.band--surface h2 { color: var(--color-heading); }

.prose { max-width: var(--measure); display: grid; gap: var(--space-4); }

/* ---------------------------------------------------------------
 * Lists
 * ------------------------------------------------------------- */
/* Numbered list with large figures */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: var(--space-5); max-width: 52rem; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-text);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  line-height: 1;
  color: var(--color-heading);
}

/* Full-width rows divided by rules: dates, events, services */
.rows { list-style: none; padding: 0; border-bottom: 2px solid var(--color-text); }
.rows li {
  padding: var(--space-4) 0;
  border-top: 2px solid var(--color-text);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: 1.3;
}
.rows strong { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-black); letter-spacing: var(--tracking-display); display: block; }
.rows span { margin-left: var(--space-2); font-size: var(--text-base); font-weight: var(--weight-regular); }

/* ---------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.button {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--color-text);
  color: var(--color-bg) !important;
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.button::after { content: " →"; }
.button:hover { background: var(--color-heading); color: var(--color-on-accent) !important; }

/* ---------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------- */
.site-footer {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-8) var(--gutter);
  background: var(--color-inverse-bg);
  color: var(--color-inverse-text);
}
.site-footer a { color: inherit; }
.site-footer img { display: block; width: 4rem; height: auto; }
.site-footer p { max-width: var(--measure); }
.site-footer strong { display: block; font-size: var(--text-lg); line-height: 1.3; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-weight: var(--weight-bold); }

@media (max-width: 40rem) {
  .site-header { gap: var(--space-4); }
  .site-logo img { width: 2.75rem; }
  .site-nav ul { gap: 0 var(--space-4); font-size: var(--text-sm); }
  .steps li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .steps li::before { font-size: var(--text-lg); }
}
