/* CESAME website mockup — shared stylesheet.
   No external resources: system fonts only, no CDN, no tracking. */

:root {
  --cave: #1c1512;
  --cave-2: #2a201b;
  --paper: #f8f4ee;
  --paper-2: #efe7dc;
  --ink: #241c17;
  --muted: #65584e;
  --line: #ddd2c4;
  --ochre: #b0602a;
  --ochre-dark: #8c4a1e;
  --bat: #8a1c1c;
  --moss: #4f5e3c;
  --on-dark: #f3ece3;
  --on-dark-muted: #c9bcae;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 6px;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17120f;
    --paper-2: #221a16;
    --ink: #ece4da;
    --muted: #b3a597;
    --line: #3a2e27;
    --ochre: #d98a52;
    --ochre-dark: #e9a172;
    --bat: #d0574f;
    --moss: #9fb07f;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
}

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

a { color: var(--ochre-dark); text-underline-offset: .15em; }
a:hover { color: var(--bat); }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.25rem; margin-top: 1.4em; }
p, ul, ol, dl { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 46rem; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ochre); color: #fff; padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; }

/* ---------- Header ---------- */
.site-header { background: var(--cave); color: var(--on-dark); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.5rem;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  color: var(--on-dark); text-decoration: none;
}
.brand img { width: 3rem; height: 3rem; }
.brand strong { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .08em; display: block; line-height: 1; }
.brand span { font-size: .78rem; color: var(--on-dark-muted); display: block; }
.brand:hover { color: #fff; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.nav a {
  display: block; padding: .5rem .7rem; border-radius: var(--radius);
  color: var(--on-dark); text-decoration: none; font-size: .95rem;
}
.nav a:hover { background: var(--cave-2); color: #fff; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ochre); }
.nav .cta { background: var(--ochre); color: #fff; }
.nav .cta:hover { background: var(--ochre-dark); color: #fff; }

/* Mobile menu without JavaScript */
.menu-toggle { display: none; }
@media (max-width: 60rem) {
  .menu-toggle { display: block; }
  .menu-toggle summary {
    list-style: none; cursor: pointer; padding: .5rem .8rem;
    border: 1px solid #4a3c33; border-radius: var(--radius);
  }
  .menu-toggle summary::-webkit-details-marker { display: none; }
  .menu-toggle[open] .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cave); padding: .5rem var(--gutter) 1rem; z-index: 5;
  }
  .menu-toggle[open] .nav ul { flex-direction: column; }
  .site-header { position: relative; }
  .desktop-nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; background: var(--cave);
  min-height: min(78vh, 40rem); display: flex; align-items: flex-end;
}
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,13,10,.88) 0%, rgba(20,13,10,.35) 55%, rgba(20,13,10,.1) 100%);
}
@media (max-width: 40rem) {
  .hero::after { background: linear-gradient(to top, rgba(20,13,10,.9) 0%, rgba(20,13,10,.65) 60%, rgba(20,13,10,.4) 100%); }
}
.hero .wrap { position: relative; z-index: 1; padding-top: 4rem; padding-bottom: 3rem; }
.hero h1 { max-width: 20ch; }
.hero p { max-width: 38rem; font-size: 1.15rem; color: #efe5da; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  color: var(--ochre); font-weight: 600; margin-bottom: .5rem;
}
.hero .eyebrow { color: #f0b383; }

.page-head { background: var(--cave); color: var(--on-dark); padding: 3rem 0 2.5rem; }
.page-head p { color: var(--on-dark-muted); max-width: 42rem; margin: 0; font-size: 1.1rem; }
.page-head .eyebrow { color: #f0b383; }
.page-head.with-photo { position: relative; overflow: hidden; }
.page-head.with-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35;
}
.page-head.with-photo .wrap { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .7rem 1.2rem; border-radius: var(--radius);
  background: var(--ochre); color: #fff; text-decoration: none; font-weight: 600;
  border: 2px solid var(--ochre);
}
.btn:hover { background: var(--ochre-dark); border-color: var(--ochre-dark); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: rgba(255,255,255,.1); color: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--paper-2); }
.section > .wrap > h2:first-child,
.section-title { margin-top: 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }

.grid { display: grid; gap: 1.5rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

.split {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr; align-items: start;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 3fr 2fr; }
  .split.reverse { grid-template-columns: 2fr 3fr; }
}
.split figure { margin: 0; }
figure img { border-radius: var(--radius); }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.section.alt .card { background: var(--paper); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card .body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); }
.card .more { margin-top: auto; font-weight: 600; }

.facts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 2rem 0 0; }
.facts div { border-left: 3px solid var(--ochre); padding-left: .9rem; }
.facts dt { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.facts dd { margin: 0; color: var(--muted); font-size: .92rem; }

.check { list-style: none; padding: 0; }
.check li { padding-left: 1.6rem; position: relative; margin-bottom: .5rem; }
.check li::before {
  content: ""; position: absolute; left: .2rem; top: .62em;
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--ochre);
}

.box {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; background: var(--paper-2);
}
.box h3 { margin-top: 0; }
.box.note { border-left: 4px solid var(--moss); }

/* ---------- News / agenda ---------- */
.news { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.news article { display: grid; gap: 1rem; grid-template-columns: 8rem 1fr; align-items: start; }
.news img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.news h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.news h3 a { color: inherit; text-decoration: none; }
.news h3 a:hover { color: var(--ochre-dark); text-decoration: underline; }
.meta { font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.tag {
  display: inline-block; font-size: .75rem; padding: .05rem .5rem; border-radius: 99px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--muted);
}
@media (max-width: 30rem) { .news article { grid-template-columns: 5rem 1fr; } }

.agenda { list-style: none; padding: 0; margin: 0; }
.agenda li {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.agenda li:last-child { border-bottom: 0; }
.date {
  text-align: center; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); line-height: 1.1; padding: .45rem 0;
}
.date b { display: block; font-family: var(--serif); font-size: 1.6rem; }
.date span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.agenda h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.agenda p { margin: 0; color: var(--muted); font-size: .95rem; }

.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { padding: .7rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
.doc-list .muted { color: var(--muted); font-size: .9rem; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--serif); }

/* ---------- Article ---------- */
.prose { max-width: 44rem; }
.prose figure { margin: 2rem 0; }
.prose blockquote {
  margin: 1.5rem 0; padding: .5rem 1.25rem; border-left: 3px solid var(--ochre);
  color: var(--muted); font-style: italic;
}

/* ---------- CTA band ---------- */
.band { background: var(--bat); color: #fff; }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.band h2 { margin: 0 0 .3rem; }
.band p { margin: 0; color: #f6dcd8; }
.band .btn { background: #fff; border-color: #fff; color: var(--bat); }
.band .btn:hover { background: #f6dcd8; border-color: #f6dcd8; }

/* ---------- Photo gallery ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin: 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Google calendar, loaded on demand ---------- */
.gcal {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-2); min-height: 22rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1.25rem; gap: .75rem;
}
.gcal p { margin: 0; max-width: 34rem; color: var(--muted); font-size: .95rem; }
.gcal button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: .7rem 1.2rem; border-radius: var(--radius);
  background: var(--ochre); color: #fff; border: 2px solid var(--ochre);
}
.gcal button:hover { background: var(--ochre-dark); border-color: var(--ochre-dark); }
.gcal.loaded { padding: 0; background: #fff; display: block; min-height: 0; overflow: hidden; }
.gcal iframe { display: block; width: 100%; height: 38rem; border: 0; }
.gcal-links { font-size: .9rem; margin-top: .6rem; }

/* ---------- Utilities ---------- */
.h3 { font-size: 1.25rem; margin-top: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--cave); color: var(--on-dark-muted); font-size: .92rem; padding: 3rem 0 1.5rem; }
.site-footer a { color: var(--on-dark); }
.site-footer h2 { font-size: 1.05rem; color: var(--on-dark); margin: 0 0 .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.footer-bottom {
  border-top: 1px solid #3a2e27; margin-top: 2rem; padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}
