/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #FFFFFF;
  background-color: #0B1D3A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid #F5B041;
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #F5B041;
}

a:focus-visible {
  outline: 2px solid #F5B041;
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== CSS Variables ===== */
:root {
  --color-deep-blue: #0B1D3A;
  --color-gold: #F5B041;
  --color-red: #E63946;
  --color-white: #FFFFFF;
  --color-gray: #8D99AE;
  --color-dark-bg: #1A1A2E;
  --color-glass: rgba(255, 255, 255, 0.1);
  --color-glass-hover: rgba(255, 255, 255, 0.18);
  --gradient-deep-blue: linear-gradient(135deg, #0B1D3A, #162447);
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --header-upper-height: 48px;
  --header-lower-height: 56px;
  --header-total-height: calc(var(--header-upper-height) + var(--header-lower-height));
  --content-max-width: 1200px;
  --content-padding: 24px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 10000;
  padding: 12px 24px;
  background-color: #F5B041;
  color: #0B1D3A;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 4px 0;
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 0;
}

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #F5B041, #E63946);
  z-index: 9999;
  transition: width 0.08s linear;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }
}

/* ===== Site Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9000;
  background: var(--gradient-deep-blue);
  border-bottom: 1px solid rgba(245, 176, 65, 0.2);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
}

.header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Upper Header */
.header-upper {
  height: var(--header-upper-height);
  border-bottom: 1px solid rgba(245, 176, 65, 0.15);
  background: rgba(11, 29, 58, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-upper .header-inner {
  height: var(--header-upper-height);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.9;
  color: inherit;
}

.brand-icon {
  font-size: 1.5rem;
  line-height: 1;
  color: #F5B041;
  filter: drop-shadow(0 0 6px rgba(245, 176, 65, 0.4));
}

.brand-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #F5B041;
  text-shadow: 0 0 20px rgba(245, 176, 65, 0.15);
}

.header-upper-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-tagline {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.03em;
  font-weight: 400;
  display: none;
}

.search-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 176, 65, 0.25);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
}

.search-link:hover {
  border-color: #F5B041;
  color: #F5B041;
  background: rgba(245, 176, 65, 0.1);
}

.search-icon {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
}

.search-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
}

/* Lower Header */
.header-lower {
  height: var(--header-lower-height);
  background: rgba(11, 29, 58, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-lower .header-inner {
  height: var(--header-lower-height);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
  position: relative;
}

.nav-list a:hover {
  color: #F5B041;
  background: rgba(245, 176, 65, 0.08);
}

.nav-list a[aria-current="page"] {
  color: #F5B041;
  font-weight: 700;
  background: rgba(245, 176, 65, 0.12);
  box-shadow: inset 0 -2px 0 #F5B041;
}

.nav-list a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: #F5B041;
  border-radius: 1px;
}

/* Nav Toggle (Mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 176, 65, 0.2);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(245, 176, 65, 0.12);
  border-color: rgba(245, 176, 65, 0.4);
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #F5B041;
  border-radius: 1px;
  transition: all 0.25s ease;
  transform-origin: center;
}

/* ===== Site Footer ===== */
.site-footer {
  background: var(--color-dark-bg);
  border-top: 1px solid rgba(245, 176, 65, 0.15);
  padding: 48px 0 0;
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-brand-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-brand-icon {
  font-size: 1.6rem;
  color: #F5B041;
  filter: drop-shadow(0 0 8px rgba(245, 176, 65, 0.3));
}

.footer-brand-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #F5B041;
}

.footer-trust {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  max-width: 480px;
  border-left: 2px solid rgba(245, 176, 65, 0.3);
  padding-left: 16px;
}

.footer-heading {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #F5B041;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245, 176, 65, 0.15);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact-list li {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.footer-contact-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.footer-contact-list a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}

.footer-contact-list a:hover {
  color: #F5B041;
}

.footer-link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-list a {
  display: inline-block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 4px 0;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.footer-link-list a:hover {
  color: #F5B041;
  border-bottom-color: rgba(245, 176, 65, 0.3);
}

.footer-divider {
  max-width: var(--content-max-width);
  margin: 32px auto 0;
  padding: 0 var(--content-padding);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 176, 65, 0.3), transparent);
}

.footer-bottom {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 20px var(--content-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
}

.footer-icp {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
}

/* ===== Shared Utilities ===== */
.site-main {
  min-height: 60vh;
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.section-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 680px;
  line-height: 1.7;
}

.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 176, 65, 0.12);
  border-radius: var(--border-radius-md);
  padding: 24px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 176, 65, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-gold {
  background: #F5B041;
  color: #0B1D3A;
}

.btn-gold:hover {
  background: #e8a332;
  color: #0B1D3A;
  box-shadow: 0 4px 20px rgba(245, 176, 65, 0.3);
}

.btn-outline {
  background: transparent;
  color: #F5B041;
  border: 1px solid rgba(245, 176, 65, 0.4);
}

.btn-outline:hover {
  background: rgba(245, 176, 65, 0.1);
  border-color: #F5B041;
  color: #F5B041;
}

.btn-red {
  background: #E63946;
  color: #FFFFFF;
}

.btn-red:hover {
  background: #c92e3a;
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.3);
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .brand-tagline {
    display: inline-block;
  }
  :root {
    --content-padding: 32px;
  }
}

@media (min-width: 768px) {
  .nav-list a {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  .brand-name {
    font-size: 1.35rem;
  }
  .footer-inner {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 48px;
  }
}

@media (min-width: 1024px) {
  :root {
    --content-padding: 40px;
  }
  .nav-list {
    gap: 8px;
  }
  .nav-list a {
    padding: 12px 24px;
    font-size: 1rem;
  }
  .brand-tagline {
    font-size: 0.9rem;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 29, 58, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(245, 176, 65, 0.15);
    padding: 16px 0;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.35s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
  }

  .main-nav[data-open] {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
    padding: 16px 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 2px;
    padding: 0 16px;
  }

  .nav-list a {
    padding: 14px 20px;
    font-size: 1rem;
    width: 100%;
    border-radius: var(--border-radius-sm);
  }

  .nav-list a[aria-current="page"] {
    background: rgba(245, 176, 65, 0.15);
    box-shadow: inset 4px 0 0 #F5B041;
  }

  .nav-list a[aria-current="page"]::after {
    display: none;
  }

  .header-lower {
    position: relative;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .brand-tagline {
    display: none;
  }

  .search-text {
    display: none;
  }

  .search-link {
    padding: 6px 10px;
    border-radius: 50%;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .scroll-progress {
    height: 2px;
  }
}

@media (max-width: 480px) {
  :root {
    --content-padding: 16px;
    --header-upper-height: 44px;
    --header-lower-height: 50px;
  }
  .brand-name {
    font-size: 1.1rem;
  }
  .brand-icon {
    font-size: 1.2rem;
  }
  .footer-contact-list li {
    font-size: 0.8rem;
  }
  .footer-trust {
    font-size: 0.8rem;
    padding-left: 12px;
  }
}

/* ===== Nav Toggle Animation ===== */
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Image Container Base ===== */
.image-placeholder {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(245, 176, 65, 0.2);
  border-radius: var(--border-radius-md);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 176, 65, 0.05), rgba(230, 57, 70, 0.05));
  pointer-events: none;
}

/* ===== Focus Visible Global ===== */
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #F5B041;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Selection ===== */
::selection {
  background: rgba(245, 176, 65, 0.3);
  color: #FFFFFF;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0B1D3A;
}

::-webkit-scrollbar-thumb {
  background: rgba(245, 176, 65, 0.25);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 176, 65, 0.4);
}
