/* ==========================================================================
   OCT 视界 — editorial portal homepage
   ========================================================================== */

.hm-home {
  padding-bottom: 0;
}

/* ---------- hero ---------- */
.hm-hero {
  padding-top: 24px;
}

.hm-hero-panel {
  position: relative;
  min-height: 354px;
  overflow: hidden;
  padding: clamp(30px, 4.2vw, 52px);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 40%, rgba(40, 137, 116, 0.38), transparent 42%),
    linear-gradient(112deg, #052e26 0%, #041d18 55%, #072820 100%);
  color: #f7f5ef;
  box-shadow: 0 30px 70px -42px rgba(3, 25, 20, 0.8);
}

.hm-hero-panel::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 25, 20, 0.92) 0%, rgba(4, 25, 20, 0.78) 32%, rgba(4, 25, 20, 0.4) 60%, rgba(4, 25, 20, 0.06) 100%);
  content: "";
  pointer-events: none;
}

.hm-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hm-hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  filter: saturate(1.02) contrast(1.03);
}

.hm-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hm-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f0a06b;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hm-hero-kicker::before {
  width: 30px;
  height: 1px;
  background: currentColor;
  content: "";
}

.hm-hero h1 {
  margin: 20px 0 16px;
  color: #fffdf8;
  font-family: var(--serif);
  font-size: clamp(46px, 5.8vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hm-hero h1 em {
  color: #f0894c;
  font-style: normal;
}

.hm-hero-sub {
  max-width: 640px;
  color: rgba(247, 245, 239, 0.76);
  font-size: clamp(13.5px, 1.25vw, 16px);
  line-height: 1.8;
}

.hm-hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 700px;
  margin-top: 24px;
  padding: 7px 7px 7px 16px;
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 16px 38px -24px rgba(0, 0, 0, 0.65);
}

.hm-hero-search > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}

.hm-hero-search input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
}

.hm-hero-search input::placeholder {
  color: var(--muted);
}

.hm-hero-search button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 11px 18px;
  border: 0;
  border-radius: 10px;
  background: #ce6339;
  color: #fffaf4;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.hm-hero-search button:hover {
  background: #b9532d;
  transform: translateY(-1px);
}

.hm-quicklinks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.hm-quicklinks > span {
  margin-right: 3px;
  color: rgba(247, 245, 239, 0.5);
  font-size: 10px;
}

.hm-quicklinks a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(247, 245, 239, 0.16);
  border-radius: 7px;
  color: rgba(247, 245, 239, 0.8);
  font-size: 10px;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.hm-quicklinks a:hover {
  border-color: rgba(247, 245, 239, 0.42);
  background: rgba(247, 245, 239, 0.08);
  color: #fff;
}

.hm-quicklinks svg {
  width: 12px;
  height: 12px;
}

/* ---------- stats ---------- */
.hm-stats-wrap {
  padding-top: 18px;
}

.hm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hm-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 24px;
  border-right: 1px solid var(--line);
}

.hm-stat:last-child {
  border-right: 0;
}

.hm-stat-icon {
  display: block;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(153, 84, 55, 0.12), 0 10px 20px -12px rgba(117, 58, 35, 0.55);
}

.hm-stat-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

[data-theme="dark"] .hm-stat-icon {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 22px -12px rgba(0, 0, 0, 0.8);
}

.hm-stat strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hm-stat > div span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- sections ---------- */
.hm-section {
  padding-top: 44px;
}

.hm-section--last {
  padding-bottom: 68px;
}

.hm-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.hm-section-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.hm-section-title h2 {
  position: relative;
  margin: 0;
  padding-left: 34px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.1vw, 38px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hm-section-title h2::before {
  position: absolute;
  top: 0.64em;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--accent-solid, #a33d20);
  content: "";
}

.hm-section-title > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hm-more {
  flex-shrink: 0;
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}

.hm-more span {
  margin-left: 3px;
}

.hm-more:hover {
  color: var(--accent);
}

/* ---------- news ---------- */
.hm-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(0, 0.82fr);
  gap: 18px;
}

.hm-news-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 352px;
  overflow: hidden;
  border-radius: 18px;
  background: #081a17;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.hm-news-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.5s var(--ease), opacity 0.4s ease;
}

.hm-news-feature::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 20, 16, 0.9) 0%, rgba(3, 20, 16, 0.18) 58%, rgba(3, 20, 16, 0.06) 100%);
  content: "";
}

.hm-news-feature:hover img {
  opacity: 0.9;
  transform: scale(1.025);
}

.hm-news-feature-copy {
  position: relative;
  z-index: 1;
  max-width: 84%;
  padding: 26px 28px;
  color: #fff;
}

.hm-news-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(247, 245, 239, 0.14);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
}

.hm-news-feature h3 {
  margin: 10px 0 8px;
  color: #fffdf8;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hm-news-feature p {
  display: -webkit-box;
  overflow: hidden;
  max-width: 560px;
  color: rgba(247, 245, 239, 0.74);
  font-size: 11.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hm-news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: rgba(247, 245, 239, 0.56);
  font-size: 9px;
}

.hm-news-side {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hm-news-side-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.hm-news-side-head span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hm-news-side-head strong {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.hm-news-side-head a {
  color: var(--muted);
  font-size: 9px;
}

.hm-news-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.hm-news-item img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--surface-2);
  object-fit: cover;
}

.hm-news-item-copy {
  min-width: 0;
}

.hm-news-item-cat {
  display: block;
  margin-bottom: 2px;
  color: var(--accent-deep);
  font-size: 8px;
}

.hm-news-item h4 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hm-news-item time {
  min-width: 48px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-align: right;
  white-space: nowrap;
}

.hm-news-item:hover h4 {
  color: var(--accent-deep);
}

/* ---------- research ---------- */
.hm-research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hm-research-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.hm-research-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.hm-field-chip {
  align-self: flex-start;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 8px;
  font-weight: 600;
}

.hm-research-card h3 {
  margin: 10px 0 7px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.hm-research-en {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 12px;
  color: var(--brand);
  font-family: var(--serif);
  font-size: 10.5px;
  font-style: italic;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hm-research-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.hm-research-foot span:last-child {
  color: var(--accent-deep);
  font-weight: 600;
}

/* ---------- scenarios ---------- */
.hm-scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hm-scenario-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.hm-scenario-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.hm-scenario-card img {
  width: 100%;
  height: 138px;
  background: #081a17;
  object-fit: cover;
  object-position: center;
}

.hm-scenario-copy {
  padding: 12px 13px 14px;
}

.hm-scenario-copy > span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-deep);
  font-size: 8px;
  font-weight: 600;
}

.hm-scenario-copy h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.hm-scenario-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ---------- data / database feature cards ---------- */
.hm-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hm-feature-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.hm-feature-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.hm-feature-card img {
  width: 112px;
  height: 78px;
  border-radius: 10px;
  background: #081a17;
  object-fit: cover;
}

.hm-feature-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.hm-feature-card p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hm-feature-card span {
  display: inline-block;
  margin-top: 7px;
  color: var(--accent-deep);
  font-size: 9px;
  font-weight: 600;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hm-hero-art img {
    object-position: 58% center;
  }

  .hm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }

  .hm-stat {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
  }

  .hm-stat:nth-child(2) {
    border-right: 0;
  }

  .hm-stat:nth-child(3),
  .hm-stat:nth-child(4) {
    border-bottom: 0;
  }

  .hm-news-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hm-news-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }

  .hm-news-side-head {
    grid-column: 1 / -1;
  }

  .hm-news-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .hm-news-item time {
    display: none;
  }

  .hm-research-grid,
  .hm-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hm-feature-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hm-hero {
    padding-top: 16px;
  }

  .hm-hero-panel {
    min-height: 0;
    padding: 26px 20px 24px;
    border-radius: 17px;
  }

  .hm-hero-art img {
    object-position: 46% center;
  }

  .hm-hero-panel::after {
    background: linear-gradient(90deg, rgba(4, 25, 20, 0.9), rgba(4, 25, 20, 0.62) 55%, rgba(4, 25, 20, 0.32));
  }

  .hm-hero h1 {
    margin-top: 16px;
    font-size: 43px;
  }

  .hm-hero-sub {
    font-size: 12.5px;
  }

  .hm-hero-search {
    margin-top: 19px;
    padding: 6px 6px 6px 13px;
  }

  .hm-hero-search button {
    padding: 10px 13px;
    font-size: 11px;
  }

  .hm-quicklinks > span {
    flex-basis: 100%;
  }

  .hm-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .hm-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 16px;
  }

  .hm-stat:nth-child(3) {
    border-bottom: 1px solid var(--line);
  }

  .hm-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
  }

  .hm-section {
    padding-top: 34px;
  }

  .hm-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hm-section-title h2 {
    padding-left: 28px;
    font-size: 27px;
  }

  .hm-section-title h2::before {
    width: 18px;
  }

  .hm-news-feature {
    min-height: 300px;
  }

  .hm-news-feature-copy {
    max-width: 100%;
    padding: 20px;
  }

  .hm-news-feature h3 {
    font-size: 22px;
  }

  .hm-news-side {
    display: block;
    padding: 14px;
  }

  .hm-research-grid,
  .hm-scenario-grid,
  .hm-feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hm-feature-card,
  .hm-feature-card:last-child {
    grid-column: auto;
  }

  .hm-feature-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .hm-feature-card img {
    width: 92px;
    height: 68px;
  }

  .hm-section--last {
    padding-bottom: 46px;
  }
}

/* application card imagery is cropped from centered OCT scenes */
