/* ==========================================================================
   Rural Solutions — design tokens
   Visual concept: the ledger / register book — the record-keeping object
   at the centre of how Indian community organisations track their work.
   Cloth-red cover, ruled cream pages, ink, and a wax-seal mark for approval.
   ========================================================================== */

:root {
  --paper: #F1E9D8;
  --paper-dim: #E8DEC7;
  --ink: #2A2822;
  --ink-soft: #55503f;
  --red: #9C3B2E;
  --red-dark: #7E2F24;
  --green: #47593E;
  --gold: #C08829;
  --rule: #C9BEA6;
  --rule-on-red: rgba(241, 233, 216, 0.35);

  --serif: "IBM Plex Serif", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 62ch;
  --container: 1160px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -50px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7em 1.2em;
  z-index: 100;
  border-radius: 3px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-2); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 var(--space-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85em 1.5em;
  border-radius: 3px;
  border: 1.5px solid var(--red);
  background: var(--red);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-on-red {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--red-dark);
}
.btn-on-red:hover { background: var(--paper-dim); border-color: var(--paper-dim); }

/* ---- ledger rule texture (background) ---- */
.ruled {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 43px,
    var(--rule) 43px,
    var(--rule) 44px
  );
  background-position: 0 90px;
  opacity: 1;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}
.wordmark span {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 50%;
  width: 1.6em;
  height: 1.6em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding: 0.3em 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active { color: var(--ink); border-bottom-color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--paper);
    border-bottom: 1.5px solid var(--ink);
    transform: translateY(-110%);
    transition: transform 0.2s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--space-3) var(--space-3);
  }
  .main-nav li { border-bottom: 1px solid var(--rule); }
  .main-nav a { display: block; padding: 0.9em 0; }
  .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--space-5) 0 var(--space-5);
  position: relative;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr;
  gap: var(--space-4);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  max-width: 14ch;
  margin-bottom: var(--space-3);
}

.hero-copy .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: var(--space-3);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-actions .note {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.seal {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  color: var(--red);
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .seal { max-width: 160px; order: -1; margin-bottom: var(--space-2); }
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

section { padding: var(--space-5) 0; }

.section-head {
  max-width: 60ch;
  margin-bottom: var(--space-4);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-head .lede {
  color: var(--ink-soft);
  margin-top: var(--space-2);
  font-size: 1.05rem;
}

/* ==========================================================================
   Services — ledger entries
   ========================================================================== */

.services { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.entry {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}

.entry-icon {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}
.entry-icon svg { width: 22px; height: 22px; }

.entry h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4em;
}

.entry p {
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ==========================================================================
   Approach — red panel
   ========================================================================== */

.approach {
  background: var(--red);
  color: var(--paper);
}

.approach h2 { color: var(--paper); }

.approach .container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-4);
}

.approach .section-head { margin-bottom: 0; }
.approach .section-head .lede { color: var(--rule-on-red); }

.approach-note {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
  border-left: 2px solid var(--paper);
  padding-left: var(--space-3);
  font-style: italic;
}

.approach-note footer {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.95rem;
  color: var(--rule-on-red);
  margin-top: var(--space-2);
}

@media (max-width: 800px) {
  .approach .container { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Who we work with
   ========================================================================== */

.audience .container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-4);
  align-items: start;
}

.audience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  margin-top: var(--space-3);
}

.audience-tags span {
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 0.4em 0.9em;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

@media (max-width: 800px) {
  .audience .container { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { background: var(--paper-dim); border-top: 1.5px solid var(--ink); }

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.contact-card {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  padding: var(--space-3);
}

.contact-card .label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.3em;
}

.contact-card .value {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: var(--space-3);
}
.contact-card .value:last-child { margin-bottom: 0; }

.contact-card .value a { text-decoration: none; }
.contact-card .value a:hover { text-decoration: underline; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { border-top: 1px solid var(--rule); padding: var(--space-2) 0; }
.contact-list li:first-child { border-top: none; }
.contact-list .k { color: var(--ink-soft); font-size: 0.9rem; }

@media (max-width: 800px) {
  .contact .container { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1.5px solid var(--ink);
  padding: var(--space-3) 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
