/* ==========================================================
   米兰新站 · Find It Fast — 全站共享样式
   ========================================================== */

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

:root {
  --primary: #D50032;
  --primary-dark: #8B0000;
  --bg-dark: #0E0E10;
  --surface-dark: #1A1A2E;
  --accent: #39FF14;
  --gold: #FFD700;
  --bg-light: #F5F5F5;
  --text-secondary: #9E9E9E;
  --text-primary: #FFFFFF;
  --font-headline: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --header-height: 72px;
  --content-width: 1280px;
  --gutter: 48px;
  --header-bg: rgba(14, 14, 16, 0.92);
  --border-light: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.14);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.2);
  --radius: 6px;
  --ease: cubic-bezier(0.65, 0.05, 0.36, 1);
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-light);
  color: #1A1A1A;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

main {
  flex: 1 0 auto;
  width: 100%;
  padding-top: var(--header-height);
}

#main-content {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

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

ul, ol {
  list-style: none;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0E0E10;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }
.text-red { color: var(--primary); }

.container,
.header-inner,
.footer-inner {
  width: min(100% - var(--gutter), var(--content-width));
  margin-inline: auto;
}

.content-wrapper {
  padding: 80px 0;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -56px;
  left: 16px;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--accent);
  color: #0E0E10;
  font-size: 14px;
  font-weight: 700;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: top 0.3s var(--ease);
}

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

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transition: width 0.08s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 3px;
  right: 40px;
  width: 220px;
  height: 4px;
  background: var(--primary);
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.55;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: transform 0.35s var(--ease);
}

.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(-3deg);
}

.brand-text {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 8px;
  border: 1px solid rgba(57, 255, 20, 0.45);
  border-radius: 20px;
  line-height: 1;
  white-space: nowrap;
}

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

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

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}

.nav-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-list a[aria-current="page"] {
  color: var(--accent);
  background: rgba(57, 255, 20, 0.08);
}

.nav-list a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-list a[aria-current="page"] .nav-index {
  color: var(--accent);
}

.nav-list a:hover .nav-index {
  color: rgba(255, 255, 255, 0.6);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s, background 0.25s;
}

.nav-toggle:hover {
  border-color: rgba(57, 255, 20, 0.5);
  background: rgba(57, 255, 20, 0.05);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) 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(-7px) rotate(-45deg);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  flex-shrink: 0;
  margin-top: auto;
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.65);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 55%, var(--accent) 100%);
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr;
  gap: 56px;
  padding: 72px 0 48px;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.footer-brand-link::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--primary);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%);
}

.footer-desc {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.5);
}

.footer-slogan {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 10px;
  border-left: 2px solid var(--accent);
  background: rgba(57, 255, 20, 0.06);
}

.footer-col-title {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.footer-nav li + li,
.footer-contact li + li {
  margin-top: 12px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.25s, transform 0.25s;
}

.footer-nav a::before {
  content: '/';
  font-family: var(--font-mono);
  color: var(--primary);
  opacity: 0.6;
  transition: color 0.25s;
}

.footer-nav a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-nav a:hover::before {
  color: var(--accent);
}

.footer-contact {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.footer-contact-label {
  flex-shrink: 0;
  width: 4em;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.footer-contact-value {
  color: rgba(255, 255, 255, 0.72);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 24px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.48);
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
}

.footer-legal a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(213, 0, 50, 0.28);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.35);
}

.btn-accent {
  background: var(--accent);
  color: #0E0E10;
  box-shadow: 0 2px 12px rgba(57, 255, 20, 0.22);
}

.btn-accent:hover {
  background: #52ff39;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(57, 255, 20, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid var(--primary-dark);
}

.btn-outline-dark:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  font-family: var(--font-mono);
  color: rgba(0, 0, 0, 0.25);
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb [aria-current="page"] {
  color: #1A1A1A;
  font-weight: 600;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.grid-gap-sm {
  gap: 16px;
}

.grid-gap-lg {
  gap: 40px;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-dark {
  background: var(--surface-dark);
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.card-dark h3 {
  color: #fff;
}

.card-dark .card-meta {
  color: var(--text-secondary);
}

.card-red {
  background: var(--primary);
  border: none;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(213, 0, 50, 0.3);
}

.card-red h3 {
  color: #fff;
}

.card-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.card-excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.card-dark .card-excerpt,
.card-red .card-excerpt {
  color: rgba(255, 255, 255, 0.72);
}

.card-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 3px;
  background: rgba(213, 0, 50, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(213, 0, 50, 0.22);
}

.tag-accent {
  background: rgba(57, 255, 20, 0.1);
  color: #1d7a10;
  border-color: rgba(57, 255, 20, 0.35);
}

.tag-gold {
  background: rgba(255, 215, 0, 0.12);
  color: #8a6d00;
  border-color: rgba(255, 215, 0, 0.35);
}

/* ---------- Section Title ---------- */
.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.section-title h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  margin: 0;
}

.section-title-light h2 {
  color: #fff;
}

.section-index {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  padding: 4px 10px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.section-title-line {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
}

.section-title-light .section-title-line {
  background: var(--border-light);
}

.section-title-light .section-index {
  color: var(--accent);
  border-color: rgba(57, 255, 20, 0.5);
}

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  margin: 40px 0;
}

/* ---------- Sections ---------- */
.section-dark {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #fff;
}

.section-surface {
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.7);
}

.section-red {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.9);
}

.section-red h2,
.section-red h3 {
  color: #fff;
}

.section-light {
  background: var(--bg-light);
}

/* ---------- Image Frames ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-dark);
  border-radius: var(--radius);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.img-frame:hover img {
  transform: scale(1.02);
}

.img-ratio-16x9 {
  aspect-ratio: 16 / 9;
}

.img-ratio-4x3 {
  aspect-ratio: 4 / 3;
}

.img-ratio-1x1 {
  aspect-ratio: 1 / 1;
}

.img-frame-skew {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

/* ---------- Scroll Reveal ---------- */
.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.js-enabled [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* ---------- Responsive ---------- */
@media (min-width: 901px) and (max-width: 1100px) {
  .nav-list a {
    padding: 8px 8px;
    font-size: 13px;
  }

  .brand-badge {
    display: none;
  }

  .footer-grid {
    gap: 32px;
  }
}

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

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 990;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .main-nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

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

  .nav-list a {
    padding: 14px 16px;
    font-size: 16px;
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: 4px;
  }

  .nav-list a[aria-current="page"] {
    background: rgba(57, 255, 20, 0.06);
    border-left-color: var(--accent);
    color: var(--accent);
  }

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

  .nav-index {
    font-size: 11px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 0 40px;
  }

  .footer-brand {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .brand-badge {
    display: none;
  }

  .content-wrapper {
    padding: 56px 0;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .footer-legal {
    gap: 16px;
  }

  .footer-contact li {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }

  .footer-contact-label {
    width: auto;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 32px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-enabled [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .brand:hover .brand-mark,
  .btn:hover,
  .card:hover,
  .footer-nav a:hover,
  .img-frame:hover img {
    transform: none;
  }

  .scroll-progress-bar {
    transition: none;
  }
}
