.page-home {
  background:
    radial-gradient(circle at 8% 24%, rgba(196, 168, 130, 0.12), transparent 32%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: clip;
}

.page-home .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page-home .home-hero {
  background:
    linear-gradient(120deg, rgba(255, 107, 53, 0.18) 0%, transparent 44%),
    radial-gradient(circle at 82% 12%, rgba(196, 168, 130, 0.26), transparent 46%),
    var(--color-primary);
  color: var(--color-surface);
  border-bottom: 6px solid var(--color-accent);
  padding: clamp(2.8rem, 6vw, 5.5rem) 0 clamp(3rem, 7vw, 7rem);
  position: relative;
  overflow: hidden;
}

.page-home .hero-layout {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.page-home .hero-kicker {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  border-left: 5px solid var(--color-accent);
  padding-left: 0.9rem;
  margin: 0 0 1.1rem;
}

.page-home .hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
  text-wrap: balance;
  color: var(--color-surface);
}

.page-home .hero-lead {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-style: italic;
  color: var(--color-tea-light);
  margin: 0 0 1rem;
}

.page-home .hero-desc {
  max-width: 46rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.page-home .hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
}

.page-home .hero-actions .btn {
  text-decoration: none;
}

.page-home .team-picker {
  position: relative;
}

.page-home .team-picker-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-fallback);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72rem 1.3rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: var(--color-surface);
  background: transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

.page-home .team-picker-summary::-webkit-details-marker {
  display: none;
}

.page-home .team-picker-summary::after {
  content: "+";
  font-weight: 700;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}

.page-home .team-picker[open] .team-picker-summary::after {
  transform: rotate(45deg);
}

.page-home .team-picker-summary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.page-home .team-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 0.7rem);
  width: min(320px, 76vw);
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-hard);
  padding: 1.2rem 1.4rem;
  z-index: 30;
}

.page-home .team-panel-lead {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.page-home .team-panel-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-home .team-panel-list a {
  display: block;
  padding: 0.45rem 0;
  color: var(--color-primary-light);
  font-weight: 700;
  border-bottom: 1px dashed var(--color-border);
  text-decoration: none;
}

.page-home .team-panel-list a:hover {
  color: var(--color-accent-dark);
}

.page-home .team-panel-note {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.page-home .hero-search-link {
  color: var(--color-tea-light);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid rgba(196, 168, 130, 0.5);
  padding-bottom: 0.1rem;
}

.page-home .hero-visual {
  position: relative;
  min-height: 330px;
  border: 3px solid var(--color-surface);
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.page-home .hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 330px;
}

.page-home .hero-arc {
  position: absolute;
  left: -14%;
  top: -12%;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 5px solid var(--color-accent);
  opacity: 0.75;
  pointer-events: none;
}

.page-home .hero-steam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-home .hero-steam path {
  opacity: 0.65;
  animation: page-home-steam-rise 4s ease-in-out infinite;
}

.page-home .hero-steam path:nth-child(2) {
  animation-delay: 0.8s;
}

.page-home .hero-steam path:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes page-home-steam-rise {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.65;
  }
  30% {
    transform: translateY(-18px);
    opacity: 0.95;
  }
  70% {
    transform: translateY(-7px);
    opacity: 0.55;
  }
}

.page-home .home-section {
  padding: clamp(3.2rem, 8vw, 7rem) 0;
}

.page-home .home-kicker {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  background: var(--color-surface);
  padding: 0.25rem 0.8rem;
  display: inline-block;
  margin: 0 0 1rem;
}

.page-home .home-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
  color: var(--color-primary);
  text-wrap: balance;
}

.page-home .home-section-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary-light);
  margin: 0 0 1rem;
}

.page-home .home-section-text {
  color: var(--color-text-muted);
  margin: 0 0 1.2rem;
}

.page-home .team-layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.page-home .team-media {
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-hard);
  transform: rotate(-1.2deg);
}

.page-home .team-media img {
  display: block;
  width: 100%;
  height: auto;
}

.page-home .feature-list {
  margin: 1.3rem 0 1.8rem;
  padding: 0;
  list-style: none;
}

.page-home .feature-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 2rem;
  border-bottom: 1px dashed var(--color-border);
}

.page-home .feature-list li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 1.05rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--color-accent);
  transform: rotate(45deg);
}

.page-home .text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.12rem;
}

.page-home .text-link:hover {
  color: var(--color-primary);
}

.page-home .home-matches {
  background: var(--color-tea-light);
  border-top: 4px solid var(--color-primary);
  border-bottom: 4px solid var(--color-primary);
}

.page-home .home-matches .home-kicker {
  background: var(--color-tea-light);
}

.page-home .matches-layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.page-home .matches-visual {
  display: grid;
  gap: 1.2rem;
}

.page-home .matches-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--color-primary);
  box-shadow: 8px 8px 0 rgba(10, 31, 68, 0.18);
}

.page-home .matches-table-wrap {
  overflow-x: auto;
  border: 2px solid var(--color-primary);
  background: var(--color-surface);
}

.page-home .matches-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-family: var(--font-fallback);
}

.page-home .matches-table th,
.page-home .matches-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.page-home .matches-table th {
  background: var(--color-primary);
  color: var(--color-surface);
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.page-home .matches-table td {
  color: var(--color-text);
}

.page-home .matches-table tr:last-child td {
  border-bottom: 0;
}

.page-home .matches-table tbody tr:hover {
  background: rgba(255, 107, 53, 0.1);
}

.page-home .matches-table .status-synced {
  color: var(--color-accent-dark);
  font-weight: 700;
}

.page-home .home-search {
  background: var(--color-surface);
}

.page-home .search-layout {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: start;
}

.page-home .search-demo {
  display: grid;
  gap: 1rem;
}

.page-home .search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 3px solid var(--color-primary);
  background: var(--color-bg);
  box-shadow: var(--shadow-hard);
  padding: 0.9rem 1.2rem;
  font-family: var(--font-fallback);
}

.page-home .search-bar-icon {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-accent);
}

.page-home .search-bar-text {
  flex: 1;
  color: var(--color-text-muted);
  font-weight: 500;
}

.page-home .search-bar-tag {
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.75rem;
  color: var(--color-primary-light);
  white-space: nowrap;
}

.page-home .search-results {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
}

.page-home .search-result-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.9rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-fallback);
}

.page-home .search-result-item:last-child {
  border-bottom: 0;
}

.page-home .search-result-tag {
  background: var(--color-primary);
  color: var(--color-surface);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.page-home .search-result-name {
  font-weight: 700;
  color: var(--color-primary);
}

.page-home .search-result-meta {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.page-home .search-result-link {
  color: var(--color-accent-dark);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.page-home .search-result-link:hover {
  text-decoration: underline;
}

.page-home .search-cta {
  justify-self: start;
  text-decoration: none;
}

.page-home .home-tea {
  position: relative;
  background: var(--color-primary);
  border-top: 6px solid var(--color-accent);
  overflow: hidden;
}

.page-home .tea-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.page-home .tea-content {
  position: relative;
  z-index: 2;
  color: var(--color-surface);
  padding: clamp(3.6rem, 10vw, 7.5rem) 0;
  max-width: 680px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.page-home .home-tea .home-kicker {
  border-color: var(--color-tea-light);
  color: var(--color-tea-light);
  background: transparent;
}

.page-home .tea-content h2 {
  color: var(--color-surface);
}

.page-home .tea-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  margin: 0 0 1rem;
}

.page-home .tea-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.page-home .tea-actions .btn-outline {
  border-color: var(--color-surface);
  color: var(--color-surface);
  background: transparent;
  text-decoration: none;
}

.page-home .tea-actions .btn-outline:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

.page-home .text-link-light {
  color: var(--color-tea-light);
  border-bottom-color: var(--color-tea-light);
}

.page-home .back-top {
  display: inline-block;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
}

.page-home .home-tea::before,
.page-home .home-tea::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 110px;
  border-radius: 999px;
  background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.55), transparent);
  filter: blur(1px);
  z-index: 3;
  right: 12%;
  bottom: 24%;
}

.page-home .home-tea::before {
  animation: page-home-tea-steam 4s ease-in-out infinite;
}

.page-home .home-tea::after {
  right: 18%;
  bottom: 30%;
  animation: page-home-tea-steam 5s ease-in-out 1.2s infinite;
}

@keyframes page-home-tea-steam {
  0% {
    transform: translateY(0) scaleY(1);
    opacity: 0;
  }
  25% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(-90px) scaleY(1.6);
    opacity: 0;
  }
}

@media (min-width: 640px) {
  .page-home .search-result-item {
    grid-template-columns: auto 1fr auto auto;
  }

  .page-home .search-result-meta {
    text-align: right;
  }
}

@media (min-width: 960px) {
  .page-home .home-hero {
    padding-bottom: calc(clamp(3rem, 7vw, 7rem) + 2rem);
  }

  .page-home .hero-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 620px;
  }

  .page-home .hero-visual {
    align-self: stretch;
    min-height: 520px;
  }

  .page-home .hero-arc {
    width: 56%;
  }

  .page-home .team-layout {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: clamp(2rem, 5vw, 4rem);
  }

  .page-home .matches-layout {
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    gap: clamp(2rem, 5vw, 4rem);
  }

  .page-home .search-layout {
    grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
    gap: clamp(2rem, 5vw, 4rem);
  }

  .page-home .tea-content {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
    max-width: 620px;
  }

  .page-home .tea-actions {
    justify-content: flex-start;
  }
}
