
:root {
  --background: #0b0c10;
  --surface: rgba(15, 19, 28, 0.84);
  --surface-strong: rgba(11, 14, 22, 0.94);
  --border: rgba(222, 230, 246, 0.13);
  --border-white: rgba(222, 230, 246, 0.25);
  --white: #f0eee8;
  --muted: #a5adbd;
  --silver: #c9d6e8;
  --ice: #8faacb;
  --gold: #c9ad78;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.75;
}

a {
  color: inherit;
}

.nation-background {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;

  /*
    Add your background image later.
    Save it as white-background.jpg in this folder.
  */
  background-image:
    url("images/white-background.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  background-color: #121923;
  transform: scale(1.015);
}

.background-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      rgba(7, 9, 14, 0.62) 0%,
      rgba(7, 9, 14, 0.78) 35%,
      rgba(7, 9, 14, 0.91) 75%,
      #0b0c10 100%
    ),
    linear-gradient(
      90deg,
      rgba(7, 9, 14, 0.45),
      transparent 50%,
      rgba(7, 9, 14, 0.45)
    );
}

/* HEADER */

.nation-header {
  position: sticky;
  top: 0;
  z-index: 20;

  min-height: 76px;
  padding: 12px 5%;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;

  background: rgba(11, 12, 16, 0.91);
  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.back-link,
.header-link {
  color: #c5cad4;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link {
  justify-self: start;
}

.header-link {
  justify-self: end;
}

.back-link:hover,
.header-link:hover {
  color: var(--silver);
}

.header-title {
  text-align: center;
  line-height: 1.5;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.header-title .eyebrow {
  margin-bottom: 3px;
}

.header-subtitle {
  color: #929bab;
  font-family: Arial, sans-serif;
  font-size: 0.59rem;
  letter-spacing: 0.13em;
}

/* MAIN CONTENT */

.nation-content {
  width: min(1100px, calc(100% - 44px));
  margin: 0 auto;
}

.nation-hero {
  position: relative;
  min-height: 570px;
  padding: 100px 20px 95px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.hero-mark {
  position: absolute;
  top: 55px;
  right: 7%;

  color: rgba(201, 214, 232, 0.08);
  font-size: clamp(10rem, 23vw, 19rem);
  line-height: 1;
  pointer-events: none;
}

.nation-hero > *:not(.hero-mark) {
  position: relative;
}

.nation-hero > .eyebrow {
  margin-bottom: 14px;
  color: var(--silver);
}

.nation-hero h1 {
  margin: 0;
  color: #f5f5f2;

  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 1.12;

  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.6);
}

.hero-divider {
  width: min(330px, 80%);
  margin: 30px 0 20px;

  display: flex;
  align-items: center;
  gap: 15px;
}

.hero-divider > span:not(.divider-symbol) {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 214, 232, 0.65)
  );
}

.hero-divider > span:last-child {
  transform: rotate(180deg);
}

.divider-symbol {
  color: var(--silver);
  font-size: 1rem;
}

.hero-capital {
  margin: 0;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}

.hero-capital span {
  margin-left: 8px;
  color: var(--white);
  letter-spacing: 0.08em;
}

.hero-description {
  max-width: 530px;
  margin: 22px 0 30px;
  color: #c0c6d0;
  font-size: 1rem;
  line-height: 1.9;
}

.discover-link {
  padding: 12px 19px;
  border: 1px solid var(--border-white);

  color: var(--silver);
  font-family: Arial, sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-decoration: none;

  background: rgba(12, 16, 24, 0.5);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.discover-link span {
  margin-left: 12px;
}

.discover-link:hover {
  border-color: var(--silver);
  background: rgba(150, 177, 212, 0.1);
}

/* SECTION STRUCTURE */

.dossier-section {
  padding: 65px 0;
  scroll-margin-top: 85px;
}

.section-heading {
  max-width: 650px;
  margin-bottom: 32px;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

.section-heading h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.3;
}

.section-intro {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.information-grid,
.present-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card,
.location-card,
.government-panel,
.military-panel,
.history-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.13);
}

.info-card {
  padding: 27px;
  min-width: 0;
}

.card-index {
  display: block;
  color: var(--ice);
  font-family: Arial, sans-serif;
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.7;
  text-transform: uppercase;
}

.info-card h3,
.location-card h3 {
  margin: 12px 0;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.4;
}

.info-card p,
.location-card p,
.history-content > p,
.government-details > p,
.military-description > p {
  color: #c1c6d0;
  font-size: 0.9rem;
  line-height: 1.9;
}

.card-facts {
  margin-top: 25px;
  border-top: 1px solid var(--border);
}

.card-facts > div {
  padding: 11px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.card-facts span {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.73rem;
}

.card-facts strong {
  color: #e3e7ed;
  font-size: 0.81rem;
  font-weight: 400;
  text-align: right;
}

.detail-list {
  padding-left: 20px;
  color: #c1c6d0;
  font-size: 0.87rem;
  line-height: 1.9;
}

.detail-list li {
  margin: 8px 0;
}

.detail-list li::marker {
  color: var(--ice);
}

/* MAGIC */

.magic-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(201, 214, 232, 0.23);
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(176, 200, 231, 0.13),
      transparent 45%
    ),
    var(--surface);
}

.magic-emblem {
  width: 72px;
  height: 72px;
  margin: 24px 0;

  display: grid;
  place-items: center;

  border: 1px solid rgba(201, 214, 232, 0.35);
  border-radius: 50%;

  color: #e3eaf5;
  font-size: 2.3rem;

  box-shadow:
    0 0 35px rgba(151, 180, 218, 0.08),
    inset 0 0 25px rgba(151, 180, 218, 0.05);
}

.magic-tags {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.magic-tags span {
  padding: 6px 9px;
  border: 1px solid var(--border);
  color: var(--silver);
  font-family: Arial, sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.1em;
}

/* GOVERNMENT */

.government-panel {
  padding: 35px;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 35px;
  align-items: start;
}

.government-emblem {
  width: 145px;
  height: 145px;
  position: relative;

  display: grid;
  place-items: center;

  border: 1px solid rgba(201, 214, 232, 0.35);
  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(180, 202, 230, 0.12),
    transparent 70%
  );
}

.government-emblem span {
  color: #e1e9f4;
  font-size: 4rem;
}

.government-emblem i {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(201, 214, 232, 0.18);
  border-radius: 50%;
}

.government-details h3 {
  margin: 10px 0;
  font-size: 1.7rem;
  font-weight: 400;
}

.government-stats {
  margin-top: 25px;
  padding: 22px 0;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.government-stats > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.government-stats strong {
  color: var(--silver);
  font-size: 1.65rem;
  font-weight: 400;
}

.government-stats span {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.69rem;
  line-height: 1.6;
}

.muted-note {
  color: #969eae !important;
  font-size: 0.8rem !important;
}

/* CHARACTER GALLERY */

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.character-card {
  min-width: 0;
  overflow: hidden;

  border: 1px solid var(--border);
  background: rgba(12, 15, 22, 0.87);

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.character-art {
  position: relative;
  height: 320px;
  overflow: hidden;

  display: flex;
  justify-content: center;
  align-items: end;

  background:
    radial-gradient(
      ellipse at 50% 65%,
      rgba(177, 202, 232, 0.15),
      transparent 65%
    ),
    linear-gradient(
      180deg,
      rgba(19, 25, 37, 0.7),
      rgba(9, 12, 19, 0.98)
    );
}

.character-art::after,
.commander-art::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(9, 12, 19, 0.6)
  );
}

.character-art img,
.commander-art img {
  position: relative;
  z-index: 1;

  display: block;
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center bottom;
}

.art-label {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 2;

  color: #c5d2e5;
  font-family: Arial, sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.13em;
}

.character-caption {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.character-rank {
  color: var(--ice);
  font-family: Arial, sans-serif;
  font-size: 0.59rem;
  letter-spacing: 0.13em;
}

.character-caption h3 {
  margin: 8px 0 4px;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
}

.character-caption p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 0.8rem;
}

.character-status {
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid rgba(143, 170, 203, 0.28);

  color: #c1d2e8;
  font-family: Arial, sans-serif;
  font-size: 0.53rem;
  letter-spacing: 0.12em;
}

.restricted-status {
  color: #a6a8b0;
  border-color: rgba(180, 184, 195, 0.2);
}

/* LOCKED CHARACTERS */

.restricted-character {
  background: rgba(10, 12, 18, 0.91);
}

.locked-art {
  position: relative;
  height: 320px;
  overflow: hidden;

  display: grid;
  place-items: center;

  background:
    radial-gradient(
      ellipse at center,
      rgba(160, 177, 203, 0.1),
      transparent 68%
    ),
    linear-gradient(
      160deg,
      rgba(29, 34, 46, 0.8),
      rgba(9, 11, 17, 0.98)
    );
}

.locked-art > span {
  position: relative;
  z-index: 2;

  color: rgba(206, 218, 235, 0.55);
  font-size: 4rem;
}

.locked-art i {
  position: absolute;
  width: 120px;
  height: 180px;
  bottom: -35px;

  border: 1px solid rgba(175, 192, 216, 0.09);
  border-radius: 60% 60% 10% 10%;

  background: linear-gradient(
    180deg,
    rgba(116, 136, 164, 0.1),
    rgba(8, 10, 15, 0.15)
  );

  filter: blur(1px);
}

.restricted-character .character-caption {
  border-top-style: dashed;
}

/* MILITARY */

.military-panel {
  padding: 32px;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 35px;
}

.military-number {
  padding: 25px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  border-right: 1px solid var(--border);
}

.military-number strong {
  color: #e1e9f4;
  font-size: clamp(2.7rem, 6vw, 4.2rem);
  font-weight: 400;
  line-height: 1.2;
}

.military-number span {
  margin-top: 14px;
  color: var(--ice);
  font-family: Arial, sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.13em;
  line-height: 1.7;
}

.military-description h3 {
  margin: 10px 0;
  font-size: 1.5rem;
  font-weight: 400;
}

.commander-row {
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.commander-symbol {
  width: 48px;
  height: 48px;
  flex-shrink: 0;

  display: grid;
  place-items: center;

  border: 1px solid var(--border-white);
  border-radius: 50%;
  color: var(--silver);
}

.commander-row h3 {
  margin: 4px 0;
  font-size: 1.15rem;
}

.commander-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.commander-card {
  width: min(340px, 100%);
  margin-top: 20px;
}

.commander-art {
  height: 350px;
  overflow: hidden;

  display: flex;
  justify-content: center;
  align-items: end;

  background:
    radial-gradient(
      ellipse at 50% 60%,
      rgba(177, 202, 232, 0.13),
      transparent 65%
    ),
    rgba(10, 13, 20, 0.9);
}

/* HISTORY */

.history-panel {
  position: relative;
  padding: 35px 35px 35px 70px;
}

.history-marker {
  position: absolute;
  top: 36px;
  left: 26px;

  width: 27px;
  height: 27px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border-white);
  border-radius: 50%;
  color: var(--silver);
  font-size: 0.8rem;
}

.history-content h3 {
  margin: 9px 0 15px;
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.4;
}

.history-divider {
  width: 100%;
  height: 1px;
  margin: 28px 0;
  background: var(--border);
}

.history-warning {
  margin-top: 25px;
  padding: 16px;

  display: flex;
  gap: 13px;
  align-items: flex-start;

  border: 1px solid rgba(201, 173, 120, 0.2);
  background: rgba(201, 173, 120, 0.04);
}

.history-warning > span {
  color: var(--gold);
  font-size: 1.15rem;
}

.history-warning p {
  margin: 0;
  color: #b8b2a6;
  font-size: 0.81rem;
  line-height: 1.8;
}

/* LOCATIONS */

.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.location-card {
  padding: 28px;
}

.location-symbol {
  width: 45px;
  height: 45px;
  margin-bottom: 20px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--silver);
  font-size: 1.4rem;
}

.location-note {
  display: inline-block;
  margin-top: 12px;

  color: #aab5c7;
  font-family: Arial, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}

/* ENDING */

.nation-ending {
  padding: 100px 20px 110px;
  text-align: center;
}

.ending-ornament {
  margin-bottom: 18px;
  color: var(--silver);
  font-size: 1.6rem;
}

.nation-ending h2 {
  margin: 15px 0 28px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 400;
}

.return-button {
  display: inline-block;
  padding: 13px 20px;

  border: 1px solid var(--border-white);
  background: rgba(12, 16, 24, 0.7);

  color: var(--silver);
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  text-decoration: none;

  transition: background 0.2s ease;
}

.return-button:hover {
  background: rgba(150, 177, 212, 0.1);
}

.return-button span {
  margin-right: 9px;
}

/* FOOTER */

.nation-footer {
  padding: 18px 5%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  border-top: 1px solid var(--border);
  background: rgba(8, 10, 15, 0.85);

  color: #858c9a;
  font-family: Arial, sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.13em;
}

/* TABLET */

@media (max-width: 800px) {
  .nation-hero {
    min-height: 500px;
  }

  .government-panel {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 25px;
    padding: 25px;
  }

  .government-emblem {
    width: 105px;
    height: 105px;
  }

  .government-emblem span {
    font-size: 3rem;
  }

  .character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-art,
  .locked-art {
    height: 300px;
  }

  .military-panel {
    gap: 25px;
    padding: 25px;
  }
}

/* MOBILE */

@media (max-width: 560px) {
  html {
    scroll-padding-top: 85px;
  }

  .nation-header {
    min-height: 68px;
    padding: 10px 13px;
    gap: 8px;
  }

  .back-link,
  .header-link {
    font-size: 0.67rem;
  }

  .header-subtitle {
    font-size: 0.48rem;
    letter-spacing: 0.07em;
  }

  .nation-content {
    width: calc(100% - 28px);
  }

  .nation-hero {
    min-height: 465px;
    padding: 75px 8px;
  }

  .hero-mark {
    top: 80px;
    right: 0;
    font-size: 11rem;
  }

  .nation-hero h1 {
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .hero-description {
    font-size: 0.88rem;
  }

  .dossier-section {
    padding: 43px 0;
  }

  .section-heading {
    margin-bottom: 23px;
  }

  .section-heading h2 {
    font-size: 1.85rem;
  }

  .information-grid,
  .present-grid,
  .location-grid,
  .character-grid {
    grid-template-columns: 1fr;
  }

  .info-card,
  .location-card {
    padding: 22px;
  }

  .government-panel {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 22px;
  }

  .government-emblem {
    width: 90px;
    height: 90px;
    margin: 0 auto;
  }

  .government-emblem span {
    font-size: 2.6rem;
  }

  .government-details h3 {
    font-size: 1.45rem;
  }

  .government-stats {
    gap: 10px;
  }

  .government-stats strong {
    font-size: 1.35rem;
  }

  .government-stats span {
    font-size: 0.62rem;
  }

  .character-grid {
    gap: 16px;
  }

  .character-art,
  .locked-art {
    height: 350px;
  }

  .commander-card {
    width: 100%;
  }

  .commander-art {
    height: 360px;
  }

  .military-panel {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .military-number {
    padding: 15px 10px 25px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .history-panel {
    padding: 65px 20px 24px;
  }

  .history-marker {
    top: 20px;
    left: 20px;
  }

  .history-content h3 {
    font-size: 1.4rem;
  }

  .nation-ending {
    padding: 75px 8px;
  }

  .nation-footer {
    padding: 15px 13px;
    font-size: 0.48rem;
    letter-spacing: 0.07em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

.character-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.character-card-link article {
    height: 100%;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.character-card-link:hover article {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.28);
}

.character-card-link:focus-visible {
    outline: 2px solid rgba(220, 220, 255, 0.85);
    outline-offset: 4px;
    border-radius: 8px;
}
.location-card-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.location-card-link .location-card {
  height: 100%;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.location-card-link:hover .location-card {
  transform: translateY(-4px);
  border-color: var(--border-white);
}

.location-card-link:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 4px;
}