/* =========================
   MILLA ATELIER — BASE
   로드 순서: reset.css → base.css → typography.css → component.css → util.css → layout.css → 페이지 CSS
   역할: 디자인 토큰 + 전역 요소 base (body, a, img, button, input, ::selection)
========================= */

@charset "UTF-8";

@import url('/assets/fonts/Pretendard-1.3.9/web/static/pretendard-subset.css');


/* =========================
   THEME TOKENS — 라이트
========================= */

:root {

    /* Primary */
    --color-primary:          #af7de7;
    --color-primary-hover:    #9a6be0;
    --color-primary-active:   #8e5fd1;
    --color-primary-dark:     #8e5fd1;
    --color-primary-soft:     #f7f1ff;
    --color-primary-light:    #f6efff;
    --color-primary-border:   #e4d4fb;
    --color-primary-text:     #7a4fc9;
    --color-primary-gradient: linear-gradient(135deg, #af7de7 0%, #caa6ff 100%);

    /* Background */
    --color-bg:               #f6f7fb;
    --color-surface:          #ffffff;
    --color-surface-secondary:#fbfcfe;
    --color-bg-soft:          #fcfbff;
    --color-bg-tint:          #f3ecff;
    --color-border-tint:      #ece8f7;

    /* Footer (dark surface) */
    --color-footer-bg:        #191425;
    --color-footer-bg-strong: #2b2140;

    /* Text */
    --color-text:             #222222;
    --color-text-strong:      #111111;
    --color-text-muted:       #666f7a;
    --color-text-disabled:    #9ca3af;

    /* Border */
    --color-border:           #e7ebf2;
    --color-border-strong:    #dbe2ec;

    /* Semantic */
    --color-success:          #16a34a;
    --color-warning:          #d97706;
    --color-danger:           #dc2626;
    --color-danger-hover:     #b91c1c;
    --color-danger-soft:      #fef2f2;
    --color-danger-border:    #fecaca;
    --color-info:             #2563eb;
    --color-info-soft:        #eff6ff;
    --color-info-border:      #bfdbfe;
    --color-info-text:        #1d4ed8;

    /* Radius */
    --radius-xs:   10px;
    --radius-sm:   16px;
    --radius-md:   22px;
    --radius-lg:   28px;
    --radius-xl:   36px;
    --radius-pill: 9999px;

    /* Shadow */
    --shadow-xs: 0 4px 14px rgba(17, 17, 17, 0.04);
    --shadow-sm: 0 10px 30px rgba(17, 17, 17, 0.06);
    --shadow-md: 0 18px 44px rgba(17, 17, 17, 0.10);

    /* Transition */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.35s ease;

    /* Focus */
    --focus-ring: 0 0 0 3px rgba(175, 125, 231, 0.22);

    /* Layout */
    --container-width:  1200px;
    --container-gutter: 32px;
    --header-height:    88px;
    --bottombar-height: 68px;

    /* Typography */
    --font-family-base: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-4:  4px;
    --space-8:  8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-48: 48px;
}


/* =========================
   THEME TOKENS — 다크
========================= */

[data-theme="dark"] {

    --color-primary:          #c4a1ff;
    --color-primary-hover:    #b388ff;
    --color-primary-active:   #9464f7;
    --color-primary-dark:     #9464f7;
    --color-primary-soft:     rgba(175, 125, 231, 0.16);
    --color-primary-light:    rgba(175, 125, 231, 0.12);
    --color-primary-border:   rgba(175, 125, 231, 0.30);
    --color-primary-text:     #c4a1ff;
    --color-primary-gradient: linear-gradient(135deg, #b388ff 0%, #d4b0ff 100%);

    --color-bg:               #0f172a;
    --color-surface:          #111827;
    --color-surface-secondary:#1a2438;

    --color-text:             #e5e7eb;
    --color-text-strong:      #ffffff;
    --color-text-muted:       #9ca3af;
    --color-text-disabled:    #6b7280;

    --color-border:           #1f2937;
    --color-border-strong:    #334155;

    --shadow-xs: 0 4px 14px rgba(0, 0, 0, 0.20);
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.36);

    --focus-ring: 0 0 0 3px rgba(196, 161, 255, 0.28);
}


/* =========================
   GLOBAL BASE
========================= */

html {
    min-height: 100%;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100dvh;
    background: var(--color-bg);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input,
textarea,
select {
    font-family: var(--font-family-base);
}

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

a {
    color: inherit;
    text-decoration: none;
    transition:
        color var(--transition-base),
        opacity var(--transition-base),
        background-color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

button {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

input,
button,
textarea,
select {
    outline: none;
}

::selection {
    background: var(--color-primary-soft);
    color: var(--color-text-strong);
}


/* =========================
   CONTAINER
========================= */

.container {
    width: min(var(--container-width), calc(100% - var(--container-gutter)));
    margin: 0 auto;
}


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

@media (max-width: 1024px) {
    :root {
        --container-gutter: 24px;
    }
}

@media (max-width: 767.98px) {
    :root {
        --container-gutter: 16px;
        --header-height: 64px;
    }

    body {
        font-size: 0.9375rem;
    }
}

@media (max-width: 399.98px) {
    :root {
        --container-gutter: 12px;
    }
}
