/* 아산여객 홈페이지 — 한 파일 스타일
   색: 로고의 파랑이 주색, 주황·초록은 정류장 점(그래픽)에만 씁니다(글자색으로 쓰면 대비 부족).
   핵심 장치: '노선 띠' — 홈의 바로가기와 현재 메뉴 표시를 버스 노선도의 선과 정류장으로 그립니다. */

@font-face {
  font-family: "Pretendard Std";
  src: url("/assets/fonts/PretendardStdVariable.woff2") format("woff2-variations"),
       url("/assets/fonts/PretendardStdVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #18212e;
  --ink-2: #48546a;
  --line: #d8e0ea;
  --paper: #ffffff;
  --mist: #f4f7fb;
  --sky: #eaf1fa;
  --blue: #1d5ba8;
  --blue-deep: #12396b;
  --orange: #ee8a1f;
  --green: #6baf3e;

  --step--1: 0.9375rem;  /* 15 */
  --step-0: 1.0625rem;   /* 17 본문 */
  --step-1: 1.25rem;     /* 20 */
  --step-2: 1.5625rem;   /* 25 */
  --step-3: clamp(1.625rem, 1.3rem + 1.2vw, 2rem);      /* 26–32 */
  --step-4: clamp(1.875rem, 1.4rem + 1.9vw, 2.5rem);    /* 30–40 */
  --step-5: clamp(2.125rem, 1.4rem + 3vw, 3.125rem);    /* 34–50 */

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 68px;
  --stop: 28px;       /* 정류장 지름 */
  --rail: 6px;        /* 노선 선 두께 */
}

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

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

body {
  margin: 0;
  font-family: "Pretendard Std", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  word-break: keep-all;          /* 한국어: 낱말 중간에서 줄을 바꾸지 않음 */
  overflow-wrap: anywhere;        /* 긴 주소·URL 은 넘치지 않게 */
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.3; letter-spacing: -0.025em; margin: 0 0 0.6em; font-weight: 750; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
p { margin: 0 0 1em; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ 머리글 */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand__mark { width: 44px; height: 16px; }
.brand__name { font-size: 1.375rem; font-weight: 820; letter-spacing: -0.04em; }
.dot-orange { fill: var(--orange); }
.dot-green { fill: var(--green); }
.dot-blue { fill: var(--blue); }

.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  position: relative; display: block; padding: 10px 14px;
  color: var(--ink); font-weight: 620; text-decoration: none; border-radius: 8px;
}
.site-nav a:hover { background: var(--mist); }
.site-nav a[aria-current="page"] { color: var(--blue); }
/* 현재 메뉴 = 지금 서 있는 정류장 (주황 점) */
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: -9px;
  width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 3px var(--paper);
}

.nav-toggle {
  display: none; width: 44px; height: 44px; margin-right: -8px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  display: block; width: 22px; height: 2px; margin: 0 auto; background: var(--ink);
  border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -24px rgb(18 57 107 / 0.45);
  }
  .site-nav.is-open { display: block; }
  /* 모바일 메뉴는 세로 노선도 */
  .site-nav ul {
    flex-direction: column; gap: 0; position: relative;
    padding: 12px var(--gutter) 20px;
  }
  .site-nav ul::before {
    content: ""; position: absolute; top: 26px; bottom: 34px;
    left: calc(var(--gutter) + 9px); width: 4px; border-radius: 2px; background: var(--blue);
  }
  .site-nav a { padding: 12px 8px 12px 40px; font-size: var(--step-1); border-radius: 0; }
  .site-nav a::before {
    content: ""; position: absolute; left: 2px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
    border-radius: 50%; background: var(--paper); border: 4px solid var(--blue);
  }
  .site-nav a[aria-current="page"]::before { background: var(--orange); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav a:hover { background: transparent; color: var(--blue); }
}

/* ------------------------------------------------------------------ 공통 구역 */

.section { padding: clamp(56px, 7vw, 88px) 0; }
.section--mist { background: var(--mist); }
.section + .section:not(.section--mist):not(.band) { padding-top: 0; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }

.lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.65; max-width: 38em; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 700; text-decoration: none;
  transition: background 0.15s ease;
}
.button:hover { background: var(--blue-deep); }
.button--ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.button--ghost:hover { background: var(--sky); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.page-head { background: var(--sky); padding: clamp(40px, 6vw, 64px) 0 clamp(32px, 4vw, 44px); }
.page-head__title { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; margin: 0 0 8px; }
.page-head__lead { margin: 0; color: var(--ink-2); font-size: var(--step-1); max-width: 40em; }

.prose { max-width: 42em; }
.prose h2 { font-size: var(--step-2); margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li + li { margin-top: 0.35em; }
.prose > :first-child { margin-top: 0; }

.note {
  margin: 24px 0; padding: 18px 22px; border-radius: 10px;
  background: var(--sky); border-left: 5px solid var(--blue);
}
.note > :last-child { margin-bottom: 0; }

/* 정의 목록 (회사 정보 등) */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.facts > div { display: contents; }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; }

/* 왼쪽 제목 + 오른쪽 내용 줄 (카드 대신) */
.info-block { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 12px 40px; padding: 36px 0; border-top: 1px solid var(--line); }
.info-block:last-child { border-bottom: 1px solid var(--line); }
.info-block h2 { font-size: var(--step-2); margin: 0; }
.info-block > div > :last-child { margin-bottom: 0; }
@media (max-width: 719px) { .info-block { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
.table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table thead th { border-bottom: 2px solid var(--ink); white-space: nowrap; }

/* ------------------------------------------------------------------ 사진 자리 (노선도 포스터) */

.ph {
  position: relative; margin: 0; overflow: hidden; border-radius: 20px;
  aspect-ratio: 4 / 3; background: var(--blue-deep) url("/assets/img/route-map.svg") center / cover no-repeat;
}
.ph--wide { aspect-ratio: 16 / 9; }
.ph--tall { aspect-ratio: 4 / 5; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ 홈: 첫 화면 */

.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 72px); }
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__title { font-size: var(--step-5); font-weight: 820; line-height: 1.22; letter-spacing: -0.045em; margin: 0 0 20px; }
.hero__lead { font-size: var(--step-1); color: var(--ink-2); max-width: 30em; margin: 0; }
@media (max-width: 859px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero .ph { aspect-ratio: 16 / 9; }
}

/* 노선 띠: 자주 찾는 안내 4곳을 정류장으로 */
.route { margin-top: clamp(40px, 6vw, 64px); }
.route__stops { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; }
.route__stops::before {
  content: ""; position: absolute; left: 0; right: 0;
  top: calc((var(--stop) - var(--rail)) / 2); height: var(--rail); border-radius: var(--rail);
  background: var(--blue); transform-origin: left center;
  animation: rail-draw 0.9s cubic-bezier(0.6, 0, 0.2, 1) both;
}
.route__stop a {
  position: relative; display: block; height: 100%;
  padding: calc(var(--stop) + 16px) 20px 8px 0;
  color: var(--ink); text-decoration: none;
}
.route__stop a::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: var(--stop); height: var(--stop); border-radius: 50%;
  background: var(--paper); border: var(--rail) solid var(--blue);
  transition: background 0.15s ease, transform 0.15s ease;
  animation: stop-in 0.35s ease-out both;
}
.route__stop:nth-child(1) a::before { animation-delay: 0.35s; }
.route__stop:nth-child(2) a::before { animation-delay: 0.5s; }
.route__stop:nth-child(3) a::before { animation-delay: 0.65s; }
.route__stop:nth-child(4) a::before { animation-delay: 0.8s; }
.route__stop a:hover::before, .route__stop a:focus-visible::before { background: var(--orange); transform: scale(1.12); }
.route__stop a:focus-visible { outline-offset: 6px; }
.route__name { display: block; font-size: var(--step-2); font-weight: 760; letter-spacing: -0.03em; line-height: 1.3; }
.route__stop a:hover .route__name { color: var(--blue); }
.route__desc { display: block; margin-top: 6px; color: var(--ink-2); font-size: var(--step--1); line-height: 1.6; max-width: 17em; }

@media (max-width: 859px) {
  .route__stops { grid-template-columns: 1fr; }
  .route__stops::before {
    left: calc((var(--stop) - var(--rail)) / 2); right: auto; top: 8px; bottom: 28px;
    width: var(--rail); height: auto; transform-origin: center top;
    animation-name: rail-draw-v;
  }
  .route__stop a { padding: 0 0 26px calc(var(--stop) + 18px); }
  .route__stop:last-child a { padding-bottom: 0; }
}

@keyframes rail-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rail-draw-v { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes stop-in { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ------------------------------------------------------------------ 홈: 공지 · 소개 · 채용 띠 */

.home-notice { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 16px 48px; align-items: start; }
.home-notice .section-head { flex-direction: column; align-items: flex-start; }
@media (max-width: 759px) { .home-notice { grid-template-columns: 1fr; } }

.notice-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.notice-list a { display: flex; gap: 20px; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.notice-list time { flex: none; width: 6.4em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.notice-list a:hover span { color: var(--blue); text-decoration: underline; }
.notice-list__empty { padding: 16px 4px; border-top: 2px solid var(--ink); color: var(--ink-2); }

.intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.intro .facts { margin-top: 24px; }
/* 두 번째 포스터는 노선도의 다른 부분을 보여 줌 */
.intro .ph { background-size: 175%; background-position: 85% 75%; }
@media (max-width: 859px) { .intro { grid-template-columns: 1fr; } }

.band { background: var(--blue); color: #fff; padding: clamp(36px, 5vw, 52px) 0; }
.band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.band h2 { margin: 0 0 4px; font-size: var(--step-2); }
.band p { margin: 0; color: rgb(255 255 255 / 0.82); }
.band .button { background: #fff; color: var(--blue); }
.band .button:hover { background: var(--sky); }
.band :focus-visible { outline-color: #fff; }

/* ------------------------------------------------------------------ 노선 안내: BIS 링크 */

.link-panels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 0 0 8px; padding: 0; list-style: none; }
.link-panel a {
  position: relative; display: block; height: 100%;
  padding: 28px 28px 28px 72px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.link-panel a::before {
  content: ""; position: absolute; left: 28px; top: 32px; width: 22px; height: 22px; border-radius: 50%;
  border: 5px solid var(--blue); background: var(--paper);
}
.link-panel a:hover { border-color: var(--blue); }
.link-panel a:hover::before { background: var(--orange); }
.link-panel strong { display: block; font-size: var(--step-1); margin-bottom: 4px; }
.link-panel span { color: var(--ink-2); font-size: var(--step--1); }
@media (max-width: 719px) { .link-panels { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ 공지사항 */

.notices { border-top: 2px solid var(--ink); }
.notice { border-bottom: 1px solid var(--line); }
.notice summary {
  display: flex; gap: 20px; align-items: baseline; padding: 18px 44px 18px 4px;
  position: relative; cursor: pointer; list-style: none;
}
.notice summary::-webkit-details-marker { display: none; }
.notice summary::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.notice[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.notice summary time { flex: none; width: 6.4em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.notice__title { font-weight: 650; }
.notice summary:hover .notice__title { color: var(--blue); }
.notice__body { padding: 0 4px 28px calc(6.4em + 24px); max-width: calc(42em + 6.4em); }
.notice__body > :last-child { margin-bottom: 0; }
.notice:target summary { background: var(--sky); }
@media (max-width: 599px) {
  .notice summary { flex-direction: column; gap: 2px; }
  .notice__body { padding-left: 4px; }
}

/* 자주 묻는 질문: 날짜 칸이 없는 펼침 목록 */
.faq summary { padding-left: 4px; }
.faq .notice__body { padding-left: 4px; }

.section-gap { margin-top: 40px; }

/* ------------------------------------------------------------------ 연혁 (실제 순서가 있는 내용이라 노선 띠 사용) */

.timeline { position: relative; list-style: none; margin: 0; padding: 0; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: var(--blue); }
.timeline li { position: relative; padding: 0 0 22px 44px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 5px solid var(--blue);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline time { display: block; font-weight: 750; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ 바닥글 */

.site-footer { background: var(--blue-deep); color: rgb(255 255 255 / 0.86); font-size: var(--step--1); }
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; padding-top: 48px; padding-bottom: 32px; }
.site-footer__name { margin: 0 0 14px; color: #fff; font-size: var(--step-1); font-weight: 760; }
.facts--footer { gap: 4px 20px; }
.facts--footer dt { color: rgb(255 255 255 / 0.66); font-weight: 500; }
.site-footer__links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__links .is-strong { font-weight: 800; }
.site-footer__bottom { padding-bottom: 28px; }
.site-footer__bottom p { margin: 0; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.16); color: rgb(255 255 255 / 0.66); }
@media (max-width: 719px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ 404 */

.not-found { padding: clamp(56px, 9vw, 120px) 0; }
.not-found h1 { font-size: var(--step-4); }

/* ------------------------------------------------------------------ ?todo : 채울 자리 표시 (주소 끝에 ?todo) */

.show-todo [data-todo] { outline: 2px dashed var(--orange); outline-offset: 3px; position: relative; }
.show-todo [data-todo]::after {
  content: attr(data-todo) "  " attr(data-spec);
  position: absolute; left: 0; top: 0; z-index: 5; max-width: 100%;
  padding: 4px 8px; border-radius: 0 0 6px 0;
  background: var(--orange); color: #1b1200; font-size: 12px; font-weight: 700; line-height: 1.4;
  white-space: normal; animation: none;
}
.show-todo .site-nav a[data-todo]::after { display: block; }

/* ------------------------------------------------------------------ 움직임 줄이기 · 인쇄 */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer__links, .nav-toggle, .skip, .band { display: none; }
  .site-footer { background: none; color: var(--ink); }
  .site-footer a, .site-footer__name { color: var(--ink); }
  .page-head { background: none; padding: 0 0 16px; }
  a { color: inherit; }
}
