/* ===========================
   SERVICES — 3D Spatial UI
   Cards tilt with cursor, depth shifts on hover
   =========================== */

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 2rem;
}

.bento-card {
  /* Glossy layered gradient — brighter at top-left like light hitting glass */
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(253, 250, 248, 0.58) 50%,
    rgba(237, 229, 220, 0.50) 100%
  );
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Glossy top-surface shine — the "lens" highlight */
.bento-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.48) 0%,
    rgba(255, 255, 255, 0.18) 35%,
    rgba(255, 255, 255, 0.04) 70%,
    transparent 100%
  );
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
  z-index: 0;
}

/* Dark mode — keep glossy but shift palette */
[data-theme="dark"] .bento-card {
  background: linear-gradient(
    150deg,
    rgba(68, 60, 53, 0.90) 0%,
    rgba(44, 39, 34, 0.80) 55%,
    rgba(35, 31, 28, 0.75) 100%
  );
  border-color: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] .bento-card::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.03) 45%,
    transparent 80%
  );
}

/* Cursor-responsive shine — sits above the static gloss */
.card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.26) 0%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}
.bento-card:hover .card-shine { opacity: 1; }

/* Depth edge glow on hover */
.bento-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(107,79,58,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.bento-card:hover::before { opacity: 1; }
.bento-card:hover { box-shadow: var(--shadow-xl); }

.bento-wide { grid-column: span 2; }

/* ===========================
   DIMENSIONAL ICON CONTAINERS
   Per-service gradients · light + dark mode
   No translateY → stays within card border
   =========================== */
.bento-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transition:
    transform 0.45s var(--spring),
    box-shadow 0.35s ease;
  /* Depth: inset top highlight */
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32);
}

/* Hover — rotate + gentle scale, NO translateY (avoids border overflow) */
.bento-card:hover .bento-icon-wrap {
  transform: rotate(8deg) scale(1.10);
}

/* ── Per-service gradient themes ── */

/* Project Management — warm amber */
[data-service="pm"] .bento-icon-wrap {
  background: linear-gradient(145deg, #D4956A 0%, #B06840 100%);
  box-shadow:
    0 6px 20px rgba(176, 104, 64, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.30);
}
[data-service="pm"] .bento-card:hover .bento-icon-wrap,
.bento-card[data-service="pm"]:hover .bento-icon-wrap {
  box-shadow:
    0 12px 30px rgba(176, 104, 64, 0.42),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

/* Technical Documentation — muted slate-lavender */
[data-service="docs"] .bento-icon-wrap {
  background: linear-gradient(145deg, #9090B0 0%, #6C6C90 100%);
  box-shadow:
    0 6px 20px rgba(108, 108, 144, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

/* Graphic Design — terracotta / dusty rose */
[data-service="design"] .bento-icon-wrap {
  background: linear-gradient(145deg, #C98070 0%, #A05848 100%);
  box-shadow:
    0 6px 20px rgba(160, 88, 72, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

/* Website Creation — steel slate-blue */
[data-service="web"] .bento-icon-wrap {
  background: linear-gradient(145deg, #6888A8 0%, #486098 100%);
  box-shadow:
    0 6px 20px rgba(72, 96, 152, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

/* Real Estate — deep warm earth */
[data-service="realestate"] .bento-icon-wrap {
  background: linear-gradient(145deg, #907055 0%, #6B5038 100%);
  box-shadow:
    0 6px 20px rgba(107, 80, 56, 0.30),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

/* ── Dark mode — brighter, glowing versions ── */
[data-theme="dark"] [data-service="pm"] .bento-icon-wrap {
  background: linear-gradient(145deg, #E0A870 0%, #C07840 100%);
  box-shadow: 0 6px 24px rgba(224, 168, 112, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}
[data-theme="dark"] [data-service="docs"] .bento-icon-wrap {
  background: linear-gradient(145deg, #A8A8C8 0%, #8080A8 100%);
  box-shadow: 0 6px 24px rgba(128, 128, 168, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}
[data-theme="dark"] [data-service="design"] .bento-icon-wrap {
  background: linear-gradient(145deg, #D89080 0%, #B06858 100%);
  box-shadow: 0 6px 24px rgba(176, 104, 88, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}
[data-theme="dark"] [data-service="web"] .bento-icon-wrap {
  background: linear-gradient(145deg, #8098B8 0%, #5878A8 100%);
  box-shadow: 0 6px 24px rgba(88, 120, 168, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}
[data-theme="dark"] [data-service="realestate"] .bento-icon-wrap {
  background: linear-gradient(145deg, #A88065 0%, #785845 100%);
  box-shadow: 0 6px 24px rgba(120, 88, 69, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}

.bento-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 2;
}

.bento-card p {
  font-size: 0.91rem;
  color: var(--text-muted);
  line-height: 1.68;
  flex: 1;
  position: relative;
  z-index: 2;
}

.bento-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 4px 12px;
  border-radius: 50px;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.expertise-closing {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 24px 32px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* ===========================
   HOW IT WORKS — Glass Steps
   =========================== */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0;
}

.step-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s var(--spring), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.step-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(107,79,58,0.07), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.step-card:hover::after { opacity: 1; }
.step-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.step-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-alt) 0%, var(--bg-alt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow:
    0 4px 14px rgba(107,79,58,0.10),
    inset 0 1px 0 rgba(255,255,255,0.60);
  transition: transform 0.4s var(--spring), box-shadow 0.35s ease;
}
.step-card:hover .step-number {
  transform: rotate(-6deg) scale(1.10);
  box-shadow:
    0 10px 24px rgba(107,79,58,0.18),
    inset 0 1px 0 rgba(255,255,255,0.60);
}
[data-theme="dark"] .step-number {
  background: linear-gradient(145deg, var(--surface-alt) 0%, var(--surface) 100%);
  box-shadow: 0 4px 14px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.06);
}
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.step-card p  { font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; }

.step-connector {
  width: 36px;
  height: 2px;
  background: linear-gradient(to right, var(--border), var(--accent), var(--border));
  margin-top: 56px;
  position: relative;
  opacity: 0.5;
}
.step-connector::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  transform: rotate(45deg);
}
