/* Home page */

/* ---------- Hero ---------- */
.hero {
  background: var(--teal); min-height: 600px; display: flex; align-items: center;
  font-family: var(--font-head);
}
.hero-inner { width: min(1120px, 100% - 40px); margin: 0 auto; padding: 10px 0; }
.hero-kicker { margin: 0; font-size: 25px; line-height: 25px; font-weight: 500; color: #fffefe; }
.hero-rule { width: 27%; height: 1px; margin: 20px 0; background: #fffefe; }
.hero-title {
  font-size: 46px; line-height: 1.1; font-weight: 700; letter-spacing: 0.4px; color: #fff;
  margin: 0 0 38px;
}
.hero-text { margin: 0 0 14.4px; font-size: 17px; line-height: 1.6; color: #fffefe; max-width: 760px; text-wrap: pretty; }
/* hero text fades in by CSS animation, not by site.js, so it is painted (and counted for LCP) at first paint */
.hero .reveal { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero .reveal { animation: hero-in 0.8s ease backwards; }
  .hero-title.reveal { animation-delay: 0.1s; }
  .hero-text.reveal { animation-delay: 0.2s; }
}
@keyframes hero-in { from { opacity: 0.01; transform: translateY(24px); } }

/* ---------- Mission & Values ---------- */
.mv { background: var(--light); padding-bottom: 30px; font-family: var(--font-head); }
.mv-grid { width: min(1140px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; }
.mv-card {
  background: #fff; margin: 50px 10px 5px; padding: 16px 16px 48px; border-radius: 5px;
  box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.5); text-align: center;
  transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s, box-shadow 0.3s ease;
}
.mv-card.is-visible:hover { box-shadow: 1px 1px 10px 2px rgba(0, 0, 0, 0.5); transform: translateY(-3px); transition-delay: 0s; }
.mv-icon {
  display: block; width: fit-content; margin: 50px auto 0; padding: 20px; color: #000;
  border-bottom: 2px solid #000; line-height: 0;
}
.mv-icon svg { display: block; width: 40px; height: 40px; fill: currentColor; }
.mv-title { margin: 8px 0 11px; font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -2px; color: #000; }
.mv-card:first-child .mv-title { color: var(--ink); }
.mv-card p { margin: 0; font-size: 14px; line-height: 1.6; color: #000; }

/* ---------- About ---------- */
.about { padding: 116px 0 90px; font-family: var(--font-head); }
.about-container {
  width: min(1120px, 100% - 80px); margin: 0 auto; background: #2d6d70; color: #fff;
  padding: 40px 60px;
}
.about-head { margin: 8px 0 30px; padding-bottom: 15px; border-bottom: 2px solid rgba(255, 255, 255, 0.2); }
.about-title { margin: 0 0 10px; font-size: 48px; line-height: 1.2; font-weight: 700; letter-spacing: 0.5px; }
.about-sub { margin: 0 0 16px; font-size: 20px; line-height: 1.2; font-weight: 400; color: rgba(255, 255, 255, 0.9); text-wrap: balance; }
.about-content {
  background: rgba(0, 0, 0, 0.15); border-radius: 8px; padding: 35px; margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.about-content p { margin: 0 0 20px; font-size: 18px; line-height: 1.7; }
.about-content p:last-child { margin-bottom: 0; }
.expertise { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.expertise-card {
  background: rgba(255, 255, 255, 0.1); padding: 15px; border-radius: 6px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.expertise-card:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-5px); }
.expertise-card h3 {
  margin: 8px 0 10px; padding-bottom: 8px; font-size: 18px; line-height: 1.2; font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.expertise-card ul { padding-left: 20px; }
.expertise-card li { margin-bottom: 5px; }

/* ---------- Our Projects ---------- */
.proj { background: #f6f6f8; padding: 50px 0; font-family: var(--font-head); }
.proj-wrap { width: min(1240px, 100% - 20px); margin: 0 auto; }
.proj-icon { display: flex; justify-content: center; height: 0; margin-bottom: 20px; color: rgba(97, 206, 112, 0.1); }
.proj-icon svg { display: block; flex: none; width: 113.6px; height: 101px; fill: currentColor; }
.proj-title { position: relative; margin: 0 0 20px; text-align: center; font-size: 35px; line-height: 1; font-weight: 600; color: #000; }
.proj-rule { width: 14%; height: 2px; margin: 0 auto 30px; background: var(--teal); box-sizing: content-box; padding: 2px 0; background-clip: content-box; }
.proj-gallery { margin: 0 10px; padding: 5px; background: rgba(255, 255, 255, 0.33); box-shadow: 0 0 1px rgba(0, 0, 0, 0.5); }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.proj-item { position: relative; margin: 0; height: 414px; padding: 2px; overflow: hidden; }
.proj-item img { width: 100%; height: 100%; object-fit: cover; }
.proj-cap {
  position: absolute; inset: 1px; padding: 15px; display: flex; align-items: center;
  opacity: 0; transition: opacity 0.5s; overflow: hidden;
}
.proj-cap::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.82); opacity: 0.7; }
.proj-item:hover .proj-cap, .proj-item:focus-within .proj-cap { opacity: 1; }
.proj-cap-in {
  position: relative; width: 100%; color: #fff; text-align: left;
  transform: translateY(40px); transition: transform 0.5s;
}
.proj-item:hover .proj-cap-in, .proj-item:focus-within .proj-cap-in { transform: none; }
.proj-name { margin: 8px 0 16px; font-size: 17px; line-height: 1.2; font-weight: 500; color: #fff; }
.proj-name a { color: inherit; text-decoration: none; }
.proj-name a::after { content: ""; position: absolute; inset: -400px -15px -400px -15px; }
.proj-item:has(.proj-name a:focus-visible) { outline: 3px solid #fff; outline-offset: -3px; }
.proj-name a:focus-visible { outline: none; }
.proj-desc { font-size: 15px; line-height: 24px; }
.proj-desc p { margin: 0 0 5px; }
.proj-desc ul { margin: 0; padding: 0; }
/* whole tile is the link: show a "Read more" cue and underline the title on hover/focus */
.proj-desc::after {
  content: "Read more \2192"; content: "Read more \2192" / "";
  display: block; width: fit-content; margin-top: 14px; padding-bottom: 3px;
  font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 2px solid #fff;
}
.proj-name a:hover, .proj-name a:focus-visible { text-decoration: underline; }
.proj-more { text-align: center; margin-top: 24px; }
.proj-more a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 34px;
  font-size: 15px; line-height: 1; font-weight: 500; letter-spacing: 0.5px;
  color: var(--teal-dark); text-decoration: none; border: 2px solid var(--teal); border-radius: 3px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.proj-more a:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.proj-more a:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 3px; }

/* subtle image zoom on hover-capable pointers */
.proj-item img { transition: transform 0.6s ease; }
@media (hover: hover) { .proj-item:hover img { transform: scale(1.03); } }

/* ---------- Touch + small screens: always-visible compact caption bar ---------- */
@media (hover: none), (max-width: 767px) {
  .proj-cap {
    inset: auto 0 0 0; padding: 36px 14px 12px; align-items: flex-end; overflow: visible;
    opacity: 1; background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.65) 55%, rgba(0, 0, 0, 0) 100%);
  }
  .proj-cap::before { display: none; }
  .proj-cap-in { transform: none; }
  .proj-name { margin: 0; font-size: 17px; line-height: 1.25; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
  .proj-name a::after { inset: -400px -14px -400px -14px; }
  /* full descriptions stay available to screen readers and on the project pages */
  .proj-desc {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .proj-item:hover img { transform: none; }
  .proj-name a:hover { text-decoration: none; }
}

/* narrower hover tiles: slightly smaller overlay text so the cue never gets clipped */
@media (min-width: 768px) and (max-width: 1259px) { .proj-desc { font-size: 14px; line-height: 22px; } }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero { min-height: 500px; }
  .hero-title { font-size: 42px; line-height: 1.1; }
  .about-container { padding: 30px 40px; }
  .about-title { font-size: 42px; }
  .about-content { padding: 25px; }
  .expertise { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Tablet portrait: third card spans the row instead of dangling beside an empty half */
@media (min-width: 768px) and (max-width: 979px) {
  .expertise-card:last-child { grid-column: 1 / -1; }
}
/* Tablet landscape: cards are 260px or wider here, so all three fit in one row without wrapping bullets */
@media (min-width: 980px) and (max-width: 1024px) {
  .expertise { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .hero { min-height: 0; padding: 20px 5px; }
  .hero-inner { width: 100%; padding: 10px; }
  .hero-kicker { font-size: 16px; line-height: 1.3; }
  .hero-rule { margin: 12px 0 13px; }
  .hero-title { font-size: 28px; line-height: 1.15; margin-bottom: 16px; }
  .hero-text { font-size: 16px; line-height: 1.6; }

  .mv { padding-bottom: 0; }
  .mv-grid { grid-template-columns: 1fr; }
  .mv-card { margin: 0; padding: 10px 20px 28px; border-radius: 0; box-shadow: none; border-bottom: 1px solid #e6e6e6; }
  .mv-card.is-visible:hover { box-shadow: none; transform: none; }
  .mv-icon { margin-top: 12px; padding: 11px; }
  .mv-icon svg { width: 22px; height: 22px; }
  .mv-title { font-size: 24px; }
  .mv-card p { font-size: 16px; }

  .about { padding: 40px 0 48px; }
  .about-container { width: calc(100% - 32px); padding: 20px 16px; }
  .about-head { margin: 0 0 20px; }
  .about-content { padding: 16px; margin-bottom: 20px; }
  .expertise { margin-top: 20px; }
  .expertise-card li { font-size: 16px; line-height: 1.5; }
  .about-title { font-size: 36px; }
  .about-sub { font-size: 18px; }
  .about-content p { font-size: 16px; }
  .expertise { grid-template-columns: 1fr; gap: 15px; }

  .proj-title { font-size: 25px; }
  .proj { padding: 36px 0 40px; }
  .proj-gallery { margin: 0; }
  .proj-grid { grid-template-columns: 1fr; }
  .proj-item { height: auto; aspect-ratio: 4 / 3; padding: 1px; }
  .proj-name { font-size: 18px; }
}
@media (min-width: 560px) and (max-width: 767px) {
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .proj-name { font-size: 16px; }
}
