body {
  font-family: 'Noto Sans JP', sans-serif;
  overflow-x: hidden;
  /* ✅ 背景レイヤーが一瞬ズレても黒ベタにならないための保険 */
  background: #0f1419;
}

.header-font {
  font-family: 'Cinzel', serif;
}

/* Rolling N Animation */
@keyframes rollIn {
  0% {
    transform: translateX(110vw) rotate(0deg) scale(1.02);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  85% {
    transform: translateX(-2px) rotate(740deg) scale(1.01);
  }
  96% { transform: translateX(0.6px) rotate(790deg) scale(0.985); }
  100% {
    /* 最後にピタッと収束（変身感の核） */
    transform: translateX(0) rotate(760deg) scale(0.98);
    opacity: 1;
  }
}

@keyframes fadeInLogo {
  0% {
    opacity: 0;
    transform: translateX(6px) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.rolling-n{
  display: inline-block;
  animation:
    rollIn 2.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    fadeOutN 0.26s ease 1.92s forwards;
  will-change: transform, opacity;
}

.fade-in-logo{
  opacity: 0;
  animation: fadeInLogo 0.65s ease-out 1.88s forwards;
  will-change: transform, opacity;
}

/* Scroll reveal */
.fade-up-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Background Gradient Layers */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  transition: opacity 1.1s ease-in-out;
  opacity: 0;
  /* ✅ 全レイヤーを基本0に */
}

/* ✅ active のときだけ 1 にする（常に1枚だけ表示） */
.bg-layer.active {
  opacity: 1;
}

/* Top / default dark */
.bg-dark {
  background: linear-gradient(180deg, #0f1419 0%, #151b23 100%);
}

/* White zone (Solutions) */
.bg-white {
  background: linear-gradient(180deg, #0f1419 0%, #ffffff 42%, #ffffff 100%);
}

/* Bottom dark (Company〜Contact〜Footer) */
.bg-dark-return {
  background: linear-gradient(180deg, #151b23 0%, #0f1419 70%, #0b0f14 100%);
}

/* Grid Overlay */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: overlay;
  opacity: 0.5;
}

.content-layer {
  position: relative;
  z-index: 10;
}

/* Hover Image Reveal */
.hover-reveal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out;
  z-index: 8;
  filter: brightness(0.42) saturate(0);
}

.hover-reveal-bg.active {
  opacity: 1;
}

/* Panels */
.glass {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.glass-dark {
  background: rgba(15, 20, 25, 0.55);
}

.glass-light {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 20, 25, 0.10);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

:focus-visible {
  outline: 2px solid rgba(184, 166, 86, 0.75);
  outline-offset: 2px;
}

/* Solutions見出し：背景に応じて色を切替 */
#solutions .solutions-heading {
  color: #0f1419;
  transition: color .25s ease;
}

#solutions .solutions-subheading {
  color: #334155;
  transition: color .25s ease;
}

/* hover背景が出ている間は暗背景扱いにして文字を明るく */
#solutions.is-dark .solutions-heading {
  color: #ffffff;
}

#solutions.is-dark .solutions-subheading {
  color: rgba(255, 255, 255, 0.78);
}

/* Form */
.form-input {
  width: 100%;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 12px 14px;
  color: #fff;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.form-input::placeholder {
  color: rgba(226, 232, 240, 0.45);
}

.form-input:focus {
  border-color: rgba(184, 166, 86, 0.60);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(184, 166, 86, 0.14);
  outline: none;
}

/* Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #0f1419;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: .08em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  user-select: none;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

/* ✅ Navbarを白固定にした時の文字色を安定させる */
nav {
  color: #0f1419;
  overflow: visible;
}

nav a {
  color: rgba(15, 20, 25, 0.78);
}

nav a:hover {
  color: #0f1419;
}

/* ロゴ文字（NEXT LABS）も白固定指定を上書き */
nav .fade-in-logo {
  color: #0f1419 !important;
}

/* Contactボタン（右上）を白背景向けに調整 */
nav a[href="#contact"] {
  border-color: rgba(15, 20, 25, 0.18) !important;
  color: #0f1419 !important;
}

nav a[href="#contact"]:hover {
  background: #0f1419 !important;
  color: #ffffff !important;
}

/* ------------------------------
   Policy pages: dark background fixed
-------------------------------- */

/* Tailwind が効いていても、背景は自前CSSで作っているので明示的に指定 */
body.policy-page {
  background: #0f1419;
}

/* 背景レイヤーが効いていないと真っ白になるので、最低限の定義を保証 */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.bg-layer.active {
  opacity: 1;
}

/* 暗背景（トップと同系統） */
.bg-dark {
  background: linear-gradient(180deg, #0f1419 0%, #151b23 100%);
}

/* Grid Overlay（トップ同様） */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* コンテンツを背景より前に */
.content-layer {
  position: relative;
  z-index: 10;
}

/* --------------------------------
   Logo marquee (scrolling logos)
---------------------------------- */
.logo-marquee {
  display: grid;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 20, 25, 0.35);
  border-radius: 18px;
  padding: 14px 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* edge fade (nice blending) */
.logo-marquee {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}



.marquee-group {
  display: flex;
  gap: 18px;
  align-items: center;
}

.marquee-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 10px 14px;
}

@media (min-width: 768px) {
  .marquee-logo {
    height: 40px;
    padding: 12px 18px;
  }
}

/* ==============================
   Seamless marquee motion (no jump)
   - animate .marquee-inner, not .marquee-track
   ============================== */

/* 速度（小さいほど速い） */
:root{
  --marquee-duration-company: 16s; /* 上段（企業） */
  --marquee-duration-uni: 18s;     /* 下段（大学） */
}

.marquee-track{
  overflow: hidden;
  position: relative;
}

/* ★追加：2列(=2グループ)を包んで動かす */
.marquee-inner{
  display: flex;
  width: max-content;
  will-change: transform;
  gap: 18px; /* 既存の gap と揃える */
}

.marquee-group{
  display: flex;
  gap: 18px;
  align-items: center;
}

/* 左へ */
.marquee-left .marquee-inner{
  animation: marquee-left var(--marquee-duration-company) linear infinite;
}

/* 右へ */
.marquee-right .marquee-inner{
  animation: marquee-right var(--marquee-duration-uni) linear infinite;
}

@keyframes marquee-left{
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}

@keyframes marquee-right{
  from { transform: translate3d(-50%,0,0); }
  to   { transform: translate3d(0,0,0); }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .marquee-left .marquee-inner,
  .marquee-right .marquee-inner{
    animation: none;
    transform: none;
  }
  .logo-marquee{
    -webkit-mask-image: none;
    mask-image: none;
  }
}


/* --- Marquee rows (with labels) --- */
.marquee-row{
  display: grid;
  gap: 10px;
}

.marquee-label{
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(226,232,240,0.70);
  padding-left: 6px;
}

/* ✅ ロゴを「もう少し大きく」 */
.marquee-logo{
  height: 70px;          /* ← 34px → 44px */
  padding: 12px 18px;    /* ← 少し余白も増やす */
  border-radius: 16px;
}

@media (min-width: 768px){
  .marquee-logo{
    height: 70px;        /* ← 40px → 54px */
    padding: 14px 22px;
  }
}

/* container spacing slightly larger to match bigger logos */
.logo-marquee{
  gap: 18px;
  padding: 16px 14px;
}

/* --- FIX: Bakuage logo box should never get overlays --- */
.ecosystem-main-logo{
  background: #fff !important;
  background-image: none !important; /* ← グラデーション/画像系を殺す */
  filter: none !important;
  -webkit-filter: none !important;
}

.ecosystem-main-logo::before,
.ecosystem-main-logo::after{
  content: none !important; /* ← 疑似要素オーバーレイがある場合を殺す */
}

.ecosystem-main-logo img{
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
}

@media (hover: none), (pointer: coarse) {
  .hover-reveal-bg {
    display: none !important; /* 背景レイヤー自体を無効化 */
  }
}

/* Hero gradient text (like flagship.cc) */
.hero-gradient-text{
  display: inline-block; /* clipが効きやすくなる保険 */
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #b8a656 35%,
    #7dd3fc 70%,
    #ffffff 100%
  );
  background-size: 200% 200%;
  background-position: 0% 50%;

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  animation: heroGradientMove 8s ease infinite;
}

@keyframes heroGradientMove{
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Logo stage (PNG animation) --- */
.logo-stage{
  position: relative;
  display: inline-block;
  height: 80px;          /* navのh-20と揃える */
  overflow: visible !important;     /* ← ここが重要：クリップしない */
}

.logo-full{
  height: 80px;
  width: auto;
  display: block;        /* 幅の基準になる */
}

.logo-n{
  position: absolute;
  left: 0;
  height: 56px;          /* ← Nは小さく（調整値） */
  top: 8px;
  width: auto;
  --n-y: 1px;
  z-index: 2;
  transform-origin: 50% 50%;
}

/* スマホではさらに少し小さく */
@media (max-width: 640px){
  .logo-stage{ height: 72px; }
  .logo-full{  height: 72px; }
  .logo-n{     height: 48px; }
}

@keyframes fadeOutN {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.logo-n,
.logo-full{
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

/* =========================================================
   Solutions Ecosystem Panel (target design)
   - append at END of styles.css
   ========================================================= */

/* outer panel */
.ecosystem-panel{
  border-radius: 28px;
  border: 1px solid rgba(15, 20, 25, 0.10);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 24px;
}

@media (min-width: 768px){
  .ecosystem-panel{ padding: 32px; }
}

/* group container */
.ecosystem-group{
  background: rgba(255,255,255,0.50);
  border-radius: 22px;
  padding: 28px;
  position: relative;
}

/* Category header pill */
.category-header{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(15, 20, 25, 0.05);
  border: 1px solid rgba(15, 20, 25, 0.10);
  border-radius: 999px;
  margin-bottom: 18px;
}

.category-icon{
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.category-operations{ background: #FF6B35; }
.category-ai{ background: #1E3A8A; }

.category-label{
  font-size: 12px;
  letter-spacing: .18em;
  font-weight: 600;
  color: rgba(71,85,105,0.95);
  text-transform: uppercase;
}

/* Parent brand card */
.parent-brand-card{
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15,20,25,0.10);
  box-shadow: 0 4px 16px rgba(15,20,25,0.06);
  padding: 28px;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.parent-brand-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,20,25,0.12);
  border-color: rgba(15,20,25,0.18);
}

.parent-brand-logo{
  height: 48px;
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Connector */
.connector-wrap{ margin: 22px 0; }

.connector-line{
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, rgba(15, 20, 25, 0.12), transparent);
  position: relative;
}

.connector-dot{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(15, 20, 25, 0.22);
}

/* Sub services grid */
.subservices-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Service card */
.service-card{
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(15, 20, 25, 0.10);
  background: #fff;
  padding: 18px;
  cursor: pointer;
  transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow .35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color .35s ease;
  overflow: visible; /* IMPORTANT: allow tooltip to show */
}

.service-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 20, 25, 0.12);
  border-color: rgba(15, 20, 25, 0.20);
  z-index: 20;
}

.service-logo{
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform .35s ease;
}

.service-card:hover .service-logo{
  transform: scale(1.05);
}

/* Detail tooltip */
.service-details{
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: 320px;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(15, 20, 25, 0.20);
  border: 1px solid rgba(15, 20, 25, 0.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease, transform .45s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
}

.service-card:hover .service-details{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.service-details::before{
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid rgba(15, 20, 25, 0.10);
  border-top: 1px solid rgba(15, 20, 25, 0.10);
  transform: translateX(-50%) rotate(45deg);
}

/* Detail content */
.detail-title{
  font-family: 'Inter','Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0f1419;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(15,20,25,0.10);
  letter-spacing: 0.01em;
}

.detail-category{
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.detail-category-operations{
  background: rgba(255,107,53,0.10);
  color: #FF6B35;
  border: 1px solid rgba(255,107,53,0.20);
}

.feature-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list-spaced{ margin-top: 12px; }

.feature-item{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  transition: transform .25s ease, color .25s ease;
}

.feature-item:hover{
  color: #0f1419;
  transform: translateX(4px);
}

.feature-icon{
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #FF6B35;
}

.highlight-tag{
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8A65 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  margin-top: 10px;
  letter-spacing: .03em;
}

.detail-note{
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

/* AI side stack */
.ai-stack{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-brand-card{
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15,20,25,0.10);
  padding: 22px;
  box-shadow: 0 4px 16px rgba(15,20,25,0.06);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  cursor: pointer;
  text-decoration: none;
}

.ai-brand-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,20,25,0.12);
  border-color: rgba(15,20,25,0.18);
}

.ai-brand-logo{
  height: 44px;
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* AI simple cards (reuse your target style) */
.ai-service-simple{
  border-radius: 18px;
  border: 1px solid rgba(15, 20, 25, 0.10);
  background: #fff;
  padding: 18px;
  text-align: center;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.ai-service-simple:hover{
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(15, 20, 25, 0.10);
  border-color: rgba(30, 58, 138, 0.30);
}

.ai-service-title{
  font-size: 18px;
  font-weight: 700;
  color: #0f1419;
  margin-bottom: 4px;
}

.ai-service-desc{
  font-size: 15px;
  color: #64748b;
}

/* Mobile behavior for tooltip (match your target) */
@media (max-width: 768px){
  .service-details{
    width: 280px;
    left: auto;
    right: 0;
    transform: translateY(-10px);
  }

  .service-card:hover .service-details{
    transform: translateY(0);
  }

  .service-details::before{
    left: auto;
    right: 32px;
    transform: rotate(45deg);
  }
}

/* =========================================================
   Contact Expanding UI
   ========================================================= */

/* Contact Trigger Button */
.contact-trigger {
  position: relative;
  cursor: pointer;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-trigger.expanded {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.contact-main-button {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(184, 166, 86, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 2px solid rgba(184, 166, 86, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.contact-main-button::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(184, 166, 86, 0.4), transparent, rgba(184, 166, 86, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.contact-trigger:hover .contact-main-button::before {
  opacity: 1;
  animation: contactRotate 3s linear infinite;
}

.contact-trigger:hover .contact-main-button {
  transform: scale(1.05);
  box-shadow: 0 32px 96px rgba(184, 166, 86, 0.3);
}

@keyframes contactRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pulse-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 2px solid rgba(184, 166, 86, 0.3);
  animation: contactPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-ring:nth-child(2) {
  animation-delay: 0.5s;
}

@keyframes contactPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0;
  }
}

/* Contact Grid (Fullscreen) */
.contact-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 1000;
  background: #0f1419;
}

.contact-grid.active {
  opacity: 1;
  pointer-events: auto;
}

/* Contact Option Cards */
.contact-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0);
  opacity: 0;
}

.contact-grid.active .contact-option {
  transform: scale(1);
  opacity: 1;
}

.contact-grid.active .contact-option:nth-child(1) { transition-delay: 0.1s; }
.contact-grid.active .contact-option:nth-child(2) { transition-delay: 0.2s; }
.contact-grid.active .contact-option:nth-child(3) { transition-delay: 0.3s; }
.contact-grid.active .contact-option:nth-child(4) { transition-delay: 0.4s; }

/* Background overlays */
.contact-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

.contact-option:hover::before {
  opacity: 1;
}

.contact-option-content {
  position: relative;
  z-index: 1;
}

/* Borders between cards */
.contact-option:nth-child(1),
.contact-option:nth-child(2) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-option:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Color schemes */
.contact-option-1 {
  --gradient-from: rgba(139, 92, 246, 0.2);
  --gradient-to: rgba(139, 92, 246, 0.05);
  background: rgba(139, 92, 246, 0.03);
}

.contact-option-2 {
  --gradient-from: rgba(255, 107, 53, 0.2);
  --gradient-to: rgba(255, 107, 53, 0.05);
  background: rgba(255, 107, 53, 0.03);
}

.contact-option-3 {
  --gradient-from: rgba(30, 58, 138, 0.3);
  --gradient-to: rgba(30, 58, 138, 0.1);
  background: rgba(30, 58, 138, 0.05);
}

.contact-option-4 {
  --gradient-from: rgba(16, 185, 129, 0.2);
  --gradient-to: rgba(16, 185, 129, 0.05);
  background: rgba(16, 185, 129, 0.03);
}

/* Icons */
.contact-option-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  margin-right: auto;
}

.contact-option:hover .contact-option-icon {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(184, 166, 86, 0.4);
}

/* Number badges */
.contact-option-number {
  position: absolute;
  top: 3rem;
  right: 3rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.6s ease;
}

.contact-option:hover .contact-option-number {
  transform: scale(1.2) rotate(360deg);
  background: rgba(184, 166, 86, 0.2);
  border-color: rgba(184, 166, 86, 0.4);
  color: #b8a656;
}

/* Typography */
.contact-option-title {
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  transition: all 0.4s ease;
}

.contact-option:hover .contact-option-title {
  color: #b8a656;
  transform: translateY(-4px);
}

.contact-option-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 400px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
  transition: all 0.4s ease;
}

.contact-option:hover .contact-option-description {
  color: rgba(255, 255, 255, 0.9);
}

/* Tags */
.contact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.contact-tag {
  padding: 0.375rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.contact-option:hover .contact-tag {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Close button */
.contact-close-btn {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  color: #fff;
  transition: all 0.4s ease;
}

.contact-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(184, 166, 86, 0.5);
  transform: rotate(90deg) scale(1.1);
}

/* Arrow animation */
.arrow-icon {
  transition: transform 0.4s ease;
}

.contact-option:hover .arrow-icon {
  transform: translateX(8px);
}

/* Contact Form Overlay */
.contact-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #0f1419 0%, #151b23 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 1002;
  overflow-y: auto;
}

.contact-form-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.contact-form-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.contact-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.contact-back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(184, 166, 86, 0.4);
  color: #fff;
}

.contact-form-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.contact-close-btn-form {
  position: static;
  width: 48px;
  height: 48px;
}

.contact-form-content {
  flex: 1;
  padding: 1rem 0;
}

/* Dark-mode filter for HubSpot cross-origin iframe */
.contact-form-content iframe {
  filter: invert(1) hue-rotate(180deg);
}

/* Responsive */
@media (max-width: 768px) {
  .contact-main-button {
    width: 260px;
    height: 260px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    overflow-y: auto;
  }

  .contact-option {
    padding: 2rem;
    border-right: none !important;
  }

  .contact-option:nth-child(1),
  .contact-option:nth-child(2),
  .contact-option:nth-child(3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .contact-option-title {
    font-size: 1.75rem;
  }

  .contact-option-number {
    width: 48px;
    height: 48px;
    font-size: 1rem;
    top: 1.5rem;
    right: 1.5rem;
  }

  .contact-option-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
  }

  .contact-close-btn {
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }

  .contact-form-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .contact-form-title {
    position: static;
    transform: none;
    order: -1;
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .contact-back-btn {
    order: 1;
  }

  .contact-close-btn-form {
    order: 2;
  }
}
