/* 투에이소프트 — 로컬 리디자인
   색: 기존 브랜드 남색(#183d50)을 축으로, 신호색(호박색) 하나만 더함 */

:root {
  --navy: #183d50;
  --navy-deep: #0f2a38;
  --navy-soft: #24566f;
  --signal: #f0a630;
  --paper: #f3f6f7;
  --white: #ffffff;
  --ink: #1b2a32;
  --text: #40525c;
  --muted: #6b7d87;
  --line: #d8e0e4;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(72px, 10vw, 132px);
  --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd, figure, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ───────── Header ───────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(15, 42, 56, .45);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}

.brand svg { display: block; width: 158px; max-width: 100%; height: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
}

.nav-main {
  display: flex;
  gap: clamp(20px, 3.4vw, 44px);
}
.nav-main a {
  position: relative;
  display: block;
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -.01em;
}
.nav-main a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-main a:hover::after,
.nav-main a.is-current::after { transform: scaleX(1); }
.nav-main a.is-current { color: var(--navy); }

.nav-util {
  display: flex;
  background: var(--navy);
  border-radius: 999px;
  padding: 3px;
}
.nav-util a {
  display: block;
  padding: 6px 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--white);
  border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.nav-util a:hover { background: var(--white); color: var(--navy); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 10px;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px; height: 2px;
  margin-inline: auto;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s, background-color .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ───────── Hero ───────── */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(60% 80% at 78% 50%, var(--navy-soft) 0%, rgba(36, 86, 111, 0) 70%),
    var(--navy);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  min-height: min(calc(100vh - var(--header-h)), 780px);
  padding-block: clamp(56px, 8vw, 96px);
}

.hero h1 {
  font-size: clamp(2.5rem, 6.1vw, 5.1rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.035em;
}
.hero h1 .line { display: block; }
.hero h1 .line:first-child {
  font-weight: 300;
  letter-spacing: -.03em;
  color: rgba(255, 255, 255, .82);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(32px, 5vw, 56px);
}
.hero-links a {
  display: block;
  padding: 15px 26px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.01em;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 6px;
  transition: background-color .2s, color .2s, border-color .2s;
}
.hero-links a:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

/* 세 겹의 방어선 — 사업영역 3개를 고리 위에 올린 그래픽 */
.perimeter {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  justify-self: end;
}
.perimeter svg { width: 100%; height: 100%; overflow: visible; }

.ring {
  fill: none;
  stroke: rgba(255, 255, 255, .34);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.ring-2 { stroke: rgba(255, 255, 255, .26); }
.ring-3 { stroke: rgba(255, 255, 255, .18); }

.core { fill: var(--signal); }
.core-halo { fill: rgba(240, 166, 48, .16); }

.orbit { transform-origin: 260px 260px; }
.orbit circle { fill: var(--signal); }
.orbit-1 { animation: spin 38s linear infinite; }
.orbit-2 { animation: spin 58s linear infinite reverse; }
.orbit-3 { animation: spin 84s linear infinite; }

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 9px 16px;
  font-size: clamp(.78rem, 1.35vw, .95rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
  text-align: center;
  white-space: nowrap;
  color: var(--navy);
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 10px 28px -12px rgba(8, 26, 36, .7);
  transition: background-color .2s, color .2s;
}
.node:hover { background: var(--signal); color: var(--navy-deep); }
.node-1 { left: 66%; top: 40.5%; }
.node-2 { left: 21%; top: 60.5%; }
.node-3 { left: 43%; top: 93.5%; border-radius: 22px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* 페이지 로드 시 한 번만 재생되는 진입 시퀀스 */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line,
  .hero-links,
  .node {
    opacity: 0;
    animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards;
  }
  .hero h1 .line:nth-child(2) { animation-delay: .12s; }
  .hero-links { animation-delay: .32s; }

  .ring { animation: draw 1.5s cubic-bezier(.4, 0, .2, 1) backwards; }
  .ring-2 { animation-delay: .18s; }
  .ring-3 { animation-delay: .36s; }

  .node { animation-name: pop; animation-duration: .5s; }
  .node-1 { animation-delay: .9s; }
  .node-2 { animation-delay: 1.1s; }
  .node-3 { animation-delay: 1.3s; }

  .core, .core-halo { animation: fade .6s .1s backwards; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(.45em); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes fade { from { opacity: 0; } }

/* ───────── Sections ───────── */

.section { padding-block: var(--section-y); }
.business,
.location { background: var(--paper); }

.section-head { margin-bottom: clamp(36px, 5vw, 64px); }

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.035em;
  color: var(--navy);
}
.section-head h2 .en {
  margin-left: .45em;
  font-size: .42em;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
  vertical-align: .35em;
}

.section-intro {
  max-width: 44em;
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.7;
  letter-spacing: -.015em;
  color: var(--ink);
}

.section-head-split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 28px;
}
.section-head-split address {
  font-size: 1.05rem;
  color: var(--ink);
}

/* 스크롤 등장 (JS가 있을 때만 숨김) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ───────── 인사말 ───────── */

.greeting-body {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.portrait img {
  width: 100%;
  border-radius: 4px 4px 96px 4px;
}

.prose { max-width: 40em; }
.prose p + p { margin-top: 1.5em; }
.prose .lead {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -.03em;
  color: var(--ink);
}

/* ───────── 사업영역 ───────── */

.areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--navy);
}

.area {
  padding: clamp(28px, 3.4vw, 44px) clamp(20px, 2.8vw, 40px) 8px;
  border-left: 1px solid var(--line);
}
.area:first-child { border-left: 0; padding-left: 0; }
.area:last-child { padding-right: 0; }

.area img {
  width: 92px;
  margin-left: -6px;
}
.area h3 {
  margin-top: 20px;
  font-size: 1.32rem;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.03em;
  color: var(--navy);
}
.area ul { margin-top: 16px; }
.area li {
  position: relative;
  padding-left: 16px;
  font-size: 1rem;
  line-height: 1.65;
}
.area li + li { margin-top: 10px; }
.area li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 6px; height: 2px;
  background: var(--navy);
}

/* ───────── 회사개요 ───────── */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
}
.fact {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.fact:nth-child(-n + 2) { border-top: 2px solid var(--navy); }
.fact dt {
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
}
.fact dd {
  color: var(--ink);
  letter-spacing: -.01em;
}

/* ───────── 오시는길 ───────── */

.map {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}
.map iframe {
  display: block;
  width: 100%;
  height: clamp(300px, 46vw, 460px);
  border: 0;
}

.map-switch {
  display: none;
  gap: 8px;
  margin-bottom: 14px;
}
.js .map-switch { display: flex; }
.map-btn {
  padding: 10px 20px;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.map-btn:hover { border-color: var(--navy); }
.map-btn[aria-pressed="true"] {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}
.map-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ───────── Data / Notice ───────── */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--navy);
}
.tab {
  padding: 12px 24px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.tab:hover { color: var(--navy); background: var(--paper); }
.tab[aria-selected="true"] { color: var(--white); background: var(--navy); }

.list {
  width: 100%;
  border-collapse: collapse;
  font-size: .98rem;
}
.list th {
  padding: 14px 12px;
  font-weight: 650;
  color: var(--ink);
  text-align: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.list .col-title { width: 100%; text-align: left; }
.list td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.list .empty td,
.empty-box {
  padding: clamp(56px, 8vw, 88px) 16px;
  text-align: center;
  color: var(--muted);
}
.empty-box { border-bottom: 1px solid var(--line); }

/* ───────── Footer ───────── */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .72);
  font-size: .94rem;
}
.footer-inner { padding-block: clamp(44px, 6vw, 72px); }

.footer-brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--white);
}
.footer-brand span {
  margin-left: .4em;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .6);
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 22px;
}
.footer-info div { display: flex; gap: 10px; }
.footer-info dt { font-weight: 700; color: var(--white); }
.footer-info a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .35); }
.footer-info a:hover { color: var(--white); text-decoration-color: var(--signal); }

.copyright {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .8rem;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .5);
}

/* ───────── Responsive ───────── */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .perimeter {
    justify-self: center;
    max-width: 440px;
    margin-bottom: 28px;
  }

  .areas { grid-template-columns: 1fr; }
  .area,
  .area:first-child,
  .area:last-child {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 24px;
    padding: 28px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .area:first-child { border-top: 0; }
  .area img { grid-row: span 2; margin-left: 0; }
  .area h3 { margin-top: 6px; }
  .area ul { grid-column: 2; }

  .facts { grid-template-columns: 1fr; }
  .fact:nth-child(2) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }

  .brand svg { width: 132px; }
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(15, 42, 56, .5);
  }
  .site-nav.is-open { display: flex; }
  .nav-main { flex-direction: column; gap: 0; }
  .nav-main a {
    padding: 14px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-main a::after { display: none; }
  .nav-util { align-self: flex-start; }

  .greeting-body { grid-template-columns: 1fr; }
  .portrait { max-width: 220px; }

  .fact { grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }

  .list .col-author,
  .list .col-hit { display: none; }
  .tab { padding: 11px 16px; }
}

@media (max-width: 480px) {
  .hero-links a { padding: 13px 18px; font-size: .95rem; }
  .node { padding: 7px 12px; }
  .area,
  .area:first-child,
  .area:last-child { grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; }
  .area img { width: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit { animation: none; }
}

/* 404 */
.page-not-found .section-head h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.035em;
  color: var(--navy);
}

.page-not-found .home-link {
  display: inline-block;
  padding: calc(var(--gutter) / 2) var(--gutter);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--white);
  background: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 6px;
  transition: background-color .2s, border-color .2s;
}

.page-not-found .home-link:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

/* 회사개요: 홀수 항목 */
.facts > .fact:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* 오시는길: 본사·지사 */
.location-addresses {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
}
.location-addresses strong {
  display: block;
  color: var(--navy);
}
@media (max-width: 900px) {
  .location-addresses { grid-template-columns: 1fr; }
}
