/* Base */

:root {
  --sea-950: #031a28;
  --sea-900: #062c44;
  --sea-800: #0b3f5d;
  --sea-700: #11577a;
  --sea-500: #2c84a6;
  --sand-100: #f4f1e9;
  --sand-200: #e7dfce;
  --card: #ffffff;
  --ink: #142633;
  --muted: #567082;
  --line: #d3dde3;
  --danger: #a53838;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 20% -10%, #d5e9f1 0%, transparent 70%),
    linear-gradient(180deg, #edf5f8 0%, #f9fcfd 100%);
}

.container {
  width: min(1140px, 94vw);
  margin: 0 auto;
}

a {
  color: var(--sea-700);
  text-decoration-thickness: 1px;
}

.topbar {
  background: linear-gradient(120deg, var(--sea-950) 0%, var(--sea-900) 55%, var(--sea-700) 100%);
  color: #fff;
  border-bottom: 3px solid #d9b46b;
  box-shadow: 0 6px 24px rgba(3, 26, 40, 0.26);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrap {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border: 3px solid #e3bf78;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.34);
  transform: translateY(2px);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.brand-logo {
  width: 120%;
  height: 120%;
  object-fit: cover;
  border-radius: 50%;
  transform: scale(1.02);
}

.brand-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(227, 191, 120, 0.68);
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

.brand-logo-wrap.is-timing::after {
  opacity: 1;
  animation: brand-logo-hold 1.8s linear forwards;
}

.brand-logo-phantom {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1300;
  width: var(--logo-target-size);
  height: var(--logo-target-size);
  pointer-events: none;
  animation: brand-logo-sail 5.8s ease both;
  box-shadow:
    0 0 0 12px rgba(227, 191, 120, 0.24),
    0 30px 90px rgba(3, 26, 40, 0.42);
}

.brand-logo-phantom::before {
  content: "";
  position: fixed;
  inset: -100vmax;
  z-index: -1;
  background: radial-gradient(circle, rgba(3, 26, 40, 0.18), rgba(3, 26, 40, 0));
  pointer-events: none;
}

@keyframes brand-logo-hold {
  from {
    transform: scale(0.82);
  }

  to {
    transform: scale(1.18);
  }
}

@keyframes brand-logo-sail {
  0% {
    opacity: 0;
    transform:
      translate(
        calc(var(--logo-start-x) - (var(--logo-target-size) / 2)),
        calc(var(--logo-start-y) - (var(--logo-target-size) / 2))
      )
      scale(calc(var(--logo-start-size) / var(--logo-target-size)));
  }

  14% {
    opacity: 1;
  }

  28%,
  86% {
    opacity: 1;
    transform: translate(calc(50vw - (var(--logo-target-size) / 2)), calc(50vh - (var(--logo-target-size) / 2))) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(50vw - (var(--logo-target-size) / 2)), calc(50vh - (var(--logo-target-size) / 2))) scale(0.96);
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-family: "Cinzel", serif;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  letter-spacing: 1.8px;
  line-height: 1;
}

.brand-version {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.88;
  margin-left: 8px;
}

.brand-subtitle {
  font-size: 0.82rem;
  color: #bfd7e5;
  line-height: 1.2;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 7px;
}

.topbar nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.topbar nav a.is-active {
  background: rgba(217, 180, 107, 0.24);
  box-shadow: inset 0 0 0 1px rgba(227, 191, 120, 0.45);
}

.topbar nav .topbar-profile-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  margin-left: 8px;
  padding: 2px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(217, 180, 107, 0.85));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(3, 26, 40, 0.24);
}

.topbar nav .topbar-profile-avatar:hover,
.topbar nav .topbar-profile-avatar:focus-visible,
.topbar nav .topbar-profile-avatar.is-active {
  background:
    linear-gradient(135deg, #fff, #e3bf78);
  box-shadow:
    0 0 0 2px rgba(227, 191, 120, 0.55),
    0 10px 22px rgba(3, 26, 40, 0.32);
  transform: translateY(-1px);
}

.topbar-profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

main.container {
  flex: 1 0 auto;
  padding: 22px 0 24px;
}

.hero {
  background:
    linear-gradient(90deg, rgba(4, 31, 49, 0.84) 0%, rgba(6, 48, 73, 0.78) 45%, rgba(17, 87, 122, 0.55) 100%),
    url("/img/hero-bg.jpg") center center / cover no-repeat;
  border-radius: 14px;
  border: 1px solid #7aa4b7;
  box-shadow: 0 12px 28px rgba(3, 26, 40, 0.2);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  padding: clamp(18px, 5vw, 44px);
  color: #fff;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 34px);
  min-height: clamp(210px, 28vw, 290px);
}

.hero-copy {
  max-width: 760px;
}

.hero-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrap {
  width: clamp(150px, 18vw, 210px);
  height: clamp(150px, 18vw, 210px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
  border: 5px solid #e3bf78;
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.14),
    0 18px 36px rgba(3, 26, 40, 0.22);
}

.hero-logo-image {
  width: 122%;
  height: 129%;
  object-fit: cover;
  border-radius: 50%;
  transform: scale(1.02);
  filter: saturate(1.06) brightness(1.03);
}

.kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #d5e7ef;
  font-weight: 700;
}

.hero h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.hero h2.restricted-title {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(2, 22, 35, 0.78);
  border: 1px solid rgba(227, 242, 249, 0.7);
  color: #c7dbe6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  font-size: clamp(1.45rem, 3.5vw, 2.3rem);
}

.hero p {
  margin: 12px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  color: #e5f0f5;
}

.search {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(12, 37, 52, 0.06);
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  background: linear-gradient(180deg, #fbfdfd 0%, #f4f9fb 100%);
}

.highlights article {
  border: 1px solid #d5e4eb;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

@media (max-width: 800px) {
  .topbar .container { flex-direction: column; align-items: flex-start; }
  .brand-logo-wrap { width: 60px; height: 60px; }
  .brand-logo { width: 44px; height: 44px; }
  .search { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 18px;
  }

  .hero-logo-panel {
    justify-content: center;
  }

  .hero-logo-wrap {
    width: 108px;
    height: 108px;
  }
}
