/* Home panels */
.home-panel {
  position: relative;
  min-height: calc(100vh - 3.2rem);
}

.home-container {
  max-width: 75rem;
  margin: 0 auto;
  padding: clamp(2rem, 3vw, 3.5rem) clamp(1rem, 3vw, 2rem);
}

/* Hero */
.home-hero {
  width: 100vw;
  margin: -1rem calc(50% - 50vw) 0;
  background: url("../images/bridge-hero.png") center center / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 18, 0.18) 0%,
    rgba(7, 11, 18, 0.7) 72%,
    rgba(7, 11, 18, 0.84) 100%
  );
}

.home-hero__content {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 5vw, 6rem) clamp(2.2rem, 6vw, 4.5rem);
  color: #f8fafc;
}

.home-hero__kicker {
  margin: 0 0 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 0.9;
}

.home-hero h1 {
  margin: 0 0 0.75rem;
  color: #ffffff;
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  line-height: 1.06;
}

.home-hero__line {
  display: block;
}

.home-hero__line + .home-hero__line {
  margin-top: 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 2.25rem);
  color: #dbeafe;
}

.home-hero p {
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.1vw, 1.25rem);
  line-height: 1.62;
}

.home-hero__actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.home-hero__scroll {
  display: inline-block;
  margin-top: 1.1rem;
  color: #cbd5e1;
  font-size: 0.92rem;
  text-decoration: none;
}

.home-hero__scroll:hover {
  color: #f8fafc;
}

/* Buttons */
.home-btn {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border-radius: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.home-btn--primary {
  background: #f8fafc;
  color: #0f172a;
}

.home-btn--ghost {
  border: 1px solid #f8fafc;
  color: #f8fafc;
}

.home-btn--dark {
  background: #0f172a;
  color: #ffffff;
}

/* Card panel */
.home-content {
  background: #f8fafc;
  padding: clamp(2rem, 4vw, 4rem) 0;
}

.home-content h2,
.home-contact h2,
.home-contact h3 {
  margin-top: 0;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.25rem);
}

.home-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.home-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.home-card p {
  margin: 0;
  color: #475569;
}

.home-card__link {
  display: inline-block;
  margin-top: 0.85rem;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
}

.home-card__link:hover {
  text-decoration: underline;
}

/* Third panel */
.home-contact {
  background: #eef2f7;
  padding: clamp(2rem, 4vw, 4rem) 0;
}

.home-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}

.home-contact__left,
.home-contact__right {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.home-contact__left p {
  margin-bottom: 1.25rem;
}

.home-contact__right ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-contact__right li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.home-contact__right li:last-child {
  border-bottom: 0;
}

.home-contact__right a {
  color: #0f172a;
  text-decoration: none;
}

.home-contact__right a:hover {
  text-decoration: underline;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (max-width: 76.1875em) {
  .home-hero {
    margin-top: 0;
  }
}

@media screen and (max-width: 55em) {
  .home-cards,
  .home-contact__grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 45em) {
  .home-panel {
    min-height: auto;
  }

  .home-hero {
    min-height: 78vh;
  }
}

/* Content utility */
.site-print-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 1.1rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.site-print-button:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.24);
  transform: translateY(-1px);
}

/* Theme toggle */
.site-theme-toggle {
  position: relative;
  margin-right: 0.15rem;
}

.site-theme-toggle .md-option,
.site-theme-toggle > label[for] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-theme-toggle__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 1.95rem;
  padding: 0.14rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.72rem;
  background: rgba(15, 23, 42, 0.16);
  color: #f8fafc;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.site-theme-toggle__button:hover {
  background: rgba(15, 23, 42, 0.24);
  border-color: rgba(255, 255, 255, 0.24);
}

.site-theme-toggle__button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.site-theme-toggle__track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 0.14rem;
}

.site-theme-toggle__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 0.55rem;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-theme-toggle__option.is-active {
  background: #ffffff;
  color: #2848a9;
}

.site-theme-toggle__option svg {
  width: 0.86rem;
  height: 0.86rem;
  fill: currentColor;
}

[data-md-color-scheme="default"] .site-theme-toggle__button {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #0f172a;
}

[data-md-color-scheme="default"] .site-theme-toggle__button:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.18);
}

[data-md-color-scheme="default"] .site-theme-toggle__option {
  color: rgba(15, 23, 42, 0.5);
}

[data-md-color-scheme="default"] .site-theme-toggle__option.is-active {
  background: rgba(64, 81, 181, 0.12);
  color: #4051b5;
}

@media screen and (max-width: 76.1875em) {
  .site-theme-toggle {
    display: none;
  }
}

@media print {
  .site-print-button,
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer,
  .md-top,
  .md-source,
  .md-search {
    display: none !important;
  }

  .md-main,
  .md-main__inner,
  .md-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

/* Markmap container styling */
.markmap-wrapper {
  margin: 1rem 0;
}
.markmap-container {
  width: 100%;
  height: 48vh;
  max-height: 600px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 6px;
  overflow: hidden;
}
.markmap-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media screen and (max-width: 600px) {
  .markmap-container { height: 40vh; }
}

  .md-grid {
    max-width: none !important;
  }
}
