/* ── Homepage: grand banner layout ── */

.page-home {
  width: min(1180px, calc(100% - 2rem));
  padding-top: 0.5rem;
}

.home-banner {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: 2.5rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem) clamp(2.75rem, 5vw, 4rem);
  overflow: hidden;
  color: #f4fffc;
  animation: enter 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-banner-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(18, 133, 119, 0.55), transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(145deg, #0a3d38 0%, #0d6e63 42%, #0a544c 100%);
  z-index: 0;
}

.home-banner-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.home-banner-bg.has-cover {
  background:
    linear-gradient(145deg, rgba(10, 61, 56, 0.82) 0%, rgba(13, 110, 99, 0.72) 45%, rgba(10, 84, 76, 0.88) 100%);
}

.home-banner-bg.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 40, 36, 0.35);
  z-index: 1;
}

.home-banner-bg.has-cover .home-orb {
  opacity: 0.45;
  z-index: 2;
}

.home-banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 3;
}

.home-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.home-orb-a {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(32, 180, 160, 0.35);
  animation: orb-float 12s ease-in-out infinite;
}

.home-orb-b {
  width: 320px;
  height: 320px;
  top: 20%;
  right: -60px;
  background: rgba(255, 255, 255, 0.12);
  animation: orb-float 15s ease-in-out infinite reverse;
}

.home-orb-c {
  width: 200px;
  height: 200px;
  bottom: -40px;
  left: 45%;
  background: rgba(10, 84, 76, 0.6);
  animation: orb-float 10s ease-in-out infinite 2s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.05); }
}

.home-banner-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.home-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 255, 252, 0.88);
}

.home-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display, "DM Serif Display", Georgia, serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.home-lede {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.65;
  color: rgba(244, 255, 252, 0.78);
}

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.home-stat {
  display: grid;
  gap: 0.15rem;
  min-width: 7.5rem;
  padding: 0.85rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
}

.home-stat strong {
  font-family: var(--font-display, "DM Serif Display", Georgia, serif);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-stat span {
  font-size: 0.82rem;
  color: rgba(244, 255, 252, 0.65);
}

.home-quick {
  display: grid;
  gap: 0.65rem;
}

.home-quick-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 255, 252, 0.55);
}

.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-quick-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #f4fffc;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.home-quick-link:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

/* ── Tool sections ── */

.home-body {
  animation: enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hub-section {
  margin-bottom: 2.25rem;
  animation: enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(21, 36, 31, 0.1);
}

.hub-title {
  margin: 0;
  font-family: var(--font-display, "DM Serif Display", Georgia, serif);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink, #15241f);
}

.hub-count {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #5a6d66);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.hub-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(21, 36, 31, 0.1);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 36px rgba(21, 36, 31, 0.07);
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  min-height: 128px;
  position: relative;
  overflow: hidden;
}

.hub-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #128577, #0a544c);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.hub-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 110, 99, 0.28);
  box-shadow: 0 20px 44px rgba(21, 36, 31, 0.12);
}

.hub-card:hover::before {
  opacity: 1;
}

.hub-card-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(13, 110, 99, 0.14), rgba(13, 110, 99, 0.06));
  border: 1px solid rgba(13, 110, 99, 0.16);
  color: #0a544c;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.hub-card-body {
  display: grid;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.hub-card-brand {
  color: #0d6e63;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hub-card-title {
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 600;
}

.hub-card-desc {
  color: #5a6d66;
  font-size: 0.84rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-card-arrow {
  flex-shrink: 0;
  align-self: center;
  color: rgba(13, 110, 99, 0.35);
  font-size: 1.1rem;
  transition: transform 0.22s ease, color 0.22s ease;
}

.hub-card:hover .hub-card-arrow {
  transform: translateX(3px);
  color: #0d6e63;
}

@media (max-width: 900px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-title {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .home-banner {
    margin-bottom: 1.75rem;
    padding-bottom: 2.25rem;
  }

  .home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .home-stat {
    min-width: 0;
    padding: 0.7rem 0.65rem;
    text-align: center;
  }

  .home-stat strong {
    font-size: 1.35rem;
  }

  .home-stat span {
    font-size: 0.72rem;
  }

  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hub-section {
    margin-bottom: 1.5rem;
  }

  .hub-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .hub-card {
    border-radius: 16px;
    min-height: 112px;
    padding: 1rem;
  }

  .hub-card-icon {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 0.95rem;
  }

  .hub-card-title {
    font-size: 0.98rem;
  }

  .hub-card-desc {
    font-size: 0.82rem;
  }

  .hub-card-arrow {
    display: none;
  }

  .home-quick-link {
    font-size: 0.82rem;
    padding: 0.45rem 0.8rem;
  }
}
