/* =========================================================================
   HOME — các section riêng của trang chủ
   Mọi số đo quy đổi từ mockup home.png theo hệ số 1.3525 (1320 / 976).
   ========================================================================= */

/* ======================================================= 1. HERO
   Type A — ảnh nền là MỘT khối composition chạy full-bleed, phần bên trái
   được làm mờ dần về màu kem bằng gradient để chữ đọc được.
   Tuyệt đối không cắt hero thành 2 nửa trái/phải.                          */

.hero {
    position: relative;
    min-height: 660px;
    background: var(--c-cream);
    overflow: hidden;
    isolation: isolate;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% 52%;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            100deg,
            var(--c-cream) 0%,
            rgba(250, 238, 223, .985) 20%,
            rgba(250, 238, 223, .92) 28%,
            rgba(250, 238, 223, .58) 38%,
            rgba(250, 238, 223, .16) 47%,
            rgba(250, 238, 223, 0) 56%
        ),
        linear-gradient(to bottom, rgba(255, 250, 243, .38), rgba(255, 250, 243, 0) 22%);
}

/* Chuyen tiep mem giua hero va noi dung ben duoi:
   mot lop gradient tan dan + mot mep giay rach, dung nhu mockup.  */
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 132px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(248, 244, 239, 0) 0%,
        rgba(248, 244, 239, .32) 40%,
        rgba(248, 244, 239, .72) 72%,
        rgba(248, 244, 239, .96) 100%
    );
}

.hero::before {
    content: "";
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -1px;
    height: 26px;
    z-index: 5;
    pointer-events: none;
    background: #f8f4ef;
    -webkit-mask: url("../icons/edge-torn.svg") bottom center / 100% 100% no-repeat;
    mask: url("../icons/edge-torn.svg") bottom center / 100% 100% no-repeat;
}

.hero__inner {
    position: relative;
    z-index: 3;
    padding: 142px 0 36px;
}

.hero__content {
    max-width: 530px;
}

.hero__eyebrow {
    color: #8c7566;
    margin-bottom: 16px;
}

.hero__title {
    font-size: var(--fs-hero-h1);
    font-weight: 800;
    line-height: var(--lh-display);
    letter-spacing: -.025em;
    color: var(--c-heading);
}

.hero__accent {
    position: relative;
    display: inline-block;
    margin-top: 6px;
    padding-bottom: 14px;
    font-size: var(--fs-hero-accent);
    font-style: italic;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.015em;
    color: var(--c-red-bright);
}

.hero__accent::after {
    content: "";
    position: absolute;
    left: 2%;
    right: -1%;
    bottom: 0;
    height: 17px;
    background: url("../icons/underline-swoosh.svg") center / 100% 100% no-repeat;
}

.hero__lead {
    max-width: 470px;
    margin-top: 24px;
    font-size: var(--fs-hero-lead);
    line-height: 1.6;
    color: var(--c-text);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 22px;
}

/* ---------- Ghi chú viết tay trên hero ---------- */
.hero__note {
    position: absolute;
    z-index: 4;
    font-family: var(--font-script);
    font-weight: 700;
    line-height: 1.34;
    text-align: center;
    pointer-events: none;
}

.hero__note--top {
    top: 128px;
    right: 26px;
    font-size: 27px;
    color: #fffaf3;
    text-shadow: 0 2px 10px rgba(60, 30, 14, .45);
    transform: rotate(-7deg);
}

.hero__note--bottom {
    bottom: 34px;
    right: 16px;
    font-size: 21px;
    line-height: 1.46;
    color: #6d4b36;
    text-align: right;
    transform: rotate(-6deg);
}

.hero__note--bottom::before {
    content: "";
    position: absolute;
    inset: -26px -34px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(253, 246, 236, .92), rgba(253, 246, 236, .58) 62%, rgba(253, 246, 236, 0));
}

.hero__note .heart {
    color: #ffd9d4;
}

/* ======================================================= 2. MÓN NGON */

.section-dishes {
    padding-top: 0;
}

/* Khối đầu tiên nối thẳng vào hero — mockup gần như không có vai bo góc ở đây */
.section-dishes .panel {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.section-dishes .panel {
    padding: 10px 0 20px;
}

.section-dishes .section-head {
    margin-bottom: 12px;
}

.dish-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.dish-card .card__media {
    aspect-ratio: 431 / 155;
}

.dish-card .card__body {
    padding: 13px 24px 18px;
}

.dish-card .card__title {
    margin-bottom: 4px;
}

/* ======================================================= 3. VÌ SAO */

.section-why {
    padding-top: 6px;
    /* Lá trang trí tràn ra ngoài panel — cắt theo chiều ngang để
       không tạo thanh cuộn ngang trên màn hình hẹp. */
    overflow-x: clip;
}

.section-why .panel {
    padding: 12px 0 22px;
    overflow: visible;
    background: linear-gradient(to bottom, #f6eee3, var(--c-panel-warm) 62%, #f9f5ee);
}

.section-why .section-head {
    margin-bottom: 16px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.why-item {
    padding: 0 16px;
    text-align: center;
}

.why-item + .why-item {
    border-left: 1px solid var(--c-border);
}

.why-item__icon {
    display: flex;
    align-items: flex-end;      /* mockup: 4 icon thẳng hàng theo ĐÁY */
    justify-content: center;
    height: 57px;
    margin-bottom: 10px;
}

/* Kích thước lấy đúng bounding box đo trên mockup (đã nhân 1.3525) */
.why-item__icon img { width: auto; }
.why-icon--diamond { height: 50px; }
.why-icon--pin     { height: 50px; }
.why-icon--bread   { height: 39px; }
.why-icon--scooter { height: 57px; }

.why-item__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-heading);
    line-height: 1.32;
    margin-bottom: 6px;
}

.why-item__text {
    font-size: var(--fs-body-sm);
    line-height: 1.5;
    color: var(--c-text);
}

/* Lá trang trí hai mép khối */
.section-why .leaf--left {
    /* mockup: la trai x 10..55, y 795..891 ; panel x 26..949, top 783.5 */
    left: -22px;
    top: 16px;
    width: 61px;
    transform: none;
}

.section-why .leaf--right {
    /* mockup: la phai x 868..976, y 758..888 (vat len ca khoi phia tren) */
    right: -36px;
    top: -34px;
    width: 152px;
}

/* ======================================================= 4. CÂU CHUYỆN */

.section-story {
    padding-top: 8px;
}

.story {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 620px;
    align-items: stretch;
    min-height: 282px;
}

.story__text {
    align-self: center;
    padding: 24px 28px 24px 40px;
}

.story__title {
    font-size: var(--fs-h2);
    margin-bottom: 10px;
}

.story__text p {
    max-width: 592px;
    font-size: var(--fs-body-sm);
    line-height: 1.58;
}

.story__text .btn {
    margin-top: 18px;
}

.story__media {
    position: relative;
    align-self: center;
    overflow: hidden;
    /* Giu DUNG ty le goc cua anh (1335 x 582) de chu viet tay in san
       trong anh khong bi cat mat o hai mep. */
    aspect-ratio: 1335 / 582;
    /* mép trái rách như giấy xé — biên độ nhỏ để không ăn vào chữ */
    clip-path: polygon(
        1.4% 0%, .4% 7%, 1.5% 14%, .5% 21%, 1.6% 28%, .4% 35%,
        1.4% 42%, .3% 49%, 1.5% 56%, .5% 63%, 1.4% 70%, .4% 77%,
        1.6% 84%, .5% 91%, 1.4% 96%, .6% 100%, 100% 100%, 100% 0%
    );
}

.story__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ======================================================= 5. HÌNH ẢNH THỰC TẾ */

.section-gallery {
    padding-top: 6px;
}

.section-gallery .panel {
    padding: 14px 0 18px;
}

.gallery-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-bottom: 14px;
}

.gallery-head__title {
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--c-heading);
}

.gallery-head__sub {
    flex: 1 1 auto;
    font-size: var(--fs-body-sm);
    font-style: italic;
    color: var(--c-muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    width: calc(100% - 150px);
}

.gallery-grid a {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.gallery-grid a:hover img {
    transform: scale(1.07);
}

.gallery__note {
    position: absolute;
    right: 18px;
    bottom: 26px;
    width: 180px;
    font-family: var(--font-script);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.34;
    color: #5f4130;
    text-align: center;
    transform: rotate(-4deg);
    pointer-events: none;
}

.gallery__note .heart {
    color: var(--c-red-bright);
}

/* ======================================================= 6. ĐẶT HÀNG NHANH */

.section-order {
    padding-top: 6px;
}

.section-order .panel {
    padding: 20px 0 22px;
    background:
        linear-gradient(105deg, #f7ecdd 0%, #f6ede0 42%, #f3e6d6 100%);
    overflow: hidden;
}

.order {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 306px minmax(0, 1fr) 292px;
    align-items: center;
    gap: 0;
    min-height: 152px;
}

/* --- Mảnh giấy xé + chữ viết tay bên trái --- */
.order__note {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 132px;
    padding: 18px 14px;
}

.order__note::before {
    content: "";
    position: absolute;
    inset: -6px -12px;
    background: linear-gradient(104deg, #f0ddba 0%, #e5cfa6 48%, #d6b98e 100%);
    -webkit-mask: url("../icons/badge-brush.svg") center / 100% 100% no-repeat;
    mask: url("../icons/badge-brush.svg") center / 100% 100% no-repeat;
    transform: rotate(-2deg);
}

.order__note span {
    position: relative;
    font-family: var(--font-script);
    font-weight: 700;
    font-size: 27px;
    line-height: 1.34;
    color: var(--c-red-bright);
    text-align: center;
    transform: rotate(-5deg);
}

/* --- Khối giữa --- */
.order__main {
    text-align: center;
}

.order__title {
    font-size: var(--fs-h2);
    margin-bottom: 0;
}

.order__sub {
    font-size: var(--fs-body-sm);
    color: var(--c-text);
}

.order__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* Do tren mockup: nut cao 52px anh (~70 CSS), goc bo ~10.5px anh (~14 CSS)
   -> day la rounded rect, khong phai pill nhu cac nut khac. */
.order__actions .btn {
    padding-inline: 22px;
    min-height: 70px;
    border-radius: 14px;
}
.order__actions .btn--stack .btn__value { font-size: 19px; }
.order__actions .btn--icon-stack { padding-inline: 18px; gap: 11px; }

.order__actions .btn--icon-stack .btn__note {
    color: var(--c-muted);
}

.order__actions .btn--green .icon {
    width: 27px;
    height: 27px;
}

/* --- Túi giấy bên phải --- */
.order__bag {
    position: relative;
    align-self: end;
    display: grid;
    justify-items: start;
}

.order__bag img {
    width: 264px;
    max-width: none;
    height: auto;
    margin: 0 0 -22px -6px;
    mix-blend-mode: multiply;
    opacity: .97;
    -webkit-mask-image: radial-gradient(76% 74% at 52% 52%, #000 30%, rgba(0, 0, 0, 0) 76%);
    mask-image: radial-gradient(76% 74% at 52% 52%, #000 30%, rgba(0, 0, 0, 0) 76%);
}

.order__hand {
    position: absolute;
    right: 12px;
    top: 18px;
    z-index: 4;
    width: 122px;
    font-family: var(--font-script);
    font-weight: 700;
    font-size: 23px;
    line-height: 1.34;
    color: #6d4b36;
    text-align: center;
    transform: rotate(-5deg);
    pointer-events: none;
}

.order__hand .heart {
    color: var(--c-red-bright);
}

.section-order .leaf--sprig {
    left: 246px;
    bottom: -8px;
    width: 104px;
    z-index: 4;
}

.section-order .leaf--corner {
    left: -8px;
    bottom: -10px;
    width: 86px;
    transform: rotate(-8deg);
    z-index: 4;
}
