:root {
    --bg: #f4efe6;
    --bg-strong: #efe4d2;
    --surface: rgba(255, 252, 246, 0.94);
    --surface-strong: #fffaf1;
    --text: #1d2b24;
    --muted: #5e6d63;
    --line: rgba(29, 43, 36, 0.12);
    --line-strong: rgba(29, 43, 36, 0.2);
    --accent: #1f6b52;
    --accent-strong: #114a39;
    --accent-soft: #d9eadf;
    --shadow: 0 24px 80px rgba(54, 58, 44, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --transition: 180ms ease;
}

[data-theme="dark"] {
    --bg: #132019;
    --bg-strong: #1b2b22;
    --surface: rgba(23, 35, 28, 0.92);
    --surface-strong: #213328;
    --text: #edf5ee;
    --muted: #bccbbc;
    --line: rgba(237, 245, 238, 0.11);
    --line-strong: rgba(237, 245, 238, 0.18);
    --accent: #8fd0ac;
    --accent-strong: #b7e4c8;
    --accent-soft: rgba(143, 208, 172, 0.14);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Iowan Old Style", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    line-height: 1.65;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(31, 107, 82, 0.12), transparent 35%),
        linear-gradient(180deg, var(--bg) 0%, #f7f3eb 55%, var(--bg) 100%);
    min-height: 100vh;
}

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

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

button,
input,
textarea {
    font: inherit;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #fff;
    z-index: 50;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 1rem;
}

.site-header,
.site-footer,
main {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    padding-top: 1rem;
}

.nav-shell,
.footer-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-shell {
    padding: 1rem 1.25rem;
    background: rgba(255, 250, 241, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    position: sticky;
    top: 1rem;
    z-index: 20;
}

[data-theme="dark"] .nav-shell {
    background: rgba(23, 35, 28, 0.82);
    border-color: rgba(255, 255, 255, 0.06);
}

.brand {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-nav,
.footer-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-nav a,
.footer-nav a {
    color: var(--muted);
    font-size: 0.95rem;
}

.site-nav a:hover,
.footer-nav a:hover {
    color: var(--text);
}

.theme-toggle {
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    border-radius: 999px;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
}

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

main {
    padding: 2.25rem 0 4rem;
}

.hero,
.section-shell,
.hero-panel,
.tool-card,
.content-card,
.faq-item,
.page-shell {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 1.5rem;
    padding: 1.75rem;
    border-radius: var(--radius-xl);
}

.hero-copy,
.hero-panel,
.tool-card,
.content-card,
.page-shell {
    border-radius: var(--radius-xl);
}

.hero-copy {
    padding: 1rem;
}

.eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.4rem, 4vw, 4.3rem);
    max-width: 10ch;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}

h3 {
    font-size: 1.2rem;
}

p {
    margin: 0;
}

.hero-text,
.section-heading p,
.content-card p,
.tool-note,
.privacy-note,
.form-footnote,
.footer-copy,
.copyright,
.page-shell p,
.page-shell li {
    color: var(--muted);
}

.hero-text {
    margin-top: 1rem;
    max-width: 58ch;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.4rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #fff;
}

.btn-secondary {
    background: var(--surface-strong);
    border-color: var(--line-strong);
    color: var(--text);
}

.hero-panel {
    padding: 1.4rem;
    background:
        linear-gradient(180deg, rgba(31, 107, 82, 0.08), transparent 70%),
        var(--surface-strong);
}

.hero-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.value-list,
.check-list,
.plain-list,
.policy-list {
    margin: 0;
    padding-left: 1.2rem;
}

.value-list li,
.check-list li,
.plain-list li,
.policy-list li {
    margin-bottom: 0.7rem;
}

.trust-strip {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.trust-strip div {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 252, 246, 0.68);
}

[data-theme="dark"] .trust-strip div {
    background: rgba(23, 35, 28, 0.78);
}

.trust-strip strong {
    display: block;
    margin-bottom: 0.3rem;
}

.trust-strip span {
    color: var(--muted);
    font-size: 0.95rem;
}

.section-shell {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
}

.section-heading {
    margin-bottom: 1.2rem;
}

.section-heading h2 {
    margin-bottom: 0.6rem;
}

.tool-card {
    position: relative;
    padding: 1.35rem;
    background: var(--surface-strong);
}

.tool-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
}

.tool-main,
.tool-sidebar {
    padding: 0.5rem;
}

.tool-note {
    margin-top: 0.5rem;
}

.preview-area {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(31, 107, 82, 0.06), transparent),
        var(--bg);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-area canvas,
.preview-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder {
    min-height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: var(--muted);
}

.placeholder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 800;
}

.controls {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.upload-btn-wrapper {
    display: inline-flex;
}

.tool-sidebar {
    border-left: 1px solid var(--line);
}

.privacy-note {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
}

.result-area {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.result-header {
    display: grid;
    gap: 0.4rem;
}

.result-summary {
    color: var(--muted);
}

.label-bars {
    margin-top: 1rem;
}

.bar-wrapper + .bar-wrapper {
    margin-top: 1rem;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.progress-bar {
    height: 0.9rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(29, 43, 36, 0.08);
}

.progress {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-strong), #8bc8a7);
}

.overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.8rem;
    text-align: center;
    border-radius: inherit;
    background: rgba(12, 19, 15, 0.74);
    color: #fff;
    z-index: 10;
}

.spinner {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.content-card {
    padding: 1.4rem;
}

.content-card p + p,
.page-shell p + p,
.page-shell p + ul {
    margin-top: 0.8rem;
}

.faq-list {
    display: grid;
    gap: 0.8rem;
}

.faq-item {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
}

.faq-item p {
    margin-top: 0.8rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-strong);
    background: var(--surface-strong);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid rgba(31, 107, 82, 0.28);
    border-color: var(--accent);
}

.form-footnote {
    font-size: 0.92rem;
}

.site-footer {
    padding: 0 0 3rem;
}

.footer-shell {
    padding: 1.2rem 0;
    border-top: 1px solid var(--line);
}

.brand-footer {
    display: inline-block;
    margin-bottom: 0.3rem;
}

.footer-copy,
.copyright {
    font-size: 0.93rem;
}

.page-shell {
    margin-top: 2rem;
    padding: 1.6rem;
}

.page-shell h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    max-width: none;
}

.page-shell h2 {
    margin-top: 1.6rem;
    margin-bottom: 0.7rem;
    font-size: 1.35rem;
}

.page-meta {
    margin-top: 0.75rem;
    font-size: 0.94rem;
    color: var(--muted);
}

.link-inline {
    color: var(--accent-strong);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .hero,
    .tool-layout,
    .article-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 1.2rem;
    }

    .trust-strip {
        grid-template-columns: 1fr;
    }

    .nav-shell,
    .footer-shell {
        flex-direction: column;
        align-items: flex-start;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 680px) {
    body {
        background:
            radial-gradient(circle at top right, rgba(31, 107, 82, 0.08), transparent 30%),
            linear-gradient(180deg, var(--bg) 0%, #f7f3eb 55%, var(--bg) 100%);
    }

    .site-header,
    .site-footer,
    main {
        width: min(100%, calc(100% - 1rem));
    }

    .site-nav,
    .footer-nav,
    .hero-actions,
    .controls {
        width: 100%;
    }

    .site-nav a,
    .footer-nav a,
    .btn {
        width: 100%;
    }

    .hero,
    .section-shell,
    .page-shell {
        padding: 1.1rem;
    }

    h1 {
        max-width: none;
    }
}
