/* 문경대 생성형 AI 콘텐츠 경진대회 · 문경대학교 누리집 톤 (진한 파랑 #173D96 · 하늘 #4FC6FF · 빨강 포인트 · 둥근 흰 상자) */
:root {
  --blue: #173d96;          /* 문경대학교 대표 파랑 */
  --blue-deep: #0c2a6e;
  --blue-ink: #0b1f4f;
  --sky: #173d96;           /* 흰 바탕 위 강조 글자 (대비 확보) */
  --sky-2: #4fc6ff;         /* 파랑 바탕 위 강조 · 버튼 */
  --sky-bg: #eaf6ff;
  --navy: #173d96;
  --navy-2: #0c2a6e;
  --ink: #1b2440;
  --muted: #4b5670;
  --line: #d6e0f0;
  --card: #ffffff;
  --page: #f2f5fb;
  --red: #cf0000;
  --red-bg: #fdecec;
  --gold: #f5b700;
  --green: #1f8a4c;
  --green-bg: #e5f5ec;
  --warn: #8a5300;
  --warn-bg: #fff4dc;
  --radius: 15px;
  --shadow: 0 4px 18px rgba(12, 42, 110, .10);
  --focus: 0 0 0 3px #4fc6ff, 0 0 0 5px #0b1f4f;
  --title: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
}
h1, h2, .brand b, .tile b, .medal b, .dday b { font-family: var(--title); font-weight: 800; letter-spacing: -.02em; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--sky-2); color: var(--blue-ink); padding: 10px 14px; border-radius: 10px; font-weight: 800; z-index: 99; }
.skip:focus { top: 12px; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: top; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* 머리: 흰 바탕 + 파랑 글자 (대학 누리집 머리 형식) */
.top { position: sticky; top: 0; z-index: 30; background: #fff; color: var(--blue); box-shadow: 0 1px 0 var(--line), 0 4px 14px rgba(12, 42, 110, .08); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--blue); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--blue); }
.brand small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.brand b { display: block; font-size: 17px; line-height: 1.3; color: var(--blue); }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); background: var(--sky-bg); }
.nav a.cta { background: var(--blue); color: #fff; margin-left: 6px; }
.nav a.cta:hover { background: var(--blue-deep); color: #fff; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--blue); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: grid; place-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; background: #fff; padding: 8px 16px 16px; box-shadow: 0 8px 16px rgba(12, 42, 110, .12); }
  .nav.open { display: flex; }
  .nav a.cta { margin-left: 0; }
}
.notice-bar { background: var(--red); color: #fff; font-weight: 700; text-align: center; padding: 10px 16px; font-size: 15px; }
.foot { background: #1f1f2b; color: #c9cbd6; padding: 36px 0 44px; margin-top: 64px; font-size: 14px; text-align: center; }
.foot .wrap { display: grid; gap: 8px; justify-items: center; }
.foot b { color: #fff; }
.foot a { color: #fff; }
.foot .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }

/* 공통 블록 */
.section { padding: 56px 0 8px; }
.section h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 6px; color: var(--blue); display: flex; align-items: center; gap: 10px; }
.section h2 .ic { color: var(--blue); }
.section .lead { color: var(--muted); margin: 0 0 24px; }
.band { background: var(--blue); color: #fff; padding: 52px 0 56px; margin-top: 56px; }
.band .section { padding-top: 0; }
.band h2, .band h2 .ic { color: #fff; }
.band .lead { color: #d5e3ff; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: var(--radius); border: 0; cursor: pointer; font: inherit; font-weight: 800; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-gold { background: var(--sky-2); color: var(--blue-ink); }          /* 주 버튼: 대학 누리집의 하늘색 단추 */
.btn-gold:hover { background: #7ad5ff; }
.btn-navy { background: var(--blue); color: #fff; }
.btn-navy:hover { background: var(--blue-deep); }
.btn-line { background: #fff; color: var(--blue); border: 2px solid var(--line); }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn-red { background: var(--red); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--sky-bg); color: var(--blue); }
.pill.ok { background: var(--green-bg); color: #145c33; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--red-bg); color: #a30000; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--blue-ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 90; font-weight: 600; max-width: calc(100% - 32px); }
.alert { border-radius: 12px; padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert.info { background: var(--sky-bg); }
.alert.warn { background: var(--warn-bg); color: #5c3700; }
.alert.bad { background: var(--red-bg); color: #7a0d0d; }
.alert.ok { background: var(--green-bg); color: #164d2c; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th, table.t td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: #eef3fb; font-weight: 700; color: var(--blue-ink); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 히어로: 직접 그린 문경새재 배경 */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--blue-deep) url("img/hero-bg.svg") center bottom / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 42, 110, .92) 0%, rgba(12, 42, 110, .7) 42%, rgba(12, 42, 110, 0) 72%); }
.hero .wrap { position: relative; padding: 64px 0 150px; min-height: min(640px, 88vh); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { max-width: 9em; font-size: clamp(38px, 6.4vw, 68px); line-height: 1.15; margin: 14px 0 14px; }
.hero h1 em { font-style: normal; color: var(--sky-2); }
.hero p.sub { font-size: 18px; margin: 0 0 22px; color: #eef4ff; max-width: 30em; }
.hero .kicker { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.dday { display: flex; gap: 10px; margin: 0 0 24px; flex-wrap: wrap; }
.dday div { background: #fff; color: var(--blue); border-radius: 14px; padding: 10px 14px; min-width: 76px; text-align: center; }
.dday b { display: block; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dday span { font-size: 12px; color: var(--muted); font-weight: 700; }
.dday div:last-child { background: var(--red); color: #fff; }
.dday div:last-child span { color: #ffe1e1; }
@media (max-width: 860px) {
  .hero { background-position: 78% bottom; }
  .hero::before { background: linear-gradient(180deg, rgba(12, 42, 110, .9) 0%, rgba(12, 42, 110, .78) 60%, rgba(12, 42, 110, .35) 100%); }
  .hero .wrap { padding: 40px 0 120px; min-height: 0; }
}

/* 바로가기 타일 (대학 누리집 퀵메뉴 형식) */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: -56px; position: relative; z-index: 2; }
.tile { border-radius: var(--radius); color: #fff; text-decoration: none; padding: 18px 12px 16px; min-height: 132px; display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; box-shadow: var(--shadow); transition: transform .15s; }
.tile .ic { width: 38px; height: 38px; stroke-width: 1.8; }
.tile b { font-size: 21px; line-height: 1.25; }
.tile:hover { transform: translateY(-3px); }
.tile.t1 { background: var(--blue); }
.tile.t2 { background: var(--sky-2); color: var(--blue-ink); }
.tile.t3 { background: #7b3f97; }
.tile.t4 { background: #59595f; }
.tile.t5 { background: var(--red); }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); margin-top: -40px; } .tile:last-child { grid-column: 1 / -1; } }

/* 요강 상자: 파랑 띠 위 흰 상자 */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.facts .fact.wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
.fact { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; background: #fff; color: var(--ink); border-radius: var(--radius); padding: 18px 20px; }
.fact .badge { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-bg); color: var(--blue); }
.fact .badge .ic { width: 26px; height: 26px; }
.fact h3 { margin: 0 0 2px; color: var(--blue); font-size: 20px; }
.fact p, .fact ul { margin: 0; }
.fact ul { padding-left: 18px; }
.medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.medal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.medal .disc { width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.medal.g .disc { background: radial-gradient(circle at 35% 30%, #ffe08a, #e0a100); color: #3d2900; }
.medal.s .disc { background: radial-gradient(circle at 35% 30%, #eef3f9, #8ea4bd); color: #233a57; }
.medal.b .disc { background: radial-gradient(circle at 35% 30%, #f6c3a2, #d07a46); color: #2e1404; }
.medal b { display: block; font-size: 28px; color: var(--blue); }
@media (max-width: 560px) { .medals { grid-template-columns: 1fr; } }

/* 단계 · 흐름 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.step { background: #fff; border-radius: var(--radius); padding: 22px 20px 20px; box-shadow: var(--shadow); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -14px; left: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 900; display: grid; place-items: center; }
.step h3 { margin: 6px 0 4px; font-size: 20px; display: flex; gap: 8px; align-items: center; color: var(--blue); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow .node { background: #fff; color: var(--blue); border: 2px solid var(--blue); border-radius: 12px; padding: 10px 14px; font-weight: 800; display: inline-flex; gap: 8px; align-items: center; }
.flow .arrow { color: var(--blue); font-weight: 900; }
.flow .node.pulse { animation: pulse 2.4s ease-in-out infinite; }
.flow .node.pulse:nth-child(3) { animation-delay: .6s; }
.flow .node.pulse:nth-child(5) { animation-delay: 1.2s; }
.flow .node.pulse:nth-child(7) { animation-delay: 1.8s; }
@keyframes pulse { 0%, 100% { background: #fff; color: var(--blue); } 30% { background: var(--blue); color: #fff; } }

/* 해시태그 */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--blue); color: var(--blue); border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit; font-weight: 800; min-height: 44px; }
.tag:hover { background: var(--sky-bg); }

/* 폼 */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .field > legend, fieldset > legend { font-weight: 700; }
.req { color: var(--red); margin-left: 2px; }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
input[type=search], input[type=text], input[type=tel], input[type=email], input[type=url], input[type=number], input[type=password], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--red); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 600; }
.choice input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; }
.choice input:focus-visible + span { box-shadow: var(--focus); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.err { color: var(--red); font-size: 14px; font-weight: 600; margin: 0; }
.form-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: grid; gap: 18px; }
.form-section h2 { font-size: 21px; margin: 0; display: flex; gap: 8px; align-items: center; color: var(--blue); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .cols2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 미리보기 · 갤러리 */
.preview { border: 2px dashed var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: #fbfdff; }
.embed { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: var(--blue-ink); }
.embed.h { aspect-ratio: 16 / 9; }
.embed.v { aspect-ratio: 9 / 16; max-width: 360px; margin-inline: auto; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .poster-btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: var(--blue-ink) center / cover no-repeat; display: grid; place-items: center; color: #fff; }
.embed .poster-btn .play { width: 64px; height: 64px; border-radius: 50%; background: var(--sky-2); color: var(--blue-ink); display: grid; place-items: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.wcard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s; }
.wcard:hover { transform: translateY(-3px); }
.wcard .thumb { aspect-ratio: 4 / 3; background: var(--blue) url("img/hero-bg.svg") 70% bottom / cover no-repeat; display: grid; place-items: center; color: #fff; }
.wcard .thumb .ic { width: 40px; height: 40px; }
.wcard .body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.wcard h3 { margin: 0; font-size: 17px; line-height: 1.35; color: var(--blue-ink); }
.wcard .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* 스크롤 등장 · 모션 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .flow .node.pulse { animation: none; }
  .btn:hover, .wcard:hover, .tile:hover { transform: none; }
}
details.faq { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 4px 18px; }
details.faq + details.faq { margin-top: 10px; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--blue-ink); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq[open] summary .ic { transform: rotate(90deg); }
details.faq p { margin: 0 0 16px; color: var(--muted); }
.copyline { display: flex; gap: 8px; align-items: stretch; }
.copyline code { flex: 1; background: var(--sky-bg); border-radius: 10px; padding: 10px 12px; font-family: inherit; font-weight: 600; white-space: pre-wrap; }

/* 하위 페이지 머리: 같은 그림을 얇게 */
.page-head { position: relative; color: #fff; padding: 40px 0 72px; background: var(--blue-deep) url("img/hero-bg.svg") 70% 92% / cover no-repeat; }
.page-head::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 42, 110, .92), rgba(12, 42, 110, .55)); }
.page-head .wrap { position: relative; }
.page-head h1 { margin: 0; font-size: clamp(28px, 4.4vw, 40px); }
.page-head p { margin: 6px 0 0; color: #eef4ff; }
main { display: block; }

/* 전체 폭 배경 띠: 띠 자체에 좌우 여백 · 안쪽 .wrap 은 그 안을 채움 */
.hero, .band, .page-head { padding-left: 16px; padding-right: 16px; }
.hero .wrap, .band .wrap, .page-head .wrap { width: min(1120px, 100%); }

/* 로고 */
.brand-logo { height: 34px; width: auto; }
.brand-div { width: 1px; height: 28px; background: var(--line); }
@media (max-width: 480px) {
  .brand { gap: 8px; }
  .brand-logo { height: 26px; }
  .brand-div { height: 24px; }
  .brand b { font-size: 14px; max-width: 7.5em; line-height: 1.25; }
}
.hero-logo { height: 44px; width: auto; margin-bottom: 18px; }
@media (max-width: 480px) { .hero-logo { height: 34px; } }
.foot-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 20px 40px; margin-bottom: 12px; }
.foot-logo { display: grid; justify-items: center; gap: 8px; text-decoration: none; color: #c9cbd6; font-size: 13px; }
.foot-logo img { height: 36px; width: auto; }
.foot-logo .duon-chip { background: #fff; border-radius: 10px; padding: 6px 14px; display: block; }
.foot-logo .duon-chip img { height: 26px; }
.foot-logo:hover span:last-child { color: #fff; text-decoration: underline; }
.hero-logo { align-self: flex-start; }
@media (max-width: 480px) {
  .dday { gap: 8px; }
  .dday div { min-width: 0; flex: 1; padding: 8px 6px; }
  .dday b { font-size: 24px; }
}
