/* ============================================================
   Dog House Hub — Aurora Mesh / Glassmorphism Theme
   Roboto MD3, #ff0080 / #ff00ff / #26171f
   ============================================================ */


/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink: #ff0080;
  --magenta: #ff00ff;
  --ink: #26171f;
  --ink-light: #3d2230;
  --ink-mid: #4f2d3d;
  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.14);
  --text-primary: #f5e6ef;
  --text-muted: #c8a8b8;
  --text-dim: #9a7a88;
  --radius-card: 28px;
  --radius-btn: 100px;
  --max-w: 1200px;
  --header-h: 64px;
  --bottom-nav-h: 64px;
  --transition-fast: 180ms ease;
  --transition-med: 320ms ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--bottom-nav-h);
}

/* ---------- Aurora Background ---------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255,0,128,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 30%, rgba(255,0,255,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 70% at 50% 80%, rgba(255,0,128,0.12) 0%, transparent 60%),
    var(--ink);
  animation: aurora-shift 12s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
  0%   { filter: hue-rotate(0deg) brightness(1); }
  50%  { filter: hue-rotate(18deg) brightness(1.08); }
  100% { filter: hue-rotate(-12deg) brightness(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-bg { animation: none; }
}

/* ---------- Site Wrapper ---------- */
.site-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(38,23,31,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.brand-mark { border-radius: 8px; }

.brand-name {
  background: linear-gradient(90deg, var(--pink), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Nav (details > summary + menu) ---------- */
.nav-details {
  flex: 1;
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  list-style: none;
  transition: background var(--transition-fast);
}

.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle::marker { display: none; }

.nav-toggle:hover { background: var(--glass-bg); }

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Desktop: show menu inline */
.nav-details > menu,
.nav-details > .nav-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li a {
  display: block;
  padding: 8px 12px;
  min-height: 44px;
  line-height: 28px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.nav-menu li a:hover,
.nav-menu li a[aria-current="page"] {
  color: var(--text-primary);
  background: var(--glass-bg);
}

/* ---------- Header CTAs ---------- */
.header-ctas {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.cta:hover { opacity: 0.88; transform: translateY(-1px); }

.cta-signup {
  background: linear-gradient(135deg, var(--pink), var(--magenta));
  color: #fff;
  border: none;
}

.cta-login {
  background: transparent;
  color: var(--pink);
  border: 2px solid var(--pink);
}

/* ---------- Mobile Nav (≤768px) ---------- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-details > menu,
  .nav-details > .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(38,23,31,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px;
    z-index: 300;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  }

  .nav-details[open] > menu,
  .nav-details[open] > .nav-menu {
    display: flex;
    animation: menu-reveal 200ms ease;
  }

  @keyframes menu-reveal {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav-menu li a {
    font-size: 1rem;
    padding: 12px 16px;
    min-height: 48px;
    border-radius: 10px;
    white-space: normal;
  }

  .cta {
    height: 40px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .header-inner {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  @keyframes menu-reveal { from { opacity: 1; } to { opacity: 1; } }
}

/* ---------- Main ---------- */
main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ---------- Hero Sections ---------- */
.hero-section,
.article-hero,
.compare-hero,
.ranking-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  min-height: 45vh;
  padding: 40px 0 32px;
}

.hero-figure,
.article-hero-fig,
.compare-hero-fig,
.ranking-hero-fig {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,0,128,0.12), rgba(255,0,255,0.08));
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-card);
  object-fit: cover;
}

.hero-copy,
.article-hero-copy,
.compare-hero-copy,
.ranking-hero-copy {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.hero-copy h1,
.article-hero-copy h1,
.compare-hero-copy h1,
.ranking-hero-copy h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
}

/* ---------- Inner Hero (about/privacy/no-image pages) ---------- */
.inner-hero {
  display: grid;
  grid-template-columns: 0 1fr;
  gap: 0;
  padding: 40px 0 24px;
}

.inner-hero-fig { display: none; }

.inner-hero-copy {
  text-align: left;
}

.inner-hero-copy h1 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Section Rule ---------- */
.section-rule {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 8px 0 32px;
}

/* ---------- Content Layout (div + aside) ---------- */
.content-section,
.article-body-section,
.compare-body-section,
.ranking-body-section,
.inner-body-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  padding-top: 16px;
}

.content-main,
.article-content,
.compare-content,
.ranking-content,
.inner-content {
  min-width: 0;
}

/* ---------- Content Aside ---------- */
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,0,128,0.12);
}

/* ---------- Aside Cards ---------- */
.aside-heading {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 10px;
}

.aside-card > hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 8px 0 14px;
}

.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-links li a {
  display: block;
  padding: 8px 10px;
  min-height: 44px;
  line-height: 28px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 10px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.aside-links li a:hover {
  color: var(--text-primary);
  background: rgba(255,0,128,0.1);
}

.aside-cta-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.aside-cta-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Page Content (body copy) ---------- */
.page-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.page-content h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 700;
  margin: 2em 0 0;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.page-content h2 + hr {
  border: none;
  border-top: 2px solid;
  border-image: linear-gradient(90deg, var(--pink), var(--magenta)) 1;
  margin: 8px 0 18px;
}

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.6em 0 0.4em;
  color: var(--text-primary);
}

.page-content h3 + hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 4px 0 14px;
}

.page-content p {
  margin: 0.9em 0;
}

.page-content a {
  color: var(--pink);
  text-decoration: underline;
  text-decoration-color: rgba(255,0,128,0.4);
  transition: text-decoration-color var(--transition-fast);
}

.page-content a:hover {
  text-decoration-color: var(--pink);
}

.page-content ul,
.page-content ol {
  margin: 0.9em 0 0.9em 1.4em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.page-content th,
.page-content td {
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  text-align: left;
}

.page-content th {
  background: rgba(255,0,128,0.12);
  font-weight: 600;
  color: var(--text-primary);
}

.page-content td { color: var(--text-muted); }

/* ---------- Headings with HR (contract requirement) ---------- */
h2 + hr {
  border: none;
  border-top: 2px solid;
  border-image: linear-gradient(90deg, var(--pink), var(--magenta)) 1;
  margin: 8px 0 18px;
}

h3 + hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 4px 0 14px;
}

/* ---------- Byline ---------- */
.byline {
  font-size: 0.875rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.byline time { color: var(--text-muted); }

/* ---------- Stage Label ---------- */
.stage-label {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,0,128,0.18);
  color: var(--pink);
  border: 1px solid rgba(255,0,128,0.3);
}

/* ---------- Eyebrow Label ---------- */
.eyebrow-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 4px;
}

/* ---------- Card Date ---------- */
.card-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------- Child Page Cards ---------- */
.child-pages-section {
  padding: 32px 0;
}

.child-pages-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: card-in 400ms ease both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .child-card { animation: none; }
}

.card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-body h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.card-body h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.card-body h3 a:hover { color: var(--pink); }

.card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.card-read-more {
  display: inline-block;
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.card-read-more:hover { opacity: 0.8; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--pink), var(--magenta));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  min-height: 44px;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

/* ---------- Compare Table ---------- */
.compare-children,
.ranking-list {
  margin-top: 32px;
}

.compare-children h2,
.ranking-list h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
}

.compare-table,
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td,
.ranking-table th,
.ranking-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
  vertical-align: top;
  min-width: 80px;
}

.compare-table th,
.ranking-table th {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
}

.compare-table td,
.ranking-table td {
  color: var(--text-muted);
}

.compare-table a,
.ranking-table a {
  color: var(--pink);
  text-decoration: none;
}

.compare-table a:hover,
.ranking-table a:hover { text-decoration: underline; }

.rank-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--magenta);
  min-width: 32px;
}

/* ---------- Rank Items List ---------- */
.rank-items-aside h2 { margin-bottom: 0; }

.rank-items-list {
  list-style: none;
  counter-reset: rank-counter;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.rank-items-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 6px 0;
}

.rank-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--magenta));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Author Block ---------- */
.author-block {
  margin-bottom: 32px;
}

.author-block h2 {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--pink), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0;
}

.author-credentials {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.author-bio {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-top: 10px;
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: rgba(38,23,31,0.9);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px 16px 24px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 24px;
}

.footer-col dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 10px;
}

.footer-col dd {
  margin: 0 0 6px;
}

.footer-col a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.875rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.rg-notice {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.5;
}

/* ---------- Trust Links ---------- */
.trust-link {
  color: var(--text-dim);
  font-size: 0.875rem;
  text-decoration: none;
  margin-right: 16px;
  transition: color var(--transition-fast);
}

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

/* ---------- Fixed Bottom Pill Nav (mobile-style on all sizes) ---------- */
/* The spec says "fixed bottom bar — brand centered, menu split on both sides"
   This is implemented via the sticky site-header at top on desktop,
   and a dedicated bottom pill nav on mobile (≤768px).
   On desktop the header fills this role, bottom pill is hidden.         */

/* ---------- Responsive: Tablet & Mobile ---------- */
@media (max-width: 900px) {
  .content-section,
  .article-body-section,
  .compare-body-section,
  .ranking-body-section,
  .inner-body-section {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }

  .hero-section,
  .article-hero,
  .compare-hero,
  .ranking-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px 0 16px;
  }

  .hero-copy,
  .article-hero-copy,
  .compare-hero-copy,
  .ranking-hero-copy {
    text-align: left;
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 0 12px 40px;
  }

  .compare-table,
  .ranking-table {
    display: block;
    overflow-x: auto;
  }
}

/* ---------- Stagger scroll-reveal ---------- */
.child-card:nth-child(1) { animation-delay: 0ms; }
.child-card:nth-child(2) { animation-delay: 80ms; }
.child-card:nth-child(3) { animation-delay: 160ms; }
.child-card:nth-child(4) { animation-delay: 240ms; }
.child-card:nth-child(5) { animation-delay: 320ms; }
.child-card:nth-child(6) { animation-delay: 400ms; }

/* ---------- Holographic shimmer on cards (iridescent overlay) ---------- */
.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,0,255,0.06) 30%,
    rgba(255,0,128,0.04) 60%,
    rgba(255,255,255,0.02) 100%
  );
  pointer-events: none;
  mix-blend-mode: screen;
}

.glass-card { position: relative; overflow: hidden; }

/* ---------- Focus Styles (accessibility) ---------- */
a:focus-visible,
button:focus-visible,
.nav-toggle:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* ---------- Print ---------- */
@media print {
  .aurora-bg,
  .site-header,
  .content-aside,
  .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .page-content a { color: #000; }
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}