/* ── Tokens ─────────────────────────────────────────── */
:root {
    --ground:    #0C0C14;
    --surface:   rgba(255,255,255,0.05);
    --surface-b: rgba(255,255,255,0.09);
    --input-bg:  rgba(255,255,255,0.06);
    --input-border: rgba(255,255,255,0.12);
    --input-focus:  #7C6FE0;
    --text:      #ECEAF8;
    --text-dim:  rgba(236,234,248,0.45);
    --accent:    #7C6FE0;
    --accent-g:  rgba(124,111,224,0.25);
    --radius:    16px;
    --req:       #FF6B6B;
}

[data-theme="light"] {
    --ground:    #F4F3FF;
    --surface:   rgba(255,255,255,0.9);
    --surface-b: rgba(0,0,0,0.07);
    --input-bg:  #ffffff;
    --input-border: rgba(0,0,0,0.14);
    --input-focus:  #5B4ED0;
    --text:      #0C0C14;
    --text-dim:  rgba(12,12,20,0.45);
    --accent:    #5B4ED0;
    --accent-g:  rgba(91,78,208,0.14);
}

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

/* ── Base ───────────────────────────────────────────── */
body {
    font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic",
                 "Nanum Gothic", sans-serif;
    background: var(--ground);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.4s, color 0.3s;
}

/* ── Layout ─────────────────────────────────────────── */
.layout {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px 72px;
}

/* ── Header ─────────────────────────────────────────── */
header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 0 0;
}

.header-left { flex: 1; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: color 0.2s;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

.site-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.site-nav a {
    padding: 7px 14px;
    border-radius: 50px;
    border: 1.5px solid var(--surface-b);
    background: var(--surface);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.site-nav a:hover {
    background: var(--surface-b);
    color: var(--text);
}

#theme-toggle {
    background: var(--surface);
    border: 1px solid var(--surface-b);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: background 0.25s;
}
#theme-toggle:hover { background: var(--surface-b); }
#theme-toggle svg { width: 17px; height: 17px; }

[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }

/* ── Hero ───────────────────────────────────────────── */
.hero {
    padding: 52px 0 40px;
    text-align: center;
}

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

h1 {
    font-size: clamp(36px, 8vw, 52px);
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 14px;
}

.hero-sub {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ── Form card ──────────────────────────────────────── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--surface-b);
    border-radius: 20px;
    padding: 36px 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ── Fields ─────────────────────────────────────────── */
.field-row { margin-bottom: 20px; }
.field-row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 7px; }

label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
}
.req { color: var(--req); }

input[type="text"],
input[type="email"],
select,
textarea {
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder { color: var(--text-dim); }

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-g);
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
select option { background: #1a1a2e; color: var(--text); }
[data-theme="light"] select option { background: #fff; color: #0C0C14; }

textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* last field no bottom margin */
.field:last-of-type { margin-bottom: 0; }

/* ── Submit button ──────────────────────────────────── */
#submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 28px;
    padding: 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 32px var(--accent-g);
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
#submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 48px var(--accent-g);
}
#submit-btn:active { transform: scale(0.98); }
#submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.send-icon { width: 18px; height: 18px; transition: transform 0.2s; }
#submit-btn:hover .send-icon { transform: translateX(3px) translateY(-3px); }

/* ── Success card ───────────────────────────────────── */
.success-card {
    text-align: center;
    padding: 60px 24px;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.success-icon { font-size: 64px; margin-bottom: 20px; }

.success-card h2 {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 10px;
}
.success-card p {
    font-size: 15px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 32px;
}

.home-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.15s;
}
.home-btn:hover { transform: translateY(-2px); }

/* ── Footer ─────────────────────────────────────────── */
footer {
    text-align: center;
    padding-top: 48px;
    font-size: 12px;
    color: var(--text-dim);
}
footer a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover { color: var(--accent); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 520px) {
    .field-row.two-col { grid-template-columns: 1fr; }
    .form-card { padding: 24px 18px; }
    .site-nav { display: none; }
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .success-card { animation: none; }
}
