@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600&display=swap');

/* =========================
   Manyeo – Clean Base (recode)
   ========================= */

:root {
  /* Base night background (lighter than before) */
  --bg: #151725;

  /* Text */
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.72);

  /* Lines & surfaces (softer, more airy) */
  --line: rgba(255, 255, 255, 0.14);
  --surface: rgba(255, 255, 255, 0.07);
  --surface-2: rgba(255, 255, 255, 0.12);

  /* Shape */
  --radius: 18px;
  --shadow: 0 12px 32px rgba(10, 12, 30, 0.45);

  /* Layout */
  --max: 1280px;
  --pad: 20px;

  /* Main accent — soft magical purple */
  --accent: rgba(190, 160, 255, 0.95);
  --accent-soft: rgba(190, 160, 255, 0.22);

  /* Warm starlight accent (from the header image) */
  --accent-gold: rgba(255, 210, 130, 0.9);
  --accent-gold-soft: rgba(255, 210, 130, 0.25);
}

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

/* ---------- BASE ---------- */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(175, 140, 255, 0.18), transparent 60%),
    radial-gradient(900px 600px at 80% 0%, rgba(110, 210, 255, 0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  /* px baseline */
  line-height: 1.55;
}

body {
  overflow-x: hidden;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 0;
}

/* subtle warm accent on hover */
a:hover {
  border-bottom-color: rgba(255, 210, 130, 0.55);
}

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- STICKY NAV ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(21, 23, 37, 0.70);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

/* Full-width inner layout (NOT constrained) */
.nav-inner {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 58px;
  padding: 0 var(--pad);
}

/* LEFT */
.nav-left {
  justify-self: start;
}

.nav-brand {
  border-bottom: 0;
  display: inline-flex;
  align-items: center;
}

/* Logo image */
.nav-logo {
  height: 50px;
  width: auto;
  display: block;
}

/* CENTER */
.nav-center {
  justify-self: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  opacity: 0.85;
  border-bottom: 0;
  font-size: 15px;
  /* was 0.95rem */
}

.nav-links a:hover {
  opacity: 1;
}

/* RIGHT */
.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* ---------- HEADER BANNER ---------- */
.site-banner {
  position: relative;
  min-height: 36vh;
  max-height: 420px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background-image: url("../images/header.png");
  background-size: cover;
  background-position: center 20%;
}

.site-banner_overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(15, 17, 22, 0.00) 0%,
      rgba(15, 17, 22, 0.30) 40%,
      rgba(15, 17, 22, 0.88) 100%);
}

.site-banner_inner {
  position: relative;
  padding-top: 48px;
  padding-bottom: 24px;
}

.site-banner_title {
  display: inline-block;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: rgba(15, 17, 22, 0.45);
  border: 1px solid rgba(255, 210, 130, 0.14);
  box-shadow: 0 14px 36px rgba(10, 12, 30, 0.55);
  backdrop-filter: blur(8px);
}

/* ---------- SITE TITLE ----------- */
.site-title {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 56px;
  /* was clamp(2.9rem, 5.6vw, 3.8rem) */
  letter-spacing: 0.08em;
  /* tighter */
  line-height: 1;

  background: linear-gradient(90deg,
      rgba(255, 210, 130, 0.95),
      rgba(190, 160, 255, 0.95),
      rgba(255, 210, 130, 0.95));
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: manyeoGradient 12s linear infinite;

  border-bottom: 0;
  text-decoration: none;
  display: inline-block;
}

/* ---------- HEADINGS ---------- */
h1,
h2,
h3,
.intro-title {
  position: relative;
  margin: 0 0 12px;
  /* spacing to next content */
  padding-bottom: 8px;
  /* reserves space for line at bottom:5px */
}

/* tighten the text itself */
h1 {
  line-height: 1.5;
}

h2 {
  line-height: 1.5;
}

h3 {
  line-height: 1.5;
}

.intro-title {
  line-height: 1.05;
}

/* sizes (unchanged, just tighter line-height) */
h1 {
  font-family: "Caveat", cursive;
  font-size: 32px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

h2 {
  font-family: "Caveat", cursive;
  font-size: 36px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

h3 {
  font-family: "Caveat", cursive;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- SHARED LINE ---------- */
h1::after,
h2::after,
h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  /* stays exactly 5px below text */
  width: 100%;
  height: 3px;
  border-radius: 999px;

  background: linear-gradient(90deg,
      rgba(190, 160, 255, 0.0),
      rgba(190, 160, 255, 0.55) 20%,
      rgba(255, 210, 130, 0.75) 50%,
      rgba(190, 160, 255, 0.55) 80%,
      rgba(190, 160, 255, 0.0));

  box-shadow:
    0 0 10px rgba(190, 160, 255, 0.35),
    0 0 18px rgba(255, 210, 130, 0.25);
}

/* ---------- GRADIENT ANIMATION ---------- */
@keyframes manyeoGradient {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* ---------- MAIN ---------- */
.site-main {
  padding: 40px 0 56px;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 16px 0;
  backdrop-filter: blur(8px);
}

.card a {
  border-bottom: 0;
}

/* ---------- INTRO ---------- */
.card.intro {
  padding: 28px;
}

/* keep old intro-inner safe (not used now, but harmless) */
.intro-inner {
  display: grid;
  gap: 12px;
}

/* DIALOGUE VERSION (index special) */
.card.intro.intro--dialogue {
  /* slightly lighter than other cards but same palette */
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.16);
  padding: 18px;
}

.intro-dialogue {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: stretch;
}

/* Portrait panel */
.intro-portrait {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.16);

  /* subtle gold frame edges */
  box-shadow:
    0 0 0 1px rgba(255, 210, 130, 0.18) inset,
    0 0 26px rgba(255, 210, 130, 0.06);
}

.intro-portrait img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

/* tiny ornamental corner detail */
.intro-ornament {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  border-radius: 7px;

  background: radial-gradient(circle at 30% 30%,
      rgba(255, 210, 130, 0.75),
      rgba(255, 210, 130, 0.08) 72%);
  box-shadow: 0 0 0 1px rgba(255, 210, 130, 0.35) inset;
  opacity: 0.95;
}

/* Speech panel */
.intro-speech {
  position: relative;
  border-radius: var(--radius);
  padding: 14px 14px 56px;

  background: rgba(0, 0, 0, 0.10);

  /* soft divider hint via gentle glow */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    -10px 0 20px rgba(255, 210, 130, 0.05);
}

/* faint vertical divider hint between portrait & speech */
@media (min-width: 721px) {
  .intro-speech::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(255, 210, 130, 0.22),
        transparent);
    opacity: 0.85;
  }
}

/* kicker now supports icon */
.intro-kicker {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  opacity: 0.80;

  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.intro-kicker i {
  color: var(--accent-gold);
  opacity: 0.95;
}

/* keep your title style */
.intro-title {
  margin: 0;
  font-size: 42px;
  /* was clamp(2rem, 4vw, 2.8rem) */
  line-height: 1.05;
}

/* speech text block */
.intro-text {
  margin: 0;
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
}

.intro-text p {
  margin: 0 0 10px;
}

/* bottom-right action */
.intro-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  justify-content: flex-end;
}

/* your button system is .btn.primary — add support for btn-primary too */
.btn.btn-primary {
  background: linear-gradient(135deg,
      var(--accent-soft),
      rgba(255, 210, 130, 0.10));
  border-color: rgba(190, 160, 255, 0.40);
}

.btn.btn-primary:hover {
  background: linear-gradient(135deg,
      rgba(190, 160, 255, 0.28),
      rgba(255, 210, 130, 0.16));
}

/* extra emphasis for Begin */
.intro-begin {
  box-shadow: 0 12px 30px rgba(255, 210, 130, 0.10);
}

.intro-begin i {
  color: var(--accent-gold);
  opacity: 0.95;
}

/* responsive stack */
@media (max-width: 720px) {
  .intro-dialogue {
    grid-template-columns: 1fr;
  }

  .intro-portrait img {
    min-height: 220px;
  }

  .intro-speech {
    padding-bottom: 60px;
  }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 16px;
  /* explicit px */
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn.primary {
  background: linear-gradient(135deg,
      var(--accent-soft),
      rgba(255, 210, 130, 0.10));
  border-color: rgba(190, 160, 255, 0.40);
}

.btn.primary:hover {
  background: linear-gradient(135deg,
      rgba(190, 160, 255, 0.28),
      rgba(255, 210, 130, 0.16));
}

/* ---------- SECTION HEAD ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  /* was 1.25rem */
}

.text-link {
  border-bottom: 0;
  opacity: 0.85;
  font-size: 16px;
  /* explicit px for consistency */
}

.text-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---------- NEWS GRID ---------- */
.news-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, 1fr);
}

.news-card {
  grid-column: span 12;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (min-width: 720px) {
  .news-card {
    grid-column: span 6;
  }
}

@media (min-width: 1000px) {
  .news-card {
    grid-column: span 4;
  }
}

/* --- NEWS ROW (title left, date/time + read right) --- */
.news-row {
  display: block;
  color: inherit;
  border-bottom: 0;
}

.news-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.news-title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.news-datetime {
  font-size: 14px;
  opacity: 0.9;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.news-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-read {
  font-size: 14px;
  opacity: 0.9;
}

/* ✅ NEW hover behavior (only link hover, not card hover) */
.news-title a:hover,
.news-read:hover {
  text-decoration: underline;
  opacity: 1;
}

/* --- NEW DOT (glowing gold indicator) --- */
.news-card {
  position: relative;
  /* needed for the dot */
}

.news-card.is-new::before {
  content: "";
  position: absolute;
  top: -7px;
  right: -7px;
  width: 12px;
  height: 12px;
  border-radius: 999px;

  background: rgba(255, 210, 130, 0.95);
  box-shadow:
    0 0 10px rgba(255, 210, 130, 0.55),
    0 0 18px rgba(255, 210, 130, 0.35),
    0 0 28px rgba(190, 160, 255, 0.18);

  animation: manyeoNewPulse 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes manyeoNewPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
    filter: blur(0px);
  }

  50% {
    transform: scale(1.25);
    opacity: 1;
    filter: blur(0.2px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .news-card.is-new::before {
    animation: none;
  }
}

/* ---------- NEWS: Interactive UI Echo (safe with NEW dot) ---------- */

/* Faint gold top accent (uses ::after so it does NOT override the NEW dot) */
.news-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,
      rgba(255, 210, 130, 0.0),
      rgba(255, 210, 130, 0.35),
      rgba(255, 210, 130, 0.0));
  opacity: 0.55;
  pointer-events: none;
}

/* Stronger "panel" hover (interactive UI feel) */
.news-card {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 210, 130, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 210, 130, 0.12) inset,
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.news-card:hover::after {
  opacity: 0.85;
}

/* Optional: make Read feel more like an action */
.news-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 40px;
  padding: 34px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 12, 25, 0.28);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.footer-col {
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-col h3 {
  margin: 0 0 8px;
  font-size: 20px;
  /* was 0.95rem */
  letter-spacing: 0.4px;
}

.footer-col p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  /* was 0.95rem */
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  /* was 0.92rem */
}

.footer-dot {
  opacity: 0.7;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-banner {
    min-height: 44vh;
  }
}

/* ---------- ALERTS ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  /* explicit px */
  backdrop-filter: blur(8px);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert i {
  font-size: 1.2em;
}

/* SUCCESS (Green) */
.alert-success {
  background: rgba(80, 250, 123, 0.12);
  border-color: rgba(80, 250, 123, 0.25);
  color: #50fa7b;
}

.alert-success i {
  color: #50fa7b;
}

/* DANGER / ERROR (Red) */
.alert-danger {
  background: rgba(255, 85, 85, 0.12);
  border-color: rgba(255, 85, 85, 0.25);
  color: #ff5555;
}

.alert-danger i {
  color: #ff5555;
}

/* WARNING / CONFIRMATION (Yellow) */
.alert-warning {
  background: rgba(255, 255, 0, 0.12);
  border-color: rgba(255, 255, 0, 0.25);
  color: #ffff00;
}

.alert-warning i {
  color: #ffff00;
}

/* INFO (Blue - optional but good to have) */
.alert-info {
  background: rgba(139, 233, 253, 0.12);
  border-color: rgba(139, 233, 253, 0.25);
  color: #8be9fd;
}

.alert-info i {
  color: #8be9fd;
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-title {
    animation: none;
  }
}