/*
Theme Name: Infracorp Global
Theme URI: https://infracorp.global
Author: Antigravity
Description: High-fidelity, cinematic, 1:1 custom WordPress theme inspired by infracorp.global. Tailwind & GSAP integrated.
Version: 1.0.0
Text Domain: infracorp-global
*/

/* Custom base styles beyond Tailwind */
:root {
  --ic-bg-color: #050505;
  --ic-text-color: #d1d5db; /* 與內文 prose 一致，避免有些文字偏白、有些偏灰 */
  --ic-accent-color: #3b82f6;

  /* WordPress 區塊字級預設（本主題無 theme.json，補上以免 has-*-font-size 失效變小） */
  --wp--preset--font-size--small: 0.875rem;
  --wp--preset--font-size--normal: 1rem;
  --wp--preset--font-size--medium: 1.125rem;
  --wp--preset--font-size--large: 1.875rem;
  --wp--preset--font-size--x-large: 2.5rem;
  --wp--preset--font-size--huge: 3rem;
}

body {
  background-color: var(--ic-bg-color);
  color: var(--ic-text-color);
  overflow-x: hidden;
}

/* Hide scrollbar for smooth cinematic feel */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--ic-bg-color);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Utilities */
.clip-text {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* ────────────────────────────────────────────
   統一 Hero（服務頁 / 案例詳情 / 文章 共用一套）
   灰階圖背景 + 漸層遮罩 + 置中 mono medium 標題
   ──────────────────────────────────────────── */
.ic-hero {
  position: relative;
  min-height: 54vh;
  padding: 150px 24px 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.ic-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(1.05);
  opacity: 0.72;            /* was 0.55 — 提高背景可見度 */
  transform: scale(1.04);
}
.ic-hero-overlay {
  position: absolute;
  inset: 0;
  /* 底部維持深色銜接頁面，中段（標題區）遮罩變淡讓背景看得清楚 */
  background: linear-gradient(to top, rgba(5, 7, 7, 0.92) 0%, rgba(5, 7, 7, 0.55) 50%, rgba(5, 7, 7, 0.45) 100%);
}
.ic-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}
.ic-hero-eyebrow {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #34f5c5;
  text-decoration: none;
  margin-bottom: 16px;
}
.ic-hero-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 0 50px rgba(52, 245, 197, 0.18), 0 2px 8px rgba(0, 0, 0, 0.8);
  text-wrap: balance;          /* 多行標題自動平衡（避免第一行超長、第二行剩一點點） */
  overflow-wrap: anywhere;     /* 中文逐字自然斷行，不再卡在空格處硬撐 */
}
.ic-hero-meta {
  margin-top: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.ic-hero-divider {
  display: block;
  width: 48px;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(to right, transparent, #34f5c5, transparent);
}
.ic-hero-back {
  position: absolute;
  top: 112px;
  left: 24px;
  z-index: 3;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.3s;
}
.ic-hero-back:hover {
  color: #34f5c5;
}

/* 麵包屑 */
.bbmep-breadcrumb {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
}
.bbmep-breadcrumb a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.3s;
}
.bbmep-breadcrumb a:hover {
  color: #34f5c5;
}
.bbmep-breadcrumb .bc-sep {
  color: rgba(255, 255, 255, 0.25);
}
.bbmep-breadcrumb .bc-current {
  color: rgba(255, 255, 255, 0.7);
}

/* 列表頁 hero（/projects/、/tech-column/、分類封存共用，無圖、置中） */
.ic-lhero {
  position: relative;
  padding: 150px 24px 52px;
  text-align: center;
  overflow: hidden;
}
.ic-lhero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(52, 245, 197, 0.08), transparent 70%);
  pointer-events: none;
}
.ic-lhero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.ic-lhero-sub {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ── CTA 區動畫（純 CSS、全站共用；首頁 orb 的 animate-[float] 需要這個 keyframe）── */
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(24px, -28px) scale(1.06); }
  66%      { transform: translate(-18px, 18px) scale(0.96); }
}
@keyframes ctaGlowPulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.1); }
}
.cta-glow { animation: ctaGlowPulse 3.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .cta-glow, [class*="animate-[float"] { animation: none !important; }
}

/* ── WordPress 原生燈箱（點擊放大）配色：預設白底 → 改深色配合主題 ── */
.wp-lightbox-overlay .scrim { background-color: #050707 !important; } /* 蓋掉 inline 的 #fff 白底 */
.wp-lightbox-overlay .wp-lightbox-close-button { fill: #ffffff !important; } /* 黑色關閉鈕 → 白色 */
.wp-lightbox-overlay .wp-lightbox-close-button:hover { fill: #34f5c5 !important; }

/* ── 回到頂端（全站常駐右下角、深色科技風）── */
.bbmep-totop {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer;
  color: #34f5c5;
  background: rgba(5, 7, 7, 0.6);
  border: 1px solid rgba(52, 245, 197, 0.4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, transform .2s, color .2s;
}
.bbmep-totop:hover { background: rgba(52, 245, 197, 0.12); border-color: #34f5c5; transform: translateY(-2px); }
@media (max-width: 640px) { .bbmep-totop { right: 16px; bottom: 16px; width: 42px; height: 42px; } }

/* ── 內文 .gutenberg-content 排版（全站一致：page / contact / qualifications 共用，H2 含青綠條美化）── */
.gutenberg-content { color:#d1d5db; font-weight:400; line-height:1.85; font-size:1.125rem; }
.gutenberg-content p { margin-bottom:1.85rem; }
.gutenberg-content h1,.gutenberg-content h2,.gutenberg-content h3,.gutenberg-content h4,.gutenberg-content h5,.gutenberg-content h6 {
  color:#fff; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-weight:600; margin-top:3rem; margin-bottom:1.1rem; position:relative; padding-left:.9rem; }
.gutenberg-content h2::before,.gutenberg-content h3::before,.gutenberg-content h4::before {
  content:''; position:absolute; left:0; top:12%; height:76%; width:2px; background:#34f5c5; border-radius:2px; }
.gutenberg-content h2 { font-size:1.5rem; }
.gutenberg-content h3 { font-size:1.2rem; font-weight:500; color:#e2e8f0; }
.gutenberg-content h4 { font-size:1.1rem; font-weight:500; color:#e2e8f0; }
.gutenberg-content hr { border:0; height:1px; margin:2.75rem 0; background:linear-gradient(90deg,transparent,rgba(52,245,197,.38),transparent); }
.gutenberg-content figure { margin:2.6rem 0; }
.gutenberg-content img { border-radius:.5rem; border:1px solid rgba(255,255,255,.1); max-width:100%; height:auto; box-shadow:0 20px 25px -5px rgba(0,0,0,.5),0 10px 10px -5px rgba(0,0,0,.3); }
.gutenberg-content a { color:#34f5c5; text-decoration:none; transition:all .3s ease; box-shadow:inset 0 -1px 0 0 rgba(52,245,197,.4); }
.gutenberg-content a:hover { color:#fff; box-shadow:inset 0 -1px 0 0 rgba(52,245,197,.8); }
.gutenberg-content ul,.gutenberg-content ol { margin-bottom:1.75rem; padding-left:1.6rem; }
.gutenberg-content li { margin-bottom:.7rem; }
/* 精選引言（全站標準）：置中 + 大引號 + 青綠 divider（同關於我們 .ab-quote） */
.gutenberg-content blockquote { position:relative; border:0; background:none; text-align:center; max-width:760px; margin:3rem auto; padding:2.6rem 1.5rem 1.4rem; color:#fff; border-radius:0; }
.gutenberg-content blockquote::before { content:"\201C"; position:absolute; top:-.4rem; left:50%; transform:translateX(-50%); font-family:Georgia,serif; font-size:5rem; line-height:1; color:rgba(52,245,197,.32); }
.gutenberg-content blockquote::after { content:""; display:block; width:48px; height:1px; margin:1.4rem auto 0; background:linear-gradient(90deg,transparent,#34f5c5,transparent); }
.gutenberg-content blockquote p { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size:clamp(1.2rem,2.4vw,1.6rem); font-weight:500; line-height:1.7; letter-spacing:.01em; color:#fff; text-decoration:none !important; text-wrap:balance; margin-bottom:0; }

/* 全站移除青綠網格背景（2026；想恢復刪這段即可） */
.tc-grid, .tech-grid-bg, .qual-grid { display: none !important; }

/* ic-hero 無精選圖時的漸層 fallback（專業資格/發展歷程/聯絡我們 等改用 ic-hero 但可能沒設圖）*/
.ic-hero.is-plain { min-height: 46vh; }
.ic-hero.is-plain::before { content:""; position:absolute; inset:0; pointer-events:none; z-index:1;
  background:radial-gradient(ellipse 70% 50% at 50% 0%, rgba(52,245,197,0.08), transparent 70%); }
