/* ==========================================================================
   ZDD House - Homepage 2026
   Light editorial layout, no third-party UI framework
   ========================================================================== */

:root {
    --bg: #faf8f4;
    --surface: #ffffff;
    --ink: #1c1e1f;
    --ink-soft: #3d4143;
    --muted: #716c64;
    --line: #e8e2d8;
    --accent: #b25c35;
    --accent-dark: #8f4526;
    --accent-soft: #fbf1ea;
    --forest: #26332e;
    --radius: 16px;
    --shadow: 0 18px 40px -24px rgba(28, 24, 18, .35);
    --container: 1200px;
    --serif: Georgia, "Times New Roman", "Songti SC", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.home {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; }

.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { color: var(--accent); }
.btn-light { background: #fff; color: var(--forest); }
.btn-light:hover { background: #f1ece3; transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    height: 72px;
}

.brand { flex: 0 0 auto; display: flex; align-items: center; }
.brand img { width: 132px; height: 26px; object-fit: contain; }

.main-nav { flex: 1 1 auto; min-width: 0; }
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a {
    position: relative;
    display: block;
    padding: 6px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: color .2s ease;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px; height: 40px;
    padding: 0 9px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border-top: 1px solid transparent;
    transition: max-height .3s ease;
}
.mobile-nav ul { padding: 6px 20px; }
.mobile-nav li a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
}
.mobile-nav-actions { padding: 14px 20px 20px; }
.mobile-nav.open { max-height: 78vh; overflow-y: auto; border-top-color: var(--line); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero-section { padding: 30px 0 4px; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: 22px;
}

.hero-main {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16 / 10;
    background: #e7e0d4;
    box-shadow: var(--shadow);
}
.hero-main img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2, .6, .2, 1);
}
.hero-main:hover img { transform: scale(1.04); }

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 12, 9, 0) 32%, rgba(15, 12, 9, .74) 100%);
}
.hero-content {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: block;
    padding: 28px 32px;
    color: #fff;
}
.eyebrow {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.hero-content .eyebrow {
    background: rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.hero-title {
    margin: 12px 0 10px;
    font-family: var(--serif);
    font-size: clamp(24px, 2.9vw, 38px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .28);
}
.hero-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 640px;
    margin-bottom: 12px;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .84);
}
.meta { font-size: 12.5px; letter-spacing: .02em; color: var(--muted); }
.hero-content .meta { color: rgba(255, 255, 255, .7); }

.hero-side {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.hero-side-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.hero-side-item:hover {
    transform: translateY(-2px);
    border-color: #dcd2c2;
    box-shadow: 0 16px 30px -22px rgba(28, 24, 18, .4);
}
.hero-side-media {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1 / 1;
    background: #ece5da;
}
.hero-side-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-side-body { display: block; min-width: 0; }
.eyebrow.small {
    padding: 0;
    background: transparent;
    color: var(--accent);
    font-size: 10px;
    letter-spacing: .12em;
}
.hero-side-title {
    margin: 4px 0 6px;
    font-family: var(--serif);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Category chips
   -------------------------------------------------------------------------- */
.cat-chips-wrap { display: none; padding: 24px 0 4px; }
.cat-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.chip:hover { color: var(--accent); border-color: #e0c9b9; background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 46px 0 4px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}
.section-title {
    position: relative;
    padding-left: 16px;
    font-family: var(--serif);
    font-size: clamp(22px, 2.2vw, 29px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .28em;
    bottom: .28em;
    width: 4px;
    border-radius: 4px;
    background: var(--accent);
}
.section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}
.section-link:hover { color: var(--accent-dark); }

.category-section { padding: 44px 0; border-top: 1px solid var(--line); }
.category-section.alt {
    background: #f4efe7;
    border-top-color: transparent;
}
.category-section .section-head { border-bottom-color: rgba(0, 0, 0, .08); }
.category-section.alt .section-head { border-bottom-color: #e2d8c9; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.card { display: flex; }
.card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 42px -30px rgba(28, 24, 18, .45);
}
.card-media {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #ece5da;
}
.card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}
.card-link:hover .card-media img { transform: scale(1.05); }

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 7px;
    padding: 16px 18px 18px;
}
.card-title {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s ease;
}
.card-link:hover .card-title { color: var(--accent); }
.card-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-body .meta { margin-top: auto; padding-top: 4px; }

/* Compact text links under each category */
.text-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}
.category-section.alt .text-links { border-top-color: #e2d8c9; }
.text-links li { border-bottom: 1px solid var(--line); }
.category-section.alt .text-links li { border-bottom-color: #e2d8c9; }
.text-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 2px;
    font-size: 14px;
    color: var(--ink-soft);
}
.text-links a span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.text-links a em {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
}
.text-links a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
    margin-top: 56px;
    padding: 52px 0;
    background: var(--forest);
    color: #fff;
}
.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.cta-copy .eyebrow { background: rgba(255, 255, 255, .14); }
.cta-copy h2 {
    margin: 14px 0 8px;
    font-family: var(--serif);
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.2;
}
.cta-copy p { max-width: 560px; color: rgba(255, 255, 255, .76); font-size: 14.5px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: #1b2622;
    color: #c3cdc8;
    padding-top: 54px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 38px;
    padding-bottom: 42px;
}
.footer-brand img {
    width: 132px; height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .92;
}
.footer-brand p {
    max-width: 320px;
    margin: 16px 0 20px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #98a8a1;
}
.social { display: flex; gap: 10px; }
.social a { display: block; opacity: .82; transition: opacity .2s ease, transform .2s ease; }
.social a:hover { opacity: 1; transform: translateY(-1px); }
.social img { width: 26px; height: 26px; filter: brightness(0) invert(1); }

.footer-col h3 {
    margin: 4px 0 14px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #fff;
}
.footer-col a {
    display: block;
    padding: 5px 0;
    font-size: 13.5px;
    color: #aab8b2;
    transition: color .2s ease;
}
.footer-col a:hover { color: #fff; }
.footer-col a img {
    display: inline-block;
    width: 16px; height: 16px;
    margin-right: 6px;
    vertical-align: -3px;
}
.footer-partners { columns: 2; column-gap: 18px; }
.footer-partners h3 { column-span: all; }
.footer-partners a { text-transform: capitalize; break-inside: avoid; }

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 12.5px;
    color: #83948d;
}
.footer-bottom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-bottom a { color: #b7c4be; }
.footer-bottom a:hover { color: #fff; }
.footer-note { color: #6d7d76; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
    .main-nav ul { gap: 16px; }
    .main-nav a { font-size: 12.5px; }
    .header-inner { gap: 18px; }
}

@media (max-width: 980px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }
    .mobile-nav { display: block; }
    .cat-chips-wrap { display: block; }
    .hero { grid-template-columns: 1fr; }
    .hero-side { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; }
    .hero-side-item { grid-template-columns: 1fr; align-items: stretch; gap: 10px; }
    .hero-side-media { aspect-ratio: 16 / 10; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-grid .card:nth-child(3) { grid-column: 1 / -1; }
    .cat-grid .card:nth-child(3) .card-media { aspect-ratio: 21 / 9; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .container { width: calc(100% - 32px); }
    .header-inner { height: 62px; gap: 12px; }
    .brand img { width: 110px; height: 22px; }
    .header-actions .btn-primary { padding: 9px 14px; font-size: 12.5px; }
    .hero-section { padding-top: 18px; }
    .hero-main { aspect-ratio: 4 / 3; border-radius: 16px; }
    .hero-content { padding: 18px 18px 20px; }
    .hero-title { font-size: 23px; -webkit-line-clamp: 4; }
    .hero-desc { display: none; }
    .hero-side { grid-template-columns: 1fr; }
    .hero-side-item { grid-template-columns: 96px minmax(0, 1fr); }
    .hero-side-media { aspect-ratio: 1 / 1; }
    .hero-side-title { font-size: 15.5px; -webkit-line-clamp: 2; }
    .section { padding-top: 34px; }
    .category-section { padding: 34px 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .card-grid, .cat-grid { grid-template-columns: 1fr; }
    .cat-grid .card:nth-child(3) { grid-column: auto; }
    .cat-grid .card:nth-child(3) .card-media { aspect-ratio: 16 / 9; }
    .card-media { aspect-ratio: 16 / 9; }
    .text-links { grid-template-columns: 1fr; }
    .cta-band { padding: 38px 0; margin-top: 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .footer-partners { columns: 1; }
    .footer-bottom .container { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .hero-main:hover img, .card-link:hover .card-media img { transform: none; }
}
