/* ============================================================
   제4회 인천어린이청소년영화제 (4th INKY Film Festival)
   Cinematic design system — Pretendard + film-festival palette
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  /* Core palette — deep cinema navy + festival gold + accent sky */
  --c-bg:        #070d20;   /* deepest background */
  --c-bg-2:      #0b132b;   /* base navy */
  --c-surface:   #131d3b;   /* card / panel */
  --c-surface-2: #1a2647;   /* raised panel */
  --c-primary:   #ffc233;   /* festival gold (from logo) */
  --c-primary-d: #f5a623;   /* gold deep */
  --c-sky:       #4cb8e8;   /* logo sky-blue accent */
  --c-text:      #ffffff;
  --c-text-dim:  #c3cde0;
  --c-text-mute: #8b97b5;
  --c-border:    rgba(255,255,255,0.10);
  --c-border-2:  rgba(255,255,255,0.16);

  --radius:   18px;
  --radius-s: 12px;
  --shadow:   0 24px 60px -20px rgba(0,0,0,0.7);
  --shadow-g: 0 16px 40px -12px rgba(255,194,51,0.35);
  --maxw:     1240px;
  --header-h: 76px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  word-break: keep-all;          /* 한글 단어 단위 줄바꿈 — 글자 잘림 방지 */
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* Ambient cinematic background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 50% at 80% -5%,  rgba(255,194,51,0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 5%,   rgba(76,184,232,0.10), transparent 55%),
    linear-gradient(180deg, var(--c-bg-2) 0%, var(--c-bg) 55%, var(--c-bg) 100%);
}
/* Film-grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(7,13,32,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--c-border);
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
}
.brand img {
  height: 42px;
  width: auto;
  transition: transform .35s var(--ease);
}
.brand:hover img { transform: scale(1.04); }

#siteNav {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1.4vw, 1.1rem);
}
#siteNav a {
  position: relative;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--c-text-dim);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: color .25s var(--ease), background .25s var(--ease);
}
#siteNav a::after {
  content: '';
  position: absolute;
  left: 0.7rem; right: 0.7rem;
  bottom: 0.32rem;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
#siteNav a:hover { color: var(--c-text); }
#siteNav a:hover::after,
#siteNav a.active::after { transform: scaleX(1); }
#siteNav a.active { color: var(--c-primary); }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--c-border-2);
  color: var(--c-text);
  font-size: 1.4rem;
  width: 44px; height: 44px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   LAYOUT
   ============================================================ */
main { flex: 1 0 auto; }
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.1rem, 4vw, 2.5rem);
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 0.9rem;
}

/* ============================================================
   PAGE HERO (sub pages)
   ============================================================ */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.1rem, 5vw, 2rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,194,51,0.14), transparent 55%),
    repeating-linear-gradient(90deg, transparent, transparent 38px, rgba(255,255,255,0.018) 38px, rgba(255,255,255,0.018) 40px);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.22;
  background: linear-gradient(180deg, #fff 30%, #cfd9f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 1.2rem auto 0;
  max-width: 640px;
  font-size: clamp(1rem, 2.4vw, 1.22rem);
  color: var(--c-text-dim);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.9rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: #1a1303;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-d) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-g); }
.btn.secondary {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}
.btn.secondary:hover { background: rgba(255,194,51,0.12); box-shadow: none; }
.btn.ghost {
  background: rgba(255,255,255,0.06);
  color: var(--c-text);
  border: 1px solid var(--c-border-2);
}
.btn.ghost:hover { background: rgba(255,255,255,0.12); box-shadow: none; }
.btn[disabled], .btn.disabled {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

/* ============================================================
   CARDS / GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  position: relative;
  background: linear-gradient(160deg, var(--c-surface) 0%, var(--c-bg-2) 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,194,51,0.4);
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
  margin-bottom: 0.7rem;
  color: #fff;
}
.card h4 { color: var(--c-primary); font-size: 1.05rem; margin-bottom: 0.4rem; }
.card p { color: var(--c-text-dim); }

.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(255,194,51,0.14);
  color: var(--c-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.tag.sky { background: rgba(76,184,232,0.16); color: var(--c-sky); }

/* image placeholder block */
.media-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 200px;
  padding: 1.5rem;
  margin-top: 1.8rem;
  border-radius: var(--radius-s);
  border: 1px dashed var(--c-border-2);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 12px, transparent 12px 24px),
    rgba(0,0,0,0.28);
  color: var(--c-text-mute);
  font-size: 0.95rem;
  font-weight: 600;
}

/* ============================================================
   TABS
   ============================================================ */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.4rem;
  padding: 0.4rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1 0 auto;
  background: none;
  border: none;
  color: var(--c-text-mute);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.tab-btn:hover { color: var(--c-text); }
.tab-btn.active {
  color: #1a1303;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-d));
}
.tab-panel { display: none; animation: fadeUp .55s var(--ease); }
.tab-panel.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.98rem;
}
th {
  background: rgba(255,194,51,0.10);
  color: var(--c-primary);
  font-weight: 800;
  white-space: nowrap;
}
td { color: var(--c-text-dim); }
tr:last-child td { border-bottom: none; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  border-left: 2px solid rgba(255,194,51,0.4);
  margin-top: 1.6rem;
  padding-left: 1.8rem;
}
.time-row {
  position: relative;
  padding-bottom: 2rem;
}
.time-row:last-child { padding-bottom: 0; }
.time-row::before {
  content: '';
  position: absolute;
  left: -1.8rem;
  margin-left: -7px;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-primary);
  border: 3px solid var(--c-bg-2);
  box-shadow: 0 0 0 3px rgba(255,194,51,0.18);
}
.time-date { font-weight: 800; color: var(--c-primary); font-size: 1.05rem; margin-bottom: 0.3rem; }
.time-desc { color: var(--c-text-dim); }

/* ============================================================
   ADMIN AUTH
   ============================================================ */
.auth-box {
  max-width: 440px;
  margin: clamp(2rem, 8vw, 5rem) auto;
  background: linear-gradient(160deg, var(--c-surface), var(--c-bg-2));
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: clamp(2rem, 6vw, 3rem);
  text-align: center;
  box-shadow: var(--shadow);
}
.auth-box .lock { font-size: 2.4rem; margin-bottom: 0.8rem; }
.auth-box input {
  width: 100%;
  padding: 1rem;
  margin: 1.4rem 0 0.4rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--c-border-2);
  color: #fff;
  border-radius: 10px;
  font-size: 1.6rem;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.6rem;
}
.auth-box input:focus { outline: none; border-color: var(--c-primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-mute);
  font-size: 0.92rem;
}
.site-footer strong {
  display: block;
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.site-footer .foot-sub { display: block; margin-top: 0.4rem; }

/* ============================================================
   UTIL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* 실패 안전장치: JS 미동작 시에도 콘텐츠가 보이도록 */
.no-js .reveal { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  #siteNav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(7,13,32,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--c-border);
    padding: 0.6rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s var(--ease);
  }
  #siteNav.open { max-height: 80vh; }
  #siteNav a { padding: 0.95rem 1rem; font-size: 1.05rem; border-radius: 10px; }
  #siteNav a::after { display: none; }
  #siteNav a.active { background: rgba(255,194,51,0.12); }
  .tab-btn { flex: 0 0 auto; }
}

@media (max-width: 560px) {
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
  .brand img { height: 36px; }
}
