@import "forensic.css";

/* Home landing */

.home {
  min-height: 100dvh;
  background: var(--fw-bg);
  color: var(--fw-text);
  font-family: var(--fw-font-display);
}

.home__content {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* Header */

.home__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0 2rem;
  animation: home-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.home__logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--fw-accent) 0%, #0ea5e9 55%, var(--fw-warm) 100%);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
  flex-shrink: 0;
}

.home__logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.home__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.home__nav a,
.home__nav-link {
  font-family: var(--fw-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--fw-text-muted);
  transition: color 0.15s ease;
}

.home__nav a:hover {
  color: var(--fw-accent);
}

.home__nav-cta {
  padding: 0.55rem 1rem !important;
  color: var(--fw-bg) !important;
  background: linear-gradient(135deg, var(--fw-accent), #0ea5e9);
  border-radius: var(--fw-radius);
  font-weight: 500 !important;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease !important;
}

.home__nav-cta:hover {
  color: var(--fw-bg) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(56, 189, 248, 0.35);
}

.home__logout-form {
  display: inline-flex;
  margin: 0;
}

.home__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 0.95rem;
  color: var(--fw-text-muted);
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.home__logout:hover {
  color: var(--fw-warm);
  border-color: rgba(245, 158, 11, 0.4);
  background: var(--fw-warm-dim);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
  transform: translateY(-1px);
}

.home__logout:focus-visible {
  outline: none;
  border-color: var(--fw-accent);
  box-shadow: 0 0 0 3px var(--fw-accent-dim);
}

/* Hero */

.home__hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: end;
  padding: clamp(1rem, 4vw, 3rem) 0 clamp(4rem, 10vw, 6rem);
}

.home__hero-copy {
  animation: home-fade-up 0.7s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home__hero h1 {
  margin: 0.85rem 0 0;
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.home__hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--fw-accent) 20%, #7dd3fc 50%, var(--fw-warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home__lead {
  margin: 1.35rem 0 0;
  max-width: 42ch;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--fw-text-muted);
}

.home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.home__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--fw-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--fw-radius);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.home__btn--primary {
  color: var(--fw-bg);
  background: linear-gradient(135deg, var(--fw-accent), #0ea5e9);
  box-shadow: 0 4px 24px rgba(56, 189, 248, 0.28);
}

.home__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(56, 189, 248, 0.38);
}

.home__btn--ghost {
  color: var(--fw-text);
  background: transparent;
  border: 1px solid var(--fw-border);
}

.home__btn--ghost:hover {
  border-color: var(--fw-border-strong);
  background: var(--fw-accent-dim);
}

.home__btn-arrow {
  font-family: var(--fw-font-mono);
  transition: transform 0.2s ease;
}

.home__btn:hover .home__btn-arrow {
  transform: translateX(3px);
}

/* Hero visual — evidence timeline */

.home__hero-visual {
  position: relative;
  animation: home-fade-up 0.8s 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home__evidence-card {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: calc(var(--fw-radius) + 4px);
  padding: 1.35rem 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 20px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(1.5deg);
}

.home__evidence-card::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1.35rem -1.5rem 1.25rem;
  border-radius: calc(var(--fw-radius) + 4px) calc(var(--fw-radius) + 4px) 0 0;
  background: linear-gradient(90deg, var(--fw-accent), var(--fw-warm));
}

.home__evidence-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  font-family: var(--fw-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fw-text-muted);
}

.home__evidence-status {
  color: var(--fw-accent);
}

.home__timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home__timeline li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--fw-border);
  font-size: 0.875rem;
  animation: home-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home__timeline li:nth-child(1) { animation-delay: 0.35s; }
.home__timeline li:nth-child(2) { animation-delay: 0.42s; }
.home__timeline li:nth-child(3) { animation-delay: 0.49s; }
.home__timeline li:nth-child(4) { animation-delay: 0.56s; }

.home__timeline time {
  font-family: var(--fw-font-mono);
  font-size: 0.7rem;
  color: var(--fw-text-muted);
}

.home__timeline strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.home__timeline span {
  color: var(--fw-text-muted);
  font-size: 0.8rem;
}

.home__scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fw-accent), transparent);
  opacity: 0.5;
  animation: home-scan 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes home-scan {
  0%, 100% { top: 12%; opacity: 0; }
  10% { opacity: 0.6; }
  50% { top: 88%; opacity: 0.4; }
  90% { opacity: 0; }
}

/* Metrics */

.home__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--fw-border);
  border: 1px solid var(--fw-border);
  border-radius: calc(var(--fw-radius) + 2px);
  overflow: hidden;
  margin-bottom: clamp(3rem, 8vw, 5rem);
  animation: home-fade-up 0.7s 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home__metric {
  padding: 1.35rem 1.5rem;
  background: var(--fw-surface);
  text-align: center;
}

.home__metric-value {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fw-accent);
}

.home__metric-label {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--fw-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fw-text-muted);
}

/* Features */

.home__section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home__section-desc {
  margin: 0 0 2rem;
  max-width: 50ch;
  color: var(--fw-text-muted);
  line-height: 1.6;
}

.home__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 8vw, 5rem);
}

.home__feature {
  padding: 1.5rem;
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: calc(var(--fw-radius) + 2px);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
  animation: home-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home__feature:nth-child(1) { animation-delay: 0.3s; }
.home__feature:nth-child(2) { animation-delay: 0.38s; }
.home__feature:nth-child(3) { animation-delay: 0.46s; }

.home__feature:hover {
  border-color: var(--fw-border-strong);
  transform: translateY(-3px);
}

.home__feature-icon {
  font-family: var(--fw-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--fw-warm);
  margin-bottom: 0.85rem;
}

.home__feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.home__feature p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--fw-text-muted);
}

/* CTA band */

.home__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
  background: var(--fw-surface-raised);
  border: 1px solid var(--fw-border);
  border-radius: calc(var(--fw-radius) + 4px);
  position: relative;
  overflow: hidden;
  animation: home-fade-up 0.7s 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, var(--fw-accent-dim) 0%, transparent 45%, var(--fw-warm-dim) 100%);
  pointer-events: none;
}

.home__cta > * {
  position: relative;
  z-index: 1;
}

.home__cta h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
}

.home__cta p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--fw-text-muted);
}

/* Footer */

.home__footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--fw-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--fw-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--fw-text-muted);
}

@keyframes home-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (max-width: 900px) {
  .home__hero {
    grid-template-columns: 1fr;
  }

  .home__hero-visual {
    order: -1;
  }

  .home__evidence-card {
    transform: none;
  }

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

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

@media (max-width: 520px) {
  .home__nav a:not(.home__nav-cta) {
    display: none;
  }

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