/* =========================================================
   MCHub — sub-page components
   ========================================================= */

/* page hero (compact) */
.page-hero { padding-top: calc(var(--nav-h) + clamp(54px, 8vw, 110px)); padding-bottom: clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }

/* page-hero titles are ALWAYS visible (no opacity gating); entrance is transform-only
   so content never gets stuck hidden even if animations are throttled/paused. */
.ph-in { animation: phUp .8s var(--ease-spring) both; }
.ph-in.ph-d1 { animation-delay: .07s; }
.ph-in.ph-d2 { animation-delay: .14s; }
@keyframes phUp { from { transform: translateY(16px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ph-in { animation: none; } }

.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero .display { font-size: clamp(36px, 5vw, 64px); }
.page-hero .lead { margin-top: 22px; max-width: 52ch; }
.page-hero .hero-aurora { opacity: .45; }

/* breadcrumb */
.crumb { display: flex; gap: 10px; align-items: center; font-size: 12.5px; letter-spacing: .03em; color: var(--ink-faint); margin-bottom: 26px; }
.crumb a:hover { color: var(--ink); }
.crumb .sep { opacity: .45; font-size: 11px; }

/* ---- service detail rows ---- */
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; padding-block: clamp(40px, 6vw, 88px); }
.svc-row + .svc-row { border-top: 1px solid var(--line); }
.svc-row .visual { position: relative; aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-alt); box-shadow: var(--shadow-sm); }
.svc-row .visual canvas { width: 100%; height: 100%; display: block; }
.svc-row:nth-child(even) .copy { order: 2; }
.svc-row .num { font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--ink-faint); }
.svc-row .en { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.svc-row h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 12px 0 16px; letter-spacing: -.02em; }
.svc-row p { color: var(--ink-soft); margin: 0 0 18px; }
.svc-row .feat { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 12px; }
.svc-row .feat li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.svc-row .feat .ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 12px; margin-top: 1px; }
@media (max-width: 800px){
  .svc-row { grid-template-columns: 1fr; gap: 24px; }
  .svc-row:nth-child(even) .copy { order: 0; }
  .svc-row .visual { order: -1; }
}

/* ---- service thumbnails (designed, no photos) ---- */
.svc-art {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 8% 9%;
  overflow: hidden; font-family: var(--font);
  background:
    radial-gradient(120% 130% at 82% 4%, rgba(123,63,242,.13), transparent 52%),
    radial-gradient(120% 130% at 4% 100%, rgba(33,200,214,.16), transparent 52%),
    linear-gradient(158deg, #f3f6ff 0%, #eceffb 100%);
}
.svc-art .sa-blob {
  position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%;
  filter: blur(34px); opacity: .55; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(43,107,255,.5), transparent 66%);
}
.svc-art--web .sa-blob { top: -16%; right: -8%; }
.svc-art--sns .sa-blob { bottom: -18%; left: -10%; background: radial-gradient(circle at 50% 50%, rgba(255,93,143,.42), transparent 66%); }
.svc-art--it  .sa-blob { top: -14%; left: -8%; background: radial-gradient(circle at 50% 50%, rgba(33,200,214,.5), transparent 66%); }

.sa-card {
  position: relative; z-index: 2;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 16px;
  box-shadow: 0 26px 50px -26px rgba(20,30,80,.42), inset 0 1px 0 rgba(255,255,255,.7);
}
.svc-art .sa-top { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid rgba(15,23,42,.06); }
.svc-art .sa-top i { width: 9px; height: 9px; border-radius: 50%; background: #e0e3ec; flex: none; }
.svc-art .sa-url {
  margin-left: auto; font-family: var(--font-en); font-size: 10px; font-weight: 600; letter-spacing: .04em;
  color: #9aa1b4; background: rgba(15,23,42,.045); padding: 4px 11px; border-radius: 999px;
}

/* floating accents */
@keyframes saFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.svc-art .sa-tag, .svc-art .sa-heart, .svc-art .sa-spark { will-change: transform; }

/* ---- 01 WEB : browser mock ---- */
.sa-browser { width: 82%; }
.sa-browser .sa-win { padding: 14px; display: grid; gap: 11px; }
.sa-hero {
  height: 70px; border-radius: 11px; padding: 14px; display: flex; flex-direction: column; gap: 8px; justify-content: center;
  background: linear-gradient(118deg, #2b6bff, #7b3ff2 58%, #21c8d6); position: relative; overflow: hidden;
}
.sa-hero .sa-h1 { width: 60%; height: 9px; border-radius: 5px; background: rgba(255,255,255,.95); }
.sa-hero .sa-h2 { width: 40%; height: 6px; border-radius: 5px; background: rgba(255,255,255,.6); }
.sa-hero .sa-cta { width: 38px; height: 14px; border-radius: 6px; background: #fff; margin-top: 4px; }
.sa-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.sa-cols b { height: 30px; border-radius: 8px; background: #eef1f8; }
.sa-cols b:nth-child(2) { background: #e7ebf6; }
.sa-rows { display: grid; gap: 6px; }
.sa-rows span { height: 6px; border-radius: 4px; background: #e9ecf4; }
.sa-rows span:last-child { width: 66%; }
.svc-art .sa-tag {
  position: absolute; z-index: 3; bottom: 11%; right: 7%; white-space: nowrap;
  font-size: 11px; font-weight: 700; color: #fff; padding: 7px 13px; border-radius: 999px;
  background: linear-gradient(118deg, #2b6bff, #7b3ff2); box-shadow: 0 12px 24px -8px rgba(43,107,255,.7);
  animation: saFloat 4.6s ease-in-out infinite;
}

/* ---- 02 SNS : phone feed + growth ---- */
.sa-phone { width: 47%; padding: 13px; display: grid; gap: 10px; transform: translateX(-16%) rotate(-4deg); }
.sa-post { display: flex; align-items: center; gap: 9px; }
.sa-av { width: 24px; height: 24px; border-radius: 50%; flex: none; background: linear-gradient(125deg, #7b3ff2, #2b6bff); }
.sa-name { display: grid; gap: 5px; }
.sa-name b { width: 50px; height: 7px; border-radius: 4px; background: #e3e7f0; display: block; }
.sa-name i { width: 32px; height: 5px; border-radius: 4px; background: #eef1f7; display: block; }
.sa-media { height: 70px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, #c9d6f7, #e6d4fb); }
.sa-play { width: 0; height: 0; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.2)); }
.sa-acts { display: flex; gap: 8px; }
.sa-acts span { width: 17px; height: 17px; border-radius: 6px; background: #eef1f7; }
.sa-acts .like { background: linear-gradient(125deg, #ff5d8f, #7b3ff2); }
.sa-graph { position: absolute; z-index: 3; right: 7%; bottom: 12%; width: 52%; padding: 13px 14px 11px; display: grid; gap: 8px; }
.sa-graph svg { width: 100%; height: 46px; display: block; }
.sa-glbl { font-size: 10px; font-weight: 600; color: var(--ink-soft); display: grid; }
.sa-glbl b { font-family: var(--font-en); font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin-top: 3px; }
.sa-glbl small { font-size: 11px; font-weight: 700; margin-left: 2px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sa-heart {
  position: absolute; z-index: 4; top: 15%; left: 11%; font-size: 21px; color: #ff5d8f;
  filter: drop-shadow(0 8px 14px rgba(255,93,143,.5)); animation: saFloat 3.9s ease-in-out infinite;
}

/* ---- 03 IT : terminal + automation ---- */
.sa-term { width: 82%; overflow: hidden; }
.sa-term .sa-top { background: #0e1530; border-bottom: 1px solid rgba(255,255,255,.08); }
.sa-term .sa-top i { background: rgba(255,255,255,.28); }
.sa-term .sa-url { color: #8ea0d6; background: rgba(255,255,255,.08); }
.sa-code { background: #0b1228; padding: 15px 16px; display: grid; gap: 9px; }
.sa-code .ln {
  display: flex; align-items: center; gap: 7px; color: #d2dcf6;
  font-family: var(--font-en), var(--font); font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
}
.sa-code em { color: #6f8bff; font-style: normal; font-weight: 700; }
.sa-code .ok { color: #4fe0b6; }
.sa-code .cur { width: 7px; height: 13px; border-radius: 1px; background: #21c8d6; display: inline-block; animation: saBlink 1.05s steps(2, jump-none) infinite; }
@keyframes saBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.sa-spark {
  position: absolute; z-index: 3; top: 6%; right: 6%; white-space: nowrap; font-size: 11px; font-weight: 700; color: #fff;
  padding: 6px 12px; border-radius: 999px; background: linear-gradient(118deg, #21c8d6, #2b6bff);
  box-shadow: 0 12px 22px -8px rgba(33,200,214,.7); animation: saFloat 4.2s ease-in-out infinite;
}
.sa-gear {
  position: absolute; z-index: 3; bottom: 11%; left: 9%; font-size: 30px; line-height: 1;
  color: rgba(43,107,255,.5); animation: saSpin 9s linear infinite;
}
@keyframes saSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .sa-tag, .sa-heart, .sa-spark, .sa-gear, .sa-code .cur { animation: none !important; }
}
@media (max-width: 560px) {
  .svc-art { padding: 7% 7%; }
  .sa-browser { width: 90%; }
  .sa-term { width: 90%; }
  .sa-code { padding: 13px 14px; gap: 8px; }
  .sa-code .ln { font-size: 11px; }
  .sa-gear { font-size: 24px; bottom: 8%; left: 7%; }
  .sa-spark { top: 7%; right: 7%; }
  /* SNS: center the phone and keep the graph fully inside */
  .sa-phone { width: 52%; transform: translateX(-9%) rotate(-4deg); }
  .sa-graph { width: 55%; right: 6%; bottom: 10%; padding: 11px 12px 9px; }
  .sa-glbl b { font-size: 17px; }
  .sa-heart { top: 12%; left: 9%; font-size: 19px; }
  .sa-tag { bottom: 9%; right: 6%; font-size: 10.5px; padding: 6px 11px; }
}

/* ---- works full grid + filter ---- */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px,4vw,44px); }
.filter button { font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--bg); padding: 8px 17px; border-radius: var(--r-pill); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .25s var(--ease-spring), box-shadow .25s; }
.filter button:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.filter button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 14px -6px rgba(15,23,42,.4); }
/* phones: filters become one swipeable row */
@media (max-width: 640px){
  .filter { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); padding-bottom: 6px; }
  .filter::-webkit-scrollbar { display: none; }
  .filter button { flex: none; }
}
.works-grid.full { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px){ .works-grid.full { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .works-grid.full { grid-template-columns: 1fr; } }
.work.hide { display: none; }

/* news page: with category tag column + filtering */
.news-list.news-filterable .news-item { grid-template-columns: 112px 96px 1fr auto; }
.news-list.news-filterable .news-item .tag { justify-self: start; white-space: nowrap; }
.news-item.hide { display: none; }
@media (max-width: 680px){
  .news-list.news-filterable .news-item { grid-template-columns: 1fr auto; }
  .news-list.news-filterable .news-item .tag { grid-row: 1; grid-column: 1; }
  .news-list.news-filterable .news-item .date { grid-row: 1; grid-column: 2; justify-self: end; }
  .news-list.news-filterable .news-item .ttl { grid-column: 1 / -1; grid-row: 2; }
  .news-list.news-filterable .news-item .ar { display: none; }
}

/* ---- news article (detail) ---- */
.article { max-width: 760px; margin: 0 auto; }
.article-back { display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: color .2s; }
.article-back .ar { transition: transform .3s var(--ease-spring); }
.article-back:hover { color: var(--accent); }
.article-back:hover .ar { transform: translateX(-4px); }
.article-back.bottom { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); width: 100%; }
.article-head { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.article-head .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent); white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 4px 12px; }
.article-head .date { font-family: var(--font-en); font-size: 13px; font-weight: 500; color: var(--ink-faint); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.article-title { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 14px 0 0; }
.article-body { margin-top: 26px; color: var(--ink); font-size: 16px; line-height: 1.95; }
.article-body p { margin: 0 0 1.3em; }
.article-body p:last-child { margin-bottom: 0; }

/* ---- works detail ---- */
.wk-article { max-width: 1000px; margin: 0 auto; }
.wk-hero { margin-top: 22px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.wk-shot { aspect-ratio: 16/9; background: var(--bg-alt); position: relative; }
.wk-shot canvas, .wk-shot img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
.wk-shot img { position: absolute; inset: 0; }
.wk-grid { display: grid; grid-template-columns: 1fr 300px; gap: clamp(28px,4vw,56px); margin-top: clamp(28px,4vw,44px); align-items: start; }
.wk-main .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent); white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 4px 12px; }
.wk-title { font-size: clamp(26px,3.6vw,42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 16px 0 0; }
.wk-summary { font-size: clamp(17px,1.7vw,20px); color: var(--ink); font-weight: 600; line-height: 1.7; margin: 16px 0 0; }
.wk-body { margin-top: 22px; color: var(--ink-soft); font-size: 16px; line-height: 1.95; }
.wk-body p { margin: 0 0 1.3em; }
.wk-body p:last-child { margin-bottom: 0; }
.wk-main .btn { margin-top: 28px; }
.wk-side { position: sticky; top: calc(var(--nav-h) + 20px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px,2.4vw,28px); background: var(--bg); box-shadow: var(--shadow-sm); }
.wk-facts { margin: 0; }
.wk-facts > div { padding: 14px 0; border-top: 1px solid var(--line); }
.wk-facts > div:first-child { padding-top: 0; border-top: 0; }
.wk-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 6px; }
.wk-facts dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.wk-serv { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wk-serv li { font-size: 14px; font-weight: 600; color: var(--ink); padding-left: 18px; position: relative; }
.wk-serv li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.wk-side-cta { margin-top: 18px; }
.wk-side-cta .btn { width: 100%; justify-content: center; }
@media (max-width: 800px){
  .wk-grid { grid-template-columns: 1fr; gap: 28px; }
  .wk-side { position: static; }
}

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px){ .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field label .req { color: var(--accent); margin-left: 4px; font-size: 12px; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 13px 15px;
  transition: border-color .2s, box-shadow .2s, background .2s; width: 100%;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: #b9bcc6; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,108,255,.12); }
.field.row2 { grid-template-columns: 1fr 1fr; gap: 16px; display: grid; }
@media (max-width: 560px){ .field.row2 { grid-template-columns: 1fr; } }
.field .err { color: #d4183a; font-size: 13px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #d4183a; }
.field.invalid .err { display: block; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form-note { font-size: 13px; color: var(--ink-faint); }
.form-success { display: none; padding: 28px; border-radius: var(--r-md); background: var(--bg-alt); text-align: center; }
.form-success.show { display: block; }
.form-success .ck { width: 56px; height: 56px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; font-size: 26px; }

.info-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px,3vw,34px); background: var(--bg); box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.info-card + .info-card { margin-top: 18px; }
.info-card h3 { font-size: 18px; margin-bottom: 14px; }
.info-row { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.info-row:first-of-type { border-top: 0; }
.info-row .k { color: var(--ink-faint); width: 104px; flex: none; white-space: nowrap; }
.info-row .v { color: var(--ink); font-weight: 500; flex: 1; min-width: 0; }
.contact-cta-list { display: grid; gap: 12px; margin-top: 8px; }
.contact-pill { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--r-md);
  background: var(--bg-alt); transition: transform .35s var(--ease-spring), background .2s; }
.contact-pill:hover { transform: translateX(4px); background: #ececf0; }
.contact-pill .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; flex: none; }
.contact-pill .ic svg { width: 20px; height: 20px; }
.contact-pill .t { font-weight: 600; font-size: 15px; }
.contact-pill .s { font-size: 13px; color: var(--ink-faint); }

/* ============ mobile refinements (pages) ============ */
@media (max-width: 640px){
  .page-hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 30px; }
  .page-hero .display { font-size: clamp(30px, 8.6vw, 38px); }
  .page-hero .lead { font-size: 15px; }
  .crumb { font-size: 12px; margin-bottom: 16px; }
  .svc-row { padding-block: 36px; }
  .svc-row h2 { font-size: 24px; }
  .svc-row .feat li { font-size: 14px; }
  .wk-title { font-size: 26px; }
  .wk-summary { font-size: 16px; }
  .wk-hero { border-radius: var(--r-md); }
  .wk-side { padding: 20px; }
  .article-title { font-size: 24px; }
  .article-body { font-size: 15px; line-height: 1.9; }
  .form-foot { flex-direction: column; align-items: stretch; }
  .form-foot .btn { width: 100%; justify-content: center; }
  .form-note { text-align: center; }
  .info-card { padding: 20px; }
  .info-row { flex-direction: column; gap: 2px; padding: 10px 0; }
  .info-row .k { width: auto; font-size: 12px; }
}
