/* Komoriko International Ministry: preview stylesheet
   Palette and type from Jacinth's brief (Oct 16). Gold never carries text on light backgrounds (2.1:1). */

:root {
  --ivory: #F7F2E9;
  --white: #FFFFFF;
  --plum: #654C70;
  --charcoal: #352E37;
  --gold: #C6A36A;
  --night: #2A1F2E;
  --plum-soft: #EFE8EE;
  --line: rgba(53, 46, 55, 0.14);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Lato", "Segoe UI", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  --step-5: clamp(2.9rem, 1.5rem + 6vw, 5.75rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 72rem;
  --measure: 34em;
}

*, *::before, *::after { box-sizing: border-box; }

/* scroll-padding keeps focused items and #anchors clear of the sticky header */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 7rem; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--charcoal);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--plum); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* focus ring: plum on light (6.7:1+), gold on dark (6.6:1), ivory on the plum band (6.7:1) */
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .skip-link:focus-visible { outline-color: var(--gold); }
.section--plum :focus-visible { outline-color: var(--ivory); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--charcoal); color: var(--ivory); padding: 0.6rem 1rem;
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Preview notice */
.preview-bar {
  background: var(--charcoal);
  color: var(--ivory);
  font-size: var(--step--1);
  text-align: center;
  padding: 0.45rem var(--gutter);
}
.preview-bar p { max-width: none; margin: 0; }

/* Header */
.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 5rem;
}
.wordmark { text-decoration: none; color: var(--charcoal); display: inline-flex; flex-direction: column; line-height: 1.05; }
.wordmark-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: 0.02em; }
.wordmark-sub { font-size: 0.78rem; letter-spacing: 0.04em; color: var(--plum); margin-top: 0.2rem; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-list { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.nav-list a {
  color: var(--charcoal); text-decoration: none; font-size: 1rem;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--line); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--plum); color: var(--plum); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 1rem; color: var(--charcoal); padding: 0.45rem 1rem; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.01em; text-decoration: none; padding: 0.85rem 1.6rem;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer; line-height: 1.2;
}
.btn-donate { background: var(--plum); color: var(--white); padding: 0.6rem 1.3rem; }
.btn-donate:hover { background: var(--charcoal); }
.btn-primary { background: var(--plum); color: var(--white); }
.btn-primary:hover { background: var(--charcoal); }
.btn-ghost { border-color: var(--plum); color: var(--plum); background: transparent; }
.btn-ghost:hover { background: var(--plum); color: var(--white); }
.on-dark .btn-primary { background: var(--gold); color: var(--night); }
.on-dark .btn-primary:hover { background: var(--ivory); }
.on-dark .btn-ghost { border-color: var(--ivory); color: var(--ivory); }
.on-dark .btn-ghost:hover { background: var(--ivory); color: var(--night); }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Dark bands that carry the cover's light */
.on-dark { background: var(--night); color: var(--ivory); position: relative; overflow: hidden; isolation: isolate; }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--ivory); }
.on-dark a:not(.btn) { color: var(--gold); }

.light {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.light::before {
  /* the shaft: rays falling from the top left across the band, like the cover */
  content: ""; position: absolute;
  width: 46%; height: 220%; left: 20%; top: -60%;
  background:
    linear-gradient(90deg,
      rgba(232, 206, 150, 0) 0%,
      rgba(232, 206, 150, 0.10) 18%,
      rgba(240, 220, 172, 0.42) 34%,
      rgba(232, 206, 150, 0.12) 46%,
      rgba(232, 206, 150, 0.30) 58%,
      rgba(232, 206, 150, 0.06) 74%,
      rgba(232, 206, 150, 0) 100%);
  transform: rotate(-34deg);
  transform-origin: top center;
  filter: blur(18px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 85%);
          mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 85%);
}
.light::after {
  /* the source glow at the top of the beam */
  content: ""; position: absolute; width: 70vmax; height: 70vmax; left: 8vmax; top: -46vmax;
  background: radial-gradient(closest-side, rgba(240, 220, 172, 0.38), rgba(198, 163, 106, 0) 70%);
}
.light--hero { animation: dawn 2.6s ease-out 0.2s both; }
@keyframes dawn { from { opacity: 0.15; } to { opacity: 1; } }

/* Home hero */
.hero { padding: clamp(5rem, 12vw, 9.5rem) 0 clamp(4.5rem, 10vw, 8rem); }
.hero h1 {
  font-size: var(--step-5); font-weight: 400; line-height: 1.02; letter-spacing: -0.02em;
  max-width: 9.5em; margin-bottom: 0.45em;
}
.hero-line { display: block; }
.hero-line + .hero-line { padding-left: clamp(1.5rem, 9vw, 7.5rem); }
.tagline { font-family: var(--serif); font-style: italic; font-size: var(--step-1); color: var(--gold); margin-bottom: 1.2rem; }
.hero .lede { font-size: 1.25rem; max-width: 30em; color: rgba(247, 242, 233, 0.9); }

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--white { background: var(--white); }
.section--plum { background: var(--plum); color: var(--ivory); }
.section--plum h2 { color: var(--ivory); }
.section--plum .btn-primary { background: var(--ivory); color: var(--plum); }
.section--plum .btn-primary:hover { background: var(--gold); color: var(--night); }
.section--plum .btn-ghost { border-color: var(--ivory); color: var(--ivory); }
.section--plum .btn-ghost:hover { background: var(--ivory); color: var(--plum); }

.split { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1.05fr 0.95fr; }
  .split--media-first { grid-template-columns: 0.85fr 1.15fr; }
}

.text-link { font-weight: 700; }

/* Three areas: plain columns, not cards */
.areas-intro { margin-bottom: 2.5rem; }
.areas { display: grid; grid-template-columns: 1fr; gap: 2rem 3rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .areas { grid-template-columns: repeat(3, 1fr); } }
.areas h3 { color: var(--plum); margin-bottom: 0.35em; }
.areas p { margin: 0; }

/* Book */
.book-feature { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.book-cover {
  width: min(100%, 22rem); margin: 0 auto;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(198, 163, 106, 0.25);
}
.book-subtitle { font-family: var(--serif); font-style: italic; font-size: var(--step-2); color: var(--gold); margin-top: -0.2em; }
.book-feature .lead { font-size: var(--step-1); font-family: var(--serif); }

/* Founder */
.portrait { width: min(100%, 26rem); border-radius: 12rem 12rem 0.5rem 0.5rem; object-fit: cover; aspect-ratio: 3 / 4; }
.roles { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; color: var(--plum); font-weight: 700; font-size: 1rem; }
.kicker { font-family: var(--serif); font-style: italic; font-size: var(--step-1); color: var(--plum); margin-bottom: 1rem; }

/* Closing statement, used once on the site */
.closing { padding: clamp(4.5rem, 10vw, 8rem) 0; text-align: left; }
.closing blockquote { margin: 0; }
.closing p {
  font-family: var(--serif); font-size: var(--step-3); line-height: 1.25; max-width: 22em; color: var(--charcoal);
}

/* Forms */
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 700; font-size: 1rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--charcoal); background: var(--white);
  border: 1px solid rgba(53, 46, 55, 0.35); border-radius: 0.5rem; padding: 0.75rem 0.9rem; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.signup { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; max-width: 36rem; }
.signup .field { flex: 1 1 16rem; }
.form-status { font-weight: 700; color: var(--plum); min-height: 1.5em; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Placeholders: clearly labelled for the preview */
.ph {
  border: 2px dashed var(--plum); border-radius: 0.6rem; background: var(--plum-soft);
  color: var(--charcoal); padding: 1.1rem 1.25rem; font-size: 1rem; max-width: 40rem;
}
.ph strong { color: var(--plum); }
.ph p { margin: 0.3rem 0 0; }
.on-dark .ph, .section--plum .ph { background: rgba(247, 242, 233, 0.08); border-color: var(--gold); color: var(--ivory); }
.on-dark .ph strong, .section--plum .ph strong { color: var(--gold); }
.ph-media {
  display: grid; place-items: center; text-align: center; aspect-ratio: 4 / 3; width: 100%;
  border: 2px dashed var(--plum); border-radius: 0.6rem; background: var(--plum-soft); padding: 1.5rem; font-size: 1rem;
}
.ph-tag {
  display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--plum);
  border: 1px dashed var(--plum); border-radius: 999px; padding: 0.05rem 0.55rem; margin-left: 0.4rem; vertical-align: middle;
}
footer .ph-tag { color: var(--gold); border-color: var(--gold); }

/* Inner page headers */
.page-head { padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { max-width: 14em; }
.page-head .lede { font-size: 1.25rem; max-width: 32em; }
.prose h2 { margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.status-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; max-width: 40rem; }
.status-list li { border-left: 3px solid var(--gold); padding-left: 1rem; }
.status-list strong { color: var(--plum); }

/* Footer */
.site-footer { background: var(--night); color: rgba(247, 242, 233, 0.85); padding: 4rem 0 2rem; font-size: 1rem; }
.site-footer a { color: var(--ivory); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .wordmark { color: var(--ivory); }
.site-footer .wordmark-sub { color: var(--gold); }
.wordmark--logo { flex-direction: row; align-items: center; gap: 0.75rem; }
.logo { display: block; height: 4.75rem; width: auto; }
.logo-name { font-family: var(--serif); font-size: 0.95rem; font-weight: 600; line-height: 1.15; color: var(--charcoal); }
.logo--footer { height: 4.5rem; }
.footer-name { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.04em; margin-top: 0.6rem; }
.footer-tagline { font-family: var(--serif); font-style: italic; color: var(--gold); margin-top: 1rem; }
.footer-title { font-family: var(--serif); font-size: 1.15rem; color: var(--ivory); margin: 0 0 0.75rem; font-weight: 500; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer-legal { border-top: 1px solid rgba(247, 242, 233, 0.15); margin-top: 3rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.9rem; }
.footer-legal p { margin: 0; max-width: none; }

/* Mobile navigation */
@media (max-width: 960px) {
  .menu-toggle { display: inline-block; }
  .nav { gap: 0.75rem; }
  .nav-list {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--ivory); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav-list.is-open { display: flex; }
  .nav-list a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--line); font-weight: 700; }
}
@media (max-width: 420px) {
  .wordmark-name { font-size: 1.35rem; }
  .wordmark-sub { font-size: 0.7rem; }
  .site-header .logo { height: 3.25rem; }
  .logo-name { font-size: 0.72rem; }
  .wordmark--logo { gap: 0.5rem; }
  .btn-donate { padding: 0.5rem 1rem; }
  .hero-line + .hero-line { padding-left: 0; }
}

@media (max-width: 700px) {
  .light::before { width: 110%; left: -20%; top: -40%; }
  .light::after { left: -20vmax; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .light--hero { animation: none; }
}

/* Logo name beside the header logo: only where the header has room (Oct 22 QA fix). Phones get the name in the home hero instead. */
.hero-brand { display: none; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
@media (max-width: 599px) { .logo-name { display: none; } .hero-brand { display: block; } }
@media (min-width: 961px) and (max-width: 1199px) { .logo-name { display: none; } .hero-brand { display: block; } }

/* Photos added Oct 22 (round 2) */
.community-photo { width: 100%; max-width: 32rem; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0.5rem; justify-self: center; }
.mission-photo { margin: 2.5rem 0 0; max-width: 26rem; }
.mission-photo img { display: block; width: 100%; height: auto; border-radius: 0.5rem; }
.mission-photo figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--plum); font-style: italic; }

/* Added Oct 28 (round 3): scripture quote on Our Mission, readable tags on the plum band */
.section--plum .ph-tag { color: var(--ivory); border-color: var(--ivory); }
.scripture { margin: 1.5rem 0 0; padding-left: 1.25rem; border-left: 3px solid var(--gold); max-width: 40rem; }
.scripture p { font-family: var(--serif); font-style: italic; font-size: var(--step-1); margin-bottom: 0.5rem; }
.scripture cite { font-style: normal; font-weight: 700; color: var(--plum); font-size: 1rem; }

/* Added Oct 29 (round 4): wide KIM logo, program badges, small print, legal pages */
.logo { height: 3.6rem; }
.logo--footer { height: 3.6rem; }
@media (max-width: 420px) { .site-header .logo { height: 2.6rem; } }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; color: var(--plum); background: var(--plum-soft); border-radius: 999px; padding: 0.1rem 0.6rem; margin-left: 0.4rem; vertical-align: middle; }
.fine-print { font-size: 0.9rem; margin-top: 1rem; opacity: 0.9; }
.form-hint { font-size: 0.9rem; margin: 0; }
.legal h2 { font-size: var(--step-1); margin-top: 2rem; }
