/* ============================================
   lozic — global theme system
   ============================================ */

:root {
    --bg: #000000; /* 전체 배경 기본색 */
    --fg: #f2ece2; /* 기본 본문/주요 텍스트 색 */
    --fg-dim: rgba(242, 236, 226, 0.55); /* 보조 텍스트 색 */
    --hair: rgba(242, 236, 226, 0.25); /* 얇은 구분선/테두리 색 */
    --accent: #ff6a3d; /* 핵심 포인트(버튼, 강조) 색 */
    --accent-soft: #ff8a5c; /* 부드러운 보조 강조 색 */
    --glow: #ff6a3d; /* 발광/광원 계열 효과 기준색 */
    --layer-1: #ffdd66; /* 3D 레이어 색상 1 (가장 밝은 층) */
    --layer-2: #ff8833; /* 3D 레이어 색상 2 */
    --layer-3: #ff2222; /* 3D 레이어 색상 3 */
    --layer-4: #aa1111; /* 3D 레이어 색상 4 */
    --layer-5: #551111; /* 3D 레이어 색상 5 */
    --layer-6: #333333; /* 3D 레이어 색상 6 (가장 어두운 층) */
    --particle: #ffc9a6; /* 파티클/점 효과 색 */
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-serif: 'Instrument Serif', 'Times New Roman', serif;
    --node-label-main: rgba(242, 236, 226, 0.94); /* 노드 라벨 메인 텍스트 */
    --node-label-sub: rgba(242, 236, 226, 0.72); /* 노드 라벨 한글/보조 텍스트 */
    --node-label-en: rgba(242, 236, 226, 0.38); /* 노드 라벨 영어 보조 줄 */
    --node-fill: #aa2222; /* 노드 내부 사각형 채움 색 */
}

[data-theme="ember"] {
    --bg: #000000; /* Ember 배경 */
    --fg: #f2ece2; /* Ember 기본 텍스트 */
    --fg-dim: rgba(242, 236, 226, 0.55); /* Ember 보조 텍스트 */
    --hair: rgba(242, 236, 226, 0.25); /* Ember 경계선 */
    --accent: #ff6a3d; /* Ember 포인트 색 */
    --accent-soft: #ff8a5c; /* Ember 보조 포인트 색 */
    --glow: #ff6a3d; /* Ember 글로우 기준색 */
    --layer-1: #ffdd66; /* Ember 레이어 1 */
    --layer-2: #ff8833; /* Ember 레이어 2 */
    --layer-3: #ff2222; /* Ember 레이어 3 */
    --layer-4: #aa1111; /* Ember 레이어 4 */
    --layer-5: #551111; /* Ember 레이어 5 */
    --layer-6: #333333; /* Ember 레이어 6 */
    --particle: #ffc9a6; /* Ember 파티클 */
    --node-label-main: rgba(242, 236, 226, 0.94); /* Ember 노드 메인 텍스트 */
    --node-label-sub: rgba(242, 236, 226, 0.72); /* Ember 노드 보조 텍스트 */
    --node-label-en: rgba(242, 236, 226, 0.38); /* Ember 노드 영어 텍스트 */
    --node-fill: #aa2222; /* Ember 노드 채움 */
}

[data-theme="ion"] {
    --bg: #05080c; /* Ion 배경 */
    --fg: #e6f1ff; /* Ion 기본 텍스트 */
    --fg-dim: rgba(230, 241, 255, 0.55); /* Ion 보조 텍스트 */
    --hair: rgba(230, 241, 255, 0.22); /* Ion 경계선 */
    --accent: #6c3bff; /* Ion 포인트 색 */
    --accent-soft: #00aeff; /* Ion 보조 포인트 색 */
    --glow: #4cc9ff; /* Ion 글로우 기준색 */
    --layer-1: #97ffcf; /* Ion 레이어 1 */
    --layer-2: #77e6ff; /* Ion 레이어 2 */
    --layer-3: #2e8bff; /* Ion 레이어 3 */
    --layer-4: #411ab8; /* Ion 레이어 4 */
    --layer-5: #102a6b; /* Ion 레이어 5 */
    --layer-6: #1a2230; /* Ion 레이어 6 */
    --particle: #bfe3ff; /* Ion 파티클 */
    --node-label-main: rgba(230, 241, 255, 0.96); /* Ion 노드 메인 텍스트 */
    --node-label-sub: rgba(230, 241, 255, 0.74); /* Ion 노드 보조 텍스트 */
    --node-label-en: rgba(230, 241, 255, 0.42); /* Ion 노드 영어 텍스트 */
    --node-fill: #011022; /* Ion 노드 채움 */
}

[data-theme="moss"] {
    --bg: #ff0000; /* Moss 배경 (완전 단색 레드) */
    --fg: #f5f5f5; /* Moss 기본 텍스트 */
    --fg-dim: rgba(245, 245, 245, 0.62); /* Moss 보조 텍스트 */
    --hair: rgba(245, 245, 245, 0.24); /* Moss 경계선 */
    --accent: #d91f26; /* Moss 포인트 색 */
    --accent-soft: #000000; /* Moss 보조 포인트 색 */
    --glow: #ff3b42; /* Moss 글로우 기준색 */
    --layer-1: #e5f99c; /* Moss 레이어 1 */
    --layer-2: #ffb3b6; /* Moss 레이어 2 */
    --layer-3: #ff5b61; /* Moss 레이어 3 */
    --layer-4: #d91f26; /* Moss 레이어 4 */
    --layer-5: #7a1216; /* Moss 레이어 5 */
    --layer-6: #141414; /* Moss 레이어 6 */
    --particle: #ffd6d8; /* Moss 파티클 */
    --node-label-main: rgba(245, 245, 245, 0.96); /* Moss 노드 메인 텍스트 */
    --node-label-sub: rgba(245, 245, 245, 0.78); /* Moss 노드 보조 텍스트 */
    --node-label-en: rgba(245, 245, 245, 0.46); /* Moss 노드 영어 텍스트 */
    --node-fill: #2a0d0f; /* Moss 노드 채움 */
}

[data-theme="ivory"] {
    --bg: #ece6d7; /* Ivory 배경 */
    --fg: #2a2826; /* Ivory 기본 텍스트 */
    --fg-dim: rgba(42, 40, 38, 0.55); /* Ivory 보조 텍스트 */
    --hair: rgba(42, 40, 38, 0.22); /* Ivory 경계선 */
    --accent: #4a4742; /* Ivory 포인트 색 */
    --accent-soft: #6b6860; /* Ivory 보조 포인트 색 */
    --glow: #4a4742; /* Ivory 글로우 기준색 */
    --layer-1: #8a8780; /* Ivory 레이어 1 */
    --layer-2: #6b6860; /* Ivory 레이어 2 */
    --layer-3: #4a4742; /* Ivory 레이어 3 */
    --layer-4: #2e2c28; /* Ivory 레이어 4 */
    --layer-5: #1a1816; /* Ivory 레이어 5 */
    --layer-6: #3a332a; /* Ivory 레이어 6 */
    --particle: #4a4742; /* Ivory 파티클 */
    --node-label-main: rgba(28, 26, 24, 0.95); /* Ivory 노드 메인 텍스트 */
    --node-label-sub: rgba(28, 26, 24, 0.74); /* Ivory 노드 보조 텍스트 */
    --node-label-en: rgba(28, 26, 24, 0.5); /* Ivory 노드 영어 텍스트 */
    --node-fill: #4a4742; /* Ivory 노드 채움 */
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    transition: background-color 600ms ease, color 600ms ease;
}
body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23b8b8b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.5' y='4.5' width='11' height='19' rx='5.5'/%3E%3Cline x1='14' y1='8' x2='14' y2='12'/%3E%3C/g%3E%3C/svg%3E") 14 8, default;
}
@media (hover: none), (pointer: coarse) {
    body { cursor: default; }
}
canvas { display: block; width: 100vw; height: 100vh; }

.hud {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.brand {
    position: absolute;
    top: 28px;
    left: 32px;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--fg-dim);
    text-decoration: none;
    pointer-events: auto;
    transition: color 240ms ease;
}
.brand:hover { color: var(--fg); }

.tagline {
    position: absolute;
    left: 0; right: 0;
    bottom: 8vh;
    text-align: center;
    pointer-events: none;
}

.headline {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(44px, 7.2vw, 112px);
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--fg);
    display: inline-block;
    position: relative;
    cursor: default;
}
.headline .line { display: block; }
.headline .italic {
    font-style: italic;
    color: var(--accent-soft);
    transition: color 600ms ease;
}
.headline .ch {
    display: inline-block;
    transition: transform 480ms cubic-bezier(.2,.7,.2,1), color 400ms ease, opacity 400ms ease;
    will-change: transform;
}
.headline .sp { display: inline-block; width: 0.24em; }

.footer {
    position: absolute;
    bottom: 24px;
    left: 32px;
    right: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--fg-dim);
    font-variant-numeric: tabular-nums;
}
.foot-link {
    color: var(--fg-dim);
    text-decoration: none;
    pointer-events: auto;
    font-size: 15px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    transition: color 240ms ease;
}
.foot-link:hover { color: var(--fg); }

.subscribe {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 22px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--fg);
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--hair);
    border-radius: 999px;
    overflow: hidden;
    isolation: isolate;
    transition: color 360ms ease, border-color 360ms ease, transform 360ms cubic-bezier(.2,.7,.2,1);
}
.subscribe::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
        var(--accent) 0%, var(--accent-soft) 40%, transparent 70%);
    opacity: 0;
    transform: scale(0.2);
    transform-origin: var(--mx, 50%) var(--my, 50%);
    transition: opacity 420ms ease, transform 620ms cubic-bezier(.2,.7,.2,1);
    z-index: -1;
}
.subscribe:hover {
    color: #000;
    border-color: transparent;
    transform: translateY(-1px);
}
[data-theme="ivory"] .subscribe:hover { color: #fff; }
.subscribe:hover::before { opacity: 1; transform: scale(1.6); }
.subscribe-label { position: relative; z-index: 1; }
.subscribe-arrow {
    position: relative;
    z-index: 1;
    display: inline-block;
    transition: transform 360ms cubic-bezier(.2,.7,.2,1);
}
.subscribe:hover .subscribe-arrow { transform: translateX(6px); }

.theme-switcher {
    position: absolute;
    top: 24px;
    right: 32px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    pointer-events: auto;
    border: 1px solid var(--hair);
    border-radius: 999px;
    background: color-mix(in oklab, var(--bg) 55%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.theme-switcher button {
    appearance: none;
    border: 1px solid rgba(220, 220, 220, 0.7);
    background: transparent;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    position: relative;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28) inset;
    opacity: 1;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}
.theme-switcher button:hover { transform: scale(1.15); }
.theme-switcher button[aria-pressed="true"] {
    border-color: rgba(220, 220, 220, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
[data-theme="ivory"] .theme-switcher button {
    border-color: rgba(90, 90, 90, 0.7);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}
[data-theme="ivory"] .theme-switcher button[aria-pressed="true"] {
    border-color: rgba(90, 90, 90, 0.7);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.62) inset;
}

.theme-switcher .sw-ember { background: transparent; }
.theme-switcher .sw-ion   { background: transparent; }
.theme-switcher .sw-moss  { background: transparent; }
.theme-switcher .sw-ivory { background: transparent; }

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    pointer-events: none;
}
.modal-root.open { display: block; pointer-events: auto; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 420ms ease;
}
.modal-root.open .modal-backdrop { opacity: 1; }

.modal-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 16px)) scale(0.98);
    width: min(680px, calc(100vw - 48px));
    padding: 48px 56px 40px;
    border-radius: 32px;
    background:
        linear-gradient(155deg,
            color-mix(in oklab, var(--bg) 72%, transparent) 0%,
            color-mix(in oklab, var(--bg) 62%, transparent) 40%,
            color-mix(in oklab, var(--bg) 70%, transparent) 100%);
    backdrop-filter: blur(48px) saturate(1.8);
    -webkit-backdrop-filter: blur(48px) saturate(1.8);
    border: 1px solid color-mix(in oklab, var(--fg) 18%, transparent);
    box-shadow:
        0 40px 80px -20px rgba(0,0,0,0.55),
        0 8px 24px -8px rgba(0,0,0,0.35),
        inset 0 1px 0 color-mix(in oklab, var(--fg) 35%, transparent),
        inset 0 -1px 0 color-mix(in oklab, var(--fg) 8%, transparent),
        inset 1px 0 0 color-mix(in oklab, var(--fg) 10%, transparent),
        inset -1px 0 0 color-mix(in oklab, var(--fg) 10%, transparent);
    opacity: 0;
    transition: opacity 520ms cubic-bezier(.2,.7,.2,1) 60ms,
                transform 720ms cubic-bezier(.2,.7,.2,1) 60ms;
    overflow: hidden;
    isolation: isolate;
}
[data-theme="ivory"] .modal-frame {
    background:
        linear-gradient(155deg,
            rgba(255,255,255,0.82) 0%,
            rgba(255,255,255,0.68) 40%,
            rgba(255,255,255,0.78) 100%);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow:
        0 40px 80px -20px rgba(60,50,40,0.25),
        0 8px 24px -8px rgba(60,50,40,0.15),
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -1px 0 rgba(255,255,255,0.25);
}

.modal-frame::before {
    content: "";
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 40%;
    background: linear-gradient(180deg,
        color-mix(in oklab, var(--fg) 22%, transparent) 0%,
        transparent 100%);
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}
.modal-frame::after {
    content: "";
    position: absolute;
    bottom: -1px; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        color-mix(in oklab, var(--accent) 35%, transparent),
        transparent);
    pointer-events: none;
    z-index: 0;
}
.modal-root.open .modal-frame {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.modal-body, .sent-veil { position: relative; z-index: 1; }

.modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--fg-dim);
    font-family: var(--font-sans);
    margin-bottom: 40px;
}
.modal-meta .dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    margin-right: 10px;
    animation: sig-pulse 2.4s ease-in-out infinite;
}
@keyframes sig-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50%      { opacity: 1;    transform: scale(1.1); }
}
.modal-close {
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid color-mix(in oklab, var(--fg) 22%, transparent);
    background: color-mix(in oklab, var(--fg) 8%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--fg-dim);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 color-mix(in oklab, var(--fg) 22%, transparent);
    transition: color 240ms ease, border-color 240ms ease, background 240ms ease, transform 240ms ease;
}
.modal-close:hover {
    color: var(--fg);
    border-color: var(--fg);
    background: color-mix(in oklab, var(--fg) 14%, transparent);
    transform: scale(1.06);
}

.modal-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(40px, 5.4vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.015em;
    color: var(--fg);
    margin: 0 0 8px;
}
.modal-sub {
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--fg-dim);
    margin: 0 0 40px;
    max-width: 42ch;
    line-height: 1.55;
}

.channel-row {
    display: flex;
    gap: 32px;
    position: relative;
    border-bottom: 1px solid var(--hair);
    padding-bottom: 14px;
    margin-bottom: 28px;
}
.channel-btn {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fg-dim);
    cursor: pointer;
    position: relative;
    transition: color 320ms ease;
}
.channel-btn:hover { color: var(--fg); }
.channel-btn[aria-pressed="true"] { color: var(--fg); }
.channel-underline {
    position: absolute;
    bottom: -15px;
    left: 0;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    width: 0;
    transform: translateX(0);
    transition: transform 520ms cubic-bezier(.2,.7,.2,1),
                width    520ms cubic-bezier(.2,.7,.2,1);
}

.field-wrap {
    position: relative;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--hair);
    transition: border-color 360ms ease;
    margin-bottom: 36px;
}
.field-wrap:focus-within { border-bottom-color: var(--accent); }
.field-label {
    font-family: var(--font-sans);
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--fg-dim);
    display: block;
    margin-bottom: 8px;
    transition: color 320ms ease;
}
.field-wrap:focus-within .field-label { color: var(--accent); }
.field-input {
    width: 100%;
    appearance: none;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(22px, 2.6vw, 32px);
    letter-spacing: -0.005em;
    color: var(--fg);
    caret-color: var(--accent);
}
#contactFrame .field-input {
    font-family: 'Pretendard', 'Inter', -apple-system, sans-serif;
    font-size: clamp(15.4px, 1.82vw, 22.4px);
}
#contactFrame #contactMessage {
    resize: vertical;
    min-height: 96px;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in oklab, var(--fg) 36%, transparent) transparent;
}
#contactFrame #contactMessage::-webkit-scrollbar {
    width: 8px;
}
#contactFrame #contactMessage::-webkit-scrollbar-track {
    background: transparent;
}
#contactFrame #contactMessage::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
    background: color-mix(in oklab, var(--fg) 30%, transparent);
}
#contactFrame #contactMessage:hover::-webkit-scrollbar-thumb {
    background: color-mix(in oklab, var(--fg) 44%, transparent);
}
.field-input::placeholder {
    color: var(--fg-dim);
    opacity: 0.55;
    font-style: italic;
}

.submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.submit-hint {
    font-family: var(--font-sans);
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: none;
    color: var(--fg-dim);
}
.submit-btn {
    position: relative;
    appearance: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 13px 26px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--fg);
    background: color-mix(in oklab, var(--fg) 10%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid color-mix(in oklab, var(--fg) 22%, transparent);
    border-radius: 999px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: inset 0 1px 0 color-mix(in oklab, var(--fg) 28%, transparent);
    transition: color 360ms ease, border-color 360ms ease, transform 360ms cubic-bezier(.2,.7,.2,1);
}
.submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
        var(--accent) 0%, var(--accent-soft) 45%, transparent 72%);
    opacity: 0;
    transform: scale(0.2);
    transform-origin: var(--mx, 50%) var(--my, 50%);
    transition: opacity 420ms ease, transform 620ms cubic-bezier(.2,.7,.2,1);
    z-index: -1;
}
.submit-btn:hover {
    color: #000;
    border-color: transparent;
    transform: translateY(-1px);
}
[data-theme="ivory"] .submit-btn:hover { color: #fff; }
.submit-btn:hover::before { opacity: 1; transform: scale(1.8); }
.submit-btn:disabled { cursor: default; opacity: 0.45; }
.submit-btn:disabled:hover { transform: none; color: var(--fg); border-color: var(--hair); }
.submit-btn:disabled:hover::before { opacity: 0; transform: scale(0.2); }

.submit-arrow {
    display: inline-block;
    transition: transform 360ms cubic-bezier(.2,.7,.2,1);
}
.submit-btn:hover .submit-arrow { transform: translateX(6px); }

.modal-body { transition: opacity 400ms ease; }
.modal-frame[data-state="sent"] .modal-body { opacity: 0; pointer-events: none; }
.sent-veil {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 520ms ease 280ms;
    pointer-events: none;
    text-align: center;
    padding: 0 48px;
}
.modal-frame[data-state="sent"] .sent-veil { opacity: 1; }
.sent-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(36px, 4.8vw, 56px);
    color: var(--fg);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.sent-sub {
    font-family: var(--font-sans);
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent);
}

.field-error {
    font-family: var(--font-sans);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--accent);
    min-height: 14px;
    margin-top: -24px;
    margin-bottom: 22px;
    opacity: 0;
    transition: opacity 240ms ease;
}
.field-error.show { opacity: 1; }

@media (max-width: 640px) {
    .modal-frame {
        width: calc(100vw - 24px);
        padding: 44px 28px 32px;
    }
    .modal-sub { margin-bottom: 28px; }
    .channel-row { gap: 20px; }
    .submit-row { flex-direction: column-reverse; align-items: stretch; gap: 16px; }
    .submit-btn { justify-content: space-between; }
}

@media (max-width: 768px) {
    .brand { top: 20px; left: 20px; font-size: 9px; }
    .theme-switcher { top: 16px; right: 20px; gap: 8px; padding: 5px 8px; }
    .theme-switcher button { width: 14px; height: 14px; }
    .tagline { bottom: 80px; }
    .headline { font-size: clamp(32px, 9vw, 72px); }
    .footer { bottom: 18px; left: 20px; right: 20px; }
    .foot-link { font-size: 13.5px; letter-spacing: 0.18em; }
    .subscribe { padding: 9px 16px; font-size: 9px; letter-spacing: 0.22em; }
}


/* ---------- Project menu ---------- */
.project-wrap { position: relative; pointer-events: auto; }
.project-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 14px);
    min-width: 248px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    text-transform: none;
    letter-spacing: normal;
    animation: projectIn 220ms ease;
}
.project-menu[hidden] { display: none; }
@keyframes projectIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.project-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--fg);
    text-decoration: none;
    transition: background 200ms ease;
}
.project-item:hover, .project-item:focus-visible { background: color-mix(in srgb, var(--fg) 8%, transparent); outline: none; }
.project-name { font-family: var(--font-serif); font-size: 22px; line-height: 1.1; }
.project-url { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.08em; color: var(--accent-soft); }
.project-legal {
    margin: 6px 14px 4px;
    padding-top: 8px;
    border-top: 1px solid var(--hair);
    font-family: var(--font-sans);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fg-dim);
    text-decoration: none;
}
.project-legal:hover { color: var(--fg); }
@media (max-width: 768px) {
    .project-menu { min-width: 220px; }
    .project-name { font-size: 19px; }
}
