:root {
  --ph-red: #E63946;
  --ph-gold: #C99700;
  --ph-blue: #00A8E8;
  --ph-ink: #1A1A1A;
  --ph-charcoal: #333333;
  --ph-silver: #F5F5F5;
  --ph-orange: #FF6B35;
  --ph-midnight: #0B1D3A;
  --font-head: 'Arial Black', 'Impact', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Roboto Mono', monospace;
  --container: 1280px;
  --su: 8px;
  --header-h: 72px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ph-ink);
  background-color: var(--ph-silver);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

ul, ol {
  list-style: none;
}

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

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

::selection {
  background: var(--ph-red);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--ph-blue);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: calc(var(--su) * 3);
}

.skip-link {
  position: fixed;
  top: -120%;
  left: 16px;
  z-index: 9999;
  background: var(--ph-red);
  color: #fff;
  padding: 12px 24px;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--ph-ink);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  background: var(--ph-ink);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--ph-blue);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: calc(var(--su) * 2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--ph-red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ph-blue);
  letter-spacing: 0.15em;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: calc(var(--su) * 2);
}

.badge-upgrade {
  display: inline-block;
  background: var(--ph-red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  width: 44px;
  height: 44px;
  gap: 6px;
  padding: 8px;
  background: var(--ph-charcoal);
}

.nav-toggle-bar {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--ph-silver);
  transition: transform 0.2s ease, width 0.2s ease;
}

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

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

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

.main-nav {
  background: var(--ph-ink);
  border-top: 1px solid var(--ph-charcoal);
}

.nav-list {
  display: flex;
  gap: 0;
}

.nav-list a {
  display: block;
  padding: 14px 24px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--ph-silver);
  border-right: 1px solid var(--ph-charcoal);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-list li:first-child a {
  border-left: 1px solid var(--ph-charcoal);
}

.nav-list a:hover {
  background: var(--ph-red);
  color: #fff;
}

.nav-list a[aria-current="page"] {
  background: var(--ph-red);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--ph-gold);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--ph-red), var(--ph-orange), var(--ph-blue));
  transition: width 0.05s linear;
}

.site-footer {
  background: var(--ph-midnight);
  color: rgba(255, 255, 255, 0.75);
  margin-top: auto;
}

.footer-rule {
  height: 6px;
  background: linear-gradient(90deg, var(--ph-red) 0%, var(--ph-orange) 30%, var(--ph-gold) 65%, var(--ph-blue) 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: calc(var(--su) * 4);
  padding-top: calc(var(--su) * 6);
  padding-bottom: calc(var(--su) * 5);
}

.footer-brand .brand-name {
  font-size: 22px;
}

.footer-brand .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 24px;
}

.footer-desc {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
}

.footer-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ph-gold);
  display: inline-block;
}

.footer-nav ul,
.footer-contact p {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  width: fit-content;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.footer-nav a:hover {
  color: var(--ph-blue);
  padding-left: 6px;
}

.footer-contact p {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid var(--ph-ink);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease, color 0.15s ease;
  text-align: center;
}

.btn-primary {
  background: var(--ph-red);
  color: #fff;
  box-shadow: 6px 6px 0 var(--ph-ink);
}

.btn-primary:hover {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ph-ink);
}

.btn-outline {
  background: transparent;
  color: var(--ph-ink);
  border-color: var(--ph-ink);
  box-shadow: 6px 6px 0 var(--ph-ink);
}

.btn-outline:hover {
  background: var(--ph-blue);
  color: #fff;
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ph-ink);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  padding: 16px 0;
  color: var(--ph-charcoal);
}

.breadcrumbs a {
  color: var(--ph-blue);
  transition: color 0.15s ease;
}

.breadcrumbs a:hover {
  color: var(--ph-red);
}

.breadcrumbs .sep {
  color: var(--ph-gold);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.15;
  color: var(--ph-ink);
  position: relative;
  padding-left: 20px;
  margin-bottom: calc(var(--su) * 3);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 8px;
  background: var(--ph-gold);
  transform: skewY(-30deg);
}

.section-title[data-theme="dark"] {
  color: #fff;
}

.grid {
  display: grid;
  gap: calc(var(--su) * 3);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.phx-img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ph-ink);
  overflow: hidden;
  border-left: 4px solid var(--ph-gold);
}

.phx-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--ph-charcoal) 25%, var(--ph-ink) 50%, var(--ph-charcoal) 75%);
  background-size: 200% 200%;
  animation: phx-shimmer 4s ease infinite;
}

.phx-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 107, 53, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: phx-scan 3.5s ease-in-out infinite;
}

.phx-img[data-ratio="4:3"] {
  aspect-ratio: 4 / 3;
}

.phx-img[data-ratio="1:1"] {
  aspect-ratio: 1 / 1;
}

.phx-img[data-ratio="21:9"] {
  aspect-ratio: 21 / 9;
}

@keyframes phx-scan {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

@keyframes phx-shimmer {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: calc(var(--su) * 2);
}

.data-card {
  background: #fff;
  border: 2px solid var(--ph-ink);
  padding: calc(var(--su) * 3);
  box-shadow: 4px 4px 0 rgba(27, 27, 27, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.data-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 rgba(27, 27, 27, 0.15);
  border-color: var(--ph-red);
}

.data-card .card-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ph-charcoal);
  margin-bottom: 8px;
}

.data-card .card-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--ph-blue);
  line-height: 1.2;
}

.data-card .card-unit {
  font-size: 14px;
  color: var(--ph-gold);
  font-weight: 700;
  margin-left: 4px;
}

.cut-edge {
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}

.cut-edge-lg {
  clip-path: polygon(0 0, 100% 6%, 97% 100%, 0 94%);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--su) * 3);
  }
}

@media (max-width: 768px) {
  .container {
    padding-inline: calc(var(--su) * 2);
  }

  .masthead {
    min-height: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .badge-upgrade {
    font-size: 11px;
    padding: 4px 10px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-tagline {
    font-size: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .main-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .main-nav[data-open="true"] {
    max-height: 480px;
  }

  .nav-list {
    flex-direction: column;
    padding: 8px 0;
  }

  .nav-list li:first-child a,
  .nav-list a {
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--ph-charcoal);
    padding: 14px 16px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--su) * 3);
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}
