/* Homepage presentation only; application views and navigation retain their behavior. */
.home-open .app-header {
    background: #f8f5ed;
    border-bottom: 1px solid #e9e2d5;
    box-shadow: none;
}
.home-open .home-page {
    background: #f8f5ed;
    color: #173e46;
}
.home-open .app-main { margin-bottom: 0; }
.home-content {
    --home-gutter: max(48px, calc((100% - 944px) / 2));
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 100%;
    padding: 48px var(--home-gutter) 32px;
    box-sizing: border-box;
    text-align: left;
}
.home-content::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    /* Match the image proportions so the fade ends at its actual bottom edge. */
    aspect-ratio: 3 / 2;
    background: url('../images/home-heritage-watercolor.png') center top / 100% auto no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, rgb(0 0 0 / .85) 68%, rgb(0 0 0 / .4) 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, rgb(0 0 0 / .85) 68%, rgb(0 0 0 / .4) 84%, transparent 100%);
    opacity: .65;
    pointer-events: none;
}
.home-intro { position: relative; padding: 10px 0 30px; }
.home-intro-eyebrow {
    margin: 0 0 14px;
    color: #406568;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.home-intro h1 {
    margin: 0 0 16px;
    color: #123d46;
    font: 700 clamp(38px, 5vw, 62px)/.98 'DM Sans', system-ui, sans-serif;
    letter-spacing: -.025em;
}
.home-intro > p:last-child { margin: 0; max-width: 470px; font-size: 14px; line-height: 1.65; }
.home-search-box {
    position: relative;
    padding: 0 24px;
    border: 1px solid #d9d4c6;
    background: rgb(255 254 250 / .95);
    color: #284f56;
    box-shadow: 0 5px 18px #4f493015, 0 1px 3px #4f493015;
}
.home-search-box input { height: 60px; color: #173e46; font-size: 14px; }
.home-search-box input::placeholder { color: #526b70; }
.home-search-status { margin: 12px 0 28px; text-align: center; font-size: 11px; color: #476068; }
.home-search-box { max-width: 720px; margin-inline: auto; box-sizing: border-box; }
.home-page.has-search-results .home-search-status {
    max-width: 720px; margin: 20px auto 12px; text-align: left; font-size: 13px;
}
.home-search-results {
    max-width: 720px; margin-inline: auto; gap: 0; overflow: hidden;
    border: 1px solid #e5dfd1; border-radius: 20px; background: #fffdf7;
    box-shadow: 0 8px 28px #564d2f0a;
}
.home-search-results:empty { display: none; }
.home-search-results li + li { border-top: 1px solid #ebe6da; }
.home-search-results button {
    display: flex; align-items: center; gap: 14px; min-height: 74px; padding: 14px 20px;
    border: 0; border-radius: 0; background: transparent; color: #183e46;
    transition: background-color 160ms ease;
}
.home-search-results button:hover, .home-search-results button:focus-visible { background: #edf1e7; }
.home-search-results button:focus-visible { outline: 2px solid #64816b; outline-offset: -3px; }
.home-search-results button:disabled { opacity: .6; cursor: wait; }
.home-search-results span { margin-top: 0; }
.home-search-results .home-result-avatar {
    position: relative; display: grid; place-items: center; flex: 0 0 40px; height: 40px;
    overflow: hidden; border-radius: 50%; background: #e9eee1; color: #728369; font-size: 23px;
}
.home-result-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-search-results .home-result-copy { flex: 1; min-width: 0; }
.home-search-results strong { color: #183e46; font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.home-search-results .home-result-detail { margin-top: 3px; color: #64716a; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.home-search-results .home-result-arrow { flex-shrink: 0; color: #80907c; font-size: 20px; }
.home-search-more {
    display: block; margin: 18px auto 0; padding: 11px 20px; border: 1px solid #cdd5c5;
    border-radius: 24px; background: #fffdf7; color: #284f46; font: inherit; font-size: 13px; cursor: pointer;
}
.home-search-more[hidden] { display: none; }
.home-search-more:hover { background: #edf1e7; }
.home-search-more:focus-visible { outline: 2px solid #64816b; outline-offset: 3px; }
@media (max-width: 600px) {
    .home-search-results button { gap: 11px; padding: 12px 14px; }
    .home-search-results strong { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-search-results button { transition: none; }
}
.home-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.home-history-section { display: contents; }
.home-history-header { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.home-hero .home-dynasty-card {
    --card-accent: #607f40;
    --card-hover-border: rgb(96 127 64 / .45);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 26px;
    border: 1px solid rgb(255 255 255 / .5);
    border-radius: 20px;
    background: #e8eadf;
    color: #183e46;
    box-shadow: 0 5px 12px #564d2f08;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.home-hero > .home-dynasty-card:first-child { margin-top: 0; }
.home-hero .home-relationship-card { --card-accent: #aa8540; --card-hover-border: rgb(170 133 64 / .45); background: #f4ebda; }
.home-hero .home-map-card { --card-accent: #548e9a; --card-hover-border: rgb(84 142 154 / .45); background: #e3eceb; }
.home-hero .home-podcasts-card { --card-accent: #b98471; --card-hover-border: rgb(185 132 113 / .45); background: #f3e5df; }
.home-hero .home-royal-card { --card-accent: #82704b; --card-hover-border: rgb(130 112 75 / .45); background: #eee9dc; grid-column: 1 / -1; }
.home-hero .home-dynasty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 50%;
    color: var(--card-accent);
    background: rgb(255 255 255 / .32);
    font-size: 38px;
}
.home-dynasty-copy { flex: 1; }
.home-hero .home-dynasty-eyebrow { color: var(--card-accent); font-size: 9px; letter-spacing: .1em; }
.home-hero .home-dynasty-copy h2,
.home-hero .home-dynasty-copy h3 { color: #183e46; font: 700 23px/1.12 'DM Sans', system-ui, sans-serif; }
.home-hero .home-dynasty-copy > p:last-child { color: #3e5960; font-size: 12px; line-height: 1.6; margin-top: 8px; }
.home-hero .home-dynasty-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #294c52;
    box-shadow: none;
    font-size: 11px;
    text-align: left;
    white-space: normal;
    border-radius: 12px;
    transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.home-dynasty-button > .material-symbols-rounded { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: #fffdf6; color: var(--card-accent); transition: transform 180ms ease, box-shadow 180ms ease; }
.home-hero .home-dynasty-card:hover { transform: translateY(-2px); border-color: var(--card-hover-border); box-shadow: 0 12px 28px rgb(60 65 45 / .12); }
.home-hero .home-dynasty-card:hover .home-dynasty-button,
.home-hero .home-dynasty-button:hover {
    background: transparent;
    color: #294c52;
    box-shadow: none;
    transform: none;
}
.home-hero .home-dynasty-card:hover .home-dynasty-button > .material-symbols-rounded {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgb(60 65 45 / .12);
}
.home-hero .home-dynasty-card:active .home-dynasty-button,
.home-hero .home-dynasty-button:active { transform: none; box-shadow: none; }
.home-hero .home-dynasty-button:focus-visible { outline: 2px solid #245b60; outline-offset: 5px; }
.home-hero .home-royal-card { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; }
.home-royal-card .home-dynasty-button { width: auto; }
.has-search-results .home-intro { display: none; }
.has-search-results .home-content { padding-bottom: 32px; }
.home-open .site-footer { background: #133f42; border-top-color: #295254; box-shadow: none; }
.home-open .site-footer-legal, .home-open .site-footer-credit { color: #f3edde; }
@media (max-width: 600px) {
    .home-content { --home-gutter: 16px; padding: 24px var(--home-gutter); }
    .home-content::before { height: max(100%, 1024px); aspect-ratio: auto; background-size: auto 100%; background-position: 68% top; opacity: .4; }
    .home-intro { padding: 8px 8px 24px; }
    .home-intro h1 { font-size: 39px; }
    .home-intro > p:last-child { max-width: 285px; font-size: 12px; }
    .home-intro-break { display: none; }
    .home-intro-eyebrow { font-size: 8px; }
    .home-search-box { padding: 0 16px; gap: 10px; }
    .home-search-box input { height: 49px; font-size: 12px; }
    .home-search-status { font-size: 10px; margin-bottom: 22px; }
    .home-hero { gap: 14px; }
    .home-hero .home-dynasty-card { padding: 18px 14px 12px; gap: 12px; border-radius: 16px; }
    .home-hero .home-dynasty-copy h2, .home-hero .home-dynasty-copy h3 { font-size: 21px; }
    .home-hero .home-dynasty-copy > p:last-child { font-size: 11px; }
    .home-hero .home-dynasty-eyebrow { font-size: 8px; }
    .home-hero .home-dynasty-button { font-size: 10px; }
    .home-hero .home-royal-card { grid-template-columns: 42px 1fr; }
    .home-royal-card .home-dynasty-button { grid-column: 2; width: 100%; }
}
@media (max-width: 350px) {
    .home-hero { grid-template-columns: 1fr; }
    .home-intro h1 { font-size: 35px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-hero .home-dynasty-card, .home-hero .home-dynasty-icon, .home-hero .home-dynasty-button { transition: none; }
    .home-hero .home-dynasty-card:hover { transform: none; }
}
