/* ==========================================================================
   Payette Land Trust — shared design system
   Tokens and component classes used by every page. Tailwind utilities are
   injected at runtime by the Play CDN and land after this file in the
   cascade, so a utility on an element still overrides a class here.
   ========================================================================== */

:root {
  --spring: cubic-bezier(.16, 1, .3, 1);
  --s-4: 4px;   --s-8: 8px;   --s-12: 12px; --s-16: 16px;
  --s-24: 24px; --s-32: 32px; --s-48: 48px; --s-64: 64px;
  --s-96: 96px; --s-128: 128px; --s-160: 160px;
}

html { -webkit-font-smoothing: antialiased; }
body { font-family: 'Newsreader', Georgia, serif; color: #0E1A17; background: #F2F0E9; }

/* ---- Type scale --------------------------------------------------------- */
.display-xl, .display-l, .display-m {
  font-family: 'Archivo', system-ui, sans-serif;
  font-variation-settings: 'wdth' 115, 'wght' 700;
}
.display-xl { font-size: clamp(2.75rem, 6vw, 5.25rem); line-height: .95; letter-spacing: -.03em; }
.display-l  { font-size: clamp(2rem, 4vw, 3.25rem);    line-height: 1.02; letter-spacing: -.025em; }
.display-m  { font-size: clamp(1.5rem, 2.5vw, 2rem);   line-height: 1.1;  letter-spacing: -.02em;
              font-variation-settings: 'wdth' 112, 'wght' 600; }
.body-l { font-size: 1.125rem; line-height: 1.7; }
.body-m { font-size: 1rem; line-height: 1.7; }
.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500; font-size: .6875rem; line-height: 1.45;
  letter-spacing: .14em; text-transform: uppercase;
}
.data {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .875rem; font-variant-numeric: tabular-nums;
}
.figure {
  font-family: 'Archivo', system-ui, sans-serif;
  font-variation-settings: 'wdth' 108, 'wght' 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; letter-spacing: -.03em;
}

/* ---- Section rhythm ----------------------------------------------------- */
.band { padding-top: var(--s-64); padding-bottom: var(--s-64); }
@media (min-width: 768px) { .band { padding-top: var(--s-128); padding-bottom: var(--s-128); } }
.band-tight { padding-top: var(--s-48); padding-bottom: var(--s-48); }
@media (min-width: 768px) { .band-tight { padding-top: var(--s-96); padding-bottom: var(--s-96); } }
.shell { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--s-24); }
@media (min-width: 768px) { .shell { padding-inline: var(--s-32); } }

/* ---- Placeholders: unmistakably not final ------------------------------- */
.tbc { border-bottom: 1px dotted rgba(216,163,25,.85); }
.tbc-tag {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500; font-size: .5rem; letter-spacing: .1em;
  color: #D8A319; vertical-align: super; margin-left: .3em; white-space: nowrap;
}
/* A whole block that is standing in for real content. */
.ph-block {
  border: 1px dashed rgba(216,163,25,.65);
  background:
    repeating-linear-gradient(135deg,
      rgba(216,163,25,.05) 0 12px, transparent 12px 24px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: var(--s-32);
}

/* ---- Interactive states ------------------------------------------------- */
a, button { transition: transform 180ms var(--spring), opacity 180ms var(--spring),
                        background-color 180ms var(--spring), color 180ms var(--spring),
                        border-color 180ms var(--spring); }
:focus-visible { outline: 2px solid #D8A319; outline-offset: 2px; border-radius: 2px; }

.btn {
  display: inline-flex; align-items: center; gap: var(--s-8);
  font-family: 'Archivo', system-ui, sans-serif;
  font-variation-settings: 'wdth' 108, 'wght' 600;
  font-size: .9375rem; letter-spacing: -.005em;
  padding: 12px 18px; border-radius: 2px; will-change: transform;
}
@media (min-width: 768px) { .btn { padding: 14px 24px; } }
.btn-primary { background: #2F6FA8; color: #F2F0E9; box-shadow: 0 1px 2px rgba(14,26,23,.18), 0 6px 16px rgba(47,111,168,.22); }
.btn-primary:hover  { background: #275C8C; transform: translateY(-1px); }
.btn-primary:active { background: #204d76; transform: translateY(0); }
.btn-ghost { color: #F2F0E9; border: 1px solid rgba(242,240,233,.38); }
.btn-ghost:hover  { background: rgba(242,240,233,.10); border-color: rgba(242,240,233,.66); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }
.btn-outline { color: #16342C; border: 1px solid rgba(126,146,133,.6); }
.btn-outline:hover  { border-color: #16342C; transform: translateY(-1px); }
.btn-outline:active { transform: translateY(0); }

.navlink {
  font-family: 'Archivo', system-ui, sans-serif;
  font-variation-settings: 'wdth' 105, 'wght' 500;
  font-size: .875rem; color: rgba(242,240,233,.86);
  position: relative;
}
.navlink:hover { color: #F2F0E9; }
/* The page you are on keeps a standing gold rule; hover only previews one. */
.navlink[aria-current="page"] { color: #F2F0E9; }
.navlink[aria-current="page"]::after { transform: scaleX(1); background: #D8A319; height: 2px; }

/* Underline that grows from the left — transform only. */
.ulink { position: relative; display: inline-block; }
.ulink::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 180ms var(--spring);
}
.ulink:hover::after { transform: scaleX(1); }

/* ---- Filter chips ------------------------------------------------------- */
.chip {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 14px; border: 1px solid rgba(126,146,133,.55); border-radius: 2px;
  color: #16342C; background: transparent;
}
.chip:hover { border-color: #16342C; }
.chip[aria-pressed="true"] { background: #16342C; border-color: #16342C; color: #F2F0E9; }

/* ---- Form fields -------------------------------------------------------- */
.field-label { display: block; margin-bottom: var(--s-8); }
.field {
  width: 100%; background: #fff; border: 1px solid rgba(126,146,133,.55);
  padding: 12px 14px; border-radius: 2px; color: #0E1A17;
  font-family: 'Newsreader', Georgia, serif; font-size: 1rem; line-height: 1.6;
}
.field::placeholder { color: rgba(14,26,23,.38); }
.field:focus { border-color: #2F6FA8; outline: 2px solid #D8A319; outline-offset: 2px; }
select.field { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .875rem; }

/* ---- Photo treatment ---------------------------------------------------- */
.photo-wrap { position: relative; overflow: hidden; background: #16342C; }
.photo-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,26,23,.32), rgba(14,26,23,0) 62%);
}
.photo-treat {
  position: absolute; inset: 0; background: #16342C;
  mix-blend-mode: multiply; opacity: .14; pointer-events: none;
}

/* ---- Heroes ------------------------------------------------------------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: flex-end; overflow: hidden; background: #0E1A17; }
/* Interior pages get a shorter hero — the homepage keeps the full-height one. */
/* Tall enough that the 104px logo does not crowd the headline. */
.page-hero { position: relative; min-height: 58vh; display: flex; align-items: flex-end; overflow: hidden; background: #0E1A17; }
@media (min-width: 768px) { .page-hero { min-height: 64vh; } }

.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 42%; }
.hero-treat { position: absolute; inset: 0; background: #16342C; mix-blend-mode: multiply; opacity: .24; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    /* Holds the overlaid nav legible against a bright sky. */
    linear-gradient(to bottom, rgba(14,26,23,.58) 0%, rgba(14,26,23,.22) 14%, rgba(14,26,23,0) 26%),
    linear-gradient(to top, rgba(14,26,23,.82) 0%, rgba(14,26,23,.38) 46%, rgba(14,26,23,.20) 100%),
    linear-gradient(to right, rgba(14,26,23,.58) 0%, rgba(14,26,23,0) 64%);
}

/* ---- Scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 420ms var(--spring), transform 420ms var(--spring); }

/* ---- Contour texture for the flat colour bands -------------------------- */
/* Kept only where there is no photograph to compete with. Centre-masked so it
   never crowds the type. */
.band-contour { position: relative; overflow: hidden; }
.band-contour > .shell { position: relative; z-index: 1; }
.band-contour svg {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 42%, transparent 30%, #000 78%);
          mask-image: radial-gradient(120% 90% at 50% 42%, transparent 30%, #000 78%);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  a, button { transition: none; }
  .btn-primary:hover, .btn-ghost:hover, .btn-outline:hover { transform: none; }
}
