/* Palette and type taken from the original Antevasin Design site:
   white page, deep red headings and links, Lora serif, flat greys. */
:root {
  --bg: #ffffff;
  --band: #eeeeee;
  --grey: #c8c8c8;
  --grey-dark: #8c8c8c;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --accent: #a3212b;
  --accent-dark: #7f1820;
  --error: #a3212b;
  --radius: 2px;
  --wrap: 80rem;     /* header and footer */
  --content: 62rem;  /* every page's main column, centred */
  --gutter: clamp(1rem, 4vw, 2rem);
  --font: "Lora", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; font-weight: 400; margin: 0 0 0.6em; color: var(--accent); }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; color: var(--ink); font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
/* Page content uses one centred column width everywhere; the header and footer stay wider */
main .wrap { max-width: calc(var(--content) + 2 * var(--gutter)); }
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--alt { background: var(--band); }
.section-title { text-align: center; margin-bottom: 1.5rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.editbar { background: var(--ink); color: #fff; font-size: 0.875rem; padding: 0.4rem var(--gutter); text-align: center; }
.editbar a { color: #fff; }

/* Header */
.site-header { background: var(--bg); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid transparent; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5.5rem; }
.brand { color: var(--ink); text-decoration: none; font-size: 1.3rem; display: inline-flex; align-items: baseline; gap: 1rem; }
.brand strong { font-weight: 600; }
/* Same letter size as the antevasin-design / antevasin-projects app bars, at double size for the website.
   The SVG's bottom edge is the letters' baseline (see wordmark.php), so it sits on the text baseline. */
.wordmark { height: 37px; width: auto; flex-shrink: 0; overflow: visible; }
.brand__rule { width: 1px; height: 34px; background: currentColor; opacity: 0.25; }
.brand__rest { font-size: 1.9rem; color: var(--muted); }
@media (max-width: 520px) {
  .brand { gap: 0.6rem; }
  .wordmark { height: 25px; }
  .brand__rule { height: 22px; }
  .brand__rest { font-size: 1.25rem; }
}
.brand:hover { color: var(--ink); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 1rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.nav-toggle { display: none; font: inherit; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.35rem 0.9rem; color: var(--ink); cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .site-nav li:last-child a { border-bottom: 0; }
}

/* Hero: centred red title and italic intro, as on the original site */
.hero { padding: clamp(3.5rem, 10vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); position: relative; text-align: center; }
.hero h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.hero .lede { max-width: 46rem; margin-left: auto; margin-right: auto; }
.hero .actions { justify-content: center; }
.hero--image { color: #fff; min-height: min(80vh, 44rem); display: flex; align-items: flex-end; overflow: hidden; text-align: left; }
.hero--image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0.05) 70%); }
.hero--image h1 { color: #fff; margin-left: 0; }
.hero--image .lede { margin-left: 0; }
.hero--image .actions { justify-content: flex-start; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero--image .btn--ghost { color: #fff; border-color: #fff; }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; font-style: italic; }
.philosophy { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 0; color: var(--accent); font-size: clamp(1rem, 1.6vw, 1.15rem); letter-spacing: 0.02em; }
.philosophy li + li::before { content: "|"; margin: 0 0.75rem; color: var(--grey); }
.hero--image .philosophy { justify-content: flex-start; color: #fff; }
.hero--image .philosophy li + li::before { color: rgba(255,255,255,0.5); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: var(--radius); padding: 0.7rem 1.4rem; font: 400 1rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }

/* Content */
.page-title { margin-bottom: 1.5rem; text-align: center; }
.contact .page-title { text-align: left; }
.project__head { text-align: center; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-style: italic; color: var(--muted); }
.prose > :first-child { margin-top: 0; }
/* Bold links (e.g. the names on About) read as dark text and only show they're links on hover */
.prose strong > a { color: var(--ink); text-decoration: none; }
.prose strong > a:hover { color: var(--accent); }
.intro { margin-bottom: 2.5rem; }
.meta { color: var(--muted); font-size: 0.95rem; font-style: italic; }
.empty { color: var(--muted); }
.badge { display: inline-block; vertical-align: middle; font: 600 0.7rem/1.4 system-ui, sans-serif; letter-spacing: 0.05em; text-transform: uppercase; background: #f1dfa6; color: #4a3d0c; padding: 0.15rem 0.5rem; border-radius: 99px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.cta { text-align: center; }
.cta p { text-wrap: balance; }
.cta p { font-style: italic; }
.crumb { font-size: 0.95rem; margin-bottom: 1.5rem; }
.crumb a { text-decoration: none; }

/* Project grid */
.project-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 2rem; }
.card a { display: block; color: inherit; text-decoration: none; }
/* Photos show uncropped at their own shape; a grey block stands in when a project has none */
.card__img { overflow: hidden; }
.card__img:not(:has(img)) { aspect-ratio: 4 / 3; background: var(--grey); }
.card__img img { width: 100%; height: auto; transition: transform 0.4s ease; }
.card a:hover .card__img img { transform: scale(1.03); }
.card__body { padding-top: 1rem; }
.card h3 { margin-bottom: 0.2rem; color: var(--accent); font-weight: 400; font-size: 1.25rem; }
.card .meta { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }

/* Project map */
.project-map { height: clamp(22rem, 60vh, 34rem); background: var(--grey); margin: 0 0 3rem; }
.map-missing { border: 2px dashed var(--grey); padding: 2rem; margin: 0 0 3rem; text-align: center; color: var(--muted); font-style: italic; }
.map-missing strong { display: block; font-style: normal; color: var(--ink); margin-bottom: 0.25rem; }
.project-map--large { height: clamp(26rem, 72vh, 46rem); margin-bottom: 4rem; }
.map-card { display: block; width: 15.5rem; color: var(--ink); text-decoration: none; font-family: var(--font); }
.map-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 0.6rem; }
.map-card strong { display: block; color: var(--accent); font-weight: 400; font-size: 1.1rem; line-height: 1.3; }
.map-card__meta { display: block; color: var(--muted); font-style: italic; font-size: 0.9rem; margin-top: 0.15rem; }
.map-card__summary { display: block; font-size: 0.9rem; line-height: 1.45; margin-top: 0.4rem; }
.map-card__more { display: block; color: var(--accent); font-size: 0.9rem; margin-top: 0.5rem; text-decoration: underline; text-underline-offset: 0.18em; }
.map-card:hover strong, .map-card:hover .map-card__more { color: var(--accent-dark); }

/* Project page */
.project__cover { margin: 2rem auto; }
.project__cover img { width: 100%; }
.gallery { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--grey); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.caption { font-size: 0.875rem; color: var(--muted); font-style: italic; margin: 0.4rem 0 0; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(15, 15, 15, 0.92); }
.lightbox img { max-width: 96vw; max-height: 86vh; width: auto; margin: 0 auto; }
.lightbox p { color: #ddd; text-align: center; margin: 0.75rem 0 0; font-style: italic; }
.lightbox button { position: fixed; background: rgba(0,0,0,0.4); color: #fff; border: 0; font: 1.75rem/1 var(--font); width: 3rem; height: 3rem; cursor: pointer; border-radius: 50%; }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lightbox .lb-next { right: 1rem; top: 50%; translate: 0 -50%; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 2rem 0 0; }
.details dt { color: var(--muted); font-style: italic; }
.details dd { margin: 0; }
.contact__form { background: var(--band); padding: clamp(1.25rem, 4vw, 2.5rem); align-self: start; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: 0.35rem; }
.field input, .field textarea { width: 100%; font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--grey); border-radius: var(--radius); background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field--error input, .field--error textarea { border-color: var(--error); }
.field__error { color: var(--error); font-size: 0.9rem; margin: 0.35rem 0 0; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 1rem 1.25rem; }
.notice--ok { background: #fff; }
.notice--ok h2 { margin-top: 0; }
.notice--error { background: #f7e3e4; color: var(--error); }

/* Footer: grey band, then a white strip of grey logos (as on the original site) */
.footer-band { background: var(--band); color: var(--muted); text-align: center; padding: 2.25rem 0 1.75rem; font-size: 0.85rem; line-height: 1.6; }
.footer-band p { margin: 0 0 0.75rem; }
.footer-band__tagline { color: var(--ink); }
.footer-band a { color: var(--muted); }
.footer-band a:hover { color: var(--accent); }
.footer-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem; padding-top: 1.75rem; padding-bottom: 2rem; }
.footer-logos__aecb img { height: 4.5rem; width: auto; filter: grayscale(1); opacity: 0.8; }
.footer-logos__aecb:hover img { opacity: 1; }
.aecb-badge { display: inline-flex; flex-direction: column; align-items: center; color: var(--grey-dark); text-decoration: none; line-height: 1; }
.aecb-badge strong { background: var(--grey-dark); color: #fff; font: 600 2rem/1 system-ui, sans-serif; letter-spacing: 0.04em; padding: 0.3rem 0.6rem; }
.aecb-badge small { font: 400 0.85rem/1 system-ui, sans-serif; margin-top: 0.3rem; }
.social-tile { display: block; width: 3.5rem; height: 3.5rem; background: var(--grey-dark); }
.social-tile:hover { background: var(--accent); }
.social-tile svg { width: 100%; height: 100%; display: block; }
