/* =========================================================
   TML HOME
   ========================================================= */

.tml-home {
    overflow: hidden;
}

/* Hero */

.tml-hero {
    padding: 82px 0 72px;

    border-bottom: 1px solid var(--tml-line);

    background:
        radial-gradient(
            circle at 82% 10%,
            rgba(21, 94, 239, 0.10),
            transparent 31%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8faff 100%
        );
}

.tml-hero__inner {
    max-width: 880px;
}

.tml-kicker {
    margin: 0 0 14px;

    color: var(--tml-blue);

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.tml-hero h1 {
    max-width: 800px;

    margin: 0;

    color: var(--tml-ink);

    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -0.055em;
}

.tml-hero__lead {
    max-width: 700px;

    margin: 24px 0 0;

    color: var(--tml-muted);

    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.8;
}

/* Sections */

.tml-section {
    padding: 72px 0;
}

.tml-section + .tml-section {
    border-top: 1px solid var(--tml-line);
}

.tml-section--soft {
    background: var(--tml-soft);
}

.tml-section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;

    gap: 28px;

    margin-bottom: 30px;
}

.tml-section__head h2 {
    margin: 0;

    font-size: clamp(1.55rem, 3vw, 2.05rem);
    line-height: 1.3;
    letter-spacing: -0.04em;
}

.tml-section__head p {
    max-width: 520px;

    margin: 0;

    color: var(--tml-muted);

    font-size: 0.94rem;
}

/* Category cards */

.tml-area-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    border-top: 1px solid var(--tml-line);
    border-left: 1px solid var(--tml-line);

    background: var(--tml-white);
}

.tml-area {
    min-height: 190px;

    display: flex;
    flex-direction: column;

    padding: 24px;

    border-right: 1px solid var(--tml-line);
    border-bottom: 1px solid var(--tml-line);

    background: var(--tml-white);

    transition:
        background 0.16s ease,
        transform 0.16s ease;
}

.tml-area:hover {
    background: var(--tml-soft-blue);
}

.tml-area__number {
    display: block;

    margin-bottom: 28px;

    color: var(--tml-blue);

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.tml-area h3 {
    margin: auto 0 7px;

    color: var(--tml-ink);

    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: -0.035em;
}

.tml-area p {
    margin: 0;

    color: var(--tml-muted);

    font-size: 0.84rem;
    line-height: 1.6;
}

/* Latest */

.tml-latest-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(0, 0.85fr);

    gap: 46px;
}

.tml-feature {
    min-width: 0;
}

.tml-feature__media {
    aspect-ratio: 16 / 9;

    display: block;

    overflow: hidden;

    margin-bottom: 20px;

    border-radius: var(--tml-radius-lg);

    background: #eaecf0;
}

.tml-feature__media img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.22s ease;
}

.tml-feature:hover .tml-feature__media img {
    transform: scale(1.015);
}

.tml-image-placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    color: #98a2b3;
    background:
        linear-gradient(
            135deg,
            #f2f4f7,
            #e4e7ec
        );

    font-size: 0.85rem;
    font-weight: 700;
}

.tml-feature__category {
    margin: 0 0 8px;

    color: var(--tml-blue);

    font-size: 0.75rem;
    font-weight: 800;
}

.tml-feature h3 {
    margin: 0;

    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.35;
    letter-spacing: -0.04em;
}

.tml-feature time {
    display: block;

    margin-top: 11px;

    color: var(--tml-muted);

    font-size: 0.84rem;
}

/* latest rows */

.tml-latest-list {
    border-top: 1px solid var(--tml-line);
}

.tml-latest-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);

    gap: 18px;

    padding: 17px 0;

    border-bottom: 1px solid var(--tml-line);
}

.tml-latest-row__media {
    aspect-ratio: 4 / 3;

    display: block;

    overflow: hidden;

    border-radius: 9px;

    background: #eaecf0;
}

.tml-latest-row__media img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.tml-latest-row__copy {
    min-width: 0;
}

.tml-latest-row__category {
    margin: 0 0 5px;

    color: var(--tml-blue);

    font-size: 0.7rem;
    font-weight: 800;
}

.tml-latest-row h3 {
    margin: 0;

    font-size: 1rem;
    line-height: 1.45;
    letter-spacing: -0.025em;
}

.tml-latest-row time {
    display: block;

    margin-top: 7px;

    color: var(--tml-muted);

    font-size: 0.78rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1020px) {
    .tml-area-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .tml-hero {
        padding: 62px 0 58px;
    }

    .tml-section {
        padding: 58px 0;
    }

    .tml-section__head {
        display: block;
    }

    .tml-section__head p {
        margin-top: 10px;
    }

    .tml-area-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .tml-latest-layout {
        grid-template-columns: 1fr;
        gap: 38px;
    }
}

@media (max-width: 520px) {
    .tml-hero {
        padding: 46px 0 44px;
    }

    .tml-hero h1 {
        font-size: 2.15rem;
    }

    .tml-hero__lead {
        margin-top: 18px;
        font-size: 0.95rem;
    }

    .tml-section {
        padding: 44px 0;
    }

    .tml-section__head {
        margin-bottom: 22px;
    }

    .tml-area-grid {
        grid-template-columns: 1fr;
    }

    .tml-area {
        min-height: 0;
        padding: 20px;
    }

    .tml-area__number {
        margin-bottom: 16px;
    }

    .tml-latest-row {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
    }

    .tml-latest-row h3 {
        font-size: 0.94rem;
    }
}

/* =========================================================
   TML HOME V0.5 REFINEMENT
   ========================================================= */

/* Category cards: improve desktop readability. */

.tml-area h3 {
    font-size: 1.16rem;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.tml-area p {
    font-size: 0.9rem;
    line-height: 1.65;
}

/*
 * Keep five clean columns on normal desktop sizes.
 * Slightly wider labels remain on one line.
 */
@media (min-width: 1021px) {

    .tml-area {
        padding-left: 22px;
        padding-right: 22px;
    }
}

/* Tablet spacing */

@media (max-width: 820px) {

    .tml-hero {
        padding-top: 50px;
        padding-bottom: 46px;
    }

    .tml-section {
        padding-top: 46px;
        padding-bottom: 46px;
    }

    .tml-section__head {
        margin-bottom: 24px;
    }
}

/*
 * Phone: remove excessive vertical whitespace.
 * Content density is more important than decorative space.
 */
@media (max-width: 520px) {

    .tml-hero {
        padding-top: 34px;
        padding-bottom: 32px;
    }

    .tml-section {
        padding-top: 32px;
        padding-bottom: 34px;
    }

    .tml-section__head {
        margin-bottom: 18px;
    }

    .tml-section__head h2 {
        font-size: 1.65rem;
        line-height: 1.35;
    }

    .tml-section__head p {
        margin-top: 8px;

        font-size: 0.93rem;
        line-height: 1.7;
    }

    .tml-area {
        padding: 21px 24px;
    }

    .tml-area h3 {
        font-size: 1.12rem;
        white-space: normal;
    }

    .tml-area p {
        font-size: 0.9rem;
    }
}

/* === /TML HOME V0.5 REFINEMENT === */
