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

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

body {
  font-family: 'Open Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #00BFFF;
  --primary-dark: #009ACD;
  --primary-light: #66D9FF;
  --accent: #FF4500;
  --accent-dark: #DC143C;
  --accent-light: #FF7A50;
  --bg-dark: #1A1A2E;
  --bg-dark-alt: #16213E;
  --bg-light: #F5F5F5;
  --surface: #FFFFFF;
  --text-primary: #222222;
  --text-secondary: #6B6B6B;
  --text-light: #F0F0F0;
  --text-muted: #A0A0A0;
  --success: #32CD32;
  --warning: #FFD700;
  --border-color: #DDE0E4;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.18);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-heading: 'Roboto Condensed', 'Arial Narrow', 'Impact', sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', 'Courier New', monospace;
  --header-h: 220px;
  --header-h-mobile: 64px;
  --container-max: 1200px;
  --grid-cols: 3;
  --transition: 0.25s ease;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 0.3s ease;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--bg-dark);
  color: var(--text-light);
  border-bottom: 3px solid var(--primary);
  position: relative;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: stretch;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  min-height: var(--header-h);
}

/* Header Brand (Left) */
.header-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 38%;
  padding: 24px 24px 24px 0;
  border-right: 2px solid rgba(0, 191, 255, 0.25);
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 2.8rem;
  color: var(--primary);
  letter-spacing: 0.02em;
  line-height: 1.1;
  transition: color var(--transition);
  text-transform: uppercase;
}

.logo:hover,
.logo:focus-visible {
  color: var(--accent);
}

.logo-tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Header Nav (Right) */
.header-nav {
  width: 62%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 0 20px 24px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  max-width: 320px;
}

.nav-item {
  width: 100%;
  text-align: right;
}

.nav-link {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
  position: relative;
  letter-spacing: 0.04em;
}

.nav-link::before {
  content: "▸ ";
  font-family: var(--font-mono);
  color: var(--primary);
  opacity: 0.6;
  transition: opacity var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
  background: rgba(255, 69, 0, 0.08);
  border-color: rgba(255, 69, 0, 0.2);
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  opacity: 1;
  color: var(--accent);
}

.nav-link[aria-current="page"] {
  color: var(--primary);
  border-left: 4px solid var(--primary);
  background: rgba(0, 191, 255, 0.06);
  padding-left: 12px;
}

.nav-link[aria-current="page"]::before {
  color: var(--primary);
  opacity: 1;
}

/* Nav Toggle (Mobile) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  flex-shrink: 0;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--primary);
  background: rgba(0, 191, 255, 0.1);
}

.nav-toggle-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-light);
  position: relative;
  transition: background var(--transition);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-light);
  transition: all var(--transition);
}

.nav-toggle-icon::before {
  top: -8px;
}

.nav-toggle-icon::after {
  top: 8px;
}

/* Nav Toggle Open State */
.nav-toggle[data-open] .nav-toggle-icon {
  background: transparent;
}

.nav-toggle[data-open] .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
  background: var(--accent);
}

.nav-toggle[data-open] .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
  background: var(--accent);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-muted);
  border-top: 3px solid var(--primary);
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 32px 48px;
  align-items: start;
}

.footer-brand {
  grid-column: 1;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 2rem;
  color: var(--primary);
  transition: color var(--transition);
  text-transform: uppercase;
}

.footer-logo:hover,
.footer-logo:focus-visible {
  color: var(--accent);
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-links {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.footer-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  width: fit-content;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.footer-contact {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-contact span {
  display: block;
}

.footer-phone::before {
  content: "📞 ";
  margin-right: 4px;
}

.footer-email::before {
  content: "✉ ";
  margin-right: 4px;
}

.footer-address::before {
  content: "📍 ";
  margin-right: 4px;
}

.footer-note {
  grid-column: 1 / -1;
  background: rgba(0, 191, 255, 0.06);
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copyright {
  order: 1;
}

.footer-icp {
  order: 2;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ===== BUTTON ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--primary);
  color: #fff;
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 24px;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 12px 0;
  font-family: var(--font-mono);
}

.breadcrumb a {
  color: var(--primary);
  transition: color var(--transition);
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.breadcrumb span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
  gap: 24px;
}

/* ===== SECTION ===== */
.section {
  padding: 64px 0;
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 32px;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 10000;
  transition: width 0.08s linear;
  pointer-events: none;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  :root {
    --header-h: 180px;
  }

  .header-brand {
    width: 34%;
  }

  .header-nav {
    width: 66%;
  }

  .logo {
    font-size: 2.2rem;
  }

  .nav-link {
    font-size: 1rem;
    padding: 6px 12px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: auto;
    --header-h-mobile: 60px;
  }

  .header-container {
    flex-wrap: wrap;
    padding: 0 16px;
    min-height: var(--header-h-mobile);
  }

  .header-brand {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-right: none;
    flex: 1;
  }

  .logo {
    font-size: 1.8rem;
  }

  .logo-tagline {
    display: none;
  }

  .nav-toggle {
    display: flex;
    order: 3;
  }

  .header-nav {
    width: 100%;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    order: 4;
  }

  .header-nav[data-open] {
    max-height: 480px;
    opacity: 1;
    padding: 12px 0 20px;
  }

  .nav-list {
    align-items: stretch;
    max-width: 100%;
    gap: 4px;
  }

  .nav-item {
    text-align: left;
  }

  .nav-link {
    font-size: 1rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
  }

  .nav-link::before {
    content: "▸ ";
  }

  .nav-link[aria-current="page"] {
    border-left: 4px solid var(--primary);
    border-top: none;
    background: rgba(0, 191, 255, 0.08);
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 16px 24px;
  }

  .footer-brand {
    grid-column: 1;
  }

  .footer-links {
    grid-column: 1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-contact {
    grid-column: 1;
  }

  .footer-note {
    grid-column: 1;
  }

  .footer-bottom {
    grid-column: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section {
    padding: 40px 0;
  }

  .section__title {
    font-size: 1.7rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .card {
    padding: 18px;
  }

  .breadcrumb {
    font-size: 0.78rem;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 8px 12px;
  }

  .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 10px;
  }

  .container {
    padding: 0 12px;
  }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  .header-nav {
    transition: none;
  }

  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    transition: none;
  }
}

/* ===== UTILITY ===== */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}
