/* Home page — catalog layout (option C) */

.hp-page { max-width: 1120px; margin: 0 auto; padding: 0 24px 72px; }

.hp-hero {
    position: relative;
    padding: 44px 8px 10px;
    text-align: left;
    background: radial-gradient(
        ellipse 80% 90% at 28% 40%,
        rgba(248, 250, 252, 0.96) 0%,
        rgba(248, 250, 252, 0.78) 48%,
        transparent 74%
    );
}
.hp-hero h1 {
    margin: 0 0 10px;
    color: var(--ai-blue-800);
    font-size: clamp(1.9rem, 3.4vw, 2.55rem);
    letter-spacing: -0.03em;
    line-height: 1.12;
    font-weight: 750;
}
.hp-hero p {
    margin: 0;
    max-width: 38rem;
    font-size: 1.08rem;
    color: var(--ai-gray-700);
    line-height: 1.55;
}

.hp-section { margin: 22px 0 8px; }
.hp-section > h2 {
    margin: 0 0 12px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ai-gray-500);
    font-weight: 700;
}

.hp-navline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 8px 0 6px;
    font-size: 0.95rem;
}
.hp-navline a {
    color: var(--ai-blue-700);
    font-weight: 650;
    text-decoration: none;
}
.hp-navline a:hover,
.hp-navline a:focus-visible { text-decoration: underline; }

.hp-catalog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.hp-tile {
    display: flex;
    flex-direction: column;
    background: var(--ai-bg-card);
    border: 1px solid var(--ai-gray-200);
    border-radius: var(--ai-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--ai-shadow-sm);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.hp-tile:hover,
.hp-tile:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--ai-shadow-md);
    border-color: #93c5fd;
}
.hp-tile .meta { padding: 12px 14px 14px; }
.hp-tile h3 { margin: 0 0 4px; font-size: 1rem; color: var(--ai-blue-800); }
.hp-tile p { margin: 0; font-size: 0.82rem; color: var(--ai-gray-600); line-height: 1.4; }
.hp-kind {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ai-gray-500);
}
.hp-catalog .hp-tile .hp-viz { height: 168px; }

.hp-viz {
    height: 148px;
    background:
        linear-gradient(#e8eef5 1px, transparent 1px),
        linear-gradient(90deg, #e8eef5 1px, transparent 1px),
        #f8fafc;
    background-size: 16px 16px, 16px 16px, auto;
    border-bottom: 1px solid var(--ai-gray-200);
}
.hp-svg { display: block; width: 100%; height: 100%; }
.hp-paper { fill: transparent; }
.hp-cap {
    font-family: var(--ai-font-sans);
    font-size: 11px;
    font-weight: 650;
    fill: #64748b;
    letter-spacing: 0.02em;
}
.hp-band { fill: rgba(124, 58, 237, 0.12); }
.hp-draw { stroke-dasharray: 360; stroke-dashoffset: 0; }
.hp-draw.delay { animation-delay: 0.14s; }
.hp-draw.delay2 { animation-delay: 0.28s; }
.hp-iso { transform-box: fill-box; transform-origin: center; }

.hp-tile:hover .hp-draw,
.hp-door:hover .hp-draw,
.mt-card:hover .hp-draw {
    animation: hp-trace 0.75s ease both;
}
.hp-tile:hover .hp-draw.hp-buck,
.hp-door:hover .hp-draw.hp-buck,
.mt-card:hover .hp-draw.hp-buck {
    animation-duration: 1.5s;
}
.hp-draw.hp-buck.delay { animation-delay: 0.2s; }
.hp-tile:hover .hp-draw.hp-smith,
.hp-door:hover .hp-draw.hp-smith,
.mt-card:hover .hp-draw.hp-smith {
    animation-duration: 1.35s;
}
.hp-draw.hp-smith.delay { animation-delay: 0.45s; }
.hp-draw.hp-smith.delay2 { animation-delay: 0.9s; }
.hp-tile:hover .hp-iso,
.hp-door:hover .hp-iso,
.mt-card:hover .hp-iso {
    animation: hp-iso-slide 1s ease both;
}

@keyframes hp-trace {
    from { stroke-dashoffset: 360; }
    to { stroke-dashoffset: 0; }
}
@keyframes hp-iso-slide {
    from { transform: translateX(-36px); }
    to { transform: translateX(0); }
}

.tc-rest { display: flex; flex-direction: column; }
.tc-rest a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--ai-gray-100);
    text-decoration: none;
    color: inherit;
}
.tc-rest a:hover { color: var(--ai-blue-700); }
.tc-rest strong { font-size: 0.95rem; color: var(--ai-blue-800); }
.tc-rest span { font-size: 0.84rem; color: var(--ai-gray-600); }

.latin-nook {
    position: fixed;
    right: 14px;
    bottom: 52px;
    z-index: 30;
    font-size: 0.72rem;
    color: #64748b;
    background: rgba(255,255,255,0.92);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 5px 10px;
    text-decoration: none;
    box-shadow: var(--ai-shadow-sm);
}
.latin-nook:hover { color: var(--ai-blue-700); border-color: #93c5fd; }

/* Homepage: three destination doors, not a second catalog */
.hp-doors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
}
.hp-door {
    display: flex;
    flex-direction: column;
    background: var(--ai-bg-card);
    border: 1px solid var(--ai-gray-200);
    border-radius: var(--ai-radius-lg);
    padding: 18px 16px 14px;
    box-shadow: var(--ai-shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.hp-door:hover,
.hp-door:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--ai-shadow-md);
    border-color: #93c5fd;
}
.hp-door-hit {
    display: block;
    text-decoration: none;
    color: inherit;
}
.hp-door-hit h2 {
    margin: 4px 0 8px;
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    color: var(--ai-blue-800);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.hp-door-hit p {
    margin: 0 0 4px;
    font-size: 0.92rem;
    color: var(--ai-gray-600);
    line-height: 1.45;
}
.hp-door-hit .hp-go {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ai-blue-700);
}

.hp-peek {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    opacity: 0.72;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.hp-door:hover .hp-peek,
.hp-door:focus-within .hp-peek {
    opacity: 1;
    transform: none;
}
.hp-peek .hp-tile {
    min-width: 0;
    box-shadow: none;
}
.hp-peek .hp-tile:hover,
.hp-peek .hp-tile:focus-visible {
    transform: none;
    border-color: #93c5fd;
}
.hp-peek .hp-viz { height: 88px; }
.hp-peek .meta { padding: 8px 8px 10px; }
.hp-peek h3 { font-size: 0.78rem; margin: 0; }
.hp-peek .hp-kind,
.hp-peek p { display: none; }

.hp-peek-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: auto;
    padding-top: 16px;
    opacity: 0.72;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.hp-door:hover .hp-peek-list,
.hp-door:focus-within .hp-peek-list {
    opacity: 1;
    transform: none;
}
.hp-peek-list a {
    display: block;
    padding: 9px 2px;
    border-bottom: 1px solid var(--ai-gray-100);
    text-decoration: none;
    color: var(--ai-blue-800);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.35;
}
.hp-peek-list a:last-child { border-bottom: 0; }
.hp-peek-list a:hover { color: var(--ai-blue-600); }

/* Mini-tutorial hub tiles reuse the same sketches */
.mt-card.hp-tile {
    padding: 0;
    overflow: hidden;
}
.mt-card .hp-viz {
    height: 148px;
    flex: 0 0 auto;
}
.mt-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (max-width: 860px) {
    .hp-catalog { grid-template-columns: 1fr; }
    .hp-doors { grid-template-columns: 1fr; }
    .hp-hero { padding-top: 24px; }
    .latin-nook { bottom: 14px; }
    .hp-peek { opacity: 1; transform: none; }
    .hp-peek-list { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hp-tile:hover .hp-draw,
    .hp-tile:hover .hp-iso,
    .hp-door:hover .hp-draw,
    .hp-door:hover .hp-iso,
    .mt-card:hover .hp-draw,
    .mt-card:hover .hp-iso { animation: none; }
}
