/* Blakletterpress — responsive stylesheet */
:root {
    --ink: #25221f;
    --muted: #6d655e;
    --paper: #f7f3ed;
    --white: #fffdf9;
    --rust: #a94f37;
    --rust-dark: #7f3526;
    --line: #e4d9cc;
    --sage: #e8ebe2;
    --shadow: 0 16px 42px rgba(45, 31, 20, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--rust-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

a:hover { color: var(--rust); }

.site-header {
    position: relative;
    overflow: hidden;
    padding: 42px 24px 0;
    text-align: center;
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(39, 32, 27, .96), rgba(77, 51, 40, .94)),
        url("./images/bg-navigation.png") center / cover;
    border-bottom: 5px solid var(--rust);
}

.site-name {
    display: inline-block;
    color: #fffaf2;
    font-size: clamp(2.1rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: .045em;
    line-height: 1.15;
    text-decoration: none;
}

.site-name:hover { color: #f0d7c8; }

.tagline {
    margin: 10px 0 30px;
    color: #e6d5c7;
    font-size: 1rem;
    letter-spacing: .12em;
}

.main-nav {
    max-width: 1120px;
    margin: 0 auto;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 36px;
    margin: 0;
    padding: 15px 20px;
    list-style: none;
    border-top: 1px solid rgba(255,255,255,.18);
}

.main-nav a {
    display: inline-block;
    padding: 5px 0;
    color: #fffaf2;
    font-family: Arial, sans-serif;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: #efb99f;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 38px;
    width: min(1160px, calc(100% - 48px));
    margin: 48px auto 70px;
    align-items: start;
}

main { min-width: 0; }

article,
main section,
.sidebar {
    margin-bottom: 32px;
    padding: clamp(22px, 3.4vw, 40px);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

h1, h2, h3 {
    margin-top: 0;
    color: #342821;
    line-height: 1.25;
}

h1 {
    margin-bottom: 24px;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: normal;
}

h2 {
    margin-bottom: 24px;
    padding-bottom: 12px;
    font-size: clamp(1.5rem, 2.7vw, 2rem);
    border-bottom: 1px solid var(--line);
}

h3 { font-size: 1.2rem; }

p { margin: 0 0 18px; }

article figure { margin: 0 0 26px; }

article figure img {
    width: 100%;
    max-height: 470px;
    object-fit: cover;
}

figcaption {
    padding: 9px 12px;
    color: var(--muted);
    background: #f0e8de;
    font-size: .88rem;
    font-style: italic;
}

article p:last-child,
.value-card p:last-child,
.member p:last-child { margin-bottom: 0; }

.value-list,
.team-list,
.footer-cols,
.recent {
    margin: 0;
    padding: 0;
    list-style: none;
}

.value-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.value-card {
    min-width: 0;
    padding: 22px 18px;
    background: var(--sage);
    border-top: 3px solid var(--rust);
}

.value-card h3 {
    margin-bottom: 10px;
    color: var(--rust-dark);
}

.value-card p {
    color: #514b44;
    font-size: .95rem;
}

.team-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.member {
    min-width: 0;
    overflow: hidden;
    background: #f6f0e8;
    border: 1px solid var(--line);
    text-align: center;
}

.member img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.member h3 {
    margin: 15px 10px 5px;
    color: var(--rust-dark);
}

.member p {
    padding: 0 12px 16px;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
}

.contact-form p { margin-bottom: 18px; }

.contact-form label {
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 12px 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfc1b3;
    border-radius: 3px;
    font: inherit;
}

.contact-form textarea {
    min-height: 130px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid rgba(169, 79, 55, .25);
    border-color: var(--rust);
}

.contact-form button {
    padding: 12px 23px;
    color: white;
    background: var(--rust);
    border: 0;
    border-radius: 3px;
    font: 700 .95rem Arial, sans-serif;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.contact-form button:hover {
    background: var(--rust-dark);
    transform: translateY(-1px);
}

.sidebar {
    position: sticky;
    top: 24px;
    padding: 28px;
    background: #f0e8de;
    box-shadow: none;
}

.sidebar h2 { font-size: 1.45rem; }

.recent li {
    padding: 12px 0;
    border-bottom: 1px solid #d9cbbd;
}

.recent li:first-child { padding-top: 0; }
.recent li:last-child { border-bottom: 0; }

.recent a {
    font-weight: 700;
    text-decoration: none;
}

.sidebar p {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid #d9cbbd;
}

.site-footer {
    padding: 48px max(24px, calc((100% - 1160px) / 2)) 22px;
    color: #eee3d8;
    background: #29231f;
    border-top: 5px solid var(--rust);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.footer-cols h3 {
    margin-bottom: 12px;
    color: #f0b99f;
    font-size: 1.05rem;
}

.footer-cols p {
    margin: 0;
    color: #d1c4b8;
    font-size: .92rem;
}

.copyright {
    margin: 34px 0 0;
    padding-top: 18px;
    color: #bfb1a5;
    border-top: 1px solid rgba(255,255,255,.16);
    text-align: center;
}

/* Tablet: chuyển sang một cột nội dung chính và sidebar */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        width: min(760px, calc(100% - 36px));
        margin-top: 30px;
    }

    .sidebar {
        position: static;
    }

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

/* Điện thoại */
@media (max-width: 600px) {
    body { font-size: 15px; }

    .site-header { padding: 30px 16px 0; }

    .site-name { font-size: 2.15rem; }

    .tagline {
        margin: 9px 0 22px;
        font-size: .85rem;
        letter-spacing: .06em;
    }

    .main-nav ul {
        gap: 4px 20px;
        padding: 12px 4px;
    }

    .main-nav a { font-size: .82rem; }

    .layout {
        width: calc(100% - 24px);
        margin: 18px auto 36px;
    }

    article,
    main section,
    .sidebar {
        margin-bottom: 18px;
        padding: 20px 17px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.55rem; }

    .value-list,
    .team-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .value-card { padding: 18px; }

    .member {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        grid-template-rows: auto auto;
        text-align: left;
    }

    .member img {
        grid-row: 1 / 3;
        width: 110px;
        height: 100%;
        min-height: 110px;
        aspect-ratio: auto;
    }

    .member h3 {
        align-self: end;
        margin: 13px 14px 4px;
    }

    .member p {
        align-self: start;
        margin: 0;
        padding: 0 14px 12px;
    }

    .site-footer { padding: 32px 20px 18px; }

    .footer-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .copyright { margin-top: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
