/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * Heritage ancestry product stories: portrait-led heroes, chronological chapters and historical context.
 */
.hap-hero { padding: 30px 0 52px; }
.hap-hero-layout { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr); align-items: center; gap: clamp(32px, 5vw, 80px); }
.hap-hero-copy { min-width: 0; padding-block: 24px; }
.hap-hero h1 { max-width: 10ch; font-size: clamp(3.4rem, 5.6vw, 5.5rem); line-height: .99; margin-bottom: 26px; }
.hap-hero-description { max-width: 47ch; font-size: 1.05rem; line-height: 1.85; margin-bottom: 28px; }
.hap-hero .hpl-actions { align-items: stretch; }
.hap-hero-detail { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; min-height: 44px; }
.hap-hero-notice { max-width: 58ch; font-size: 14px; line-height: 1.75; margin: 18px 0 0; }
.hap-hero-art { min-width: 0; position: relative; padding-left: 24px; }
.hap-hero-art::before { content: ''; position: absolute; top: 26px; bottom: 26px; left: 0; right: 24px; border: 1px solid #b9a77f; border-radius: 150px 12px 12px 12px; pointer-events: none; }
.hap-portrait { position: relative; min-width: 0; margin: 0; background: #fff; border: 1px solid var(--hd-border); border-radius: 14px; overflow: hidden; }
.hap-portrait-image { position: relative; background: #e7dfd1; aspect-ratio: 5 / 4; }
.hpl-page .hap-portrait-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hap-portrait-image img[hidden] { display: none; }
.hap-portrait-fallback { align-items: center; justify-content: center; height: 100%; padding: 32px; color: var(--hd-forest); text-align: center; font-size: 16px; }
.hap-portrait-fallback:not([hidden]) { display: flex; }
.hap-portrait figcaption { padding: 22px 26px; color: var(--hd-forest); }
.hap-portrait-date { display: block; color: #765e34; font-size: 13px; font-weight: 600; letter-spacing: .06em; margin-bottom: 8px; }
.hap-portrait figcaption > strong { display: block; font: 500 1.9rem/1.1 var(--hd-serif); margin-bottom: 8px; }
.hap-portrait-place { display: block; font-size: 14px; }
.hap-portrait-context { margin: 12px 0 0; font-size: 14px; line-height: 1.75; }
/* One quiet AI disclosure row: the visible label is the short notice, the full notice expands on demand. */
.hap-image-disclosure { margin-top: 12px; }
.hap-image-disclosure summary { min-height: 32px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #53664e; font-size: 12px; line-height: 1.5; cursor: pointer; list-style: none; }
.hap-image-disclosure summary::-webkit-details-marker { display: none; }
.hap-image-disclosure summary .dna-icon { flex: 0 0 auto; width: 11px; height: 11px; }
.hap-image-disclosure[open] summary .dna-icon { transform: rotate(45deg); }
.hap-image-disclosure p { font-size: 12px; line-height: 1.8; margin: 2px 0 0; }
@media (pointer: coarse) { .hap-image-disclosure summary { min-height: 44px; } }
.hap-hero-art .hap-portrait { border-top-left-radius: 150px; }
.hap-hero-art .hap-portrait-image { aspect-ratio: 1.32; }
.hap-hero-caption { margin: 16px 0 0 24px; font-size: 13px; line-height: 1.7; }
.hap-era-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid #c9b98f; }
.hap-era-list li { position: relative; padding: 28px 20px 24px 0; border-bottom: 1px solid #d8cdb8; min-width: 0; }
.hap-era-list li::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: #8a6f3e; }
.hap-era-number { display: block; font-size: 12px; color: #765e34; letter-spacing: .08em; margin-bottom: 10px; }
.hap-era-list h3 { font-size: 1.6rem; line-height: 1.15; min-height: 3.45em; margin-bottom: 10px; }
.hap-era-list p { font-size: 13px; line-height: 1.7; margin: 0; }
.hap-context-note { margin: 26px 0 0; padding-left: 20px; border-left: 2px solid #b9a77f; font-size: 14px; line-height: 1.85; max-width: 100ch; }
.hap-sample-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: start; }
.hap-methods { list-style: none; padding: 0; margin: 0; }
.hap-methods li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-top: 1px solid var(--hd-border); }
.hap-methods li > span { color: #765e34; font: 500 1.7rem var(--hd-serif); white-space: nowrap; }
.hap-methods h3 { font-size: 1.8rem; }
.hap-methods p { margin-bottom: 0; font-size: 15px; line-height: 1.85; }
.hap-detail-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 26px; }
.hap-detail-links a { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 1100px) {
    .hap-hero-layout { gap: 30px; }
    .hap-hero .hpl-actions { flex-direction: column; }
    .hap-hero h1 { font-size: clamp(3rem, 6vw, 4.5rem); }
    .hap-era-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hap-era-list h3 { min-height: 0; }
    .hap-sample-grid { gap: 16px; }
    .hap-portrait figcaption { padding: 18px; }
}
@media (max-width: 767px) {
    .hap-hero { padding: 20px 0 36px; }
    .hap-hero-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .hap-hero-copy { padding: 0; }
    .hap-hero h1 { font-size: clamp(3.1rem, 12vw, 4.6rem); max-width: 11ch; }
    .hap-hero-description { font-size: 16px; }
    .hap-hero-notice { font-size: 14px; }
    .hap-hero-art { padding-left: 12px; max-width: 550px; width: 100%; margin-inline: auto; }
    .hap-hero-art::before { right: 12px; }
    .hap-hero-art .hap-portrait { border-top-left-radius: 100px; }
    .hap-hero-caption { margin-left: 12px; }
    .hap-era-list { grid-template-columns: minmax(0, 1fr); border: 0; }
    .hap-era-list li { padding: 6px 0 26px 24px; border-left: 1px solid #b9a77f; border-bottom: 0; }
    .hap-era-list li::before { top: 12px; left: -4px; }
    .hap-era-list li:last-child { padding-bottom: 0; }
    .hap-era-number { margin-bottom: 6px; }
    .hap-era-list h3 { font-size: 1.8rem; margin-bottom: 6px; }
    .hap-context-note { padding-left: 16px; }
    .hap-sample-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .hap-portrait figcaption { padding: 22px; }
    .hap-portrait-image { aspect-ratio: 1.2; }
    .hap-methods li { grid-template-columns: 32px minmax(0, 1fr); gap: 16px; }
}
@media print { .hap-image-disclosure summary .dna-icon { display: none; } .hap-portrait { break-inside: avoid; } }
