/* ================================================
   Iden & Frewen Educational Foundation
   Calm, rural, neutral palette
   ================================================ */

:root {
  --cream:      #f6f2ea;
  --cream-dark: #ede8dd;
  --green:      #4a6b3a;
  --green-dark: #344d29;
  --green-light:#e8eee4;
  --brown:      #8c7355;
  --brown-light:#d6cbb8;
  --text:       #2a2f24;
  --text-light: #5a5f54;
  --border:     #ddd6c6;
  --white:      #ffffff;
  --shadow:     0 2px 12px rgba(74, 107, 58, 0.08);

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --max-w: 1120px;
  --radius: 6px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--green-dark);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Utilities ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 4rem 0; }
.section--alt { background: var(--white); }
.section--green { background: var(--green-light); }
.text-center { text-align: center; }
.lead {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 640px;
}
.lead.lead--center { margin: 0 auto; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-light);
  border-radius: 50px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.75rem;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn--primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}
.btn--outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn--outline:hover {
  background: var(--green);
  color: var(--white);
}
.btn--lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

/* ---- Header ---- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-svg {
  height: 44px;
  width: auto;
  display: block;
}

/* Nav */
.main-nav ul { display: flex; align-items: center; gap: 0.25rem; }
.main-nav li { position: relative; }
.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--green);
  background: var(--green-light);
}
.nav-cta {
  background: var(--green) !important;
  color: var(--white) !important;
  margin-left: 0.25rem;
}
.nav-cta:hover { background: var(--green-dark) !important; }


/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--green-dark);
}
.hero__image {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.45;
}
.hero__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #344d29 0%, #4a6b3a 50%, #6b8c55 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 5rem 0;
  color: var(--white);
  max-width: 640px;
}
.hero__tag {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  margin-bottom: 1rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero .lead { color: rgba(255,255,255,0.9); margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__actions .btn--outline { border-color: rgba(255,255,255,0.6); color: var(--white); }
.hero__actions .btn--outline:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }

/* ---- Page Header ---- */
.page-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 3.5rem 0;
}
.page-header h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-header .lead { color: rgba(255,255,255,0.85); }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(74, 107, 58, 0.12); transform: translateY(-2px); }
.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}
/* ---- Highlight cards (cycling animation) ---- */
.highlight-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.highlight-card {
  background: var(--green-light);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
  cursor: default;
}
.highlight-card h3 {
  color: var(--green-dark);
  font-size: 1.1rem;
  transition: color 0.5s ease;
}
.highlight-card ul {
  list-style: disc;
  padding-left: 1.1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  flex: 1;
  transition: color 0.5s ease;
}
.highlight-card ul li { margin-bottom: 0.35rem; }
.hc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.hc-header h3 { margin-bottom: 0; }
.hc-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}
.hc-icon svg { width: 18px; height: 18px; stroke-width: 2; }

/* Active / highlighted state */
.highlight-card.is-active {
  background: var(--green-dark);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(52, 77, 41, 0.25);
}
.highlight-card.is-active h3 { color: var(--white); }
.highlight-card.is-active ul,
.highlight-card.is-active p { color: rgba(255,255,255,0.85); }

/* ---- Timing cards ---- */
.timing-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 560px;
}
.timing-card {
  flex: 1;
  background: var(--white);
  border-radius: 10px;
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.timing-card h3 { color: var(--green-dark); margin-bottom: 0.5rem; }
.timing-card p { color: var(--text-light); margin: 0; font-size: 0.95rem; }
.timing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  margin-bottom: 1rem;
}
.timing-icon svg { width: 20px; height: 20px; }

.highlight-cards--3col { grid-template-columns: repeat(3, 1fr); }
.hc-note {
  font-size: 0.78rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
  opacity: 0.65;
  font-style: italic;
}
.hc-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.highlight-card.is-active .hc-link { color: rgba(255,255,255,0.85); }

@media (max-width: 900px) {
  .highlight-cards--3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .highlight-cards { grid-template-columns: repeat(2, 1fr); }
  .hero__content { text-align: center; }
  .hero__actions { justify-content: center; }
}
@media (max-width: 600px) {
  .highlight-cards,
  .highlight-cards--3col { grid-template-columns: 1fr; }
}
.card h3 { color: var(--green-dark); }
.card ul { list-style: disc; padding-left: 1.25rem; color: var(--text-light); }
.card ul li { margin-bottom: 0.4rem; }

/* ---- Photo placeholder ---- */
.photo-block {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-dark);
  aspect-ratio: 16/9;
}
.photo-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-block--rounded { border-radius: 16px; }
.photo-block__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.85rem;
  background: var(--cream-dark);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}
.photo-block__placeholder span { font-size: 2.5rem; }

/* ---- Two-column layout ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.two-col--reverse .two-col__text { order: 2; }
.two-col--reverse .two-col__media { order: 1; }

/* ---- Step list ---- */
.steps { counter-reset: steps; display: flex; flex-direction: column; gap: 1.5rem; }
.step {
  display: flex;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.step::before {
  counter-increment: steps;
  content: counter(steps);
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}
.step__content h3 { margin-bottom: 0.4rem; }

/* ---- Accordion (FAQ) ---- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion + .accordion { margin-top: 0.75rem; }
.accordion__header {
  width: 100%;
  background: var(--white);
  border: none;
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.15s;
}
.accordion__header:hover { background: var(--green-light); color: var(--green-dark); }
.accordion__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
  transition: transform 0.2s;
}
.accordion__icon::before,
.accordion__icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
}
.accordion__icon::before { width: 100%; height: 2px; top: 50%; transform: translateY(-50%); }
.accordion__icon::after { height: 100%; width: 2px; left: 50%; transform: translateX(-50%); transition: transform 0.2s, opacity 0.2s; }
.accordion.is-open .accordion__icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.accordion__body {
  display: none;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--cream);
}
.accordion.is-open .accordion__body { display: block; }
.accordion__body p, .accordion__body ul { color: var(--text-light); }
.accordion__body ul { list-style: disc; padding-left: 1.25rem; }
.accordion__body ul li { margin-bottom: 0.4rem; }

/* ---- Form ---- */
.form-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.form-section { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.form-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.form-section h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  padding: 0.4rem 0.9rem;
  background: var(--green-light);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-grid.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group--full { grid-column: 1 / -1; }
label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.required { color: var(--green); margin-left: 2px; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74, 107, 58, 0.12);
  background: var(--white);
}
textarea { min-height: 120px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a5f54' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.25rem; }
.hint { font-size: 0.8rem; color: var(--text-light); }
.form-row { display: flex; gap: 1rem; align-items: center; }
.checkbox-group { display: flex; align-items: flex-start; gap: 0.6rem; }
.checkbox-group input[type="checkbox"] { width: auto; margin-top: 0.2rem; flex-shrink: 0; }
.field-note {
  background: var(--green-light);
  border-left: 3px solid var(--green);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.875rem;
  color: var(--green-dark);
  margin-bottom: 1rem;
}

/* Assessment placeholder */
.assessment-placeholder {
  background: var(--cream-dark);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  color: var(--text-light);
}
.assessment-placeholder h3 { color: var(--brown); margin-bottom: 0.5rem; }

/* Cost table */
.cost-table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; }
.cost-table th {
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 0.9rem;
  text-align: left;
  border: 1px solid var(--border);
}
.cost-table td { padding: 0.5rem 0.9rem; border: 1px solid var(--border); background: var(--white); vertical-align: top; }
.cost-table td input { padding: 0.35rem 0.6rem; }

/* ---- Story cards ---- */
.story-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.story-card__image { aspect-ratio: 3/2; overflow: hidden; }
.story-card__image img { width: 100%; height: 100%; object-fit: cover; }
.story-card__body { padding: 1.5rem; }
.story-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 0.5rem;
}
.story-card h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.story-card p { color: var(--text-light); font-size: 0.9rem; }

/* ---- Trustee section ---- */
.trustee-intro-row {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  margin-top: 1.25rem;
}
.trustee-intro {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 2rem;
  border-left: 4px solid var(--green);
  flex: 1;
}
.trustee-intro-photo {
  flex: 1;
  min-height: 0;
  aspect-ratio: unset;
}
@media (max-width: 700px) {
  .trustee-intro-row { flex-direction: column; }
  .trustee-intro-photo { aspect-ratio: 16/9; }
}

/* ---- Timeline (history) ---- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.625rem;
  top: 0.4rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--green);
}
.timeline-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

/* ---- Notice / Info box ---- */
.notice {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--green-light);
  border: 1px solid var(--green);
  margin: 1.5rem 0;
}
.notice__icon { flex-shrink: 0; font-size: 1.25rem; }
.notice p { margin: 0; color: var(--green-dark); font-size: 0.9rem; }
.notice--warn { background: #fdf6ec; border-color: #c9873a; }
.notice--warn p { color: #7a4f1f; }

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--green-dark);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 2rem; max-width: 540px; margin-left: auto; margin-right: auto; }
.cta-banner .btn--outline { border-color: rgba(255,255,255,0.5); color: var(--white); margin-left: 0.75rem; }
.cta-banner .btn--outline:hover { background: rgba(255,255,255,0.15); }

/* ---- Footer ---- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.site-footer h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 0.75rem; }
.site-footer h4 { color: rgba(255,255,255,0.9); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.site-footer p { font-size: 0.875rem; line-height: 1.6; margin-bottom: 0.5rem; }
.site-footer a { color: rgba(255,255,255,0.75); font-size: 0.875rem; }
.site-footer a:hover { color: var(--white); }
.site-footer ul li { margin-bottom: 0.4rem; }
.charity-number { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col--reverse .two-col__text { order: 1; }
  .two-col--reverse .two-col__media { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 200;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 0.75rem 0; }
  .main-nav a { border-radius: 0; padding: 0.7rem 1.5rem; }
.form-grid { grid-template-columns: 1fr; }
  .form-grid.form-grid--3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero { min-height: 380px; }
  .hero__content { text-align: center; max-width: 100%; }
  .hero__actions { justify-content: center; }
}
@media (max-width: 480px) {
  .section { padding: 2.5rem 0; }
  .form-wrapper { padding: 1.5rem; }
}
