/*
Theme Name: E.Ma Hot Pot Redesign
Theme URI: https://ema-hotpot.com/
Description: A local editorial refresh for the E.Ma Hot Pot restaurant site.
Author: E.Ma Hot Pot
Template: futurio
Version: 1.0.0
Text Domain: ema-hotpot-redesign
*/

:root {
    --ema-ivory: #f5f1e9;
    --ema-ivory-deep: #eae4d8;
    --ema-ink: #242521;
    --ema-wine: #8d302f;
    --ema-muted: #716c62;
    --ema-line: #d8d0c4;
    --ema-content: 1280px;
    --ema-header-height: 92px;
}

html {
    scroll-padding-top: calc(var(--ema-header-height) + 1rem);
}

body.ema-hotpot-site {
    margin: 0;
    background: var(--ema-ivory);
    color: var(--ema-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

.ema-hotpot-site *,
.ema-hotpot-site *::before,
.ema-hotpot-site *::after {
    box-sizing: border-box;
}

.ema-hotpot-site img {
    display: block;
    max-width: 100%;
    height: auto;
}

.ema-hotpot-site a {
    color: inherit;
}

.ema-hotpot-site a:focus-visible,
.ema-hotpot-site button:focus-visible {
    outline: 3px solid var(--ema-wine);
    outline-offset: 4px;
}

.page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.ema-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--ema-line);
    background: rgba(245, 241, 233, 0.98);
}

.ema-site-header__inner {
    position: relative;
    width: min(var(--ema-content), calc(100% - 64px));
    min-height: var(--ema-header-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.ema-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    text-decoration: none;
}

.ema-brand img {
    width: 176px;
    height: auto;
}

.ema-primary-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 44px);
    padding: 0;
    margin: 0;
    list-style: none;
}

.ema-primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ema-ink);
    font-size: 15px;
    text-decoration: none;
}

.ema-primary-nav a:not(.ema-button):hover,
.ema-footer a:hover {
    color: var(--ema-wine);
}

.ema-button,
.ema-store-action {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border: 1px solid var(--ema-wine);
    border-radius: 2px;
    background: var(--ema-wine);
    color: #fff !important;
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.ema-button:hover,
.ema-store-action:hover {
    background: #702625;
    border-color: #702625;
}

.ema-menu-toggle {
    display: none;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--ema-line);
    border-radius: 2px;
    background: transparent;
    color: var(--ema-ink);
    font: inherit;
    cursor: pointer;
}

.ema-menu-toggle__icon,
.ema-menu-toggle__icon::before,
.ema-menu-toggle__icon::after {
    display: block;
    width: 18px;
    height: 1px;
    background: currentColor;
}

.ema-menu-toggle__icon {
    position: relative;
}

.ema-menu-toggle__icon::before,
.ema-menu-toggle__icon::after {
    position: absolute;
    left: 0;
    content: "";
}

.ema-menu-toggle__icon::before {
    top: -6px;
}

.ema-menu-toggle__icon::after {
    top: 6px;
}

.ema-skip-target {
    height: 0;
    scroll-margin-top: calc(var(--ema-header-height) + 1rem);
}

.ema-main-container {
    width: 100%;
    flex: 1 0 auto;
}

.ema-page-area {
    width: 100%;
    padding: 0;
}

.ema-home [id] {
    scroll-margin-top: calc(var(--ema-header-height) + 1rem);
}

.ema-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(40px, 6vw, 88px);
    width: min(var(--ema-content), calc(100% - 128px));
    min-height: min(690px, calc(100svh - var(--ema-header-height)));
    margin: 0 auto;
    padding: 64px 0 72px;
}

.ema-eyebrow {
    margin: 0 0 18px;
    color: var(--ema-wine);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.16em;
}

.ema-hero h1,
.ema-section-heading h2,
.ema-story h2,
.ema-footer h2 {
    margin: 0;
    color: var(--ema-ink);
    font-family: ui-serif, "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
    font-weight: 500;
    letter-spacing: 0.035em;
}

.ema-hero h1 {
    font-size: clamp(3.5rem, 5.6vw, 4.75rem);
    line-height: 1.18;
}

.ema-hero h1 span {
    display: block;
}

.ema-hero__intro {
    max-width: 430px;
    margin: 24px 0 0;
    color: #45453f;
    font-size: 18px;
    line-height: 1.8;
}

.ema-hero__actions {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 32px;
}

.ema-text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    color: var(--ema-ink);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.ema-text-link span {
    color: var(--ema-wine);
    font-size: 20px;
}

.ema-hero__signature {
    margin: 48px 0 0;
    color: var(--ema-muted);
    font-size: 11px;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.ema-hero__media {
    position: relative;
    margin: 0;
}

.ema-hero__media img {
    width: 100%;
    aspect-ratio: 1.36 / 1;
    object-fit: cover;
    object-position: center;
}

.ema-section {
    padding: 96px 0;
}

.ema-section__inner {
    width: min(var(--ema-content), calc(100% - 128px));
    margin: 0 auto;
}

.ema-section-heading {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    margin-bottom: 40px;
}

.ema-section-number {
    margin: 0;
    color: var(--ema-wine);
    font-family: ui-serif, Georgia, serif;
    font-size: 38px;
    line-height: 1;
}

.ema-section-heading h2,
.ema-story h2 {
    font-size: clamp(2.25rem, 3.5vw, 3.25rem);
    line-height: 1.28;
}

.ema-section-heading__copy > p:last-child {
    max-width: 660px;
    margin: 12px 0 0;
    color: var(--ema-muted);
}

.ema-stores {
    background: var(--ema-ivory-deep);
}

.ema-store-city-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.ema-store-city-nav a {
    display: inline-flex;
    flex: 1 1 120px;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid var(--ema-wine);
    border-radius: 2px;
    background: var(--ema-ivory);
    color: var(--ema-wine);
    font-size: 14px;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

.ema-store-city-nav a:hover {
    background: var(--ema-wine);
    color: #fff;
}

.ema-store-list {
    border-top: 1px solid #c9c0b3;
}

.ema-store-row {
    display: grid;
    grid-template-columns: 42px minmax(210px, 1.15fr) minmax(310px, 1.45fr) auto;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid #c9c0b3;
}

.ema-store-row:focus {
    outline: 3px solid var(--ema-wine);
    outline-offset: 4px;
}

.ema-store-index {
    align-self: start;
    padding-top: 4px;
    color: var(--ema-wine);
    font-size: 13px;
    letter-spacing: 0.1em;
}

.ema-store-main h3 {
    margin: 0 0 8px;
    font-family: ui-serif, "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
    font-size: 21px;
    font-weight: 500;
}

.ema-store-main p {
    margin: 0;
    color: #39362f;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.ema-store-phone {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    margin-top: 5px !important;
}

.ema-store-phone a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 2px 8px;
    border-radius: 2px;
    color: var(--ema-wine);
    font-size: 15px;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.ema-store-hours ul {
    padding: 0;
    margin: 0;
    list-style: none;
    color: #39362f;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
}

.ema-store-hours li + li {
    margin-top: 2px;
}

.ema-store-hours__note {
    margin: 7px 0 0;
    color: var(--ema-wine);
    font-size: 12px;
}

.ema-store-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.ema-store-action {
    min-width: 116px;
    min-height: 44px;
    padding: 9px 15px;
    font-size: 14px;
}

.ema-store-action--map {
    background: transparent;
    color: var(--ema-wine) !important;
}

.ema-store-action--map:hover {
    background: var(--ema-wine);
    color: #fff !important;
}

.ema-section-note {
    margin: 22px 0 0;
    color: var(--ema-muted);
    font-size: 12px;
}

.ema-menu {
    background: var(--ema-ivory);
}

.ema-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 54px);
}

.ema-menu-item {
    min-width: 0;
}

.ema-menu-item figure {
    margin: 0;
    overflow: hidden;
}

.ema-menu-item figure img {
    width: 100%;
    aspect-ratio: 1.38 / 1;
    object-fit: cover;
}

.ema-menu-item__copy {
    padding: 21px 0 0;
}

.ema-menu-item h3 {
    margin: 0;
    font-family: ui-serif, "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
    font-size: 26px;
    font-weight: 500;
}

.ema-menu-item p {
    max-width: 520px;
    margin: 10px 0 0;
    color: var(--ema-muted);
}

.ema-menu-reference {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
    padding: 24px 0;
    margin-top: 52px;
    border-top: 1px solid var(--ema-line);
    border-bottom: 1px solid var(--ema-line);
}

.ema-menu-reference p {
    margin: 0;
}

.ema-menu-reference__label {
    max-width: 58ch;
    padding-left: 12px;
    border-left: 3px solid var(--ema-wine);
    color: #39362f;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
}

.ema-menu-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.ema-menu-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ema-wine);
    font-size: 14px;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.ema-story {
    background: #eee8dd;
}

.ema-story__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(40px, 8vw, 112px);
}

.ema-story__copy > p:not(.ema-eyebrow) {
    max-width: 480px;
    margin: 22px 0 0;
    color: #4f4c45;
    font-size: 16px;
    line-height: 1.9;
}

.ema-story__media {
    margin: 0;
}

.ema-story__media img {
    width: 100%;
    aspect-ratio: 1.42 / 1;
    object-fit: cover;
    object-position: center;
}

.ema-footer {
    padding: 52px 0 26px;
    background: var(--ema-ink);
    color: var(--ema-ivory);
}

.ema-footer__inner {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 1.2fr) 1fr;
    align-items: center;
    gap: 40px;
    width: min(var(--ema-content), calc(100% - 128px));
    margin: 0 auto;
}

.ema-footer__brand img {
    width: 176px;
}

.ema-footer__brand {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 12px 14px;
    border-radius: 2px;
    background: var(--ema-ivory);
}

.ema-footer__message {
    padding: 0 34px;
    text-align: center;
    border-left: 1px solid rgba(245, 241, 233, 0.28);
    border-right: 1px solid rgba(245, 241, 233, 0.28);
}

.ema-footer h2 {
    color: var(--ema-ivory);
    font-size: clamp(1.65rem, 2.4vw, 2.25rem);
}

.ema-footer h2 span {
    display: block;
}

.ema-footer__message .ema-button {
    margin-top: 18px;
}

.ema-footer nav ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ema-footer nav a {
    color: var(--ema-ivory);
    text-decoration: none;
}

.ema-footer__legal {
    width: min(var(--ema-content), calc(100% - 128px));
    padding-top: 23px;
    margin: 36px auto 0;
    border-top: 1px solid rgba(245, 241, 233, 0.22);
    color: rgba(245, 241, 233, 0.72);
    font-size: 12px;
}

.ema-footer__legal p {
    margin: 0;
}

.ema-mobile-booking {
    display: none;
}

@media (min-width: 783px) {
    body.admin-bar .ema-site-header {
        top: 32px;
    }
}

@media (max-width: 782px) {
    body.admin-bar .ema-site-header {
        top: 46px;
    }
}

@media (max-width: 1050px) {
    .ema-hero,
    .ema-section__inner,
    .ema-footer__inner,
    .ema-footer__legal {
        width: calc(100% - 80px);
    }

    .ema-store-row {
        grid-template-columns: 34px minmax(190px, 1fr) minmax(260px, 1.2fr);
    }

    .ema-store-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
        margin-top: -6px;
    }

    .ema-footer__inner {
        grid-template-columns: 1fr 1.3fr;
    }

    .ema-footer nav {
        grid-column: 1 / -1;
    }

    .ema-footer nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 24px;
    }
}

@media (max-width: 760px) {
    :root {
        --ema-header-height: 72px;
    }

    html {
        scroll-padding-top: calc(var(--ema-header-height) + 1rem);
    }

    .ema-site-header__inner {
        width: calc(100% - 40px);
        min-height: var(--ema-header-height);
        flex-wrap: wrap;
        gap: 16px;
    }

    .ema-brand img {
        width: 145px;
    }

    .ema-menu-toggle {
        display: inline-flex;
    }

    .ema-menu-toggle__icon {
        transition: transform 160ms ease;
    }

    .ema-site-header.is-open .ema-menu-toggle__icon {
        background: transparent;
    }

    .ema-site-header.is-open .ema-menu-toggle__icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .ema-site-header.is-open .ema-menu-toggle__icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    html.no-js .ema-menu-toggle {
        display: none;
    }

    .ema-primary-nav {
        flex: 0 0 100%;
        margin: 0;
        padding: 0 0 14px;
        background: var(--ema-ivory);
    }

    .ema-site-header.is-open::before {
        position: fixed;
        z-index: 0;
        inset: 0;
        background: rgba(36, 37, 33, 0.78);
        content: "";
    }

    .ema-site-header.is-open::after {
        position: fixed;
        z-index: 0;
        top: 0;
        right: 0;
        left: 0;
        height: calc(var(--ema-header-height) + 1px);
        background: var(--ema-ivory);
        content: "";
    }

    body.admin-bar .ema-site-header.is-open::after {
        top: 46px;
    }

    .ema-site-header.is-open .ema-site-header__inner {
        z-index: 1;
    }

    .ema-primary-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .ema-primary-nav a {
        min-height: 46px;
    }

    html.js .ema-primary-nav {
        display: none;
        position: absolute;
        z-index: 1;
        top: 100%;
        right: 0;
        left: 0;
        width: auto;
        padding: 10px 20px 18px;
        margin: 0;
        border-bottom: 1px solid var(--ema-line);
        background: var(--ema-ivory);
        box-shadow: 0 12px 22px rgba(36, 37, 33, 0.16);
    }

    html.js .ema-site-header.is-open .ema-primary-nav {
        display: block;
    }

    .ema-hero,
    .ema-section__inner,
    .ema-footer__inner,
    .ema-footer__legal {
        width: calc(100% - 40px);
    }

    .ema-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        min-height: 0;
        padding: 48px 0 44px;
    }

    .ema-eyebrow {
        margin-bottom: 14px;
        font-size: 12px;
    }

    .ema-hero h1 {
        font-size: clamp(2.25rem, 11vw, 2.7rem);
        line-height: 1.24;
    }

    .ema-hero__intro {
        margin-top: 17px;
        font-size: 16px;
    }

    .ema-hero__actions {
        flex-wrap: wrap;
        gap: 12px 24px;
        margin-top: 24px;
    }

    .ema-hero__signature {
        margin-top: 28px;
    }

    .ema-hero__media img {
        aspect-ratio: 1.26 / 1;
    }

    .ema-section {
        padding: 66px 0;
    }

    .ema-section-heading {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 28px;
    }

    .ema-section-number {
        font-size: 27px;
    }

    .ema-section-heading h2,
    .ema-story h2 {
        font-size: clamp(1.75rem, 7vw, 2.3rem);
    }

    .ema-section-heading__copy > p:last-child {
        font-size: 14px;
    }

    .ema-store-row {
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: start;
        gap: 7px 12px;
        padding: 20px 0;
    }

    .ema-store-index {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .ema-store-main {
        grid-column: 2;
    }

    .ema-store-main h3 {
        margin-bottom: 5px;
        font-size: 19px;
    }

    .ema-store-main p,
    .ema-store-hours ul {
        font-size: 14px;
    }

    .ema-store-phone {
        min-height: 44px;
    }

    .ema-store-phone a {
        font-size: 14px;
    }

    .ema-store-hours,
    .ema-store-actions {
        grid-column: 2;
    }

    .ema-store-actions {
        gap: 8px;
        margin-top: 5px;
    }

    .ema-store-action {
        flex: 1 1 120px;
        min-width: 0;
        padding: 9px 10px;
    }

    .ema-section-note {
        line-height: 1.6;
    }

    .ema-menu-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .ema-menu-item figure img {
        aspect-ratio: 1.28 / 1;
    }

    .ema-menu-item__copy {
        padding-top: 15px;
    }

    .ema-menu-item h3 {
        font-size: 22px;
    }

    .ema-menu-reference {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-top: 34px;
    }

    .ema-menu-links {
        flex-direction: column;
        gap: 4px;
    }

    .ema-story__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .ema-story__copy > p:not(.ema-eyebrow) {
        margin-top: 16px;
        font-size: 15px;
    }

    .ema-footer {
        padding: 40px 0 22px;
    }

    .ema-footer__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .ema-footer__brand img {
        width: 152px;
    }

    .ema-footer__message {
        padding: 24px 0;
        border-top: 1px solid rgba(245, 241, 233, 0.28);
        border-right: 0;
        border-bottom: 1px solid rgba(245, 241, 233, 0.28);
        border-left: 0;
    }

    .ema-footer nav {
        grid-column: auto;
    }

    .ema-footer nav ul {
        align-items: flex-start;
        justify-content: flex-start;
        gap: 4px;
    }

    .ema-footer__legal {
        padding-top: 17px;
        margin-top: 26px;
        line-height: 1.65;
    }

    body.ema-hotpot-site {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .ema-mobile-booking {
        position: fixed;
        z-index: 1200;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--ema-line);
        background: rgba(245, 241, 233, 0.98);
    }

    .ema-mobile-booking .ema-button {
        width: min(100%, 460px);
        margin: 0 auto;
    }

    body.ema-menu-open .ema-mobile-booking {
        display: none;
    }
}

@media (max-width: 380px) {
    .ema-site-header__inner,
    .ema-hero,
    .ema-section__inner,
    .ema-footer__inner,
    .ema-footer__legal {
        width: calc(100% - 32px);
    }

    .ema-brand img {
        width: 132px;
    }

    .ema-menu-toggle {
        padding-right: 8px;
        padding-left: 8px;
    }

    html.js .ema-primary-nav {
        right: 0;
        left: 0;
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
