/* ============================================
   SSA.BBA.MAT Brand Page — style.css
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-main: #EA2E00;
    --color-main-dark: #C42700;
    --color-cream: #F0E7D6;
    --color-dark: #1A1A1A;
    --color-white: #FFFFFF;

    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --nav-height: 64px;
    --container-max: 1280px;
    --container-padding: 24px;

    --transition-fast: 0.2s ease;
    --transition-mid: 0.4s ease;
    --transition-slow: 0.6s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--color-dark);
    background: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ---------- Scroll Animation ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--color-dark);
    transition: background var(--transition-mid), box-shadow var(--transition-mid);
}

.nav__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.nav__links {
    display: flex;
    gap: 32px;
}

.nav__links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-white);
    transition: opacity var(--transition-fast);
    letter-spacing: 0.02em;
}

.nav__links a:hover {
    opacity: 0.7;
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    z-index: 1001;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav__hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: var(--color-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__pattern {
    position: absolute;
    inset: 0;
    background-image: url('../브랜드 에셋/격자 패턴 레퍼런스.png');
    background-size: 300px 300px;
    background-repeat: repeat;
    opacity: 0.15;
    will-change: transform;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--container-padding);
}

.hero__logo {
    width: min(70vw, 600px);
    margin: 0 auto 40px;
    filter: brightness(0) invert(1);
}

.hero__story {
    color: var(--color-white);
    max-width: 640px;
    margin: 0 auto;
}

.hero__story-line {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 500;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 8px;
}

.hero__story-en {
    font-size: clamp(1.3rem, 3.5vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.hero__story-tagline {
    font-size: clamp(1.1rem, 2.8vw, 1.6rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.hero__story-brand {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

.hero__scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--color-white);
    border-bottom: 2px solid var(--color-white);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(8px); }
}

/* ---------- Menu Section ---------- */
.menu {
    background: var(--color-dark);
    padding: calc(var(--nav-height) + 40px) 0 120px;
}

.menu__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--color-white);
    text-align: center;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
}

.menu__tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.menu__tab {
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-fast);
}

.menu__tab:hover {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.menu__tab.active {
    color: var(--color-dark);
    background: var(--color-white);
    border-color: var(--color-white);
}

.menu__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.menu__card {
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
    transition: transform var(--transition-mid), box-shadow var(--transition-mid);
}

.menu__card:hover {
    transform: scale(1.03);
    box-shadow: 0 16px 48px rgba(234, 46, 0, 0.2);
}

.menu__card.hidden {
    display: none;
}

.menu__card-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #000;
}

.menu__card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-mid);
}

.menu__card:hover .menu__card-img img {
    transform: scale(1.05);
}

.menu__card-info {
    padding: 20px 24px;
}

.menu__card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-main);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.menu__card-info h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-white);
}

/* ---------- Menu Detail Modal ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
}

.modal__content {
    position: relative;
    display: flex;
    background: var(--color-dark);
    border-radius: 20px;
    overflow: hidden;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    font-size: 2rem;
    color: var(--color-white);
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    line-height: 1;
}

.modal__close:hover {
    opacity: 1;
}

.modal__img {
    flex: 0 0 50%;
    background: #000;
}

.modal__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal__info {
    flex: 1;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal__category {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-main);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.modal__name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: 20px;
}

.modal__kcal {
    display: inline-block;
    padding: 6px 16px;
    background: var(--color-main);
    color: var(--color-white);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    align-self: flex-start;
}

.modal__composition {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal__composition li {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Modal responsive */
@media (max-width: 767px) {
    .modal__content {
        flex-direction: column;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal__img {
        flex: none;
        aspect-ratio: 1;
        max-height: 50vh;
    }

    .modal__info {
        padding: 28px 24px;
    }

    .modal__name {
        font-size: 1.25rem;
    }
}

/* ---------- Visual Break Section ---------- */
.visual-break {
    position: relative;
    width: 100%;
    padding: 140px 0;
    background: var(--color-main);
    overflow: hidden;
}

.visual-break__pattern {
    position: absolute;
    inset: 0;
    background-image: url('../브랜드 에셋/격자 패턴 레퍼런스.png');
    background-size: 300px 300px;
    background-repeat: repeat;
    opacity: 0.15;
}

.visual-break__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--container-padding);
}

.visual-break__text {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.6;
    margin-bottom: 16px;
}

.visual-break__text:last-child {
    margin-bottom: 0;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--color-main);
    padding: 80px 0 40px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
    width: 180px;
    margin: 0 auto 24px;
    filter: brightness(0) invert(1);
}

.footer__desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 32px;
}

.footer__cta {
    display: inline-block;
    padding: 16px 40px;
    border: 2px solid var(--color-white);
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
    transition: all var(--transition-fast);
}

.footer__cta:hover {
    background: var(--color-white);
    color: var(--color-main);
}

.footer__info {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 1023px) {
    .menu__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    :root {
        --nav-height: 56px;
        --container-padding: 20px;
    }

    /* Nav mobile */
    .nav__hamburger {
        display: flex;
    }

    .nav__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-main);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 0;
        transition: right var(--transition-mid);
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav__links.open {
        right: 0;
    }

    .nav__links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav__links a {
        display: block;
        padding: 16px 0;
        font-size: 1.1rem;
    }

    /* Hero mobile */
    .hero__logo {
        width: 85vw;
    }

    .hero__story {
        font-size: 0.95rem;
    }

    /* Menu mobile */
    .menu {
        padding: 60px 0 80px;
    }

    .menu__tabs {
        gap: 8px;
        margin-bottom: 32px;
    }

    .menu__tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .menu__grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 480px;
        margin: 0 auto;
    }

    /* Visual break mobile */
    .visual-break {
        padding: 80px 0;
    }

    /* Footer mobile */
    .footer {
        padding: 60px 0 32px;
    }

    .footer__logo {
        width: 140px;
    }
}
