/* Vivity AI — shared styles. Page layout is written inline in each page so it can be edited in place. */
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F5F5F2; }
img { max-width: 100%; }
a { color: #12161C; }
a:hover { color: #C2410C; }
a:focus-visible, button:focus-visible { outline: 2px solid #C2410C; outline-offset: 3px; }
[hidden] { display: none !important; }
/* On phones the nav wraps to several rows; don't let it stick and cover the page */
@media (max-width: 640px) { body > div > header, body > main > header { position: static !important; } }
/* Case-study filter chips: ease the colour swap (card motion lives in assets/cases.js) */
.chip { transition: background-color .28s cubic-bezier(0.22, 1, 0.36, 1), color .28s cubic-bezier(0.22, 1, 0.36, 1); }
.chip:hover { border-color: #C2410C !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .chip { transition: none; } }

/* ---------- Home hero: live shipyard twin behind an overlaid title (markup in index.html, script in assets/hero/) ---------- */
.hero { --h: clamp(560px, calc(100svh - 75px), 860px); position: relative; height: var(--h); background: #0E1A33; color: #FFFFFF; overflow: hidden; }
.hero-copy { position: relative; z-index: 3; max-width: 1200px; margin: 0 auto; padding: clamp(40px, 9vh, 104px) clamp(16px, 4vw, 32px) 0; box-sizing: border-box; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.hero-scene { --sh: var(--h); position: absolute; inset: 0; }
.hero-scene::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 26, 51, 0.92) 0%, rgba(14, 26, 51, 0.7) 28%, rgba(14, 26, 51, 0) 56%), linear-gradient(rgba(14, 26, 51, 0.55), rgba(14, 26, 51, 0) 28%); }
.hero-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max(100%, calc(var(--sh) * 2400 / 1100)); aspect-ratio: 2400 / 1100; }
.hero-box img, .tw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tw-canvas { opacity: 0; transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.hero-box.is-live .tw-canvas { opacity: 1; }
.tw-tag { --c: #1E9BD7; position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; transform: translate(-6px, -50%); white-space: nowrap; pointer-events: none; animation: twIn .9s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0s); }
.tw-tag.l { flex-direction: row-reverse; transform: translate(calc(-100% + 6px), -50%); }
.tw-tag.off { visibility: hidden; }
.tw-tag i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 0 3px var(--c), 0 0 0 8px rgba(255, 255, 255, 0.16); }
.tw-tag span { background: #FFFFFF; color: #14203D; font-size: 13px; font-weight: 600; line-height: 1.3; padding: 8px 12px; border-radius: 6px; border-left: 4px solid var(--c); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28); }
.tw-tag b { font: 800 10px/1 Inter, system-ui, sans-serif; letter-spacing: 0.02em; color: #FFFFFF; background: var(--c); border-radius: 8px; padding: 3px 7px; margin-right: 8px; vertical-align: 1px; }
@keyframes twIn { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 760px) {
  .hero { height: auto; }
  .hero-copy { padding-top: 48px; }
  .hero-scene { --sh: clamp(220px, 62vw, 420px); position: relative; height: var(--sh); margin-top: 28px; }
  .hero-scene::after { background: linear-gradient(#0E1A33, rgba(14, 26, 51, 0) 25%); }
  .tw-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tw-tag { animation: none; } .tw-canvas { transition: none; } }

/* ---------- Home: hero labels link to their case studies ---------- */
a.tw-tag { pointer-events: auto; text-decoration: none; color: inherit; }
a.tw-tag span { transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .3s cubic-bezier(0.22, 1, 0.36, 1); }
a.tw-tag:hover span, a.tw-tag:focus-visible span { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36); }
a.tw-tag:focus-visible { outline: none; }
a.tw-tag:focus-visible span { outline: 2px solid #F2895A; outline-offset: 2px; }

/* ---------- Home: case slideshow — all case studies, slides one card at a time (script in assets/home-cases.js) ---------- */
.cs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cs-nav { display: flex; align-items: center; gap: 8px; }
.cs-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #12161C; background: #FFFFFF; color: #12161C; font: 600 18px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: background-color .25s cubic-bezier(0.22, 1, 0.36, 1), color .25s cubic-bezier(0.22, 1, 0.36, 1); }
.cs-nav button:hover { background: #12161C; color: #FFFFFF; }
.cs-nav a { margin-left: 12px; font-size: 15px; font-weight: 600; padding: 10px 0; }
.cs-view { overflow: hidden; margin-top: 36px; }
.cs-track { --per: 4; --gap: 16px; display: flex; gap: var(--gap); transition: transform .55s cubic-bezier(0.65, 0, 0.35, 1); will-change: transform; }
.cs-card { position: relative; cursor: pointer; transition: border-color .25s ease, box-shadow .25s ease; flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); box-sizing: border-box; border: 1px solid #DADDE1; background: #FFFFFF; display: flex; flex-direction: column; }
.cs-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid #DADDE1; }
.cs-card > div { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cs-card .meta { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #4B5563; }
.cs-card h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.45; flex: 1; }
.cs-card h3 a { text-decoration: none; }
.cs-card h3 a::after { content: ""; position: absolute; inset: 0; }   /* whole card clicks through to the case study */
.cs-card:hover { border-color: #12161C; box-shadow: 0 8px 24px rgba(18, 22, 28, 0.10); }
.cs-card:hover h3 a { color: #C2410C; }
.cs-card:focus-within { outline: 2px solid #C2410C; outline-offset: 2px; }
.cs-card .roi { font-size: 18px; font-weight: 700; line-height: 1.3; color: #C2410C; margin-top: 6px; }
@media (max-width: 1100px) { .cs-track { --per: 3; } }
@media (max-width: 820px) { .cs-track { --per: 2; } }
@media (max-width: 520px) { .cs-track { --per: 1.25; --gap: 12px; } .cs-nav a { margin-left: 4px; } }
@media (prefers-reduced-motion: reduce) { .cs-track { transition: none; } }

/* ---------- 자료 받기 / Get materials: pop-up (assets/download.js) and the /resources/ page; posts to /download.php ---------- */
.dlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 8px; background: #FFFFFF; color: #12161C; box-shadow: 0 24px 64px rgba(14, 26, 51, 0.32); overflow: auto; }
.dlg::backdrop { background: rgba(14, 26, 51, 0.55); }
.dlg .dlg-form { padding: 28px clamp(20px, 4vw, 32px) 24px; }
html[lang="ko"] .dlg { font-family: 'Noto Sans KR', system-ui, sans-serif; word-break: keep-all; }
html[lang="en"] .dlg { font-family: 'Inter', system-ui, sans-serif; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dlg-head h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.dlg-x { flex: none; width: 40px; height: 40px; margin-right: -8px; border: 0; background: none; font-size: 28px; line-height: 1; color: #4B5563; cursor: pointer; border-radius: 50%; }
.dlg-x:hover { background: #F5F5F2; color: #12161C; }
.dlg-steps { display: flex; gap: 6px; list-style: none; margin: 18px 0 0; padding: 0; counter-reset: s; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #9AA1AB; }
.dlg-steps li { flex: 1; padding-top: 8px; border-top: 3px solid #DADDE1; }
.dlg-steps li::before { counter-increment: s; content: counter(s) " "; }
.dlg-steps li.past { color: #4B5563; border-color: #12161C; }
.dlg-steps li.on { color: #C2410C; border-color: #C2410C; font-weight: 500; }
.dlg-lead { margin: 20px 0 0; font-size: 15px; line-height: 1.7; color: #4B5563; }
.dlg-email { display: block; margin-top: 20px; }
.dlg-email span, .dlg-pick { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.dlg-pick { margin: 28px 0 0; }
.dlg-email input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid #9AA1AB; border-radius: 4px; background: #FFFFFF; color: #12161C; }
.dlg-email input:focus { outline: 2px solid #C2410C; outline-offset: 1px; border-color: #C2410C; }
.dlg-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; line-height: 1.6; cursor: pointer; }
.dlg-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #C2410C; }
.dlg-check small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.6; color: #4B5563; }
.dlg-check a, .dlg-talk a { color: #C2410C; font-weight: 600; }
.dlg-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.dlg-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.dl-page .dlg-docs { margin-top: 8px; }
.dlg-doc { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid #DADDE1; border-radius: 6px; cursor: pointer; background: #FFFFFF; transition: border-color .2s ease, box-shadow .2s ease; }
.dlg-doc:has(input:checked) { border-color: #C2410C; box-shadow: 0 0 0 1px #C2410C; }
.dlg-doc input { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; margin: 0; accent-color: #C2410C; }
.dlg-doc img { display: block; width: 72%; max-width: 140px; height: auto; border: 1px solid #DADDE1; box-shadow: 0 4px 12px rgba(18, 22, 28, 0.10); }
.dlg-doc b, .dlg-files b { display: block; font-size: 15px; line-height: 1.4; }
.dlg-doc small, .dlg-files small { display: block; margin-top: 2px; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: #4B5563; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dlg-primary, .dlg-secondary { font: inherit; font-size: 15px; font-weight: 600; padding: 12px 22px; border-radius: 4px; cursor: pointer; text-decoration: none; text-align: center; transition: background-color .25s cubic-bezier(0.22, 1, 0.36, 1); }
.dlg-primary { border: 0; background: #12161C; color: #FFFFFF; }
.dlg-primary:hover { background: #C2410C; color: #FFFFFF; }
.dlg-primary:disabled { opacity: 0.6; cursor: progress; }
.dlg-secondary { border: 1px solid #DADDE1; background: #FFFFFF; color: #12161C; }
.dlg-secondary:hover { border-color: #12161C; }
.dlg-done { margin: 24px 0 0; font-size: 20px; line-height: 1.4; }
.dlg-files { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid #12161C; }
.dlg-files li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #DADDE1; }
.dlg-talk { margin: 24px 0 0; font-size: 14px; color: #4B5563; }
.dlg-status { margin: 12px 0 0; min-height: 1.5em; font-size: 14px; line-height: 1.5; color: #4B5563; }
.dlg-status.bad { color: #B91C1C; }
.dl-page { margin-top: 32px; }
@media (max-width: 420px) { .dlg-docs { grid-template-columns: 1fr; } .dlg-doc { flex-direction: row; align-items: center; } .dlg-doc img { width: 64px; } }
