/* ===================================================================
   Islestyle — design tokens
   Palette grounded in bark-cloth (tapa/masi) material culture rather
   than a generic tropical gradient.
   =================================================================== */
:root {
  --cream:      #F1E6D2;   /* bark-cloth paper */
  --cream-warm: #EAD9BC;   /* slightly deeper panel tone */
  --ink:        #2B231C;   /* tapa pigment / body text */
  --ink-soft:   #5B5145;
  --teal:       #1F5751;   /* deep lagoon */
  --teal-dark:  #163E3A;
  --clay:       #A8542E;   /* burnt clay accent */
  --clay-dark:  #833F21;
  --ochre:      #D9A441;   /* sun ochre */
  --paper:      #FBF6EC;   /* near-white for cards on dark */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 2px;
  --content-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.9em;
}

/* Tapa divider motif — the page's signature element.
   Used sparingly: only at true section breaks. */
.tapa-divider {
  height: 14px;
  width: 100%;
  color: var(--ink);
  opacity: 0.85;
  overflow: hidden;
  display: flex;
}
.tapa-divider img, .tapa-divider svg { height: 100%; width: auto; }
.tapa-divider.on-dark { color: var(--cream); }
.tapa-divider.clay { color: var(--clay); }
.tapa-strip {
  background-image: url("/images/tapa-divider.svg");
  background-repeat: repeat-x;
  background-size: auto 100%;
  height: 14px;
  width: 100%;
}
.tapa-strip.dark { filter: invert(1) brightness(0.2) sepia(1) hue-rotate(150deg) saturate(0); }

/* ===================== Header ===================== */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 3px solid var(--ink);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.logo .dot { color: var(--clay); }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); border-bottom-color: var(--clay); }

.btn-donate {
  background: var(--clay);
  color: var(--paper) !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background 0.15s ease;
}
.btn-donate:hover { background: var(--clay-dark); }

/* ===================== Hero ===================== */
.hero {
  background: var(--ink);
  color: var(--cream);
  padding: 5rem 0 4rem;
}
.hero .eyebrow { color: var(--ochre); }
.hero h1 { color: var(--paper); max-width: 15ch; }
.hero p.lede { max-width: 46ch; font-size: 1.15rem; color: var(--cream-warm); }
.hero .actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-outline {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--cream);
  color: var(--cream) !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
}
.btn-outline:hover { background: var(--cream); color: var(--ink) !important; }

/* ===================== Sections ===================== */
section { padding: 4rem 0; }
section.tight { padding: 2.5rem 0; }
.section-intro { max-width: 62ch; }
.section-intro h2 { margin-bottom: 0.5rem; }

/* Numbered process — a genuine sequence, so numbering earns its place */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}
.process-step .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.process-step h3 { margin-bottom: 0.3em; }
.process-step p { color: var(--ink-soft); margin-bottom: 0; }

/* ===================== Photo placeholder ===================== */
.photo-frame {
  position: relative;
  background: var(--teal);
  color: var(--cream);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(241,230,210,0.07) 0 2px, transparent 2px 14px);
}
.photo-frame .cap {
  position: relative;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.9;
}
.photo-frame.clay { background: var(--clay); }
.photo-frame.ochre { background: var(--ochre); color: var(--ink); }
.photo-frame.ink { background: var(--ink); }

.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-frame.has-photo::before {
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%);
}

/* ===================== Project cards ===================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.project-card {
  background: var(--paper);
  border: 1px solid rgba(43,35,28,0.12);
  text-decoration: none;
  display: block;
  color: var(--ink);
}
.project-card .body { padding: 1.25rem 1.4rem 1.5rem; }
.project-card .place {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5em;
}
.project-card h3 { margin-bottom: 0.4em; }
.project-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }
.project-card .tapa-strip { opacity: 0; transition: opacity 0.15s ease; }
.project-card:hover .tapa-strip { opacity: 1; }

/* ===================== Project single ===================== */
.project-hero {
  background: var(--teal-dark);
  color: var(--paper);
  padding: 3.5rem 0 3rem;
}
.project-hero .place { color: var(--ochre); }
.project-hero h1 { color: var(--paper); max-width: 20ch; }

.project-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.project-body { max-width: 68ch; }

.donation-callout {
  background: var(--cream-warm);
  border-left: 4px solid var(--clay);
  padding: 1.5rem 1.75rem;
  margin-top: 2.5rem;
}
.donation-callout .eyebrow { margin-bottom: 0.4em; }
.donation-callout p { margin-bottom: 1rem; }
.donation-callout p:last-child { margin-bottom: 0; }

/* ===================== Upcoming list ===================== */
.upcoming-list { margin-top: 1.5rem; }
.upcoming-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(43,35,28,0.15);
}
.upcoming-item:last-child { border-bottom: 1px solid rgba(43,35,28,0.15); }
.upcoming-item .date {
  font-weight: 700;
  color: var(--teal);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.upcoming-item h4 { margin: 0 0 0.3em; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; }
.upcoming-item p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* ===================== About / founder ===================== */
.founder-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
  text-decoration: none;
  color: var(--ink);
}
.founder-card .photo-frame { aspect-ratio: 1; }
.founder-card h3 { margin-bottom: 0.2em; }
.founder-card .role {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.6em;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}

/* ===================== Closing CTA band ===================== */
.cta-band {
  background: var(--clay);
  color: var(--paper);
  text-align: center;
  padding: 3.5rem 0;
}
.cta-band h2 { color: var(--paper); max-width: 22ch; margin: 0 auto 1.25rem; }
.cta-band .btn-donate { background: var(--ink); font-size: 0.95rem; padding: 0.75rem 2rem; }
.cta-band .btn-donate:hover { background: #000; }

/* ===================== Footer ===================== */
.site-footer {
  background: var(--ink);
  color: var(--cream-warm);
  padding: 2.5rem 0;
  font-size: 0.85rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.site-footer a { text-decoration: none; opacity: 0.85; }
.site-footer a:hover { opacity: 1; }

/* ===================== Responsive ===================== */
@media (max-width: 860px) {
  .process, .project-grid, .why-grid, .project-photos { grid-template-columns: 1fr; }
  .founder-card { grid-template-columns: 1fr; }
  .founder-card .photo-frame { max-width: 200px; }
  .main-nav { gap: 1.1rem; }
  .site-header .wrap { flex-wrap: wrap; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Skip link — hidden until focused via keyboard */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}
