/* =============================================
   HOMEPAGE - PRD approved paper/stamp visual system
   ============================================= */

.hero {
  position: relative;
  padding: var(--s-16) 0 0;
  overflow: hidden;
}

.hero-bg-mesh {
  display: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: var(--s-12);
  min-height: 520px;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stamp);
  margin-bottom: var(--s-5);
}

.hero h1,
.section-header h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(2.45rem, 5vw, 4.35rem);
  line-height: 1.06;
  margin-bottom: var(--s-6);
}

.hero-italic {
  font-style: italic;
  color: var(--stamp);
}

.hero-tagline {
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: var(--s-8);
}

.hero-cta-row,
.hero-trust-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.hero-cta-row {
  margin-bottom: var(--s-6);
}

.btn-lg {
  min-height: 48px;
  padding-inline: var(--s-5);
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.doc-stack-scene {
  position: relative;
  width: min(420px, 100%);
  height: 430px;
}

.fan-card {
  position: absolute;
  width: 245px;
  height: 318px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow: 0 18px 34px -22px rgba(28, 36, 48, 0.38);
  padding: var(--s-5);
}

.fan-card-back {
  left: 24px;
  top: 66px;
  transform: rotate(-9deg);
  z-index: 1;
}

.fan-card-mid {
  left: 100px;
  top: 78px;
  transform: rotate(5deg);
  z-index: 2;
}

.fan-card-front {
  left: 70px;
  top: 38px;
  transform: rotate(-2deg);
  z-index: 3;
}

.fan-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-5);
}

.fan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.fan-dot-red {
  background: var(--stamp-soft);
}

.fan-card-lines {
  display: grid;
  gap: 10px;
}

.fan-line {
  height: 8px;
  background: var(--line);
  border-radius: 2px;
}

.fan-line-lg { width: 92%; }
.fan-line-md { width: 72%; }
.fan-line-sm { width: 48%; }

.fan-card-stamp {
  position: absolute;
  left: var(--s-5);
  bottom: var(--s-5);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--verify);
  border: 1px solid rgba(63, 122, 92, 0.28);
  padding: 0.35rem 0.45rem;
  background: rgba(63, 122, 92, 0.08);
}

.stamp-badge.hero-stamp,
.stamp-badge.how-stamp {
  position: absolute;
  width: 122px;
  height: 122px;
  border: 2.5px solid var(--stamp);
  border-radius: 50%;
  outline: 1px solid var(--stamp);
  outline-offset: -7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stamp);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-align: center;
  transform: rotate(-11deg);
  background: transparent;
  mix-blend-mode: multiply;
}

.hero-stamp {
  right: 2px;
  top: 8px;
  z-index: 4;
}

.hero-badge {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  box-shadow: 0 16px 24px -18px rgba(28, 36, 48, 0.5);
}

.hero-badge-merge {
  left: 8px;
  top: 8px;
}

.hero-badge-secure {
  right: 8px;
  bottom: 72px;
  background: var(--paper-alt);
  color: var(--verify);
  border: 1px solid rgba(63, 122, 92, 0.24);
}

.hero-stats-strip {
  margin-top: var(--s-12);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding: var(--s-4) 0;
}

.stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--font-mono);
}

.stat-num {
  color: var(--ink);
  font-weight: 600;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

.tools-section,
.trust-section,
.how-section {
  padding: var(--s-20) 0;
}

.section-header {
  margin-bottom: var(--s-8);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  margin-bottom: var(--s-3);
}

.section-sub {
  color: var(--ink-soft);
}

.cat-tabs {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-8);
}

.cat-tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.cat-tab:hover,
.cat-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.cat-count {
  opacity: 0.72;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  min-height: 210px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.2s ease;
}

.tool-card.hidden {
  display: none;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 28px -22px rgba(28, 36, 48, 0.42);
}

.tool-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--s-5);
}

.tool-card-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  margin-bottom: var(--s-4);
}

.tool-cat-tag {
  display: block;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.tool-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: var(--s-2);
}

.tool-desc {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.tool-card-arrow {
  margin-top: auto;
  align-self: flex-end;
  color: var(--stamp);
  transition: transform 0.16s ease;
}

.tool-card:hover .tool-card-arrow {
  transform: translateX(4px);
}

.trust-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
}

.trust-grid,
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6);
}

.trust-icon,
.how-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--stamp);
  margin-bottom: var(--s-4);
  background: var(--card);
}

.trust-item h3,
.how-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  margin-bottom: var(--s-2);
}

.trust-item p,
.how-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.how-section {
  position: relative;
}

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

.how-card,
.step-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: var(--s-6);
  overflow: hidden;
}

.how-num,
.step-num {
  position: absolute;
  right: var(--s-4);
  top: var(--s-3);
  color: var(--line);
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 1;
}

.step-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--stamp);
  margin-bottom: var(--s-4);
  background: var(--paper);
}

.step-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: var(--s-2);
}

.step-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.steps-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: var(--s-4);
}

.step-connector {
  align-self: center;
  width: 38px;
  height: 1px;
  background: var(--line-strong);
}

.trust-statement {
  position: relative;
  margin-top: var(--s-12);
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  padding: var(--s-8);
  overflow: hidden;
}

.trust-statement blockquote {
  max-width: 720px;
}

.trust-statement-text {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  font-style: italic;
  margin-bottom: var(--s-3);
}

.trust-statement-sub {
  color: rgba(243, 244, 238, 0.72);
  max-width: 62ch;
}

.how-stamp {
  right: var(--s-8);
  top: var(--s-10);
  border-color: var(--paper);
  outline-color: var(--paper);
  color: var(--paper);
  mix-blend-mode: normal;
  opacity: 0.72;
}

@media (prefers-color-scheme: dark) {
  .trust-statement {
    background: var(--card);
    color: var(--ink);
    border: 1.5px solid var(--line-strong);
    box-shadow: 4px 4px 0px var(--line);
  }
  .trust-statement-sub {
    color: var(--ink-soft);
  }
  .how-stamp, .hero-stamp {
    border-color: var(--stamp);
    outline-color: var(--stamp);
    color: var(--stamp);
    opacity: 0.8;
    mix-blend-mode: normal;
  }
}

.bottom-banner {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  padding: var(--s-8);
  margin-bottom: var(--s-16);
}

.banner-left {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 244, 238, 0.64);
  min-width: 140px;
}

.banner-right h2 {
  color: var(--paper);
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--s-2);
}

.banner-right p {
  color: rgba(243, 244, 238, 0.7);
}

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

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    min-height: 380px;
  }

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

@media (max-width: 680px) {
  .hero {
    padding-top: var(--s-10);
  }

  .hero-visual {
    display: none;
  }

  .stat-divider {
    display: none;
  }

  .tool-grid,
  .trust-grid,
  .how-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .step-connector {
    display: none;
  }

  .trust-statement {
    padding: var(--s-6);
  }

  .how-stamp {
    display: none;
  }

  .bottom-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Favorites Button */
.fav-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--line-strong);
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: all 0.2s ease;
  padding: 0.25rem;
}
.tool-card:hover .fav-btn {
  opacity: 1;
}
.fav-btn.is-favorite {
  opacity: 1;
  color: #F5A623;
}
.fav-btn.is-favorite svg {
  fill: #F5A623;
}
