/* AVIDE – Arise of Village Development */
:root {
  --blue: #1b3f9e;
  --blue-dark: #102766;
  --green: #5cc34a;
  --green-dark: #2f8a2a;
  --sun: #f7c531;
  --cream: #fbf7ef;
  --sand: #f2ead9;
  --ink: #1d2330;
  --muted: #5b6475;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(16, 39, 102, .10);
  --max: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--blue-dark); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section--white { background: var(--white); }
.section--sand { background: var(--sand); }
.section--blue { background: var(--blue-dark); color: #e8edfb; }
.section--blue h2, .section--blue h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: .8rem;
}
.section--blue .eyebrow { color: var(--sun); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.section--blue .lead { color: #c9d3f2; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn--sun { background: var(--sun); color: var(--blue-dark); }
.btn--sun:hover { background: #ffd54f; }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-dark); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* Top bar & header */
.topbar { background: var(--blue-dark); color: #cfd8f5; font-size: .88rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar__links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 239, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 39, 102, .08);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue); color: var(--sun);
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.35rem; font-family: var(--serif);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 800; color: var(--blue-dark); font-size: 1.25rem; letter-spacing: .04em; }
.brand__sub { font-size: .75rem; color: var(--muted); }

.nav ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600;
  padding: .55em .9em; border-radius: 999px; font-size: .97rem;
}
.nav a:hover { background: var(--sand); }
.nav a[aria-current="page"] { color: var(--blue); background: rgba(27, 63, 158, .09); }
.nav .btn { padding: .6em 1.2em; margin-left: .4rem; }
.nav .btn:hover { background: #ffd54f; }

.nav-toggle {
  display: none; background: none; border: 0; width: 44px; height: 44px;
  cursor: pointer; border-radius: 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 24px; height: 2px; background: var(--blue-dark);
  position: relative; margin: auto; transition: .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 76px 0 auto 0;
    background: var(--cream);
    border-bottom: 1px solid rgba(16, 39, 102, .1);
    display: none;
  }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.5rem; }
  .nav a { display: block; padding: .8em 1em; }
  .nav .btn { display: flex; margin: .5rem 0 0; justify-content: center; }
}

/* Hero */
.hero {
  position: relative; min-height: min(88vh, 760px);
  display: grid; align-items: end;
  color: var(--white); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,39,102,.15) 0%, rgba(16,39,102,.35) 45%, rgba(10,22,58,.88) 100%);
}
.hero .container { position: relative; z-index: 1; padding: 6rem 0 4.5rem; }
.hero h1 { color: var(--white); max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero p { font-size: 1.2rem; max-width: 56ch; color: #e8edfb; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }

.page-hero {
  position: relative; color: var(--white); overflow: hidden;
  padding: clamp(5rem, 12vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
  background: var(--blue-dark);
}
.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,39,102,.92), rgba(16,39,102,.4)); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: .3em; }
.page-hero p { color: #dce4fa; font-size: 1.15rem; max-width: 60ch; margin: 0; }
.page-hero .eyebrow { color: var(--sun); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: -3rem; position: relative; z-index: 2; }
.stat { background: var(--white); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 2rem; color: var(--blue); line-height: 1.1; font-family: var(--serif); }
.stat span { color: var(--muted); font-size: .95rem; }

/* Split layout */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }
.photo-stack { position: relative; }
.photo-stack img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.photo-stack img:first-child { aspect-ratio: 4/3; }
.photo-stack img + img {
  position: absolute; width: 42%; right: -4%; bottom: -10%;
  aspect-ratio: 3/4; border: 6px solid var(--cream);
}
@media (max-width: 860px) { .photo-stack img + img { right: 4%; } .photo-stack { margin-bottom: 3rem; } }

.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 1.6rem; }
.badge { background: var(--white); border: 1px solid rgba(16,39,102,.1); border-radius: 999px; padding: .35em .9em; font-size: .88rem; font-weight: 600; color: var(--blue-dark); }

/* Cards */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
@media (max-width: 420px) { .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border-radius: var(--radius); padding: 1.8rem;
  box-shadow: 0 1px 0 rgba(16,39,102,.06); border: 1px solid rgba(16,39,102,.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.card__icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  margin-bottom: 1.1rem; font-size: 1.6rem;
  background: rgba(92,195,74,.15);
}
.card:nth-child(3n+2) .card__icon { background: rgba(247,197,49,.22); }
.card:nth-child(3n) .card__icon { background: rgba(27,63,158,.12); }
.section--blue .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.section--blue .card p { color: #c9d3f2; }
.section--blue .card h3 { color: var(--white); }

/* Project cards */
.project {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(16,39,102,.07);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project__media { aspect-ratio: 16/10; overflow: hidden; background: var(--blue); position: relative; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project:hover .project__media img { transform: scale(1.04); }
.project__media--art { display: grid; place-items: center; font-size: 4rem; }
.project__media--green { background: linear-gradient(135deg, #2f8a2a, #5cc34a); }
.project__media--sun { background: linear-gradient(135deg, #e8a20c, #f7c531); }
.project__media--blue { background: linear-gradient(135deg, #102766, #1b3f9e); }
.project__body { padding: 1.6rem 1.7rem 1.9rem; }
.project__body p { color: var(--muted); margin: 0; }
.project__tag { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-dark); display: block; margin-bottom: .4rem; }
.project blockquote { margin: 1rem 0 0; padding-left: 1rem; border-left: 3px solid var(--sun); font-style: italic; color: var(--blue-dark); }

/* Help / CTA */
.help-video { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.help-video video { width: 100%; max-height: 640px; }
.help-list { display: grid; gap: 1.2rem; }
.help-item { display: grid; grid-template-columns: 52px 1fr; gap: 1rem; align-items: start; }
.help-item__num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--sun); color: var(--blue-dark);
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
}
.help-item h3 { margin-bottom: .3em; }
.help-item p { color: var(--muted); margin: 0; }
.section--blue .help-item p { color: #c9d3f2; }

.cta {
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white); border-radius: calc(var(--radius) * 1.4);
  padding: clamp(2.4rem, 5vw, 4rem); display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center;
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(247,197,49,.45), transparent 70%); right: -80px; top: -120px;
}
.cta > * { position: relative; }
.cta h2 { color: var(--white); margin-bottom: .3em; }
.cta p { color: #dce4fa; margin: 0; }
.cta .actions { display: flex; gap: .8rem; flex-wrap: wrap; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* Lists */
.check-list { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: .8rem; }
.check-list li { padding-left: 2.1rem; position: relative; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: .1em; width: 1.45rem; height: 1.45rem;
  border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center;
  font-size: .8rem; font-weight: 800;
}

.reg-box { background: var(--white); border-left: 5px solid var(--green); border-radius: 12px; padding: 1.2rem 1.4rem; margin: 1.5rem 0; font-size: .95rem; color: var(--muted); }
.reg-box strong { color: var(--blue-dark); }

/* Team */
.team { text-align: center; }
.team .avatar {
  width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 1.1rem;
  display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: var(--white);
  font-family: var(--serif);
  background: linear-gradient(135deg, var(--blue), var(--green));
}
.team .card:nth-child(2) .avatar { background: linear-gradient(135deg, var(--green-dark), var(--sun)); }
.team .card:nth-child(3) .avatar { background: linear-gradient(135deg, var(--blue-dark), #5d7be0); }
.team .card:nth-child(4) .avatar { background: linear-gradient(135deg, #e8a20c, var(--blue)); }
.team h3 { margin-bottom: .1em; }
.team .role { color: var(--green-dark); font-weight: 600; font-size: .95rem; display: block; margin-bottom: .6rem; }
.team a { font-size: .9rem; word-break: break-all; }

/* News */
.post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(16,39,102,.07); }
.post + .post { margin-top: 2rem; }
.post__media img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.post__body { padding: clamp(1.6rem, 4vw, 3rem); }
.post__date { display: inline-block; background: var(--sand); color: var(--blue-dark); font-weight: 700; font-size: .82rem; padding: .3em .8em; border-radius: 999px; margin-bottom: 1rem; }
.post__body p { color: var(--muted); }
.tips { background: var(--cream); border-radius: 14px; padding: 1.2rem 1.4rem; margin-top: 1.2rem; }
.tips h4 { margin-bottom: .5em; font-size: 1rem; }
.tips ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
@media (max-width: 820px) { .post { grid-template-columns: 1fr; } .post__media img { max-height: 380px; } }

/* Gallery */
.gallery { columns: 3 280px; column-gap: 1rem; }
.gallery figure { margin: 0 0 1rem; break-inside: avoid; border-radius: 14px; overflow: hidden; position: relative; cursor: zoom-in; background: var(--sand); }
.gallery img { width: 100%; transition: transform .5s ease, filter .3s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .8rem;
  color: #fff; font-size: .9rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(10,22,58,.8));
  opacity: 0; transition: opacity .3s ease;
}
.gallery figure:hover figcaption, .gallery figure:focus-visible figcaption { opacity: 1; }
.gallery figure:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 14, 36, .94);
  display: none; align-items: center; justify-content: center; padding: 3rem 4.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-height: 82vh; max-width: 100%; border-radius: 10px; margin: auto; }
.lightbox figcaption { color: #dce4fa; margin-top: .8rem; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 4rem .8rem; } .lightbox__prev, .lightbox__next { top: auto; bottom: 1rem; transform: none; } }

/* Contact */
.contact-cards .card { display: flex; gap: 1rem; align-items: flex-start; }
.contact-cards .card__icon { margin: 0; flex: none; }
.contact-cards h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--green-dark); margin-bottom: .3em; }
.contact-cards p, .contact-cards a { color: var(--ink); font-size: 1.05rem; font-weight: 600; text-decoration: none; }
.contact-cards a:hover { color: var(--blue); text-decoration: underline; }

.form { background: var(--white); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow); display: grid; gap: 1rem; }
.form label { font-weight: 600; font-size: .92rem; display: grid; gap: .35rem; color: var(--blue-dark); }
.form input, .form textarea, .form select {
  font: inherit; padding: .85em 1em; border-radius: 12px; border: 1.5px solid #d9dce4; background: #fcfcfd; color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27,63,158,.12); }
.form textarea { min-height: 160px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form__note { font-size: .85rem; color: var(--muted); margin: 0; }

/* Footer */
.footer { background: #0b1a47; color: #b9c4e6; padding: 4.5rem 0 1.5rem; font-size: .95rem; }
.footer a { color: #e3e9fb; text-decoration: none; }
.footer a:hover { color: var(--sun); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 2.5rem; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { color: var(--white); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer .brand__name { color: var(--white); }
.footer .brand__sub { color: #93a1cc; }
.footer__about p { margin-top: 1rem; }
.socials { display: flex; gap: .6rem; margin-top: 1rem; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08);
}
.socials a:hover { background: var(--sun); color: var(--blue-dark); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: #8592bd; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--sun); color: var(--blue-dark); padding: .6rem 1rem; z-index: 200; font-weight: 700; }
.skip-link:focus { left: 1rem; top: 1rem; }
