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

:root {
  --bg: #f7f9fc;
  --bg-elev: #ffffff;
  --surface: #f1f4f9;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-deep: #1e3a8a;
  --accent-soft: rgba(59, 130, 246, 0.10);
  --accent-tint: rgba(59, 130, 246, 0.06);
  --text: #0f172a;
  --text-dim: #475569;
  --text-faint: #94a3b8;
  --hairline: rgba(15, 23, 42, 0.08);
  --hairline-strong: rgba(15, 23, 42, 0.14);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-accent: 0 8px 24px rgba(59, 130, 246, 0.22);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  /* Account for fixed nav-pill height so anchor jumps & scrollIntoView land below the nav */
  scroll-padding-top: 100px;
}

html, body {
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  line-height: 1.5;
}

body {
  min-height: 100dvh;
  margin: 0;
  position: relative;
  background: transparent;
}

/* Soft blue mesh — subtle, like a brochure */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 45% at 92% 18%, rgba(30, 58, 138, 0.06), transparent 60%),
    radial-gradient(ellipse 70% 55% at 50% 110%, rgba(59, 130, 246, 0.05), transparent 65%),
    var(--bg);
}

::selection { background: var(--accent-soft); color: var(--accent-deep); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.22); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(2rem); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-up {
  opacity: 0;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fade-up.delay-1 { animation-delay: 0.08s; }
.fade-up.delay-2 { animation-delay: 0.16s; }
.fade-up.delay-3 { animation-delay: 0.24s; }
.fade-up.delay-4 { animation-delay: 0.32s; }

/* Double-bezel card — soft white inside a hairline tray */
.bezel {
  background: rgba(15, 23, 42, 0.025);
  border: 1px solid var(--hairline);
  padding: 6px;
  border-radius: 32px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bezel:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--hairline-strong);
}
.bezel-inner {
  background: var(--bg-elev);
  border-radius: calc(32px - 6px);
  box-shadow: var(--shadow-md);
  padding: 24px 28px;
}

/* Glass surface (light, frosted) */
.glass {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-sm);
}

/* Eyebrow tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.55);
  animation: float 3s ease-in-out infinite;
}

/* Top-left brand mark (logo + stacked name) */
.brand-mark {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 210;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--accent-deep);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand-mark:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-soft);
}
.brand-mark img {
  width: 42px;
  height: 42px;
  display: block;
  flex-shrink: 0;
}
.brand-mark .brand-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .brand-mark {
    padding: 8px 14px 8px 8px;
    top: 12px; left: 12px;
    gap: 8px;
    border-radius: 14px;
  }
  .brand-mark img { width: 32px; height: 32px; }
  .brand-mark .brand-name { font-size: 0.68rem; }
}

/* Floating nav pill */
.nav-pill {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md);
}
.nav-pill a {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.nav-pill a:hover { color: var(--text); background: rgba(15, 23, 42, 0.05); }
.nav-pill a.active {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-accent);
}
/* Temporarily hidden until notices are published. Remove this rule to bring it back. */
.nav-pill a[href="notice.html"] { display: none; }

/* Language toggle inside the nav pill */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--hairline);
  gap: 0;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-faint);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  line-height: 1;
  min-width: 22px;
  text-align: center;
}
.lang-toggle button:hover {
  color: var(--text);
}
.lang-toggle button.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}
/* The CJK glyph is wider — drop the tracking just for that button. */
.lang-toggle button[data-lang-to="zh"],
.lang-toggle button[data-lang-to="ja"] {
  letter-spacing: 0;
  font-size: 12px;
}

/* Premium button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-accent);
  font-family: inherit;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.35);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--hairline);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.22);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.btn-danger:hover { background: rgba(220, 38, 38, 0.15); }

/* Input fields */
.input {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input::placeholder { color: var(--text-faint); }

textarea.input {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

/* Layout */
.container-app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Headlines */
.headline {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.subhead {
  color: var(--text-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.6;
  max-width: 560px;
  margin: 16px auto 0;
}

/* Hidden util */
.hidden { display: none !important; }

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--bg-elev);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text);
  z-index: 2000;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast.error { border-color: rgba(220, 38, 38, 0.35); color: #b91c1c; }
.toast.success { border-color: rgba(16, 185, 129, 0.35); color: #047857; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  max-width: 720px;
  width: 100%;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 40px 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal .close-btn {
  position: absolute;
  top: 20px; right: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 18px;
}
.modal .close-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

/* Pin badge */
.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 640px) {
  .nav-pill { top: 12px; padding: 4px; }
  .nav-pill a { padding: 7px 14px; font-size: 12px; }
  .modal { padding: 32px 24px; border-radius: 24px; }
  .bezel { padding: 5px; border-radius: 24px; }
  .bezel-inner { padding: 18px 20px; border-radius: calc(24px - 5px); }
}
