@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

/* =============================================
   CSS 变量 & 基础重置
   ============================================= */
:root {
  --parchment: #f5e6c8;
  --amber: #d4a574;
  --ink: #262117;
  --ink-light: #4a3f2f;
  --amber-dark: #b8884a;
  --amber-pale: #efe0c0;
  --card-bg: #faf3e4;
  --radius: 10px;
  --font-head: 'Kalam', 'Patrick Hand', cursive;
  --font-body: 'Patrick Hand', 'Noto Sans SC', system-ui, sans-serif;
  --nav-h: 60px;
  --anchor-h: 40px;
  --max-w: 1100px;
  --content-w: 720px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

/* =============================================
   Film Grain Overlay (SVG filter)
   ============================================= */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23grain)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* =============================================
   Light Leak
   ============================================= */
.light-leak {
  position: fixed;
  top: -20%;
  right: -10%;
  width: 50vw;
  height: 70vh;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(ellipse at top right, rgba(212,165,116,0.18) 0%, transparent 65%);
  animation: leakPulse 8s ease-in-out infinite alternate;
}
.light-leak-subtle { opacity: 0.5; }

@keyframes leakPulse {
  from { opacity: 0.4; transform: scale(1); }
  to   { opacity: 0.9; transform: scale(1.08); }
}

/* =============================================
   VHS Tracking Effect
   ============================================= */
@keyframes vhsTrack {
  0%   { clip-path: inset(0 0 100% 0); opacity: 0; }
  5%   { clip-path: inset(40% 0 55% 0); opacity: 0.7; transform: skewX(-1deg); }
  10%  { clip-path: inset(70% 0 25% 0); opacity: 0.5; transform: skewX(0.5deg); }
  15%  { clip-path: inset(0 0 100% 0); opacity: 0; }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; }
}

/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.3;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin-top: 2rem; margin-bottom: 0.5rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; margin-bottom: 0.4rem; }
h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
a { color: var(--amber-dark); text-decoration: underline; transition: color var(--transition); }
a:hover { color: var(--ink); }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }
small { font-size: 0.85rem; color: var(--ink-light); }

/* =============================================
   Tape Strip Divider
   ============================================= */
.tape-strip {
  display: block;
  width: 100%;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--amber) 0px,
    var(--amber) 24px,
    var(--amber-dark) 24px,
    var(--amber-dark) 28px,
    var(--amber) 28px,
    var(--amber) 52px,
    transparent 52px,
    transparent 56px
  );
  margin-bottom: 1.2rem;
  border-radius: 2px;
  opacity: 0.8;
}

hr {
  border: none;
  border-top: 2px dashed var(--amber);
  margin: 0.8rem 0 1.5rem;
  opacity: 0.6;
}

/* =============================================
   Eyebrow Label
   ============================================= */
.eyebrow-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--ink);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 0.8rem;
}

/* =============================================
   Buttons
   ============================================= */
.btn-primary, .btn-secondary {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
  line-height: 1.3;
}
.btn-primary {
  background: var(--ink);
  color: var(--parchment);
  border: 2px solid var(--ink);
}
.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: var(--parchment);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--parchment);
  transform: translateY(-2px);
}

/* =============================================
   Site Header
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--ink);
  border-bottom: 3px solid var(--amber);
  height: var(--nav-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark { flex-shrink: 0; }
.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--amber);
  color: var(--ink);
  font-size: 1.3rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
}
.brand-icon:hover { background: var(--amber-dark); color: var(--parchment); }
.logo-icon { border-radius: 6px; display: block; }

.main-nav { flex: 1; overflow: hidden; }
.main-nav ol {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav ol::-webkit-scrollbar { display: none; }
.main-nav ol > li > a {
  display: block;
  color: var(--parchment);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.88rem;
  padding: 10px 12px;
  border-radius: 6px;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: background var(--transition), color var(--transition);
}
.main-nav ol > li > a:hover {
  background: var(--amber);
  color: var(--ink);
}

.nav-contact {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  background: var(--amber);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap;
  transition: background var(--transition);
}
.nav-contact:hover { background: var(--amber-dark); color: var(--parchment); }

/* =============================================
   Sticky Anchor Bar
   ============================================= */
.sticky-anchor {
  position: sticky;
  top: var(--nav-h);
  z-index: 800;
  background: var(--amber-pale);
  border-bottom: 2px solid var(--amber);
  height: var(--anchor-h);
}
.sticky-anchor ol {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-anchor ol::-webkit-scrollbar { display: none; }
.sticky-anchor ol > li > a {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--amber);
  transition: background var(--transition);
}
.sticky-anchor ol > li:last-child > a { border-right: none; }
.sticky-anchor ol > li > a:hover { background: var(--amber); color: var(--ink); }

/* =============================================
   Wrap
   ============================================= */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* =============================================
   Hero Section (Home)
   ============================================= */
.hero-section {
  min-height: calc(100vh - var(--nav-h) - var(--anchor-h));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 3rem 0;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 55%;
  height: 100%;
  background: var(--ink);
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}
.hero-section article.hero-content {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero-text {
  flex: 1;
  min-width: 0;
}
.hero-text h1 {
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
  max-width: 480px;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-media {
  flex: 0 0 42%;
  max-width: 42%;
  position: relative;
}
.hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  filter: sepia(0.25) contrast(1.05) saturate(0.85);
}

.vhs-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(38,33,23,0.85);
  color: var(--amber);
  font-family: var(--font-head);
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}
.vhs-label span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #e53; 
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* =============================================
   Polaroid Cards
   ============================================= */
.polaroid {
  background: var(--card-bg);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 3px 4px 0 var(--amber);
  transition: transform var(--transition), box-shadow var(--transition);
}
.polaroid:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 6px 8px 0 var(--amber-dark);
}

.card-thumb, .rank-thumb, .review-hero-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: sepia(0.2) contrast(1.05) saturate(0.85);
}

.card-body {
  padding: 1rem;
}
.card-body h3 { margin-bottom: 0.3rem; }
.card-body h3 a { text-decoration: none; color: var(--ink); }
.card-body h3 a:hover { color: var(--amber-dark); }
.card-desc { color: var(--ink-light); font-size: 0.9rem; }
.card-date { font-size: 0.82rem; color: var(--ink-light); margin-bottom: 0.4rem; }
.card-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--amber-dark);
  text-decoration: none;
}
.card-link:hover { color: var(--ink); }

/* =============================================
   Card Grid
   ============================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

/* =============================================
   Content Sections
   ============================================= */
.content-section {
  padding: 2.5rem 0;
}
.content-section.ranking-content,
.content-section.review-content,
.content-section.compare-content,
.content-section.faq-content,
.content-section.about-content,
.content-section.privacy-content {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2.5rem;
  align-items: start;
}

.main-article {
  min-width: 0;
}

.article-body {
  margin-bottom: 2rem;
}

.page-content h2 { margin-top: 2rem; }
.page-content h2 + hr { margin-top: 0; }
.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  filter: sepia(0.15) contrast(1.03);
}
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.page-content th, .page-content td {
  border: 1px solid var(--amber);
  padding: 8px 12px;
  text-align: left;
}
.page-content th { background: var(--amber-pale); font-weight: 700; }

/* =============================================
   Page Heroes (non-home)
   ============================================= */
.page-hero,
.ranking-hero,
.compare-header-section,
.faq-header-section,
.about-header-section,
.privacy-header-section,
.review-header-section {
  padding: 3rem 0 2rem;
  border-bottom: 3px solid var(--amber);
  margin-bottom: 0;
}
.ranking-hero article,
.compare-header-inner,
.faq-header-inner,
.about-header-inner,
.privacy-header-inner {
  max-width: var(--content-w);
}
.review-header-inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.review-hero-media {
  flex: 0 0 280px;
  position: relative;
}
.review-header-text { flex: 1; }
.review-header-text h1 { margin-top: 0.5rem; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}
.breadcrumb a { color: var(--ink-light); }
.breadcrumb a:hover { color: var(--amber-dark); }

.page-meta { font-size: 0.88rem; color: var(--ink-light); margin-top: 0.8rem; }
.review-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-light);
  margin-top: 0.8rem;
}

/* =============================================
   Ranking List
   ============================================= */
.rank-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.rank-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  align-items: flex-start;
}
.rank-number {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  min-width: 2.5rem;
  text-align: center;
}
.rank-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}
.rank-body { flex: 1; min-width: 0; }
.rank-body h3 { margin-bottom: 0.3rem; }
.rank-body h3 a { text-decoration: none; color: var(--ink); }
.rank-body h3 a:hover { color: var(--amber-dark); }
.rank-date { font-size: 0.82rem; color: var(--ink-light); }

/* Ranking links on home */
.ranking-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.ranking-list li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
}
.ranking-list li a { font-weight: 700; text-decoration: none; color: var(--ink); }
.ranking-list li a:hover { color: var(--amber-dark); }

/* Compare links */
.compare-links, .faq-more-links, .about-links, .privacy-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.compare-links li, .faq-more-links li, .about-links li, .privacy-links li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  margin-bottom: 0;
}
.compare-links li a, .faq-more-links li a, .about-links li a, .privacy-links li a {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.compare-links li a:hover, .faq-more-links li a:hover, .about-links li a:hover, .privacy-links li a:hover {
  color: var(--amber-dark);
}

/* =============================================
   Aside
   ============================================= */
.global-aside {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.2rem 2rem;
}
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + var(--anchor-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.aside-inner {
  background: var(--card-bg);
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.aside-inner h3 {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px dashed var(--amber);
}
.aside-inner ul {
  list-style: none;
  padding: 0;
}
.aside-inner ul li { margin-bottom: 0.5rem; }
.aside-inner ul li a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-light);
}
.aside-inner ul li a:hover { color: var(--amber-dark); }
.compare-tip p { font-size: 0.88rem; color: var(--ink-light); }

/* =============================================
   Cards Section & Stagger Animations
   ============================================= */
.cards-section, .ranking-section {
  padding: 2rem 0;
}

@media (prefers-reduced-motion: no-preference) {
  .stagger-list > li {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.5s ease forwards;
    animation-delay: calc(var(--stagger, 0) * 0.1s + 0.2s);
  }
  @keyframes staggerIn {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* =============================================
   About hero image
   ============================================= */
.about-hero-wrap {
  margin-bottom: 1.5rem;
  max-width: 340px;
  float: right;
  margin-left: 1.5rem;
}
.about-hero-img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(0.3) contrast(1.05) saturate(0.8);
}
.about-content .main-article::after { content: ''; display: table; clear: both; }

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding-top: 0;
  margin-top: 3rem;
  border-top: 4px solid var(--amber);
}

.footer-cta {
  background: var(--amber);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.footer-cta-text {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.footer-cta .btn-primary {
  background: var(--ink);
  color: var(--parchment);
  border-color: var(--ink);
}
.footer-cta .btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.footer-col h4 {
  color: var(--amber);
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(212,165,116,0.3);
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li > a {
  color: rgba(245,230,200,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul li > a:hover { color: var(--amber); }

.footer-col address { font-style: normal; }

.footer-bottom {
  border-top: 1px solid rgba(212,165,116,0.2);
  text-align: center;
  padding: 1.2rem;
  font-size: 0.82rem;
  color: rgba(245,230,200,0.5);
}

/* =============================================
   Parallax scroll hint (home hero)
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
  .hero-media {
    animation: fadeSlideIn 0.8s ease both;
  }
  .hero-text {
    animation: fadeSlideIn 0.8s 0.15s ease both;
  }
  @keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .light-leak, .vhs-label span { animation: none; }
  .stagger-list > li { opacity: 1; transform: none; animation: none; }
}

/* =============================================
   Responsive — Tablet 768px
   ============================================= */
@media (max-width: 900px) {
  .content-section.ranking-content,
  .content-section.review-content,
  .content-section.compare-content,
  .content-section.faq-content,
  .content-section.about-content,
  .content-section.privacy-content {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-section::before { width: 50%; }
  .review-header-inner {
    flex-direction: column;
  }
  .review-hero-media { flex: none; width: 100%; max-width: 320px; }
}

/* =============================================
   Responsive — Mobile 375px
   ============================================= */
@media (max-width: 600px) {
  :root { --nav-h: 56px; }

  .header-inner { gap: 0.5rem; padding: 0 0.8rem; }
  .main-nav ol { gap: 0; }
  .main-nav ol > li > a { padding: 8px 8px; font-size: 0.78rem; }
  .nav-contact { padding: 8px 10px; font-size: 0.78rem; }

  .sticky-anchor ol { padding: 0 0.8rem; }
  .sticky-anchor ol > li > a { padding: 0 10px; font-size: 0.75rem; }

  .wrap { padding: 0 0.8rem; }
  .hero-section { min-height: auto; padding: 2rem 0; }
  .hero-section::before { display: none; }
  .hero-section article.hero-content { flex-direction: column; }
  .hero-media { flex: none; width: 100%; max-width: 100%; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn-primary, .hero-cta .btn-secondary { width: 100%; text-align: center; }

  .card-grid { grid-template-columns: 1fr; }
  .rank-item { flex-direction: column; }
  .rank-thumb { width: 100%; height: 160px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1.5rem 0.8rem; }
  .about-hero-wrap { float: none; max-width: 100%; margin-left: 0; }

  .review-header-inner { flex-direction: column; gap: 1rem; }
  .review-hero-media { width: 100%; }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

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

/* =============================================
   Page-specific tweaks
   ============================================= */
.page-home .cards-section { margin-top: 1rem; }
.page-ranking .rank-list { margin-top: 1rem; }

/* Sketch border variant for cards */
.review-card.polaroid {
  position: relative;
}
.review-card.polaroid::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--amber);
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.4;
}
