/* ============================================================
   HOME.CSS — Homepage-specific styles
   Ongwacho Cherop Associates & Advocates
============================================================ */

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-primary-dk);
  overflow: hidden;
}

/* Geometric pattern — left side only, above image */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 65%;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z' fill='none' stroke='rgba(201,169,97,0.045)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 2;
}

/* Gradient — opaque on left for text, fades out right to show image */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--color-primary-dk)    0%,
    var(--color-primary-dk)   35%,
    rgba(92,10,34,0.92)       48%,
    rgba(92,10,34,0.55)       62%,
    rgba(92,10,34,0.12)       76%,
    transparent               88%
  );
  z-index: 1;
  pointer-events: none;
}

/* ── Image — full hero background ── */
.hero__image-col {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0;
  animation: fadeIn 1.2s 2.0s ease forwards;
}

/* ── Text column — floats on left above gradient ── */
.hero__text-col {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 4rem / 6rem from 1100px up (5.82vw and 8.73vw reach those values at 1100px); fluid below. */
  padding: 8rem clamp(1.5rem, 5.82vw, 4rem) 6rem clamp(1.5rem, 8.73vw, 6rem);
  width: min(620px, 55%);
}

/* Eyebrow label */
.hero__eyebrow {
  font-family: var(--ff-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(201,169,97,0.85);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s 1.9s cubic-bezier(0.22,1,0.36,1) forwards;
}

/* Hero title (text replacing former logo image) */
.hero__title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--color-white);
  letter-spacing: 0.02em;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeSlideUp 0.9s 2.1s cubic-bezier(0.22,1,0.36,1) forwards;
}
.hero__title strong {
  display: block;
  font-weight: 600;
  color: var(--color-accent-lt);
  font-style: italic;
}

/* Tagline */
.hero__tagline {
  font-family: var(--ff-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.03em;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 0 2.6rem;
  opacity: 0;
  animation: fadeSlideUp 0.9s 3.4s cubic-bezier(0.22,1,0.36,1) forwards;
}

/* Actions */
.hero__actions {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.9s 3.6s cubic-bezier(0.22,1,0.36,1) forwards;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s 4s ease forwards;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hero__scroll-text {
  font-size: var(--fs-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(201,169,97,0.85);
}
.hero__scroll-line {
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, rgba(201,169,97,0.85), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
/* Keyframes (fadeIn, fadeSlideUp, scrollPulse) live in global.css. */

/* Hero ≤900px: the text column spans the hero over an even scrim; the photo shows through it. */
@media (max-width: 900px) {
  .hero__text-col {
    width: 100%;
    padding-bottom: 7rem; /* keeps the buttons clear of the scroll cue */
  }
  .hero::before { width: 100%; }
  .hero::after  { background: var(--hero-scrim); }
  .hero__image  { object-position: 88% center; }
  .hero__eyebrow { color: var(--color-accent-lt); } /* solid gold: the 0.85 alpha measured 3.68:1 over the scrim */
}

/* Hero ≤480px: full-width buttons, smaller title floor for ≤400px phones. */
@media (max-width: 480px) {
  .hero__title { font-size: clamp(2.2rem, 5.5vw, 5.2rem); }
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }
}

/* ── INTRO BAND ────────────────────────────────────────────── */
.intro-band {
  background: var(--color-primary);
  padding: 1.8rem var(--space-md);
  text-align: center;
}
.intro-band p {
  font-family: var(--ff-display);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.06em;
  max-width: 780px;
  margin: 0 auto;
}
.intro-band p span {
  color: var(--color-accent-lt);
  font-style: normal;
  font-weight: 500;
}

/* ── ABOUT ─────────────────────────────────────────────────── */
.about { background: var(--color-cream); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* Visual column */
.about__portrait-frame {
  position: relative;
  padding: 1.5rem;
}
.about__portrait-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  border: 1.5px solid rgba(201,169,97,0.4);
}
/* About portrait image */
.about__portrait-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

/* Content column */
.about__text {
  font-size: var(--fs-base);
  line-height: 1.9;
  color: var(--color-ink-soft);
  margin-bottom: 1.4rem;
  max-width: var(--measure);
}
.about__text--lead {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-ink);
  line-height: 1.65;
  margin-top: 1.4rem;
}


/* ── PRACTICE AREAS ────────────────────────────────────────── */
.practice { background: var(--color-ink); }
.practice { --header-title: var(--color-accent); } /* dark variant is .section--dark (global.css) */
.practice .section { padding-bottom: 0; } /* the divider adds its own space below the header, as on about Mission & Vision */

.practice__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: rgba(201,169,97,0.1);
}
.practice__card {
  background: var(--color-ink);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background var(--ease-med);
}
.practice__card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease-slow);
}
.practice__card:hover::before { transform: scaleX(1); }
.practice__card:hover { background: rgba(122,14,46,0.09); }

.practice__card-number {
  font-family: var(--ff-display);
  font-size: 4.5rem;
  font-weight: 700;
  color: rgba(201,169,97,0.07);
  line-height: 1;
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  transition: color var(--ease-med);
}
.practice__card:hover .practice__card-number { color: rgba(201,169,97,0.14); }

.practice__card-title {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.practice__card-desc {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: rgba(255,255,255,0.48);
  transition: color var(--ease-med);
}
.practice__card:hover .practice__card-desc { color: rgba(255,255,255,0.65); }

.practice__card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.8rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: gap var(--ease-fast);
}
.practice__card:hover .practice__card-link { gap: 0.8rem; }
.practice__card-link svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Sub-services tags */
.practice__card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.practice__card-tag {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201,169,97,0.5);
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(201,169,97,0.18);
}


/* ── CTA ───────────────────────────────────────────────────── */
.cta-section {
  background: var(--color-cream-warm);
  padding: var(--space-xl) var(--space-gutter);
}
.cta-section__inner {
  max-width: 780px;
  margin: 0 auto;
}
.cta-section .corner-box {
  text-align: center;
  padding: 4rem 3rem;
}
.cta-section__title {
  font-family: var(--ff-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1.2;
  margin: 1.2rem 0 1rem;
}
.cta-section__text {
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--color-ink-soft);
  max-width: 500px;
  margin: 0 auto 2.2rem;
}
.cta-section__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
/* Placed after every base rule above so the overrides win the cascade. The hero's own blocks sit with the hero. */
@media (max-width: 719px) {
  .about__grid { grid-template-columns: 1fr; gap: 3rem; }
  .practice__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 559px) {
  .practice__grid { grid-template-columns: 1fr; }
  .practice__card { padding: 2.2rem 1.5rem; }
  .cta-section .corner-box { padding: 2.5rem 1.5rem; }
}

/* ── Reading scale on phones and tablets (desktop unchanged) ── */
@media (max-width: 899px) {
  .about__text:not(.about__text--lead) { font-size: var(--fs-body); line-height: var(--lh-body); }
  .about__text--lead { font-size: var(--fs-lead); }
}

/* ── Media on phones and tablets: the picture fills the column, centred; the offset frame is dropped (desktop unchanged) ── */
@media (max-width: 899px) {
  .about__visual { max-width: var(--media-max-w); margin-inline: auto; }
  .about__portrait-frame { padding: 0; }
  .about__portrait-frame::before { display: none; }
}

/* ── "Not sure where to start?" card (lifted from inline styles; the doubled selectors keep the card's look through :hover) ── */
.practice__card.practice__card--cta,
.practice__card.practice__card--cta:hover { background: rgba(122,14,46,0.06); }
.practice__card--cta .practice__card-number,
.practice__card--cta:hover .practice__card-number { color: rgba(201,169,97,0.12); }
.practice__card--cta .practice__card-title { color: var(--color-accent-lt); }
.practice__card--cta .practice__card-desc,
.practice__card--cta:hover .practice__card-desc { color: rgba(255,255,255,0.6); }
.practice__card--cta .btn { margin-top: 1.8rem; font-size: 0.65rem; }
