/* asiosi.com — styles
   Plain CSS, no build step. Design tokens up top mirror the live site:
   Playfair Display wordmark + Mulish (free Avenir substitute) for UI/body. */

:root {
  --ink: #1c1c1c;
  --body: #3a3a3a;
  --muted: #706b63;   /* darkened to pass 4.5:1 contrast (WCAG AA) */
  --paper: #ffffff;
  --band: #f2f1ee;   /* header band */
  --line: #e4e2dc;
  --max: 1200px;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Mulish", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--body);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ── Header (centered wordmark + tagline + nav) — matches the live site ── */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); text-align: center; }
.site-header .inner { max-width: var(--max); margin: 0 auto; padding: 2.4rem 1.5rem 1.4rem; }
.wordmark {
  display: block; text-decoration: none; color: #292929;
  font-family: var(--serif); font-weight: 400; letter-spacing: normal;
  font-size: clamp(1.6rem, 4.5vw, 2rem); line-height: 1.15; margin: 0 0 .5rem;
}
.tagline {
  font-weight: 300; color: #5d5b5b; margin: 0 0 1.4rem;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); letter-spacing: normal;
}
.site-nav ul {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1.5rem, 6vw, 4.5rem); margin: 0; padding: 0;
}
.site-nav a {
  text-decoration: none; color: #2b2b2b; font-weight: 700; font-size: 1rem; letter-spacing: .01em;
  padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #000; border-color: #bbb; }

/* ── Contact line ── */
.contact { text-align: center; margin: 1.6rem 0 1.5rem; font-size: 1.02rem; color: var(--body); }
.contact a { color: var(--ink); font-weight: 700; text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* ── Gallery: explicit columns, matching the live site's exact column order ── */
.gallery { display: flex; gap: 12px; align-items: flex-start; max-width: var(--max); margin: 0 auto; padding: 0 12px 3.5rem; }
.gallery-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; height: auto; display: block; border-radius: 2px; background: #f3f2ef;
  cursor: zoom-in; transition: opacity .3s ease, transform .5s ease;
}
.gallery figure:hover img { opacity: .9; transform: translateY(-2px); }
@media (max-width: 700px) { .gallery, .gallery-col { gap: 10px; } }
@media (max-width: 520px) { .gallery { flex-direction: column; } }

/* ── Scroll reveal — JS adds .will-reveal only to below-the-fold items, so
   above-the-fold art is never hidden (shows instantly even if JS is slow). ── */
.reveal.will-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.will-reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal.will-reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ── Simple section heading (used on inner pages) ── */
.page-head { max-width: var(--max); margin: 2.4rem auto 1.6rem; padding: 0 1.5rem; text-align: center; }
.page-head h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0 0 .4rem; }
.page-head p { color: var(--muted); margin: 0; }

/* ── Prose (About / text pages) ── */
.prose { max-width: 720px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.prose h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.prose p { color: var(--body); margin: 0 0 1.1rem; }
.prose a { color: var(--ink); }

/* ── About page ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; margin-bottom: 2.5rem; }
.about-grid .portrait { width: 100%; border-radius: 3px; }
.about-side h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 1.25rem; margin: 1.7rem 0 .55rem; }
.about-side ul { list-style: none; padding: 0; margin: 0; color: var(--body); }
.about-side li { padding: .12rem 0; }
.about-body p { margin: 0 0 1.15rem; color: var(--body); font-size: 1.02rem; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .about-side { max-width: 320px; margin: 0 auto; text-align: center; }
  .about-side ul { display: inline-block; text-align: left; }
}

/* ── Testimonials ── */
.testimonials { margin: 2.6rem auto 1.5rem; }
.testimonials h2 { text-align: center; font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.6rem; }
.tgrid { columns: 2; column-gap: 1.6rem; }
.tgrid blockquote { break-inside: avoid; margin: 0 0 1.6rem; padding: 1.3rem 1.4rem; background: var(--band); border-radius: 5px; }
.tgrid blockquote p { margin: 0 0 .7rem; color: #444; font-size: .95rem; line-height: 1.6; }
.tgrid cite { font-style: normal; font-weight: 600; color: var(--ink); font-size: .86rem; }
@media (max-width: 700px) { .tgrid { columns: 1; } }

/* ── Projects listing — 3-col square covers, title on hover (matches live) ── */
.projects-intro { margin: 1.4rem auto 2rem; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; max-width: 900px; margin: 0 auto; padding: 0 1.4rem 3.5rem; }
.project-card { position: relative; display: block; overflow: hidden; border-radius: 2px; text-decoration: none; color: inherit; background: #f3f2ef; }
.pc-cover { aspect-ratio: 1 / 1; }
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.project-card:hover .pc-cover img { transform: scale(1.05); }
.pc-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; background: rgba(26,26,26,.4); color: #fff; font-weight: 600; font-size: .95rem; letter-spacing: .01em; opacity: 0; transition: opacity .3s ease; }
.project-card:hover .pc-title { opacity: 1; }
@media (max-width: 640px) { .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ── Project detail — title left / description right, then 2-col gallery (matches live) ── */
.project-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; max-width: 900px; margin: 2.4rem auto 2.2rem; padding: 0 1.4rem; align-items: start; }
.project-title { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: clamp(1.35rem, 2.4vw, 1.7rem); line-height: 1.25; margin: 0; }
.project-intro .project-desc { color: var(--body); font-size: .97rem; line-height: 1.5; }
.project-intro .project-desc p { margin: 0 0 .45rem; }
.project-gallery { max-width: 900px; margin: 0 auto; padding: 0 1.4rem 3.5rem; columns: 2; column-gap: 2.5rem; }
.project-gallery figure { margin: 0 0 2.5rem; break-inside: avoid; }
.project-gallery img { width: 100%; height: auto; border-radius: 3px; cursor: zoom-in; background: #f3f2ef; }
@media (max-width: 700px) {
  .project-intro { grid-template-columns: 1fr; gap: .8rem; }
  .project-gallery { columns: 1; column-gap: 1.2rem; }
  .project-gallery figure { margin-bottom: 1.2rem; }
}

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); margin-top: 1rem; }
.site-footer .inner {
  max-width: var(--max); margin: 0 auto; padding: 2rem 1.5rem 3rem; text-align: center;
  color: var(--muted); font-size: .92rem;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .ig { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .6rem; font-weight: 600; }
.site-footer .ig svg { width: 20px; height: 20px; }

/* ── Lightbox (image + project info, matching the live popup) ── */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; background: #ffffff; }
.lightbox.open { display: block; }
.lb-inner { height: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(1.2rem, 4vw, 3.5rem); padding: clamp(1rem, 4vh, 3rem) clamp(3.2rem, 6vw, 5.5rem); box-sizing: border-box; }
.lb-imgwrap { display: flex; align-items: center; justify-content: center; max-width: 60%; height: 100%; }
.lb-imgwrap img { max-width: 100%; max-height: 88vh; width: auto; height: auto; object-fit: contain; }
.lb-info { flex: 0 1 340px; max-width: 360px; }
.lb-info.empty { display: none; }
.lb-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2.3vw, 1.9rem); color: var(--ink); margin: 0 0 1.1rem; line-height: 1.25; }
.lb-desc { color: #454545; font-size: .97rem; line-height: 1.55; }
.lb-desc p { margin: 0 0 .7rem; }
.lb-link { display: inline-block; margin-top: 1.2rem; color: var(--ink); font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; }
.lb-link:hover { color: #000; }
.lb-close, .lb-prev, .lb-next { position: absolute; background: none; border: 0; color: #555; cursor: pointer; z-index: 2; line-height: 1; }
.lb-close { top: 1.2rem; right: 1.5rem; font-size: 1.9rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 2.6rem; padding: .4rem .8rem; }
.lb-prev { left: .4rem; }
.lb-next { right: .4rem; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: #000; }
@media (max-width: 780px) {
  .lightbox.open { overflow-y: auto; }
  .lb-inner { flex-direction: column; align-items: stretch; height: auto; min-height: 100%; padding: 3.4rem 1.3rem 2rem; gap: 1.3rem; }
  .lb-imgwrap { max-width: 100%; height: auto; }
  .lb-imgwrap img { max-height: 62vh; }
  .lb-info { flex: none; max-width: 100%; }
  .lb-prev, .lb-next { top: auto; bottom: .6rem; transform: none; font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
