/* =========================================================
   Our Irvine — shared stylesheet
   Working Together For A Better Irvine
   ========================================================= */

/* ---- Fonts ---------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

/* ---- Design tokens -------------------------------------- */
:root {
  /* Palette — drawn from the Our Irvine logo */
  --navy:       #1f2c5c;   /* OUR IRVINE wordmark */
  --navy-dark:  #161f44;
  --navy-soft:  #2d3d75;
  --sky:        #7fb6dc;   /* shield sky / harbour */
  --sky-pale:   #e6f1f9;
  --sea:        #4f8d6f;   /* shield grass */
  --sea-pale:   #e8f1ec;
  --sandstone:  #b86b3a;   /* Townhouse steeple / dragon */
  --sandstone-pale: #f7ede3;

  --ink:        #1a1d29;
  --body:       #3a3f4d;
  --muted:      #6b7280;
  --line:       #e3e6ec;
  --line-soft:  #eef0f4;
  --paper:      #fbfaf6;   /* off-white, warm */
  --white:      #ffffff;

  /* Type */
  --display: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --wrap:    1180px;
  --gutter:  clamp(1.25rem, 4vw, 2.5rem);
  --radius:  6px;
  --shadow-sm: 0 1px 2px rgba(22, 31, 68, 0.05);
  --shadow-md: 0 4px 16px -4px rgba(22, 31, 68, 0.12);
  --shadow-lg: 0 20px 40px -20px rgba(22, 31, 68, 0.22);
}

/* ---- Reset / base -------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sandstone); }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.25rem, 4.6vw, 3.8rem); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  color: var(--body);
  font-weight: 400;
}

/* ---- Layout primitives --------------------------------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--paper { background: var(--paper); }
.section--white { background: var(--white); }
.section--sky   { background: linear-gradient(180deg, var(--sky-pale) 0%, var(--paper) 100%); }
.section--navy  { background: var(--navy); color: #cdd4ee; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sandstone);
  margin-bottom: 1rem;
  font-family: var(--sans);
}

.rule {
  width: 48px;
  height: 2px;
  background: var(--sandstone);
  border: 0;
  margin: 0 0 1.75rem;
}

/* ---- Header / nav -------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 0.5rem 0;
  position: relative;
}

.nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border-radius: 4px;
  transition: color 120ms ease, background 120ms ease;
}
.nav a:hover { color: var(--navy); background: var(--line-soft); }
.nav a.is-current { color: var(--navy); position: relative; }
.nav a.is-current::after {
  content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.2rem;
  height: 2px; background: var(--sandstone);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: 0; padding: 0.5rem; cursor: pointer; color: var(--navy);
  margin-right: auto; /* push to left when visible */
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-header__inner { justify-content: flex-start; padding: 0.65rem 0; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
         flex-direction: column; align-items: stretch; gap: 0;
         background: var(--white); border-bottom: 1px solid var(--line);
         padding: 0.5rem var(--gutter) 1rem; z-index: 30; }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .nav a.is-current::after { display: none; }
  .nav a.is-current { background: var(--sky-pale); padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* ---- Logo banner --------------------------------------- */
.logo-banner {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem) 0;
}
.logo-banner .wrap {
  display: flex;
  justify-content: center;
}
.logo-banner a { display: block; line-height: 0; }
.logo-banner img {
  width: 100%;
  max-width: 900px;
  height: auto;
}

/* ---- Dragon banner (home) ------------------------------ */
.dragon-banner {
  background: var(--ink);
  border-bottom: 3px solid var(--sandstone);
  line-height: 0;
}
.dragon-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Hero (home) --------------------------------------- */
.hero {
  position: relative;
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(127, 182, 220, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(184, 107, 58, 0.10), transparent 60%),
    var(--paper);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(31,44,92,0.04) 1px, transparent 1px);
  background-size: 80px 100%;
  mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 760px; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--sandstone); font-weight: 500; }
.hero .lede { max-width: 38em; }
.hero__meta {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem;
  font-size: 0.92rem;
}
.hero__meta div strong { display: block; color: var(--navy); font-family: var(--display); font-size: 1.6rem; font-weight: 600; }
.hero__meta div span { color: var(--muted); }

/* ---- Buttons ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.btn--sandstone { background: var(--sandstone); color: var(--white); }
.btn--sandstone:hover { background: #9c5728; color: var(--white); transform: translateY(-1px); }
.btn .arrow { transition: transform 160ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---- Card grids ---------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Generic card */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d4d9e4; }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.97rem; }

/* Survey card (Get Involved) */
.survey {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.survey:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.survey__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sky-pale);
}
.survey__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms ease;
}
.survey:hover .survey__image img { transform: scale(1.04); }
.survey__image .tag {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
  z-index: 1;
}
.survey__body { padding: 1.5rem 1.75rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.survey__body h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.survey__sub { font-size: 0.9rem; color: var(--muted); margin: 0 0 1rem; }
.survey__body p { font-size: 0.95rem; }
.survey__body .btn { margin-top: auto; align-self: flex-start; }

/* Member list (The Board) */
.member-group { margin-bottom: 3rem; }
.member-group:last-child { margin-bottom: 0; }
.member-group > h2 {
  font-size: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--sandstone);
  margin-bottom: 0;
}
.member-list { list-style: none; margin: 0; padding: 0; }
.member-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.member-list li:last-child { border-bottom: 0; }
.member-list__name {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
  min-width: 14em;
}
.member-list__role {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}

/* ---- Document list (Documents page) -------------------- */
.doc-section { margin-bottom: 3rem; }
.doc-section:last-child { margin-bottom: 0; }
.doc-section h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.doc-section > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.25rem; }

.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list a {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  transition: color 120ms ease, padding 120ms ease, background 120ms ease;
}
.doc-list a:hover { color: var(--navy); padding-left: 0.75rem; background: var(--line-soft); }
.doc-list .doc-icon {
  flex-shrink: 0;
  width: 36px; height: 44px;
  background: var(--sandstone-pale);
  color: var(--sandstone);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  border: 1px solid #eddcc8;
}
.doc-list .doc-label { flex: 1; min-width: 0; }
.doc-list .doc-meta { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.doc-list .arrow { color: var(--muted); font-size: 1.1rem; }

/* ---- Two-column layout (Regen Plan etc.) --------------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.callout {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sandstone);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.75rem;
}
.callout h3 { margin-top: 0; }
.callout--navy { background: var(--navy); color: #cdd4ee; border-color: var(--sandstone); }
.callout--navy h3 { color: var(--white); }
.callout--navy a { color: var(--white); }

.stat-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 2rem 0; }
.stat {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat strong { display: block; font-family: var(--display); font-size: 2rem; color: var(--navy); font-weight: 600; line-height: 1; margin-bottom: 0.4rem; }
.stat span { display: block; font-size: 0.88rem; color: var(--muted); line-height: 1.4; }

/* ---- Hashtag band -------------------------------------- */
.hashtag-band {
  background: var(--navy);
  color: var(--white);
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hashtag-band::before,
.hashtag-band::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  width: 40%;
  background: radial-gradient(ellipse at center, rgba(127, 182, 220, 0.18), transparent 70%);
  pointer-events: none;
}
.hashtag-band::before { left: -10%; }
.hashtag-band::after  { right: -10%; }
.hashtag-band__tag {
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1;
  color: var(--white);
  position: relative;
}
.hashtag-band__sub {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--sky);
  margin: 0;
  letter-spacing: 0.01em;
  position: relative;
}

/* ---- Delivered block (You Said, We Did) ---------------- */
.delivered {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--line);
}
.delivered:first-child { padding-top: 0; }
.delivered:last-child { border-bottom: 0; padding-bottom: 0; }

@media (min-width: 880px) {
  .delivered { grid-template-columns: 1fr 1fr; }
  .delivered--reverse .delivered__media { order: 2; }
}

.delivered__media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sky-pale);
  box-shadow: var(--shadow-md);
}
.delivered__media img {
  width: 100%;
  height: auto;
  display: block;
}

.delivered__body h2 {
  margin-top: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.delivered__date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy);
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
}

.delivered__pair {
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}
.delivered__pair strong {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin-right: 0.3rem;
}
.delivered__pair:has(strong:first-child:nth-of-type(1)) {
  /* baseline */
}
/* Distinguish You said vs We did by re-colouring the rule */
.delivered__pair:nth-of-type(2) {
  border-left-color: var(--sandstone);
}
.delivered__pair:nth-of-type(2) strong {
  color: var(--sandstone);
}

.stat-grid--compact {
  margin: 1.25rem 0 1rem;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.stat-grid--compact .stat {
  padding: 1rem;
}
.stat-grid--compact .stat strong {
  font-size: 1.5rem;
}
.stat-grid--compact .stat span {
  font-size: 0.82rem;
}

/* ---- Page header (interior pages) ---------------------- */
.page-head {
  background:
    radial-gradient(ellipse 60% 70% at 100% 50%, rgba(127, 182, 220, 0.20), transparent 60%),
    var(--paper);
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 0.75rem; }
.page-head .lede { max-width: 50em; }

/* ---- Footer -------------------------------------------- */
.site-footer {
  background: var(--navy-dark);
  color: #aab2d4;
  padding: 3rem 0 2rem;
  font-size: 0.92rem;
}
.site-footer a { color: #cdd4ee; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer h4 { color: var(--white); font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 0.5rem; }
.site-footer__about p { margin: 0 0 1rem; max-width: 38em; }
.site-footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: 0.85rem;
  color: #8a93b8;
}

/* ---- Accessibility ------------------------------------- */
:focus-visible { outline: 2px solid var(--sandstone); outline-offset: 3px; border-radius: 3px; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: 0.75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Include slots ------------------------------------- */
/* Placeholder elements before the include loader replaces them */
[data-include] { min-height: 1px; }

/* ---- Small utilities ----------------------------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--muted); }

/* Print niceties for documents page */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { background: var(--white); }
  a { color: var(--ink); }
}
