/* ==========================================================================
   Tuam Records Project — design system
   Palette and rules per project brief: calm, archival, non-dramatic.
   ========================================================================== */

:root {
  --off-white: #F8F6F0;
  --white: #FFFFFF;
  --charcoal: #202124;
  --slate-blue: #24384A;
  --archive-blue: #5E7D91;
  --pale-panel: #EEF4F7;
  --gold: #B89B5E;
  --border: #E4DED2;

  --font-serif: "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--off-white);
  color: var(--charcoal);
  font-family: var(--font-sans);
  line-height: 1.65;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--slate-blue);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-top: 2.5rem; }
h3 { font-size: 1.2rem; }

a { color: var(--archive-blue); text-decoration: underline; text-decoration-color: var(--border); }
a:hover { color: var(--slate-blue); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Header / evidence pathway navigation
   -------------------------------------------------------------------------- */

header.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--slate-blue);
  text-decoration: none;
  letter-spacing: 0.2px;
}

.site-title small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--archive-blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input[type="search"] {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--off-white);
  color: var(--charcoal);
  width: 200px;
}

.header-search input[type="search"]:focus {
  outline: 2px solid var(--archive-blue);
  outline-offset: 1px;
}

.header-search button {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 3px;
  border: 1px solid var(--archive-blue);
  background: var(--white);
  color: var(--slate-blue);
  cursor: pointer;
}

.header-search button:hover { background: var(--pale-panel); }

@media (max-width: 640px) {
  .header-search input[type="search"] { width: 140px; }
}

.pathway-label {
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--archive-blue);
  margin-top: 10px;
}

/* Evidence Pathway menu: plain horizontal list, transparent background,
   small dots beneath each item to suggest a journey through evidence.
   No bands, no side blocks, no shadows, no big containers. */
nav.pathway {
  width: 100%;
  background: transparent;
}

nav.pathway ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 34px);
  margin: 6px 0 0;
  padding: 0 0 16px;
  flex-wrap: wrap;
}

nav.pathway li { display: flex; }

nav.pathway a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 2px 2px 0;
}

nav.pathway a:hover { color: var(--slate-blue); }

/* the dot */
nav.pathway a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C7D2D8; /* pale blue-grey, inactive */
  transition: background 0.15s ease, transform 0.15s ease;
}

nav.pathway a:hover::after { background: var(--archive-blue); }

nav.pathway a.current {
  color: var(--slate-blue);
  font-weight: 700;
}

nav.pathway a.current::after {
  width: 9px;
  height: 9px;
  background: var(--gold);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--slate-blue) url("/assets/images/hero-archive.jpg") center/cover no-repeat;
  color: var(--white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(32,33,36,0.55) 0%, rgba(36,56,74,0.72) 100%);
}

.hero .wrap {
  position: relative;
  padding: 84px 24px 64px;
  max-width: 760px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--pale-panel);
  margin-bottom: 14px;
}

.hero h1 {
  color: var(--white);
  margin: 0 0 18px;
}

.hero p {
  color: #EAF1F5;
  font-size: 1.08rem;
  max-width: 620px;
}

.hero .cta-row { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Buttons / panels / cards
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary { background: var(--gold); color: var(--charcoal); }
.btn-primary:hover { background: #a68a4d; }

.btn-secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-secondary:hover { border-color: var(--white); }

main { background: var(--off-white); }

section.block { padding: 52px 0; }
section.block.panel-bg { background: var(--pale-panel); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 20px;
}

.card h3 { margin-top: 0; }
.card a.card-link { font-weight: 600; text-decoration: none; }

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 26px 28px;
}

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--pale-panel);
  color: var(--slate-blue);
  border: 1px solid var(--border);
}

.status-badge.gold { background: #F6EFDF; color: #7a6636; border-color: #E7D9B4; }

/* --------------------------------------------------------------------------
   Tables (documents / timeline / claims)
   -------------------------------------------------------------------------- */

table.evidence-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  margin: 20px 0;
  font-size: 0.93rem;
}

table.evidence-table th, table.evidence-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

table.evidence-table th {
  background: var(--pale-panel);
  color: var(--slate-blue);
  font-family: var(--font-serif);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.timeline-entry {
  border-left: 2px solid var(--border);
  padding: 2px 0 30px 22px;
  position: relative;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--archive-blue);
}

.timeline-entry .year {
  font-family: var(--font-serif);
  color: var(--gold);
  font-weight: 700;
  font-size: 1.05rem;
}

.source-note {
  font-size: 0.85rem;
  color: var(--archive-blue);
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Claim vs Evidence blocks
   -------------------------------------------------------------------------- */

.claim-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 28px 8px;
  margin: 28px 0;
}

.claim-block .public-claim {
  background: var(--pale-panel);
  border-left: 3px solid var(--archive-blue);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-style: italic;
}

.claim-block dt {
  font-weight: 700;
  color: var(--slate-blue);
  margin-top: 18px;
}

.claim-block dd { margin: 4px 0 0; }

.claim-block blockquote {
  border-left: 3px solid var(--gold);
  margin: 8px 0;
  padding: 6px 16px;
  background: #FBF8F0;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Correction form
   -------------------------------------------------------------------------- */

.form-row { margin: 16px 0; }

.form-row label {
  display: block;
  font-weight: 600;
  color: var(--slate-blue);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.form-row input[type="text"],
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--off-white);
  color: var(--charcoal);
  resize: vertical;
}

.form-row input[type="text"]:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--archive-blue);
  outline-offset: 1px;
}

#correction-form button[type="submit"] {
  margin-top: 6px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Search page
   -------------------------------------------------------------------------- */

.search-box input[type="search"] {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--charcoal);
  margin: 18px 0 8px;
}

.search-box input[type="search"]:focus {
  outline: 2px solid var(--archive-blue);
  outline-offset: 1px;
}

.search-results-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.search-result {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 14px;
}

.search-result-title {
  font-weight: 700;
  text-decoration: none;
  font-size: 1.02rem;
}

.search-result-snippet {
  margin: 8px 0 0;
  color: var(--charcoal);
  font-size: 0.93rem;
}

.search-result-snippet mark {
  background: #F6EFDF;
  color: #7a6636;
  padding: 0 2px;
  border-radius: 2px;
}

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

footer.site-footer {
  background: var(--slate-blue);
  color: #CBD8E0;
  padding: 40px 0 30px;
  font-size: 0.88rem;
  margin-top: 40px;
}

footer.site-footer a { color: #E7EEF2; text-decoration-color: rgba(255,255,255,0.35); }
footer.site-footer .disclaimer { margin-top: 18px; color: #9FB3C0; font-size: 0.82rem; }
footer.site-footer nav { margin-bottom: 10px; }
footer.site-footer nav a { margin-right: 18px; }

footer.site-footer .page-views {
  margin-top: 10px;
  color: #9FB3C0;
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Clarity consent bar (required for Ireland / EEA visitor counting)
   -------------------------------------------------------------------------- */

.clarity-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(32, 33, 36, 0.12);
  color: var(--charcoal);
  font-size: 0.9rem;
  line-height: 1.45;
}

.clarity-consent[hidden] { display: none !important; }

.clarity-consent p {
  margin: 0 0 12px;
}

.clarity-consent .btn {
  margin-right: 8px;
  margin-top: 0;
  cursor: pointer;
  background: var(--pale-panel);
  color: var(--slate-blue);
  border-color: var(--border);
}

.clarity-consent .btn-primary {
  background: var(--gold);
  color: var(--charcoal);
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .hero .wrap { padding: 56px 20px 44px; }
  h1 { font-size: 1.7rem; }
  nav.pathway ul { gap: 14px 20px; }
  table.evidence-table { font-size: 0.85rem; }
}
