/* =====================================================
   VINCITORE DESIGN — INDEX PAGE STYLES
   Safari-safe: all flex/grid gap replaced with margins
   ===================================================== */

/* ── PORTFOLIO SECTION ─────────────────────────────── */
.portfolio-section {
  padding-top: var(--nav-height);
  background: var(--white);
}

/* 3 columns × 4 rows — always, including mobile */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px; /* grid gap is fine in Safari — only flex gap is broken */
  background: var(--light-grey);
}

.portfolio-card {
  position: relative;
  background: var(--off-white);
  overflow: hidden;
}

.card-link { display: block; }

.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--light-grey);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .55s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-card:hover .card-image img { transform: scale(1.04); }

.card-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0; /* replaced inset:0 */
  background: rgba(255,255,255,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.portfolio-card:hover .card-overlay { opacity: 1; }

.card-cta {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dark);
  border-bottom: 1px solid var(--text-dark);
  padding-bottom: 2px;
  transform: translateY(6px);
  transition: transform .3s var(--ease);
}
.portfolio-card:hover .card-cta { transform: translateY(0); }

/* FILTER BAR */
.filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem var(--pad);
  background: var(--white);
  border-top: 1px solid var(--light-grey);
}

.filter-btn {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .5rem 1.2rem;
  border: 1px solid var(--mid-grey);
  border-radius: 100px;
  transition: all .2s ease;
  background: transparent;
  margin: 0.25rem; /* replaces gap: .5rem */
}
.filter-btn:hover {
  color: var(--text-dark);
  border-color: var(--text-dark);
}
.filter-btn.active {
  color: var(--white);
  background: var(--text-dark);
  border-color: var(--text-dark);
}

.portfolio-card.hidden {
  display: none;
}


/* ── ABOUT SECTION ─────────────────────────────────── */
.about-section {
  padding: 6rem 0;
  background: var(--white);
  border-top: 1px solid var(--light-grey);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 5rem; /* grid gap is fine */
  align-items: start;
}

.about-text .section-eyebrow { margin-bottom: .5rem; }
.about-text .section-title   { margin-bottom: 1.5rem; }

.about-text p {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 1.1rem;
}
.about-text p:last-child { margin-bottom: 0; }

/* Portrait column */
.about-portrait-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-portrait-col > * + * {
  margin-top: 1.5rem; /* replaces gap: 1.5rem */
}

.portrait-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--light-grey);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.portrait-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.portrait-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-grey);
  color: var(--text-muted);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.6;
}


/* ── SERVICES SECTION ──────────────────────────────── */
.services-section {
  padding: 6rem 0;
  background: var(--off-white);
  border-top: 1px solid var(--light-grey);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem; /* grid gap is fine */
  margin-bottom: 3rem;
}

.service-card {
  text-align: center;
  padding: 2rem 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-grey);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.service-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.07);
  transform: translateY(-4px);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin: 0 auto 1.25rem;
  width: 56px; height: 56px;
  background: var(--gold-subtle);
  border-radius: 50%;
}

.service-name {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: .85rem;
}

.service-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.service-link {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.service-link:hover { border-color: var(--gold); }

.services-cta { text-align: center; }


/* ── TESTIMONIALS ──────────────────────────────────── */
.testimonials-section {
  padding: 6rem 0;
  background: var(--white);
  border-top: 1px solid var(--light-grey);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; /* grid gap is fine */
  align-items: start;
}

.testimonial-card {
  background: var(--off-white);
  border: 1px solid var(--light-grey);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.07);
  transform: translateY(-3px);
}
.testimonial-card--featured {
  background: var(--gold-subtle);
  border-color: rgba(184,154,82,.3);
}

.testimonial-quote {
  font-size: .95rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-author > * + * {
  margin-left: .85rem; /* replaces gap: .85rem */
}

.author-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 600; color: var(--white);
  letter-spacing: .05em; flex-shrink: 0;
}
.author-name {
  display: block;
  font-size: .8rem; font-weight: 500; font-style: normal;
  color: var(--text-dark);
}
.author-title {
  display: block; font-size: .72rem; color: var(--text-muted);
}


/* ── CLIENTS SECTION ───────────────────────────────── */
.clients-section {
  padding: 5rem 0;
  background: var(--off-white);
  border-top: 1px solid var(--light-grey);
}

.clients-intro {
  font-size: .95rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px; /* grid gap is fine */
  background: var(--mid-grey);
  border: 1px solid var(--mid-grey);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.clients-grid img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  padding: 1rem 1.5rem;
  background: var(--white);
  filter: grayscale(1) opacity(.55);
  transition: filter .3s;
}
.clients-grid img:hover { filter: grayscale(0) opacity(1); }

.logo-placeholder {
  height: 80px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-placeholder span {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mid-grey);
  text-align: center;
  line-height: 1.5;
}


/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .about-inner { grid-template-columns: 1fr 260px; gap: 3rem; }
}

@media (max-width: 768px) {
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-portrait-col { flex-direction: row; align-items: flex-start; }
  .about-portrait-col > * + * { margin-top: 0; margin-left: 1.5rem; } /* row direction fix */
  .portrait-wrap { width: 160px; flex-shrink: 0; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .clients-grid { display: none; }
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .about-portrait-col { flex-direction: column; align-items: center; }
  .about-portrait-col > * + * { margin-top: 1.5rem; margin-left: 0; }
  .portrait-wrap { width: 100%; max-width: 280px; }
}


/* ── HOW WE WORK ───────────────────────────────────── */
.index-process-steps {
  background: #1e1c19;
  padding: 5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.section-eyebrow--light {
  color: rgba(201,168,76,.75);
}

.index-steps-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: -.01em;
  margin-bottom: 3rem;
  line-height: 1.2;
}

.index-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem; /* grid gap is fine */
}

.index-step {
  display: flex;
  flex-direction: column;
}

.index-step > * + * {
  margin-top: .75rem; /* replaces gap: .75rem */
}

.index-step-num {
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--gold);
  opacity: .45;
  line-height: 1;
  letter-spacing: -.02em;
}

.index-step-name {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

.index-step-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.45);
  line-height: 1.75;
}


/* ── AVAILABILITY BADGE ────────────────────────────── */
.availability-badge {
  display: flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: .5rem;
}

.availability-badge > * + * {
  margin-left: .5rem; /* replaces gap: .5rem */
}

.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5cb85c;
  box-shadow: 0 0 0 3px rgba(92,184,92,.2);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(92,184,92,.2); }
  50%       { box-shadow: 0 0 0 6px rgba(92,184,92,.08); }
}


/* ── NAV AVAILABILITY SIGNAL ───────────────────────── */
.nav-avail {
  display: flex;
  align-items: center;
  margin-right: .5rem;
  padding: .3rem .85rem .3rem .6rem;
  border: 1px solid rgba(92,184,92,.35);
  border-radius: 100px;
  background: rgba(92,184,92,.07);
}

.nav-avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5cb85c;
  box-shadow: 0 0 0 2px rgba(92,184,92,.25);
  animation: nav-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
  margin-right: .45rem; /* replaces gap: .45rem */
}

@keyframes nav-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(92,184,92,.25); }
  50%       { box-shadow: 0 0 0 5px rgba(92,184,92,.08); }
}

.nav-avail-text {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #4a9e4a;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .nav-avail { display: none; }
}


/* ── BY THE NUMBERS ────────────────────────────────── */
.numbers-band {
  background: #1e1c19;
  padding: 4rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.numbers-band .section-eyebrow {
  display: block;
  margin-bottom: 2.5rem;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem; /* grid gap is fine */
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-lg);
  transition: background .25s;
}

.stat-item > * + * {
  margin-top: .6rem; /* replaces gap: .6rem */
}

.stat-item:hover {
  background: rgba(255,255,255,.04);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(201,168,76,.12);
  color: var(--gold);
  margin-bottom: .25rem;
}

.stat-number {
  font-family: var(--font);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  letter-spacing: -.02em;
}

.stat-number .count {
  display: inline-block;
  transition: transform .3s;
}

.stat-label {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .numbers-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .stat-item { padding: 1rem .5rem; }
  .stat-number { font-size: 1.8rem; }
}
@media (max-width: 640px) {
  .numbers-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

@media (max-width: 768px) {
  .index-steps-grid { grid-template-columns: 1fr; gap: 2rem; }
}