/* ============================================================
   FFXIV THEME — GLOBAL
   ============================================================ */
:root {
  --gold: #ffe9b3;
  --gold-deep: #c88a2b;
  --blue: #9fb4ff;
  --blue-bright: #78d8ff;
  --bg-night: radial-gradient(circle at top, #1b2a3d 0, #050811 55%, #020308 100%);
  --bg-day: radial-gradient(circle at top, #3b4f7a 0, #10182b 55%, #050811 100%);
  --panel-bg: linear-gradient(145deg, rgba(10, 20, 45, 0.96), rgba(3, 6, 18, 0.98));
  --panel-border: rgba(255, 255, 255, 0.16);
  --text-main: #f5f5f5;
  --text-sub: #d7e0ff;
  --text-meta: #8fa0d8;
}

html[data-theme="night"] body {
  background: var(--bg-night);
  color: var(--text-main);
}

html[data-theme="day"] body {
  background: var(--bg-day);
  color: var(--text-main);
}

/* ============================================================
   RESET
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
  color: #ffd27f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   LAYOUT
   ============================================================ */
body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ============================================================
   TOP BAR / NAV
   ============================================================ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to right, rgba(5, 10, 25, 0.95), rgba(10, 20, 45, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: radial-gradient(circle at 30% 20%, #ffe9b3 0, #f5c46b 30%, #c88a2b 60%, #2b1a08 100%);
  box-shadow: 0 0 12px rgba(255, 210, 127, 0.7);
}

.brand-text-main {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-text-sub {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.main-nav a {
  position: relative;
  padding-bottom: 0.15rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold), var(--blue));
  transition: width 0.25s ease-out;
}

.main-nav a:hover::after {
  width: 100%;
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 60%);
  color: var(--text-main);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(159, 180, 255, 0.4);
}

.btn-toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffe9b3 0, #f5c46b 40%, #c88a2b 70%, #2b1a08 100%);
  box-shadow: 0 0 10px rgba(255, 210, 127, 0.8);
}

/* ============================================================
   JOB ICON BAR (INLINE SVG ICONS)
   ============================================================ */
.job-bar {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  padding: 1.1rem 0;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.job-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-size: 70% 70%;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(5, 10, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 10px rgba(159, 180, 255, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Tank icon */
.job-tank {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='10' width='44' height='44' rx='8' ry='8' fill='%230b3b5c'/%3E%3Cpath d='M32 14 L46 24 L40 48 L24 48 L18 24 Z' fill='%2349b3ff'/%3E%3C/svg%3E");
}


/* Healer icon */
.job-healer {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='10' width='44' height='44' rx='8' ry='8' fill='%230b3b2a'/%3E%3Cpath d='M30 18 h4 v12 h12 v4 h-12 v12 h-4 v-12 h-12 v-4 h12z' fill='%2378ffb3'/%3E%3C/svg%3E");
}


/* Melee icon */
.job-melee {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='10' width='44' height='44' rx='8' ry='8' fill='%230b1b3b'/%3E%3Cpath d='M20 44 L44 20 L48 24 L24 48z' fill='%23ffb378'/%3E%3C/svg%3E");
}


/* Physical ranged icon */
.job-phys {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='10' width='44' height='44' rx='8' ry='8' fill='%233b1b0b'/%3E%3Cpath d='M18 32 L46 18 L32 46z' fill='%23ffd27f'/%3E%3C/svg%3E");
}


/* Magical ranged icon */
.job-magic {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='10' width='44' height='44' rx='8' ry='8' fill='%230b103b'/%3E%3Ccircle cx='32' cy='32' r='10' fill='%239fb4ff'/%3E%3Ccircle cx='32' cy='32' r='5' fill='%23ffffff'/%3E%3C/svg%3E");
}


.job-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 0 18px rgba(255, 210, 127, 0.8);
  border-color: rgba(255, 210, 127, 0.9);
}

/* ============================================================
   HERO + AETHER PARTICLES
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-orbit {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 10% 0%, rgba(159, 180, 255, 0.18) 0, transparent 55%),
    radial-gradient(circle at 90% 10%, rgba(255, 210, 127, 0.16) 0, transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(120, 220, 255, 0.12) 0, transparent 60%);
  opacity: 0.8;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-left {
  position: relative;
  z-index: 1;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 60%);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.hero-tagline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255, 210, 127, 0.9);
}

.hero-title {
  font-size: 2.6rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 1rem;
}

.hero-title span {
  display: block;
}

.hero-title-main {
  font-size: 2.9rem;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 210, 127, 0.7);
}

.hero-title-sub {
  font-size: 1.4rem;
  color: var(--blue);
}

.hero-copy {
  max-width: 32rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-sub);
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.hero-meta {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-meta);
}

/* Aether particles */
.aether-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aether-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(159, 180, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(159, 180, 255, 0.9);
  animation: drift 12s linear infinite;
  opacity: 0.7;
}

@keyframes drift {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-80px) translateX(20px) scale(1.4);
    opacity: 1;
  }
  100% {
    transform: translateY(-160px) translateX(-20px) scale(0.8);
    opacity: 0;
  }
}

/* ============================================================
   CRYSTAL CARD
   ============================================================ */
.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crystal-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  padding: 1.2rem 1.4rem;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 60%),
    var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(159, 180, 255, 0.35);
  overflow: hidden;
}

.crystal-card::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.crystal-orbit {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 0%, rgba(159, 180, 255, 0.4) 0, transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(120, 220, 255, 0.35) 0, transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.crystal-core {
  position: absolute;
  inset: 18% 20%;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9) 0, rgba(255, 255, 255, 0.1) 40%, transparent 70%),
    radial-gradient(circle at 50% 100%, rgba(120, 220, 255, 0.7) 0, transparent 60%);
  clip-path: polygon(50% 0%, 90% 25%, 100% 60%, 70% 100%, 30% 100%, 0% 60%, 10% 25%);
  filter: drop-shadow(0 0 22px rgba(159, 180, 255, 0.9));
}

.crystal-header,
.crystal-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-meta);
}

.crystal-header {
  margin-bottom: 0.4rem;
}

.crystal-header span:last-child {
  color: var(--gold);
}

.crystal-footer {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.2rem;
}

.crystal-footer-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 60%);
  color: var(--gold);
}

/* ============================================================
   UI KIT: BUTTONS, PANELS, TAGS, META
   ============================================================ */
.ffx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out, border-color 0.12s ease-out;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #f5c46b, var(--gold-deep));
  color: #1b1306;
  box-shadow:
    0 0 18px rgba(255, 210, 127, 0.7),
    0 0 40px rgba(255, 210, 127, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 24px rgba(255, 210, 127, 0.9),
    0 0 50px rgba(255, 210, 127, 0.45);
}

.btn-ghost {
  background: radial-gradient(circle at top, rgba(159, 180, 255, 0.18), transparent 60%);
  border-color: rgba(159, 180, 255, 0.6);
  color: #e4ebff;
  box-shadow: 0 0 14px rgba(159, 180, 255, 0.4);
}

.btn-ghost:hover {
  transform: translateY(-1px);
  background: radial-gradient(circle at top, rgba(159, 180, 255, 0.26), transparent 60%);
  box-shadow: 0 0 20px rgba(159, 180, 255, 0.6);
}

.ffx-panel {
  position: relative;
  padding: 1.2rem 1.1rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 60%),
    var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
}

.ffx-tag {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 60%);
}

.ffx-meta {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-meta);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2.8rem;
}

.section-header {
  margin-bottom: 1.8rem;
  text-align: center;
}

.section-title {
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.card-title {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.card-sub {
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
}

.card-body {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-sub);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.7rem;
  font-size: 0.78rem;
}

.card-link::after {
  content: "›";
  font-size: 0.9rem;
}

/* Leveling section */
.leveling-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at top, rgba(159, 180, 255, 0.16), transparent 60%);
}

.leveling-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.8rem;
  align-items: center;
}

.leveling-title {
  font-size: 1.3rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.leveling-copy {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-sub);
  margin-bottom: 1.1rem;
}

.leveling-meta {
  font-size: 0.78rem;
}

.leveling-panel {
  font-size: 0.82rem;
  color: var(--text-sub);
}

.leveling-panel-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.leveling-panel-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-meta);
  font-size: 0.72rem;
}

.leveling-panel-value {
  color: var(--gold);
  font-size: 0.78rem;
}

.leveling-panel-note {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: #cfd8ff;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(to right, #050811, #0b1222);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-meta);
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-right {
    order: -1;
  }

  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leveling-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    gap: 0.9rem;
    font-size: 0.78rem;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-title-main {
    font-size: 2.3rem;
  }

  .section-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-bar {
    gap: 0.8rem;
  }
}
