/* ==========================================================================
   3PEDIA DIGITAL — HOMEPAGE STYLES (home.css v4.0 · INDEX.PHP ONLY)
   ========================================================================== */

/* --- ONE-FRAME HERO --- */
body.page-home .hero {
  min-height: auto;
  padding-top: clamp(80px, 11vh, 120px);
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

body.page-home .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  animation: gridpan 16s linear infinite;
  pointer-events: none;
}

body.page-home .hero-top {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

body.page-home .hero-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Archivo', sans-serif;
  font-stretch: 122%;
  font-weight: 900;
  font-size: clamp(2.2rem, 7.8vw, 6.8rem);
  line-height: 1;
  letter-spacing: -0.035em;
  text-align: center;
  text-transform: uppercase;
  margin: 0 auto;
  white-space: nowrap;
}

body.page-home .hero-brand .ln {
  display: inline-flex;
  gap: 0.28em;
  overflow: hidden;
}

body.page-home .hero-brand .wd {
  display: inline-block;
  transform: translateY(112%);
  opacity: 0;
  background: linear-gradient(110deg, var(--ink) 42%, color-mix(in srgb, var(--ink) 45%, var(--bg)) 50%, var(--ink) 58%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheen 7s linear infinite;
}

body.page-home .home-hero-tagline {
  text-align: center;
  font-size: clamp(16px, 1.8vw, 21px);
  max-width: 780px;
  margin: 22px auto 0;
  line-height: 1.6;
  color: var(--ink-soft);
  opacity: 1;
  transform: none;
}

body.page-home .home-hero-tagline b {
  color: var(--ink);
  font-weight: 700;
}

body.page-home .home-hero-bottom {
  margin-top: 18px;
}

body.page-home .hero-cta {
  display: flex;
  gap: 13px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

body.page-home .stat-row {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 52px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

body.page-home .stat {
  text-align: center;
  padding: 0 44px;
  border-right: 1px solid var(--line);
}

body.page-home .stat:last-child {
  border-right: none;
}

body.page-home .stat-n {
  font-family: 'Archivo', sans-serif;
  font-stretch: 112%;
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 800;
  color: var(--ink);
}

body.page-home .stat-l {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 7px;
}

body.page-home .hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px 26px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  position: relative;
  z-index: 1;
}

body.page-home .hero-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.page-home .hero-scroll .ar {
  animation: bob 1.6s ease-in-out infinite;
}

/* --- CLICKABLE INFINITE STAGGERED PHOTO MARQUEE --- */
.hero-photo-strip {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: clamp(14px, 2.2vh, 26px);
  margin-bottom: clamp(10px, 1.8vh, 18px);
  padding: 10px 0;
  display: flex;
  align-items: flex-end;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.photo-marquee {
  display: flex;
  width: max-content;
  align-items: flex-end;
  animation: loopMarquee 38s linear infinite;
  will-change: transform;
}

.photo-marquee:hover {
  animation-play-state: paused;
}

.photo-group {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding-right: 24px;
}

.p-item {
  display: block;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, filter 0.3s ease;
  will-change: transform;
}

.p-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  filter: brightness(1.04);
}

.p-item:active {
  transform: scale(0.93) translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}

.p-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.p-item::after {
  content: '↗';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(10, 10, 10, 0.72);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.p-item:hover::after {
  opacity: 1;
  transform: scale(1);
}

.p-xtall { width: 200px; height: 270px; }
.p-tall { width: 180px; height: 240px; }
.p-med { width: 170px; height: 190px; }
.p-sq { width: 170px; height: 170px; }
.p-wide { width: 230px; height: 150px; }
.p-landscape { width: 210px; height: 165px; }

@keyframes loopMarquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* --- PILLARS & SERVICES --- */
body.page-home .pillars { background: var(--bg-alt); }
body.page-home .pl-head { max-width: 680px; margin-bottom: 64px; }
body.page-home .pl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1400px; }
body.page-home .pl-card { background: var(--surface); border: 1px solid var(--line); padding: 46px 36px; position: relative; overflow: hidden; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
body.page-home .pl-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); }
body.page-home .pl-ghost { position: absolute; top: -18px; right: -6px; font-family: 'Archivo', sans-serif; font-stretch: 120%; font-size: 120px; font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line); pointer-events: none; user-select: none; }
body.page-home .pl-ico { width: 62px; height: 62px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 26px; transition: all 0.4s var(--ease); position: relative; z-index: 1; }
body.page-home .pl-name { font-family: 'Archivo', sans-serif; font-stretch: 110%; font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 14px; position: relative; z-index: 1; }
body.page-home .pl-desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.72; margin-bottom: 28px; position: relative; z-index: 1; }

body.page-home .svc { background: var(--bg-alt); }
body.page-home .svc-head { margin-bottom: 58px; max-width: 560px; }
body.page-home .svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
body.page-home .svc-card { background: var(--surface); border: 1px solid var(--line); padding: 34px 28px; transition: all 0.4s var(--ease); }
body.page-home .svc-card:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-6px); }
body.page-home .svc-card:hover .svc-name { color: var(--bg); }
body.page-home .svc-card:hover .svc-desc { color: color-mix(in srgb, var(--bg) 70%, transparent); }
body.page-home .svc-card:hover .svc-ico { border-color: color-mix(in srgb, var(--bg) 40%, transparent); color: var(--bg); transform: rotate(-5deg) scale(1.08); }
body.page-home .svc-ico { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; transition: all 0.4s var(--ease); }
body.page-home .svc-name { font-family: 'Archivo', sans-serif; font-stretch: 108%; font-size: 16.5px; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; transition: color 0.4s; }
body.page-home .svc-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.65; transition: color 0.4s; }
body.page-home .svc-all { text-align: center; margin-top: 50px; }

/* --- GROWTH CHART --- */
.chart-wrap { position: relative; max-width: 1060px; margin: 90px auto 0; border: 1px solid var(--line); background: var(--surface); padding: 42px 36px 30px; box-shadow: var(--shadow); }
.chart-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; flex-wrap: wrap; gap: 14px; }
.chart-label { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.chart-trend { display: flex; align-items: center; gap: 8px; font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600; color: var(--ink); }
.chart-trend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: pulse 2s infinite; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.gc-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1600; stroke-dashoffset: 1600; transition: stroke-dashoffset 2.4s var(--ease); }
.chart-wrap.drawn .gc-line { stroke-dashoffset: 0; }
.gc-area { fill: url(#gcg); opacity: 0; transition: opacity 1.4s ease 1s; }
.chart-wrap.drawn .gc-area { opacity: 1; }
.gc-node { opacity: 0; transition: opacity 0.5s var(--ease); }
.chart-wrap.drawn .gc-node { opacity: 1; }
.chart-wrap.drawn .gc-node:nth-of-type(1) { transition-delay: 0.5s; }
.chart-wrap.drawn .gc-node:nth-of-type(2) { transition-delay: 1.1s; }
.chart-wrap.drawn .gc-node:nth-of-type(3) { transition-delay: 1.7s; }
.chart-wrap.drawn .gc-node:nth-of-type(4) { transition-delay: 2.3s; }
.gc-node circle.core { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.gc-node circle.halo { fill: var(--ink); opacity: 0.12; }
.gc-node text { font-family: 'Space Grotesk', sans-serif; font-weight: 600; fill: var(--ink); }
.gc-day { font-size: 13px; }
.gc-cap { font-size: 11px; fill: var(--ink-faint); letter-spacing: 0.05em; }
#gcMarker { opacity: 0; }
.mk-glow { fill: var(--ink); opacity: 0.2; }
.mk-core { fill: var(--ink); stroke: var(--surface); stroke-width: 2.5; }
#gcMarker.rest .mk-glow { animation: pulse2 2.2s ease-in-out infinite; }
.grow-cta { text-align: center; margin-top: 54px; }

/* --- WHY US & GROWTH OS CONSOLE --- */
body.page-home .why { background: var(--bg); }
body.page-home .why-head { margin-bottom: 58px; max-width: 620px; }
.why-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 70px; align-items: start; }
.wy-rows { border-bottom: 1px solid var(--line); }
body.page-home .wy-row { position: relative; border-top: 1px solid var(--line); padding: 26px 18px; overflow: hidden; }
.wy-row::before { content: ''; position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: top; transition: transform 0.45s var(--ease); }
.wy-row:hover::before { transform: scaleY(1); transform-origin: bottom; }
body.page-home .wy-in { position: relative; z-index: 1; display: grid; grid-template-columns: 52px 1fr 28px; gap: 16px; align-items: start; }
body.page-home .wy-n { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-faint); padding-top: 5px; transition: color 0.35s; }
body.page-home .wy-t { font-family: 'Archivo', sans-serif; font-stretch: 110%; font-size: 19px; font-weight: 800; text-transform: uppercase; transition: color 0.35s; }
body.page-home .wy-d { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease); font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.wy-d p { padding-top: 10px; }
body.page-home .wy-row:hover .wy-d { max-height: 130px; color: color-mix(in srgb, var(--bg) 72%, transparent); }
.wy-ar { font-size: 17px; padding-top: 3px; transition: transform 0.4s var(--ease), color 0.35s; color: var(--ink); }
.wy-row:hover .wy-ar { transform: rotate(45deg); }
.wy-row:hover .wy-t, .wy-row:hover .wy-ar { color: var(--bg); }
.wy-row:hover .wy-n { color: color-mix(in srgb, var(--bg) 55%, transparent); }

body.page-home .os { background: #0A0A0A; color: #F4F4F4; border: 1px solid rgba(244, 244, 244, 0.14); padding: 26px 26px 30px; position: sticky; top: 130px; }
body.page-home .os-lb { font-family: 'Space Grotesk', sans-serif; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244, 244, 244, 0.45); margin-bottom: 12px; }
.os-bar { display: flex; align-items: center; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid rgba(244, 244, 244, 0.12); margin-bottom: 22px; }
.os-bar i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(244, 244, 244, 0.4); }
.os-bar i:first-child { background: #F4F4F4; border-color: #F4F4F4; }
.os-bar span { margin-left: auto; font-family: 'Space Grotesk', sans-serif; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244, 244, 244, 0.55); display: flex; align-items: center; gap: 8px; }
.os-pipe { margin-bottom: 26px; }
.os-pipe svg { width: 100%; height: auto; display: block; overflow: visible; }
.pnode { fill: #0A0A0A; stroke: rgba(244, 244, 244, 0.5); stroke-width: 1.5; }
.ppath { stroke: rgba(244, 244, 244, 0.25); stroke-width: 1.5; fill: none; }
.ptxt { font-family: 'Space Grotesk', sans-serif; font-size: 11px; font-weight: 600; fill: rgba(244, 244, 244, 0.75); letter-spacing: 0.04em; }
.tdot { fill: #F4F4F4; offset-path: path('M30 30 L470 30'); animation: travel 5s linear infinite; }
.os-bars { display: flex; align-items: flex-end; gap: 18px; height: 120px; padding: 0 6px; margin-bottom: 8px; border-bottom: 1px solid rgba(244, 244, 244, 0.15); }
.os-b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.os-b i { display: block; background: #F4F4F4; transform-origin: bottom; animation: bloop 3.2s ease-in-out infinite; height: 100%; }
.os-b:nth-child(1) i { animation-delay: 0s; animation-duration: 3s; }
.os-b:nth-child(2) i { animation-delay: 0.5s; animation-duration: 3.6s; }
.os-b:nth-child(3) i { animation-delay: 0.9s; animation-duration: 2.8s; }
.os-b:nth-child(4) i { animation-delay: 1.3s; animation-duration: 3.4s; }
.os-bl { display: flex; gap: 18px; padding: 10px 6px 24px; }
.os-bl span { flex: 1; text-align: center; font-family: 'Space Grotesk', sans-serif; font-size: 10px; letter-spacing: 0.14em; color: rgba(244, 244, 244, 0.5); }
.os-feed { font-family: 'Space Grotesk', sans-serif; font-size: 13px; line-height: 1.6; min-height: 44px; color: rgba(244, 244, 244, 0.9); }
.os-feed .pfx { color: rgba(244, 244, 244, 0.45); }
body.page-home .caret { display: inline-block; width: 8px; height: 15px; background: #F4F4F4; margin-left: 3px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }

/* --- HAPPY CLIENTS GRID --- */
.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; margin-top: 48px; }
.client-item { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(128, 128, 128, 0.12); transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.client-item:hover { transform: translateY(-5px); border-color: rgba(128, 128, 128, 0.3); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06); }
.client-logo-wrap { width: 100%; height: 75px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; padding: 6px; }
.client-logo-wrap img { max-width: 140px; max-height: 65px; width: auto; height: auto; object-fit: contain; display: block; transition: transform 0.3s ease; }
.client-item:hover .client-logo-wrap img { transform: scale(1.05); }
.client-name { font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }

/* --- HOMEPAGE RESPONSIVE --- */
@media (max-width: 1024px) {
  body.page-home .pl-grid,
  body.page-home .svc-grid,
  body.page-home .blog-grid { grid-template-columns: repeat(2, 1fr); }
  body.page-home .why-grid { grid-template-columns: 1fr; gap: 56px; }
  body.page-home .os { position: static; }
}

@media (max-width: 900px) {
  .p-xtall { width: 190px; height: 280px; }
  .p-tall { width: 170px; height: 240px; }
  .p-med { width: 160px; height: 190px; }
  .p-sq { width: 160px; height: 160px; }
  .p-wide { width: 220px; height: 140px; }
  .p-landscape { width: 200px; height: 150px; }
  .photo-group { gap: 16px; padding-right: 16px; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 640px) {
  body.page-home .hero-brand { font-size: clamp(1.8rem, 8.5vw, 2.8rem); }
  body.page-home .hero-foot { padding: 20px 22px 24px; font-size: 10px; }
  body.page-home .pl-grid,
  body.page-home .svc-grid,
  body.page-home .blog-grid { grid-template-columns: 1fr; }
  body.page-home .pl-card { padding: 38px 28px; }
  body.page-home .chart-wrap { padding: 24px 16px; }
  body.page-home .hero-cta { flex-direction: column; align-items: center; }
  .hero-photo-strip { margin-top: 16px; margin-bottom: 12px; }
  .p-xtall { width: 130px; height: 180px; border-radius: 14px; }
  .p-tall { width: 120px; height: 160px; border-radius: 14px; }
  .p-med { width: 110px; height: 130px; border-radius: 12px; }
  .p-sq { width: 110px; height: 110px; border-radius: 12px; }
  .p-wide { width: 140px; height: 95px; border-radius: 12px; }
  .p-landscape { width: 130px; height: 105px; border-radius: 12px; }
  .photo-group { gap: 12px; padding-right: 12px; }
  .photo-marquee { animation-duration: 26s; }
  .client-name { font-size: 11.5px; }
}