/* =============================================
   UNIT00 — INDEX (Tech Page)
   Palette: Crisp White + Warm Pearl + Crimson
   ============================================= */

:root {
  --hero-bg:    #FFFFFF;
  --grid-line:  rgba(0,0,0,0.035);
  --card-bg:    #FFFFFF;
}
body { background: #FAFAF9; }

/* ══════════════════════════════════════════════
   HERO — Light, animated word reveal + hex canvas
   ══════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--hero-bg);
  overflow: hidden;
  padding: calc(var(--nav-h) + 3rem) var(--page-px) 5rem;
}

/* Fine grid */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none; z-index: 0;
}
/* Radial vignette softening the grid edges */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 75% 75% at 50% 42%,
    transparent 35%, rgba(255,255,255,0.85) 72%, #fff 100%);
  pointer-events: none; z-index: 1;
}

/* Canvas behind content */
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 820px;
  width: 100%;
}

/* Animated badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.38rem 1.1rem;
  background: rgba(155,28,28,0.05);
  border: 1px solid rgba(155,28,28,0.15);
  border-radius: 100px;
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--crimson); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 2.5rem;
  animation: badge-in 0.7s var(--ease-out) 0.15s both;
}
@keyframes badge-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--crimson);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(155,28,28,0.35); }
  50%      { box-shadow: 0 0 0 5px rgba(155,28,28,0); }
}

/* Title — word-by-word reveal */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.8vw, 4.6rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
}
.hero-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: 0.2em;
}
.hero-title .word-inner {
  display: inline-block;
  animation: word-rise 0.85s var(--ease-out) both;
}
.hero-title .word:nth-child(1) .word-inner { animation-delay: 0.25s; }
.hero-title .word:nth-child(2) .word-inner { animation-delay: 0.37s; }
.hero-title .word:nth-child(3) .word-inner { animation-delay: 0.49s; }
.hero-title .word:nth-child(4) .word-inner { animation-delay: 0.61s; }
.hero-title .word:nth-child(5) .word-inner { animation-delay: 0.73s; }
.hero-title .word:nth-child(6) .word-inner { animation-delay: 0.85s; }
.hero-title .word:nth-child(7) .word-inner { animation-delay: 0.97s; }
@keyframes word-rise {
  from { opacity: 0; transform: translateY(70%); }
  to   { opacity: 1; transform: translateY(0); }
}

.title-accent  { color: var(--crimson); font-weight: 600; }
.title-light   { font-weight: 300; color: var(--text-muted); }
.title-outline {
  -webkit-text-stroke: 1.5px rgba(15,14,13,0.25);
  color: transparent; font-weight: 700;
}

.hero-sub {
  font-size: clamp(0.88rem, 1.5vw, 1.05rem);
  color: var(--text-muted); font-weight: 400;
  line-height: 1.78; max-width: 530px;
  margin: 0 auto 2.5rem;
  animation: fade-up 0.8s var(--ease-out) 1.15s both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-actions {
  display: flex; align-items: center;
  justify-content: center; gap: 0.85rem;
  flex-wrap: wrap; margin-bottom: 4rem;
  animation: fade-up 0.8s var(--ease-out) 1.3s both;
}

/* Metrics bar */
.hero-metrics {
  display: flex; align-items: stretch;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 14px; overflow: hidden;
  animation: fade-up 0.8s var(--ease-out) 1.5s both;
  background: #fff;
}
.metric {
  text-align: center; flex: 1;
  padding: clamp(1rem, 2.5vw, 1.4rem) clamp(1.25rem, 3vw, 2.5rem);
  border-right: 1px solid var(--border);
}
.metric:last-child { border-right: none; }
.metric-num {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700; color: var(--crimson);
  letter-spacing: -0.04em; display: block;
}
.metric-label {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-muted); letter-spacing: 0.07em;
  text-transform: uppercase; margin-top: 0.22rem;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  z-index: 2;
  animation: fade-up 0.8s var(--ease-out) 1.9s both;
}
.scroll-line {
  width: 1px; height: 38px;
  background: linear-gradient(to bottom, var(--crimson), transparent);
  animation: scroll-anim 1.6s ease-in-out infinite;
}
@keyframes scroll-anim {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.hero-scroll-hint span {
  font-family: var(--font-mono); font-size: 0.58rem;
  color: var(--text-light); letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Floating hexagons */
.hero-geo { position: absolute; z-index: 1; pointer-events: none; }
.geo-hex-1 {
  top: 10%; right: 7%;
  width: clamp(80px, 12vw, 160px);
  opacity: 0.07;
  animation: float-geo 9s ease-in-out infinite;
}
.geo-hex-2 {
  bottom: 14%; left: 5%;
  width: clamp(55px, 8vw, 110px);
  opacity: 0.055;
  animation: float-geo 11s ease-in-out infinite reverse;
}
.geo-hex-3 {
  top: 55%; right: 4%;
  width: clamp(40px, 5vw, 70px);
  opacity: 0.04;
  animation: float-geo 13s ease-in-out 2s infinite;
}
@keyframes float-geo {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(7deg); }
}

/* ══════════════════════════════════════════════
   SECTION DIVIDER
   ══════════════════════════════════════════════ */

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 20%, var(--border-strong) 80%, transparent);
}

/* ══════════════════════════════════════════════
   SERVICES SECTION
   ══════════════════════════════════════════════ */

.services-section {
  padding: clamp(5rem, 8vw, 8rem) 0;
  background: #F7F5F3;
}
.services-container {
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 var(--page-px);
}

.section-header { text-align: center; margin-bottom: clamp(3rem, 5vw, 4.5rem); }
.section-label {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--crimson); letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.label-line { display: block; width: 26px; height: 1px; background: var(--crimson); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 3.2rem);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.08; color: var(--text-primary); margin-bottom: 1rem;
}
.section-title .accent { color: var(--crimson); }
.section-desc {
  color: var(--text-secondary); font-size: 1rem;
  line-height: 1.7; max-width: 500px; margin: 0 auto;
}

/* Grid: 3-col desktop */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-bottom: 2rem;
}
.service-card:nth-child(4) { grid-column: 1 / 3; }
.service-card:nth-child(5) { grid-column: 3 / 4; grid-row: 2; }

.service-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
  display: flex; flex-direction: column;
}
.service-card:hover {
  border-color: rgba(155,28,28,0.2);
  box-shadow: 0 14px 44px rgba(0,0,0,0.07), 0 4px 14px rgba(155,28,28,0.05);
  transform: translateY(-3px);
}
.card-glow {
  position: absolute; top: 0; left: 0; right: 0; height: 160px;
  background: radial-gradient(ellipse at 50% -20%, rgba(155,28,28,0.06) 0%, transparent 65%);
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.service-card:hover .card-glow { opacity: 1; }

.card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 0.65rem;
}
.card-icon {
  width: 38px; height: 38px;
  background: var(--crimson-subtle);
  border: 1px solid rgba(155,28,28,0.13);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
.service-card:hover .card-icon {
  background: rgba(155,28,28,0.1);
  border-color: rgba(155,28,28,0.28);
}
.card-icon svg { width: 16px; height: 16px; stroke: var(--crimson); }
.card-num {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-light); letter-spacing: 0.1em;
}
.card-img-wrap {
  position: relative; height: 155px; overflow: hidden;
  margin: 0 1.25rem; border-radius: 9px;
}
.card-img-wrap--featured { height: 195px; }
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.96) saturate(0.88);
  transition: transform 0.5s var(--ease-out), filter 0.4s ease;
}
.service-card:hover .card-img-wrap img {
  transform: scale(1.04);
  filter: brightness(1.02) saturate(1);
}
.card-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.08) 55%, transparent 100%);
}
.ai-badge {
  position: absolute; top: 0.7rem; right: 0.7rem;
  padding: 0.18rem 0.6rem;
  background: var(--crimson); border-radius: 100px;
  font-family: var(--font-mono); font-size: 0.58rem;
  color: #fff; letter-spacing: 0.1em; text-transform: uppercase;
}
.card-body { padding: 0.9rem 1.25rem; flex: 1; }
.card-body h3 {
  font-family: var(--font-display); font-size: 1.02rem;
  font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.55rem; letter-spacing: -0.02em;
}
.card-body p {
  color: var(--text-secondary); font-size: 0.84rem;
  line-height: 1.6; margin-bottom: 0.85rem;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.card-tags span {
  padding: 0.18rem 0.55rem;
  background: #F3F1EE; border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono); font-size: 0.63rem;
  color: var(--text-muted); letter-spacing: 0.04em;
}
.card-arrow {
  padding: 0.85rem 1.25rem;
  font-size: 1rem; color: var(--text-light);
  transition: all 0.25s ease; text-align: right;
}
.service-card:hover .card-arrow { color: var(--crimson); transform: translateX(3px); }

/* Services CTA */
.services-cta {
  display: flex; align-items: center;
  justify-content: space-between; gap: 2rem;
  padding: 1.85rem 2.25rem;
  background: #fff; border: 1px solid var(--border);
  border-radius: 13px; flex-wrap: wrap;
}
.cta-label {
  font-family: var(--font-mono); font-size: 0.67rem;
  color: var(--text-light); letter-spacing: 0.1em;
  text-transform: uppercase; display: block; margin-bottom: 0.3rem;
}
.services-cta h3 {
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — index page
   ══════════════════════════════════════════════ */

/* 2XL ≥ 1536 */
@media (min-width: 1536px) {
  .hero-title { font-size: 5.4rem; }
  .hero-content { max-width: 1000px; }
  .services-grid { gap: 1.5rem; }
  .service-card:nth-child(4) { grid-column: 1 / 3; }
  .service-card:nth-child(5) { grid-column: 3 / 4; grid-row: 2; }
}

/* XL 1280-1535 */
@media (min-width: 1280px) and (max-width: 1535px) {
  .hero-title { font-size: clamp(2.4rem, 4.2vw, 4.8rem); }
}

/* LG 1024-1279 */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero-title { font-size: clamp(2rem, 4vw, 3.8rem); }
  .metric { padding: 1rem 1.5rem; }
  .metric-num { font-size: 1.6rem; }
  .card-img-wrap { height: 135px; }
  .card-img-wrap--featured { height: 170px; }
}

/* MD 768-1023 — tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero { min-height: 92vh; }
  .hero-title { font-size: clamp(1.9rem, 5vw, 3.4rem); }
  .hero-metrics { flex-wrap: wrap; }
  .metric { flex: 1 1 33%; }

  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: auto; grid-row: auto; }
  .services-cta { flex-direction: column; text-align: center; }
}

/* SM 480-767 */
@media (min-width: 480px) and (max-width: 767px) {
  .hero { min-height: 90vh; }
  .hero-title { font-size: clamp(1.85rem, 7vw, 2.9rem); }
  .hero-sub { font-size: 0.92rem; }
  .hero-metrics { flex-direction: column; }
  .metric { border-right: none; border-bottom: 1px solid var(--border); width: 100%; padding: 1rem 1.5rem; }
  .metric:last-child { border-bottom: none; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: auto; grid-row: auto; }
  .services-cta { flex-direction: column; text-align: center; padding: 1.75rem; }
  .geo-hex-1, .geo-hex-2, .geo-hex-3 { display: none; }
}

/* XS < 480 */
@media (max-width: 479px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 2rem); padding-bottom: 4rem; }
  .hero-title { font-size: clamp(1.65rem, 8.5vw, 2.3rem); }
  .hero-sub { font-size: 0.88rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .hero-metrics { flex-direction: column; }
  .metric { border-right: none; border-bottom: 1px solid var(--border); padding: 0.85rem 1rem; }
  .metric:last-child { border-bottom: none; }
  .metric-num { font-size: 1.5rem; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: auto; grid-row: auto; }
  .card-img-wrap { height: 135px; }
  .card-img-wrap--featured { height: 155px; }
  .services-cta { flex-direction: column; padding: 1.5rem; text-align: center; }
  .geo-hex-1, .geo-hex-2, .geo-hex-3 { display: none; }
}
