:root {
  --ink: #101716;
  --muted: #5f6d66;
  --line: #dce3dc;
  --paper: #faf9f3;
  --soft: #eaf5ef;
  --mist: #f3f7fa;
  --mint: #16865b;
  --mint-dark: #083f31;
  --blue: #1d6f8d;
  --navy: #071513;
  --amber: #c9972d;
  --clay: #a84b3f;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(16, 23, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(22, 134, 91, 0.05), transparent 38%, rgba(201, 151, 45, 0.07)),
    var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: rgba(201, 151, 45, 0.32);
}

a {
  color: inherit;
  text-decoration: none;
}

.top-strip {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 6px clamp(18px, 5vw, 72px);
  background: linear-gradient(90deg, #06110f, var(--mint-dark) 55%, #102a2f);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  text-align: center;
}

.top-strip span {
  flex: 0 0 auto;
  color: var(--amber);
  font-weight: 800;
  text-transform: uppercase;
}

.top-strip strong {
  font-weight: 700;
}

.site-header {
  position: fixed;
  inset: 36px 0 auto;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 10px clamp(12px, 3vw, 32px) 0;
  padding: 12px clamp(14px, 4vw, 40px);
  background: rgba(255, 255, 250, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(8, 63, 49, 0.13);
  backdrop-filter: blur(16px);
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 250, 0.98);
  box-shadow: 0 18px 42px rgba(8, 63, 49, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--mint-dark);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 10px 22px rgba(8, 63, 49, 0.2);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-copy {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(220, 227, 220, 0.86);
  border-radius: 8px;
  background: rgba(234, 245, 239, 0.78);
}

.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #314a55;
  font-weight: 800;
  font-size: 0.92rem;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
  background: var(--white);
  color: var(--mint-dark);
  box-shadow: 0 6px 18px rgba(16, 23, 22, 0.08);
  transform: translateY(-1px);
}

.nav-links .nav-cta {
  background: var(--mint-dark);
  color: var(--white);
}

.nav-links .nav-cta:hover {
  background: var(--blue);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 182px clamp(18px, 5vw, 72px) 72px;
  overflow: hidden;
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 20, 27, 0.9), rgba(7, 20, 27, 0.62) 48%, rgba(7, 20, 27, 0.24)),
    linear-gradient(0deg, rgba(7, 20, 27, 0.75), transparent 45%),
    linear-gradient(135deg, rgba(22, 134, 91, 0.22), rgba(201, 151, 45, 0.16));
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("https://tranquilmedcentre.com/tranquil-wordpress/wp-content/uploads/2023/06/Environment-2.webp");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 820px;
  font-size: clamp(2.45rem, 8vw, 5.8rem);
}

.hero-copy {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.16rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  color: var(--white);
  box-shadow: 0 14px 28px rgba(8, 63, 49, 0.28);
}

.button-primary:hover {
  background: var(--mint-dark);
  transform: translateY(-2px);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(7, 21, 19, 0.18);
}

.button-secondary:hover {
  transform: translateY(-2px);
}

.quick-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: linear-gradient(90deg, var(--mint-dark), var(--line), var(--amber));
  border-bottom: 1px solid var(--line);
}

.quick-info article {
  min-height: 128px;
  padding: 24px clamp(18px, 4vw, 34px);
  background: rgba(255, 255, 251, 0.98);
  transition: background 180ms ease, transform 180ms ease;
}

.quick-info article:hover {
  background: #fffdf7;
  transform: translateY(-2px);
}

.quick-info span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-info strong {
  display: block;
  margin-top: 8px;
  font-size: 1.04rem;
  line-height: 1.35;
}

.section {
  padding: 88px clamp(18px, 5vw, 72px);
}

.section-heading,
.intro-copy {
  max-width: 790px;
}

.section-heading {
  margin-bottom: 36px;
}

.section h2 {
  font-size: clamp(2rem, 5vw, 3.35rem);
}

.section p {
  color: var(--muted);
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: end;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(234, 245, 239, 0.66)),
    var(--white);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stats-row article {
  min-height: 142px;
  display: grid;
  align-content: center;
  padding: 18px;
  background: #fffdf7;
}

.stats-row strong {
  color: var(--mint-dark);
  font-size: 2rem;
  line-height: 1;
}

.stats-row span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.section-services {
  background:
    linear-gradient(180deg, var(--soft), #fffdf7);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.journey-grid article,
.patient-notes article,
.contact-form,
.photo-card,
.visit-grid article,
.trust-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(16, 32, 43, 0.06);
}

.service-card {
  min-height: 244px;
  padding: 24px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-card:hover,
.journey-grid article:hover,
.patient-notes article:hover,
.photo-card:hover,
.visit-grid article:hover,
.trust-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 134, 91, 0.28);
  box-shadow: 0 18px 38px rgba(16, 23, 22, 0.12);
}

.feature-service {
  background:
    linear-gradient(135deg, var(--navy), var(--mint-dark) 58%, #123843);
  color: var(--white);
}

.feature-service p {
  color: rgba(255, 255, 255, 0.72);
}

.service-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #f8f1e6;
  color: var(--mint-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.feature-service .service-icon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.service-card:nth-child(3n) .service-icon,
.service-card:nth-child(5) .service-icon {
  background: #e8f4f7;
  color: var(--blue);
}

.service-card:nth-child(4) .service-icon {
  background: #fff3d4;
  color: #7c5612;
}

.service-card h3,
.journey-grid h3,
.patient-notes h3,
.contact-form h3 {
  margin: 20px 0 8px;
  font-size: 1.14rem;
}

.service-card p,
.journey-grid p,
.patient-notes p {
  margin: 0;
}

.facility-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  background: var(--white);
}

.facility-image {
  min-height: 520px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(16, 23, 22, 0.02), rgba(16, 23, 22, 0.28)),
    url("https://chskenya.org/wp-content/uploads/2024/08/1G0A0004-scaled.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 48px rgba(16, 23, 22, 0.14);
}

.photo-section {
  background:
    linear-gradient(180deg, var(--paper), #fffdf7);
}

.photo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.photo-card {
  min-height: 220px;
  display: grid;
  align-content: end;
  padding: 22px;
  color: var(--white);
  overflow: hidden;
  position: relative;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 20%, rgba(7, 21, 19, 0.84)),
    url("https://chskenya.org/wp-content/uploads/2024/08/1G0A0004-scaled.jpg");
  background-size: cover;
  background-position: center;
  transition: transform 400ms ease;
}

.photo-card:hover::before {
  transform: scale(1.05);
}

.photo-card:nth-child(2)::before {
  background-image:
    linear-gradient(180deg, transparent 20%, rgba(7, 21, 19, 0.84)),
    url("https://tranquilmedcentre.com/tranquil-wordpress/wp-content/uploads/2023/06/Environment-2.webp");
}

.photo-card:nth-child(3)::before,
.photo-card:nth-child(4)::before {
  background-image:
    linear-gradient(180deg, transparent 20%, rgba(7, 21, 19, 0.84)),
    url("https://chskenya.org/wp-content/uploads/2024/08/1G0A0004-scaled.jpg");
}

.photo-card span,
.photo-card strong {
  position: relative;
  z-index: 1;
}

.photo-card span {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.photo-card strong {
  margin-top: 6px;
  font-size: 1.14rem;
}

.photo-card-large {
  grid-row: span 2;
  min-height: 458px;
}

.facility-content p {
  max-width: 690px;
}

.facility-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

dl,
dd {
  margin: 0;
}

.facility-list div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  font-weight: 900;
}

.patient-section {
  background:
    linear-gradient(180deg, #fffdf7, var(--mist));
}

.visit-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  background:
    linear-gradient(180deg, #fffdf7, var(--soft));
}

.visit-grid,
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.visit-grid article,
.trust-grid article {
  min-height: 152px;
  padding: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.visit-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.visit-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.visit-grid a {
  color: var(--blue);
}

.trust-section {
  background:
    linear-gradient(180deg, var(--soft), var(--paper));
}

.trust-grid article h3 {
  margin: 0 0 8px;
}

.trust-grid article p {
  margin: 0;
}

.journey-grid,
.patient-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.journey-grid article,
.patient-notes article {
  min-height: 208px;
  padding: 22px;
}

.journey-grid span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 900;
}

.patient-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.scope-section {
  background:
    linear-gradient(90deg, rgba(7, 21, 19, 0.97), rgba(8, 63, 49, 0.93)),
    var(--navy);
  color: var(--white);
}

.scope-section p {
  color: rgba(255, 255, 255, 0.76);
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.scope-grid article {
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

.scope-grid h3 {
  margin: 0 0 10px;
}

.scope-grid p {
  margin: 0;
}

.source-note {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: 0.88rem;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(28px, 6vw, 68px);
  align-items: start;
  background:
    linear-gradient(135deg, rgba(7, 21, 19, 0.98), rgba(16, 42, 47, 0.96)),
    var(--navy);
  color: var(--white);
}

.contact-section p {
  color: rgba(255, 255, 255, 0.74);
}

.contact-list {
  margin-top: 28px;
}

.contact-list p {
  margin: 8px 0;
}

.contact-list strong {
  color: var(--white);
}

.map-placeholder {
  min-height: 172px;
  display: grid;
  place-items: center;
  margin-top: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 134, 91, 0.24), rgba(201, 151, 45, 0.16)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
}

.map-placeholder span {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 900;
}

.contact-form {
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.24);
}

.contact-form h3 {
  margin-top: 0;
}

.contact-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #314a55;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(22, 134, 91, 0.12);
}

textarea {
  resize: vertical;
}

.form-note {
  margin: 14px 0 0;
  color: var(--muted) !important;
  font-size: 0.87rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(18px, 5vw, 72px);
  background: #040d12;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--white);
  font-weight: 900;
}

.reveal,
.reveal-group > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible,
.reveal-group.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group.is-visible > *:nth-child(2) {
  transition-delay: 80ms;
}

.reveal-group.is-visible > *:nth-child(3) {
  transition-delay: 160ms;
}

.reveal-group.is-visible > *:nth-child(4) {
  transition-delay: 240ms;
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.07) translate3d(1.2%, -1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-group > * {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .top-strip {
    position: static;
  }

  .site-header {
    inset: 0 0 auto;
    margin-top: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 77px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
  }

  .hero {
    padding-top: 132px;
  }

  .quick-info,
  .service-grid,
  .journey-grid,
  .scope-grid,
  .photo-grid,
  .visit-section,
  .intro-section,
  .facility-section,
  .contact-section {
    grid-template-columns: 1fr 1fr;
  }

  .stats-row,
  .patient-notes,
  .visit-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .photo-card-large {
    grid-row: auto;
    min-height: 280px;
  }
}

@media (max-width: 680px) {
  .top-strip {
    display: grid;
    gap: 2px;
    min-height: auto;
    padding: 7px 16px;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .top-strip span {
    flex: auto;
  }

  .site-header {
    padding: 12px 16px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    font-size: 0.92rem;
  }

  .brand small {
    font-size: 0.7rem;
  }

  .hero {
    min-height: 88vh;
    padding: 122px 18px 56px;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-copy {
    font-size: 1.02rem;
  }

  .button {
    width: 100%;
  }

  .quick-info,
  .service-grid,
  .journey-grid,
  .scope-grid,
  .photo-grid,
  .visit-section,
  .intro-section,
  .facility-section,
  .contact-section,
  .patient-notes {
    grid-template-columns: 1fr;
  }

  .quick-info article {
    min-height: 104px;
  }

  .section {
    padding: 64px 18px;
  }

  .section h2 {
    font-size: 2rem;
  }

  .facility-image {
    min-height: 340px;
  }

  .facility-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    display: grid;
  }
}
