/* =============================================
   Web Component Styles — hormonicdata.com
   ============================================= */

/* ── hd-nav ─────────────────────────────────── */
.hd-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background-color 0.2s, backdrop-filter 0.2s;
}

.hd-nav--scrolled {
  background-color: rgba(15, 10, 20, 0.92);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hd-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

.hd-nav__logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
}

.hd-nav__logo img {
  width: 120px;
  height: auto;
}

.hd-nav__logo span {
  color: var(--accent);
}

.hd-nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hd-nav__toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s, width 0.2s;
}

.hd-nav__toggle span:nth-child(1) { width: 20px; }
.hd-nav__toggle span:nth-child(2) { width: 14px; background: var(--accent); }
.hd-nav__toggle span:nth-child(3) { width: 20px; }

.hd-nav__toggle--open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hd-nav__toggle--open span:nth-child(2) {
  opacity: 0;
}
.hd-nav__toggle--open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 20px;
}

.hd-nav__menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(15, 10, 20, 0.98);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) var(--px);
  gap: var(--space-sm);
}

.hd-nav__menu--open {
  display: flex;
}

.hd-nav__menu a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.hd-nav__menu a:last-child {
  border-bottom: none;
}

.hd-nav__menu a[aria-current="page"],
.hd-nav__menu a:hover {
  color: var(--accent);
}

@media (min-width: 768px) {
  .hd-nav__toggle {
    display: none;
  }

  .hd-nav__menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    padding: 0;
    gap: var(--space-lg);
  }

  .hd-nav__menu a {
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    border: none;
    letter-spacing: 0.3px;
  }
}

/* ── hd-footer ──────────────────────────────── */
/*
  Grid: 3 rows × 3 columns
  ┌─────────────────────────────────────┐  row 1 — border-bottom separates
  │ tagline (spans all 3 cols)          │
  ├──────────┬──────────────┬───────────┤  row 2 — border-bottom separates
  │ logo     │ nav links    │ social    │
  ├──────────┴──────────────┴───────────┤  row 3
  │ copyright (spans all 3 cols)        │
  └─────────────────────────────────────┘
  Mobile: collapses to single column, rows stack top-to-bottom.
*/
.hd-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
}

.hd-footer__inner {
  display: grid;
  grid-template-areas:
    "tagline"
    "logo"
    "nav"
    "social"
    "copy";
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hd-footer__inner {
    grid-template-areas:
      "tagline tagline tagline"
      "logo    nav     social"
      "copy    copy    copy";
    grid-template-columns: repeat(3, 1fr);
  }
}

.hd-footer__tagline  { grid-area: tagline; }
.hd-footer__col--logo   { grid-area: logo;    }
.hd-footer__col--nav    { grid-area: nav;     }
.hd-footer__col--social { grid-area: social;  }
.hd-footer__copy     { grid-area: copy;    }

/* ── Row 1: tagline ── */
.hd-footer__tagline {
  padding: var(--space-lg) var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-subtle);
  line-height: 1.6;
  margin: 0;
}

/* ── Row 2 columns ── */
.hd-footer__col {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

/* Col 1 — logo */
.hd-footer__logo {
  display: grid;
}

.hd-footer__logo img {
  width: 70px;
  height: auto;
  display: block;
}

/* Col 2 — nav links */
.hd-footer__col--nav a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
  white-space: nowrap;
}

.hd-footer__col--nav a:hover {
  color: var(--accent);
}

/* Col 3 — social icons */
.hd-footer__social-icons {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: var(--space-md);
  align-items: center;
}

.hd-footer__social-icons a {
  color: var(--text-subtle);
  display: grid;
  place-items: center;
  transition: color 0.15s, transform 0.15s;
}

.hd-footer__social-icons a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── Row 3: copyright ── */
.hd-footer__copy {
  padding: var(--space-lg);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  margin: 0;
}

/* ── hd-stat-card ───────────────────────────── */
.hd-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-stat);
  padding: 12px 8px;
  text-align: center;
  gap: 4px;
}

.hd-stat-card__value {
  color: var(--accent);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.hd-stat-card__label {
  color: var(--text-subtle);
  font-size: 9px;
  line-height: 1.4;
}

/* ── hd-article-card ────────────────────────── */
hd-article-card {
  display: block;
}

.hd-article-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-md);
  transition: border-color 0.15s;
  text-decoration: none;
  color: inherit;
}

.hd-article-card:hover {
  border-color: var(--accent-border);
}

.hd-article-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hd-article-card__time {
  color: var(--text-subtle);
  font-size: 10px;
}

.hd-article-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.hd-article-card__excerpt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── hd-button ──────────────────────────────── */
hd-button {
  display: inline-block;
}

.hd-button {
  display: inline-block;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}

.hd-button:active {
  transform: scale(0.97);
}

.hd-button--primary {
  background: var(--accent);
  color: #ffffff;
}

.hd-button--primary:hover {
  opacity: 0.9;
}

.hd-button--secondary {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.hd-button--secondary:hover {
  background: rgba(244, 114, 182, 0.18);
}
