/* ═══════════════════════════════════════════════════
   TOPCOM — Services Page (Bento Grid Redesign)
   ═══════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════ */
.srv-hero {
  position: relative; width: 100%; height: 80vh; min-height: 540px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--black);
}
.srv-hero .hero-abstract { position: absolute; inset: 0; z-index: 1; }
.srv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.srv-hero .abs-gradient {
  position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.45) 70%),
    linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.5) 100%);
}
.srv-hero .page-hero-content {
  position: relative; z-index: 3; text-align: center;
  padding: 0 var(--space-lg); max-width: 800px;
}

.hero-label {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-bottom: var(--space-xl); opacity: 0;
  animation: fadeInDown 0.8s var(--ease-out) 0.3s forwards;
}
.hero-label span:not(.label-line) {
  font-size: var(--fs-sm); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.25em; color: rgba(255,255,255,0.8);
}
.label-line {
  display: block; height: 1px; width: 0; background: rgba(255,255,255,0.4);
  animation: lineDraw 1s var(--ease-out) 0.8s forwards;
}
@keyframes lineDraw { to { width: 60px; } }

.hero-heading {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-bottom: var(--space-lg);
}
.hh-line {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem); font-weight: 800;
  color: var(--white); line-height: 1.15; opacity: 0;
}
.hh-1 { animation: fadeInUp 0.8s var(--ease-out) 0.5s forwards; }
.hh-2 { animation: fadeInUp 0.8s var(--ease-out) 0.7s forwards; }
.hh-2 em { font-style: italic; font-weight: 300; color: rgba(255,255,255,0.5); }

.hero-sub {
  font-size: var(--fs-md); color: rgba(255,255,255,0.4); line-height: 1.6;
  opacity: 0; animation: fadeIn 0.8s var(--ease-out) 1.2s forwards;
}

.hero-corner {
  position: absolute; width: 70px; height: 70px; z-index: 3;
  pointer-events: none; opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.2s forwards;
}
.hero-corner-tl { top: 30px; left: 30px; border-top: 2px solid rgba(255,255,255,0.15); border-left: 2px solid rgba(255,255,255,0.15); }
.hero-corner-br { bottom: 30px; right: 30px; border-bottom: 2px solid rgba(255,255,255,0.15); border-right: 2px solid rgba(255,255,255,0.15); }

/* ══════════════════════════════════════════════════
   BENTO GRID
   ══════════════════════════════════════════════════ */
.srv-bento { background: var(--white); overflow: hidden; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ─── Card Base ─── */
.bento-card {
  position: relative; border-radius: 24px;
  padding: var(--space-xl) var(--space-lg);
  min-height: 280px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none; color: inherit;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.bento-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}

/* Wide cards span 2 columns */
.bc-wide { grid-column: span 2; min-height: 320px; }

/* ─── Dark variant ─── */
.bc-dark {
  background: var(--black); color: var(--white);
}
.bc-dark:hover { box-shadow: 0 24px 60px rgba(0,0,0,0.3); }

.bc-dark .bc-num { color: rgba(255,255,255,0.15); }
.bc-dark h2 { color: var(--white); }
.bc-dark h2 em { color: rgba(255,255,255,0.4); }
.bc-dark p { color: rgba(255,255,255,0.45); }
.bc-dark .bc-arrow { color: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.1); }
.bc-dark:hover .bc-arrow { color: var(--white); border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.1); }

/* ─── Light variant ─── */
.bc-light {
  background: var(--gray-100); color: var(--black);
  border: 1px solid var(--gray-200);
}

.bc-light .bc-num { color: var(--gray-200); }
.bc-light h2 { color: var(--black); }
.bc-light h2 em { color: var(--gray-400); }
.bc-light p { color: var(--gray-500); }
.bc-light .bc-arrow { color: var(--gray-300); border-color: var(--gray-200); }
.bc-light:hover .bc-arrow { color: var(--black); border-color: var(--gray-400); background: var(--white); }

/* ─── Number ─── */
.bc-num {
  position: absolute; top: var(--space-lg); left: var(--space-lg);
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 900;
  line-height: 1; pointer-events: none;
  font-family: 'SF Mono', 'Consolas', monospace;
  transition: color 0.4s ease;
}

/* ─── Abstract SVG layer ─── */
.bc-abstract {
  position: absolute; inset: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}
.bc-shape {
  position: absolute; width: 100%; height: 100%;
  transition: transform 0.6s var(--ease-out);
}
.bento-card:hover .bc-shape { transform: scale(1.08) rotate(2deg); }

/* ─── Content ─── */
.bc-content { position: relative; z-index: 2; }
.bc-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 800;
  line-height: 1.2; margin-bottom: 8px;
}
.bc-content h2 em { font-style: italic; font-weight: 300; }
.bc-content p {
  font-size: var(--fs-sm); line-height: 1.6; max-width: 380px;
}

/* ─── Arrow ─── */
.bc-arrow {
  position: absolute; top: var(--space-lg); right: var(--space-lg);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s var(--ease-out);
}
.bento-card:hover .bc-arrow svg { transform: translate(2px, -2px); }
.bc-arrow svg { transition: transform 0.3s var(--ease-out); }

/* ─── External badge (TinyCrafts) ─── */
.bc-ext-badge {
  position: absolute; top: var(--space-lg); right: 72px;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--white); color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

/* ══════════════════════════════════════════════════
   TAG CLOUD
   ══════════════════════════════════════════════════ */
.srv-cloud {
  background: var(--gray-100); padding: var(--space-2xl) 0;
  overflow: hidden;
}
.cloud-inner {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; max-width: 900px; margin: 0 auto;
}

.cloud-tag {
  display: inline-block; padding: 8px 20px;
  border-radius: 100px; font-weight: 600;
  background: var(--white); color: var(--gray-400);
  border: 1px solid var(--gray-200);
  transition: all 0.4s var(--ease-out);
  cursor: default;
}
.cloud-tag:hover { background: var(--black); color: var(--white); border-color: var(--black); transform: translateY(-4px); }

.ct-sm { font-size: var(--fs-xs); padding: 6px 14px; }
.ct-md { font-size: var(--fs-sm); }
.ct-lg { font-size: var(--fs-base); font-weight: 700; }

/* ══════════════════════════════════════════════════
   CTA
   ══════════════════════════════════════════════════ */
.srv-cta { background: var(--black); padding: var(--space-2xl) 0; }
.srv-cta .cta-inner {
  max-width: 700px; margin: 0 auto; text-align: center;
  padding: var(--space-xl) 0;
}
.cta-accent {
  width: 60px; height: 4px; background: var(--white);
  margin: 0 auto var(--space-lg);
  transform: scaleX(0); transition: transform 0.8s var(--ease-out);
}
.srv-cta .cta-inner.visible .cta-accent { transform: scaleX(1); }
.srv-cta .cta-inner h2 { font-size: var(--fs-2xl); font-weight: 800; color: var(--white); margin-bottom: var(--space-sm); }
.srv-cta .cta-inner h2 em { font-style: italic; font-weight: 300; color: var(--gray-400); }
.srv-cta .cta-inner p { font-size: var(--fs-md); color: rgba(255,255,255,0.5); margin-bottom: var(--space-lg); }

.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; font-size: var(--fs-sm); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--black); background: var(--white); border-radius: 100px;
  transition: all 0.4s var(--ease-out); position: relative; overflow: hidden;
}
.cta-btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gray-200); transform: scaleX(0);
  transform-origin: left; transition: transform 0.4s var(--ease-out);
  border-radius: inherit; z-index: 0;
}
.cta-btn:hover::before { transform: scaleX(1); }
.cta-btn span, .cta-btn svg { position: relative; z-index: 1; }
.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(255,255,255,0.1); }
.cta-btn svg { transition: transform 0.3s var(--ease-out); }
.cta-btn:hover svg { transform: translateX(5px); }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 968px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bc-wide { grid-column: span 2; }
  .hero-corner { width: 50px; height: 50px; }
  .hero-corner-tl { top: 16px; left: 16px; }
  .hero-corner-br { bottom: 16px; right: 16px; }
}

@media (max-width: 600px) {
  .srv-hero { height: 65vh; min-height: 400px; }
  .srv-hero .page-hero-content { padding: 0 var(--space-sm); }
  .hero-heading .hh-line { font-size: 1.5rem; }
  .label-line { display: none; }
  .hero-corner { display: none; }

  .bento-grid { grid-template-columns: 1fr; gap: 14px; }
  .bc-wide { grid-column: span 1; }
  .bento-card { min-height: 220px; padding: var(--space-lg); }
  .bc-num { font-size: 2.5rem; }

  .cloud-inner { gap: 8px; }
  .cloud-tag { padding: 6px 12px; font-size: var(--fs-xs); }
  .ct-lg { font-size: var(--fs-sm); }

  .srv-cta .cta-inner h2 { font-size: var(--fs-xl); }
}
