/* ==========================================================
   HAW Framework Website
   Base Styles — Organized Working Version
========================================================== */

/* 1. DESIGN TOKENS */
:root {
  --forest: #1f4d3a;
  --green: #5f8f53;
  --sage: #9fbc9a;
  --slate: #475467;
  --ink: #101828;
  --muted: #667085;
  --line: #d0d5dd;
  --surface: #f7f9f7;
  --white: #ffffff;
  --gold: #b08d3e;
  --max-width: 1180px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

/* 2. RESET AND GLOBAL ELEMENTS */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Public Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
main { min-height: 60vh; }
a {
  color: var(--forest);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: #15382a; }
img { max-width: 100%; height: auto; }

/* 3. TYPOGRAPHY */
h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.025em;
}
h1 {
  max-width: 13ch;
  margin: 0 0 1.25rem;
  font-size: clamp(2.35rem, 5.8vw, 4.7rem);
}
h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}
h3 {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
}
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--forest);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.lead {
  max-width: 66ch;
  color: var(--slate);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
}

/* 4. SHARED LAYOUT */
.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--surface); }
.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.content { padding: 3.5rem 0 6rem; }
.content-narrow { max-width: 820px; }

/* 5. ACCESSIBILITY */
.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--ink);
}
.skip-link:focus { top: 1rem; }

/* 6. HEADER AND NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  gap: 2rem;
}
.brand-link {
  display: inline-flex;
  flex: 0 1 440px;
  align-items: center;
}
.brand-link img {
  display: block;
  width: min(100%, 430px);
}
.nav-toggle {
  display: none;
  padding: 0.6rem 0.75rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  padding: 0.45rem 0.1rem;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--forest);
  border-color: var(--forest);
}
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

/* 7. BUTTONS AND ACTION GROUPS */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border: 2px solid var(--forest);
  border-radius: 7px;
  font-weight: 750;
  text-decoration: none;
}
.button-primary {
  color: var(--white);
  background: var(--forest);
}
.button-primary:hover {
  color: var(--white);
  background: #173f2f;
}
.button-secondary {
  color: var(--forest);
  background: transparent;
}

/* 8. HOME — HERO */
.hero {
  padding-top: 1.75rem;
  padding-bottom: 4rem;
  background: linear-gradient(135deg, #f8fbf8 0%, #eef5ef 100%);
  border-bottom: 1px solid #e5ebe6;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: start;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.hero h1 {
  max-width: 12ch;
  margin-bottom: 0.85rem;
  font-size: clamp(2.1rem, 3.8vw, 3.35rem);
  line-height: 1.08;
}
.hero .eyebrow { margin-bottom: 0.35rem; }
.hero .lead { max-width: 34rem; }
.hero-visual {
  position: relative;
  min-height: 512px;
  margin-top: 1.5rem;
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 150%;
  max-width: none;
  height: 130%;
  object-fit: cover;
  object-position: 150% center;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to left,
    rgba(244, 249, 244, 0) 40%,
    rgba(244, 249, 244, 0.18) 55%,
    rgba(244, 249, 244, 0.48) 72%,
    rgba(244, 249, 244, 0.78) 88%,
    rgba(244, 249, 244, 1) 100%
  );
}

/* 9. HOME — LATEST PUBLICATION */
#latest-publication { padding-top: 1.75rem; }
.publication-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.publication-cover {
  display: grid;
  place-items: center;
  min-height: 275px;
  padding: 2rem;
  color: var(--white);
  text-align: center;
  background: var(--forest);
  border-radius: 8px;
}
.publication-cover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0;
  color: #ffffff;
}
.publication-cover-content img {
  display: block;
  width: 110px;
  margin: 0 0 0.25rem;
  filter: brightness(0) invert(1);
}
.publication-cover-content strong {
  display: block;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  color: #ffffff;
}
.publication-cover-content span {
  display: block;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  opacity: 0.9;
  color: #ffffff;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}


.publication-doi {
  margin: 0.7rem 0 0.85rem;
  color: var(--slate);
  font-size: 0.98rem;
}
.publication-doi a,
.repository-note a,
.citation-block a {
  overflow-wrap: anywhere;
}
.repository-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* 10. HOME — WHAT HAW MEASURES */
#what-haw-measures { padding-top: 2rem; }

/* 11. HOME — SUPPORTING RESOURCES AND UPDATES */
#home-support { padding-top: 2rem; }

/* 12. INFORMATION PAGES */
.page-header {
  padding: 4rem 0 2.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  max-width: none;
  font-size: clamp(2.3rem, 5vw, 4rem);
}
.page-hero h1 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
  line-height: 1.15;
}
.page-hero .lead {
  max-width: 46rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  line-height: 1.6;
}
.page-hero + .section { padding-top: 1.5rem; }
.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.875rem;
  line-height: 1.25;
}
.prose h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  line-height: 1.35;
}
.prose p {
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

/* 13. CARDS, LISTS, AND NOTICES */
.card {
  padding: 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04);
}
.card p {
  margin-bottom: 0;
  color: var(--slate);
}
.link-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.link-list li { border-top: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 1px solid var(--line); }
.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.2rem;
  font-weight: 700;
  text-decoration: none;
}
.link-list-disabled > span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.2rem;
  color: #98a2b3;
  font-weight: 700;
  cursor: not-allowed;
}
.link-list-disabled > span > span {
  font-weight: 600;
}
.citation-block {
  max-width: 900px;
  padding: 1.4rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04);
}
.citation-block p {
  margin: 0;
  color: var(--slate);
  font-size: 1.05rem;
  line-height: 1.65;
}
.citation-block p + p { margin-top: 0.9rem; }
.citation-block .citation-doi {
  font-size: 1rem;
}
.citation-block .repository-note {
  color: var(--muted);
  font-size: 0.95rem;
}
.notice {
  padding: 1rem 1.2rem;
  background: #f4f8f4;
  border-left: 5px solid var(--green);
}



/* 13A. RESOURCES HUB */
.resources-hub { padding-top: 2.25rem; }
.resource-card-grid { align-items: stretch; }
.resource-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.75rem;
  border-radius: 14px;
}
.resource-card h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}
.resource-card > p:not(.card-kicker) {
  margin-top: 0;
  margin-bottom: 1rem;
}
.card-kicker {
  margin: 0 0 0.45rem !important;
  color: var(--forest) !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.1rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.text-link {
  display: inline-block;
  font-weight: 750;
}
.detail-list {
  margin: 0.25rem 0 1.1rem;
  padding-left: 1.25rem;
  color: var(--slate);
}
.detail-list li + li { margin-top: 0.35rem; }
.reference-list {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}
.reference-list li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.reference-list li:last-child { border-bottom: 1px solid var(--line); }
.reference-list a {
  display: inline-block;
  font-weight: 750;
}
.reference-list span {
  display: block;
  margin-top: 0.25rem;
  color: var(--slate);
}
.citation-block-compact {
  margin-top: 0.35rem;
  padding: 1rem 1.1rem;
}
.citation-block-compact p { margin: 0; }
.citation-block-compact p + p { margin-top: 0.8rem; }
.resource-card-planned {
  color: #667085;
  background: #f2f4f3;
  border-color: #d8ddda;
  box-shadow: none;
}
.resource-card-planned .card-kicker,
.resource-card-planned h2,
.resource-card-planned p { color: #667085 !important; }
.planned-label {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.45rem 0.7rem;
  color: #667085;
  background: #e4e7e5;
  border: 1px solid #d0d5d2;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 750;
}

/* 14. FOOTER */
.site-footer {
  padding-top: 3rem;
  color: #f2f4f7;
  background: #1f2933;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.75rem;
}
.footer-brand img {
  width: 230px;
  opacity: 0.95;
  filter: brightness(0) invert(1);
}
.footer-brand p,
.site-footer small { color: #d0d5dd; }
.site-footer h2 {
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer li + li { margin-top: 0.5rem; }
.site-footer a {
  color: #f2f4f7;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #475467;
}

/* 15. SHARED COMPONENT STATES */
.component-error {
  max-width: 72rem;
  margin: 1rem auto;
  padding: 1rem;
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
}

/* 16. RESPONSIVE — TABLET */
@media (max-width: 900px) {
  .hero-grid,
  .publication-card { grid-template-columns: 1fr; }

  .hero-image {
    width: 100%;
    max-width: 680px;
  }

  .hero-visual::before { display: none; }

  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-link { flex-basis: 350px; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .site-nav[data-open="true"] { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
  }

  .site-nav a {
    display: block;
    padding: 0.8rem;
  }
}


/* External links */
a.external-link::after {
  content: " \2197";
  font-size: 0.82em;
  white-space: nowrap;
}

/* 17. RESPONSIVE — MOBILE */
@media (max-width: 580px) {
  .header-inner { min-height: 76px; }
  .brand-link { flex-basis: 270px; }

  .grid-2,
  .grid-4,
  .footer-grid { grid-template-columns: 1fr; }

  .actions { flex-direction: column; }
  .button { width: 100%; }
  .publication-card { padding: 1.25rem; }
}

/* 18. PRINT */
@media print {
  .site-header,
  .site-footer,
  .actions,
  .nav-toggle { display: none !important; }

  body { color: #000; }

  .section,
  .content { padding: 1rem 0; }
}

/* Document and download link indicators */
a.download-link span {
    display: inline-flex;
    align-items: center;
    gap: 0.38em;
    flex-shrink: 0;
}

a.download-link span::after {
    content: "";
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    background: currentColor;
    -webkit-mask: url("../icons/download.svg") center / contain no-repeat;
    mask: url("../icons/download.svg") center / contain no-repeat;
}

/* Keep the icon attached to its link label. */
a.document-link,
a.download-link {
  white-space: normal;
}

a.document-link::after {
  /* PDFs open in a separate tab rather than replacing the website. */
  content: "";
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    margin-left: 0.38em;
    vertical-align: middle;
    background: currentColor;
    -webkit-mask: url("../icons/download.svg") center / contain no-repeat;
    mask: url("../icons/download.svg") center / contain no-repeat;
}

a.download-link::after {
  /* Dataset and archive links initiate a file download. */
}


