/* =========================================================
   Perivale Community Hub C.I.C.
   Aesthetic: warm community editorial — "pear-tree valley"
   Forest green + terracotta on warm cream paper.
   ========================================================= */

:root {
  /* palette */
  --paper:      #fbf6ea;
  --paper-2:    #f4ecd9;
  --ink:        #2a2620;
  --ink-soft:   #5c544a;
  --green:      #2e5d44;   /* primary forest green */
  --green-deep: #1f4230;
  --green-soft: #6b9a7e;
  --terra:      #c75d3a;   /* terracotta accent */
  --terra-soft: #e08a5f;
  --gold:       #e0a83f;
  --line:       #e4d9c2;

  --maxw: 1120px;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 18px 40px -22px rgba(42, 38, 32, .45);
  --shadow-lift: 0 26px 55px -24px rgba(42, 38, 32, .55);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 90% at 85% -10%, rgba(224, 168, 63, .14), transparent 55%),
    radial-gradient(90% 70% at -10% 0%, rgba(107, 154, 126, .16), transparent 50%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* decorative film grain */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .85rem 1.5rem; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn--primary { background: var(--terra); color: #fff; box-shadow: 0 12px 24px -12px rgba(199, 93, 58, .8); }
.btn--primary:hover { background: var(--green); transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(46, 93, 68, .7); }
.btn--ghost { background: transparent; color: var(--green-deep); border-color: var(--green); }
.btn--ghost:hover { background: var(--green); color: #fff; transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(251, 246, 234, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--green-deep); }
.brand__mark { color: var(--green); display: grid; place-items: center; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--font-display); font-size: 1.18rem; font-weight: 600; }
.brand__text em { font-style: normal; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }

.nav { display: flex; align-items: center; }
.nav__menu { list-style: none; display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0; }
.nav__menu a { text-decoration: none; font-weight: 500; padding: .5rem .85rem; border-radius: 999px; color: var(--ink); transition: background-color .2s, color .2s; }
.nav__menu a:hover { background: var(--paper-2); }
.nav__cta { background: var(--green); color: #fff !important; }
.nav__cta:hover { background: var(--green-deep) !important; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav__toggle span { width: 24px; height: 2.5px; background: var(--green-deep); border-radius: 2px; transition: transform .25s, opacity .25s; }

/* ---------- layout helpers ---------- */
.section { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.25rem, 4vw, 2.5rem); }
.section__head { max-width: 640px; margin-bottom: 2.75rem; }
.section__head h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-top: .4rem; }
.section__sub { color: var(--ink-soft); font-size: 1.08rem; margin-top: .9rem; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--terra); }
.eyebrow--light { color: var(--gold); }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 9vw, 7rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero__inner { position: relative; z-index: 2; max-width: 760px; }
.pill {
  display: inline-block; background: #fff; border: 1px solid var(--line);
  padding: .45rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: var(--green-deep); box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.hero__title { font-size: clamp(2.6rem, 7.5vw, 5rem); letter-spacing: -.02em; }
.hero__title .ink { color: var(--terra); font-style: italic; }
.hero__lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 560px; margin: 1.5rem 0 2.25rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero__blob { position: absolute; z-index: 1; border-radius: 48% 52% 60% 40% / 55% 45% 55% 45%; filter: blur(2px); opacity: .5; }
.hero__blob--1 { width: 360px; height: 360px; right: -90px; top: -40px; background: radial-gradient(circle at 30% 30%, var(--green-soft), transparent 70%); }
.hero__blob--2 { width: 260px; height: 260px; right: 120px; bottom: -120px; background: radial-gradient(circle at 50% 50%, var(--gold), transparent 70%); opacity: .35; }

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.about__lead p { font-size: 1.12rem; }
.about__lead p:first-child { font-size: 1.28rem; color: var(--ink); }
.about__values { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.about__values li { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.about__icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.about__values h3 { font-size: 1.12rem; margin-bottom: .2rem; }
.about__values p { margin: 0; font-size: .96rem; color: var(--ink-soft); }

/* ---------- pull quote ---------- */
.quote { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem); }
.quote__fig { margin: 0; text-align: center; max-width: 860px; margin-inline: auto; position: relative; }
.quote__fig::before {
  content: "\201C"; font-family: var(--font-display); color: var(--green-soft);
  font-size: clamp(4rem, 12vw, 7rem); line-height: 1; display: block; opacity: .55; margin-bottom: -.35em;
}
.quote__text {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 3.1rem); line-height: 1.15; letter-spacing: -.01em;
  color: var(--green-deep); margin: 0;
}
.quote__cap {
  margin-top: 1.1rem; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--terra);
}

/* ---------- offer cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem 1.5rem; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--green-soft); }
.card__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--paper-2); color: var(--green); margin-bottom: 1.1rem; }
.card:hover .card__icon { background: var(--green); color: #fff; }
.card h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ---------- who (dark band) ---------- */
.who { max-width: none; padding: 0; }
.who__inner {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 2.5rem);
  background: var(--green-deep); color: var(--paper); border-radius: clamp(20px, 4vw, 36px);
  position: relative; overflow: hidden;
}
.who__inner::after {
  content: ""; position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(224, 168, 63, .35), transparent 70%); border-radius: 50%;
}
.who .section__head { margin-bottom: 2rem; }
.who h2 { color: var(--paper); }
.section__sub--light { color: rgba(251, 246, 234, .8); }
.who__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .9rem; position: relative; z-index: 2; }
.who__list li {
  display: flex; align-items: center; gap: .7rem; font-size: 1.08rem; font-weight: 600;
  background: rgba(251, 246, 234, .08); border: 1px solid rgba(251, 246, 234, .18);
  padding: .85rem 1.3rem; border-radius: 999px;
}
.who__list span { font-size: 1.3rem; }

/* ---------- contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__intro h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: .4rem 0 1rem; }
.contact__intro > p { color: var(--ink-soft); font-size: 1.08rem; max-width: 42ch; }
.contact__details { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.contact__details li { display: flex; flex-direction: column; gap: .15rem; }
.contact__label { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--terra); font-weight: 700; }
.contact__details a { color: var(--green-deep); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--gold); width: fit-content; }
.contact__details a:hover { color: var(--terra); }

.contact__form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.field input, .field textarea {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: 11px;
  font-family: var(--font-body); font-size: 1rem; background: var(--paper); color: var(--ink);
  transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 93, 68, .15); }
.contact__note { margin: .9rem 0 0; font-size: .82rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 2; background: var(--paper-2); border-top: 1px solid var(--line); margin-top: 2rem; }
.site-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem); }
.site-footer__brand { display: flex; align-items: center; gap: .65rem; color: var(--green); margin-bottom: 1rem; }
.site-footer__brand p { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--green-deep); }
.site-footer__legal p { margin: 0 0 .35rem; font-size: .9rem; color: var(--ink-soft); max-width: 60ch; }
.site-footer__copy { margin: 1.25rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; right: clamp(1rem, 4vw, 2.5rem); left: clamp(1rem, 4vw, 2.5rem);
    flex-direction: column; align-items: stretch; gap: .25rem; padding: .75rem;
    background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lift);
    transform-origin: top; transform: scaleY(0); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
  }
  .nav__menu.is-open { transform: scaleY(1); opacity: 1; pointer-events: auto; }
  .nav__menu a { padding: .8rem 1rem; }
  .nav__cta { text-align: center; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(2.3rem, 11vw, 3.2rem); }
}
