/* =========================================================
   SANA ASSOCIATES — shared stylesheet
   Design language: serif display headings + clean sans body,
   teal accent, dark-forest-green CTA/footer, bordered cards.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
/* Libre Baskerville is loaded via <link> preconnect + stylesheet tags in each page's <head>, not @import. */

:root{
  --teal: #2f8f83;
  --teal-dark: #206a61;
  --forest: #0d3b2c;
  --forest-deep: #092a1f;
  --ink: #1c2624;
  --ink-soft: #4b5a56;
  --paper: #ffffff;
  --mist: #f4f6f5;
  --line: #e1e6e4;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --maxw: 1760px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
h1,h2,h3,h4{ font-family: var(--serif); margin: 0; line-height: 1.15; font-weight: 600; }
p{ margin: 0; }
ul{ margin: 0; padding: 0; list-style: none; }
.container{ max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

.accent{ color: var(--teal); font-style: italic; font-weight: 500; }
.eyebrow{
  display: block;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Header ---------- */
header.site{
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap{
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; max-width: var(--maxw); margin: 0 auto;
}
.brand{ display: flex; align-items: center; gap: 12px; }
.brand img.site-logo{ height: 44px; width: auto; display: block; }
@media (max-width: 500px){ .brand img.site-logo{ height: 34px; } }
nav.primary ul{ display: flex; gap: 30px; align-items: center; }
nav.primary a{
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding-bottom: 4px; border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
nav.primary a:hover, nav.primary a.active{ color: var(--forest); border-color: var(--teal); }

nav.primary a.nav-highlight{
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  padding: 8px 18px;
  border-radius: 999px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(47,143,131,0.28);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
nav.primary a.nav-highlight:hover{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal-dark), var(--forest));
  box-shadow: 0 8px 20px rgba(13,59,44,0.32);
  transform: translateY(-1px);
}
nav.primary a.nav-highlight.active{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--forest), var(--forest-deep));
  box-shadow: 0 6px 16px rgba(13,59,44,0.32);
}
.nav-toggle{ display: none; }

@media (max-width: 860px){
  nav.primary{ display: none; }
  nav.primary.mobile-open{
    display: block; position: fixed; left: 0; right: 0; top: 100%;
    background: #fff; overflow-y: auto; z-index: 45;
  }
  nav.primary.mobile-open ul{ flex-direction: column; gap: 2px; align-items: flex-start; padding: 28px 32px; }
  nav.primary.mobile-open a{
    display: inline-block; padding: 13px 0; font-size: 17px; font-weight: 500;
    border-bottom: 2px solid transparent;
  }
  nav.primary.mobile-open a.active{ color: var(--forest); font-weight: 600; border-color: var(--teal); }
  nav.primary.mobile-open a.nav-highlight{
    display: inline-block; padding: 10px 20px; margin: 14px 0 0; border-bottom: 2px solid transparent;
  }
  .nav-toggle{ display: block; background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; }
  .nav-wrap{ position: relative; }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 600; cursor: pointer;
  border-radius: 2px; transition: all .2s ease; border: 1px solid transparent;
}
.btn-outline-dark{ border-color: var(--ink); color: var(--ink); }
.btn-outline-dark:hover{ background: var(--ink); color: #fff; }
.btn-outline-light{ border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover{ background: #fff; color: var(--forest); }
.btn-solid{ background: var(--teal); color: #fff; }
.btn-solid:hover{ background: var(--teal-dark); }

/* ---------- Hero ---------- */
.hero{
  position: relative; min-height: 620px; display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
  color: #fff;
}
.hero::after{
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,26,20,.55) 0%, rgba(9,26,20,.72) 60%, rgba(9,26,20,.85) 100%);
}
.hero-inner{ position: relative; z-index: 2; padding-top: 110px; padding-bottom: 60px; width: 100%; }
.hero .eyebrow{ color: #bfe4dd; }
.hero h1{
  font-size: clamp(34px, 5.4vw, 64px);
  color: #fff; max-width: 820px;
}
.hero p.lead{
  margin-top: 22px; max-width: 620px; color: #e6ece9; font-size: 16.5px;
}
.hero .hero-cta{ margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }

.stats-strip{
  background: var(--mist); border-top: 1px solid var(--line);
}
.stats-grid{
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: var(--maxw); margin: 0 auto;
}
.stats-grid.stats-grid-3{ grid-template-columns: repeat(3, 1fr); }
.stats-grid .stat{ padding: 30px 32px; border-right: 1px solid var(--line); }
.stats-grid .stat:last-child{ border-right: none; }
.stats-grid .num{ font-family: var(--serif); font-size: 32px; color: var(--forest); font-weight: 700; }
.stats-grid .label{ font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.stats-grid .stat-detail{ font-size: 12.5px; color: var(--ink-soft); margin-top: 7px; line-height: 1.6; }

@media (max-width: 760px){
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat:nth-child(2){ border-right: none; }

  .stats-grid.stats-grid-3{ grid-template-columns: 1fr; }
  .stats-grid.stats-grid-3 .stat{
    border-right: none !important; border-bottom: 1px solid var(--line); padding: 24px 28px;
  }
  .stats-grid.stats-grid-3 .stat:last-child{ border-bottom: none; }
}

/* ---------- Sections ---------- */
section{ padding: 96px 0; }
section.tight{ padding: 64px 0; }
.section-head{ max-width: 640px; margin-bottom: 52px; }
.section-head h2{ font-size: clamp(26px, 3.4vw, 38px); color: var(--forest); }
.bg-mist{ background: var(--mist); }
.bg-paper{ background: var(--paper); }

/* ---------- Cards / grid ---------- */
.grid-3{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-top: none; }
.card{
  background: #fff; border: 1px solid var(--line); border-left: none; border-top: none;
  padding: 40px 34px;
}
.grid-3 .card:first-child{ border-left: 1px solid var(--line); }
.card .icon{ font-size: 26px; color: var(--teal); margin-bottom: 22px; }
.card h3{ font-size: 21px; color: var(--forest); margin-bottom: 12px; }
.card p{ color: var(--ink-soft); font-size: 14.5px; margin-bottom: 18px; }
.card .sublist li{
  font-size: 14px; color: var(--ink-soft); padding: 9px 0; border-top: 1px solid var(--line);
}
.card .sublist li:first-child{ border-top: none; }

@media (max-width: 900px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-3 .card{ border-left: 1px solid var(--line) !important; }
}

.grid-2{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-top: none; }
.grid-2 .card:first-child{ border-left: 1px solid var(--line); }
@media (max-width: 760px){
  .grid-2{ grid-template-columns: 1fr; }
  .grid-2 .card{ border-left: 1px solid var(--line) !important; }
}

.numbered-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.numbered-grid .item{ background: var(--mist); padding: 36px 38px; }
.numbered-grid .idx{ font-family: var(--serif); color: var(--teal); font-size: 14px; font-weight: 700; }
.numbered-grid h3{ font-size: 20px; color: var(--forest); margin: 10px 0 12px; }
.numbered-grid p{ color: var(--ink-soft); font-size: 14.5px; }
.numbered-grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
.numbered-grid .mini-stats{ margin-top: 6px; }
.numbered-grid .mini-stats li{ font-size: 13.5px; color: var(--ink-soft); padding: 3px 0; }
.numbered-grid .mini-stats strong{ color: var(--forest); font-weight: 700; }

@media (max-width: 760px){ .numbered-grid{ grid-template-columns: 1fr; } .numbered-grid.cols-3{ grid-template-columns: 1fr; } }
@media (min-width: 761px) and (max-width: 980px){ .numbered-grid.cols-3{ grid-template-columns: 1fr 1fr; } }

/* ---------- Timeline (About page) ---------- */
.timeline{ border-left: 2px solid var(--line); margin-left: 6px; }
.timeline .entry{ position: relative; padding: 0 0 32px 28px; }
.timeline .entry:last-child{ padding-bottom: 0; }
.timeline .entry::before{
  content: ''; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--teal);
  border: 2px solid #fff;
}
.timeline .years{ font-family: var(--serif); color: var(--teal-dark); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; }
.timeline h4{ font-family: var(--serif); color: var(--forest); font-size: 18px; margin: 6px 0 4px; font-weight: 600; }
.timeline p{ color: var(--ink-soft); font-size: 14px; }

/* ---------- Logo / client tiles ---------- */
.logo-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.logo-tile{
  border: 1px solid var(--line); border-radius: 12px;
  padding: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; min-height: 172px; text-align: center; background: #fff; overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.logo-tile:hover{
  border-color: #004d40;
  box-shadow: 0 4px 16px rgba(0,77,64,0.1);
}
.logo-tile .mark{
  font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--forest);
  border: 1px solid var(--line); border-radius: 50%; width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.logo-tile .cap{ font-size: 13px; color: var(--ink-soft); }
.logo-tile.placeholder{ color: var(--ink-soft); border-style: dashed; }
.logo-tile img{ max-width: 100%; max-height: 68px; width: auto; height: auto; object-fit: contain; }

@media (max-width: 900px){ .logo-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px){ .logo-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px){ .logo-grid{ grid-template-columns: repeat(2, 1fr); } }

/* ---------- CTA band ---------- */
.cta-band{
  background: var(--forest); color: #fff; text-align: center; padding: 100px 0;
}
.cta-band .dash{ width: 40px; height: 2px; background: var(--teal); margin: 0 auto 26px; }
.cta-band h2{ color: #fff; font-size: clamp(28px, 4vw, 42px); }
.cta-band p{ color: #cfe2db; max-width: 560px; margin: 20px auto 0; font-size: 16px; }
.cta-band .contact-line{ margin-top: 18px; color: var(--teal); font-size: 15px; font-weight: 600; }
.cta-band .btn{ margin-top: 34px; }

/* ---------- Footer ---------- */
footer.site{ background: var(--forest-deep); color: #cfe2db; padding: 46px 0 30px; }
.footer-row{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; font-size: 13.5px; }
.footer-brand{ display: flex; align-items: center; gap: 12px; color: #fff; }
.footer-brand img.site-logo{ height: 38px; width: auto; display: block; }
.footer-addr{ color: #a9c4bb; max-width: 320px; }
.footer-meta{ text-align: right; color: #9db8ae; }

@media (max-width: 700px){
  .footer-row{ flex-direction: column; align-items: flex-start; }
  .footer-meta{ text-align: left; }
}
.back-to-top{
  position: fixed; right: 26px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(9,26,20,0.3); opacity: 0; pointer-events: none; transition: opacity .25s ease;
  z-index: 40; font-size: 18px;
}
.back-to-top.show{ opacity: 1; pointer-events: auto; }

/* ---------- Page banner (interior pages) ---------- */
.page-banner{
  position: relative; min-height: 260px; display: flex; align-items: flex-end;
  background-size: cover; background-position: center; color: #fff;
}
.page-banner::after{ content:''; position:absolute; inset:0; background: rgba(9,26,20,.72); }
.page-banner .inner{ position: relative; z-index: 2; padding-top: 70px; padding-bottom: 40px; }
.page-banner h1{ color: #fff; font-size: clamp(30px, 4.6vw, 48px); }
.page-banner p{ color: #dfeae5; margin-top: 10px; }

/* ---------- Tabs / filters ---------- */
.filter-row{
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 24px; border: 1px solid var(--line); border-radius: 4px;
  padding: 14px 22px; margin-bottom: 40px;
}
.filter-bar{ display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; }
.filter-bar[data-filter-group="status"] .filter-btn{
  padding: 8px 18px; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase;
  font-weight: 700; border: 1px solid var(--line); background: #fff; color: #5f8a85;
  cursor: pointer; border-radius: 4px; transition: all .18s ease;
}
.filter-bar[data-filter-group="status"] .filter-btn.is-active{ background: var(--forest); border-color: var(--forest); color: #fff; }
.filter-bar[data-filter-group="status"] .filter-btn:hover:not(.is-active){ border-color: var(--teal); color: var(--teal-dark); }

.filter-bar[data-filter-group="category"] .filter-btn{
  padding: 7px 15px; font-size: 11px; letter-spacing: 0.03em;
  font-family: "DM Sans", sans-serif; font-weight: 400; border: 1px solid rgba(13,59,44,0.14); background: #fff; color: #5f8a85;
  cursor: pointer; border-radius: 4px; transition: all .18s ease;
}
.filter-bar[data-filter-group="category"] .filter-btn.is-active{ background: var(--teal); border-color: var(--teal); color: #fff; }
.filter-bar[data-filter-group="category"] .filter-btn:hover:not(.is-active){ border-color: var(--teal); color: var(--teal-dark); }

@media (max-width: 760px){ .filter-row{ justify-content: flex-start; } }

@media (max-width: 860px){ .filter-row{ gap: 12px 20px; } }

@media (max-width: 700px){
  .filter-row{ flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; }
  .filter-bar{
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; width: 100%; min-width: 0;
  }
  .filter-bar::-webkit-scrollbar{ display: none; }
  .filter-bar .filter-btn{ flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- Project cards ---------- */
/* Masonry: packed columns so cards of different photo heights sit flush,
   like MA's layout, instead of forcing every card into the same row height. */
.proj-grid{ columns: 3 340px; column-gap: 28px; }

.spotlight-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 720px; margin: 0 auto; }
.spotlight-grid > .spotlight-card:last-child:nth-child(odd){ grid-column: 1 / -1; max-width: 349px; margin: 0 auto; }
@media (max-width: 620px){
  .spotlight-grid{ grid-template-columns: 1fr; max-width: 360px; }
  .spotlight-grid > .spotlight-card:last-child:nth-child(odd){ max-width: 100%; }
}
.spotlight-card{ margin: 0; break-inside: unset; }
.spotlight-card .thumb, .spotlight-card .thumb-slider{ aspect-ratio: 1.5; position: relative; }
.proj-card.spotlight-card .thumb img, .proj-card.spotlight-card .thumb-slider img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spotlight-card .body{ padding: 20px 4px 6px; }

/* ---------- Full-width highlighted project rows (Structural Design) ---------- */
.feature-project{
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center;
  padding: 60px 0; border-bottom: 1px solid var(--line);
}
.feature-project:first-of-type{ padding-top: 0; }
.feature-project:last-of-type{ border-bottom: none; padding-bottom: 0; }
.feature-project.is-reverse .feature-media{ order: 2; }
.feature-project.is-reverse .feature-body{ order: 1; }
.feature-media .thumb, .feature-media .thumb-slider{
  aspect-ratio: 1.3; border-radius: 10px; overflow: hidden; position: relative;
  box-shadow: 0 24px 48px rgba(9,42,31,0.2);
}
.feature-media .thumb img, .feature-media .thumb-slider img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-idx{
  display: block; font-family: var(--serif); font-size: 15px; font-weight: 700;
  color: var(--teal); letter-spacing: 0.1em; margin-bottom: 10px;
}
.feature-body .tag{ font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.feature-body h3{ font-size: 30px; color: var(--forest); margin: 10px 0 12px; }
.feature-body .stat{ font-size: 15.5px; font-weight: 600; color: var(--forest); }
.feature-body .meta{ margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); opacity: .75; }
.feature-body p.desc{ margin-top: 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }
@media (max-width: 900px){
  .feature-project{ grid-template-columns: 1fr; gap: 26px; padding: 38px 0; }
  .feature-project.is-reverse .feature-media{ order: 1; }
  .feature-project.is-reverse .feature-body{ order: 2; }
  .feature-body h3{ font-size: 25px; }
}
.proj-card{
  display: inline-block; width: 100%; vertical-align: top;
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  margin: 0 0 28px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 14px 14px 0; overflow: visible;
  transition: box-shadow .2s ease, transform .2s ease;
}
.proj-card:hover{ box-shadow: 0 16px 32px rgba(9,42,31,0.14); transform: translateY(-3px); }
.proj-card .thumb{
  border-radius: 7px; box-shadow: 0 10px 22px rgba(9,42,31,0.16);
  overflow: hidden;
}
.proj-card .thumb img{
  display: block; width: 100%; height: auto;
  transition: transform .4s ease;
}
.proj-card:hover .thumb img{ transform: scale(1.06); }
.proj-card .thumb.placeholder{
  height: 210px; background: var(--mist); color: var(--ink-soft); box-shadow: none;
  border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 13px; text-align: center; padding: 12px;
}
.proj-card .body{ padding: 18px 6px 24px; }
.proj-card .tag{
  font-family: "DM Sans", sans-serif; font-size: 10px; font-weight: 400; line-height: 15px;
  letter-spacing: 2px; text-align: start; text-transform: uppercase; color: #5f8a85;
}
.proj-card h3{ font-family: "Libre Baskerville", serif; font-size: 19px; font-weight: 400; color: #004d40; margin: 8px 0 8px; }
.proj-card p{ font-family: "DM Sans", sans-serif; font-size: 13px; font-weight: 400; color: #5f8a85; }
.proj-card .meta{ margin-top: 12px; font-family: "DM Sans", sans-serif; font-size: 13px; font-weight: 400; color: #5f8a85; opacity: .75; }

@media (max-width: 960px){ .proj-grid{ columns: 2 260px; } }
@media (max-width: 640px){ .proj-grid{ columns: 1; } }

/* Multi-photo project cards: a small in-card slideshow. Uses a fixed
   aspect-ratio box (set per-card via inline style, matched to that
   project's cover photo) so switching slides never jumps the masonry. */
.thumb-slider{ position: relative; border-radius: 7px; overflow: hidden; box-shadow: 0 10px 22px rgba(9,42,31,0.16); }
.thumb-slider .slides{ position: relative; width: 100%; height: 100%; }
.thumb-slider .slides img{
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .4s ease, transform .4s ease; pointer-events: none;
}
.thumb-slider .slides img.is-active{ opacity: 1; pointer-events: auto; }
.proj-card:hover .thumb-slider .slides img.is-active{ transform: scale(1.06); }
.slide-nav{
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(9,26,20,0.5); color: #fff; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.thumb-slider:hover .slide-nav{ opacity: 1; }
.slide-nav:hover{ background: rgba(9,26,20,0.85); }
.slide-nav.prev{ left: 8px; }
.slide-nav.next{ right: 8px; }
.slide-dots{ position: absolute; bottom: 9px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 5px; }
.slide-dots .dot{
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.55);
  cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.slide-dots .dot.is-active{ background: #fff; transform: scale(1.35); }

/* ---------- Forms ---------- */
.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 720px; }
.form-grid .full{ grid-column: 1 / -1; }
.form-grid label{ display: block; font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; font-weight: 600; }
.form-grid input, .form-grid textarea, .form-grid select{
  width: 100%; border: 1px solid var(--line); padding: 13px 14px; font-family: var(--sans); font-size: 14px;
  border-radius: 2px; background: #fff; color: var(--ink);
}
.form-grid textarea{ min-height: 130px; resize: vertical; }
@media (max-width: 640px){ .form-grid{ grid-template-columns: 1fr; } }

/* ---------- Reveal-on-scroll ----------
   Hidden state only applies when the early inline script has added
   "js" to <html> — so if JavaScript is off/blocked, content is
   visible by default instead of permanently stuck at opacity:0. */
.reveal{ transition: opacity .7s ease, transform .7s ease; }
html.js .reveal{ opacity: 0; transform: translateY(18px); }
html.js .reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ---------- Misc ---------- */
.two-col{ display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 860px){ .two-col{ grid-template-columns: 1fr; } }
.two-col.profile-col{ grid-template-columns: 320px 1fr; gap: 50px; }
@media (max-width: 860px){ .two-col.profile-col{ grid-template-columns: 1fr; } }
.note-flag{
  border: 1px dashed #c8b26a; background: #fbf6e6; color: #7a6320; padding: 10px 16px;
  font-size: 12.5px; border-radius: 3px; margin-top: 10px;
}

/* ---------- Blog ---------- */
.blog-post{
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
  padding: 54px 0; border-bottom: 1px solid var(--line);
}
.blog-post:first-of-type{ padding-top: 0; }
.blog-post:last-of-type{ border-bottom: none; padding-bottom: 0; }
.blog-post.is-reverse .blog-post-media{ order: 2; }
.blog-post.is-reverse .blog-post-body{ order: 1; }
.blog-post-media img{
  display: block; width: 100%; height: auto; border-radius: 8px;
  box-shadow: 0 14px 30px rgba(9,42,31,0.16);
}
.blog-post-media-pair{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.blog-post-media-grid-4{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.blog-post-media.blog-post-media-grid-4 img{
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0;
}
.blog-post-body h2{ font-size: 24px; color: var(--forest); margin: 10px 0 14px; }
.blog-post-body p{ color: var(--ink-soft); font-size: 14.5px; }
@media (max-width: 860px){
  .blog-post{ grid-template-columns: 1fr; gap: 22px; padding: 34px 0; }
  .blog-post.is-reverse .blog-post-media{ order: 1; }
  .blog-post.is-reverse .blog-post-body{ order: 2; }
  .blog-post-media-pair{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px){
  .blog-post-media-grid-4{ grid-template-columns: 1fr; }
  .blog-post-media.blog-post-media-grid-4 img{ aspect-ratio: 16 / 10; }
}

/* ---- Credentials / registrations & memberships (About page profile) ---- */
.credentials{ display:flex; flex-wrap:wrap; align-items:flex-start; gap:28px; margin-top:20px; }

.cred-tree{ display:flex; flex-direction:column; align-items:center; }
.cred-tree .ct-parent{
  font-family: var(--sans); font-size:11.5px; font-weight:700; letter-spacing:.01em;
  color:var(--forest); background:#eef6f3; border:1px solid var(--line);
  border-radius:999px; padding:6px 14px; white-space:nowrap;
}
.cred-tree .ct-stem{ width:1px; height:11px; background:var(--teal); }
.cred-tree .ct-bar{ position:relative; display:flex; justify-content:space-between; width:210px; }
.cred-tree .ct-bar::before{ content:''; position:absolute; top:0; left:0; right:0; height:1px; background:var(--teal); }
.cred-tree .ct-bar .ct-drop{ width:1px; height:11px; background:var(--teal); }
.cred-tree .ct-children{ display:flex; justify-content:space-between; width:210px; margin-top:3px; }
.cred-tree .ct-child{
  font-family: var(--sans); font-size:10.5px; font-weight:700; color:var(--teal-dark);
  background:#fff; border:1px solid var(--line); border-radius:999px; padding:5px 11px; white-space:nowrap;
}

.cred-standalone{ display:flex; align-items:center; height:34px; }
.credai-logo{ height:100%; width:auto; display:block; }

@media (max-width: 860px){
  .credentials{ justify-content:center; width:100%; }
  .cred-tree{ width:100%; max-width:280px; }
  .cred-tree .ct-bar{ width:100%; }
  .cred-tree .ct-children{ width:100%; }
}
