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

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1A1A1A;
    background-color: #FAFAFA;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

/* ==============================
   Layout
   ============================== */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(250, 250, 250, 0.94);
    border-bottom: 1px solid #EDEDED;
    backdrop-filter: blur(12px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 24px;
}

.site-logo {
    font-size: 1rem;
    font-weight: 800;
    color: #1A1A1A;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #555555;
    font-size: 0.92rem;
    font-weight: 600;
}

.site-nav-links a:hover {
    color: #1A1A1A;
}

/* ==============================
   Hero
   ============================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 25vh;
    text-align: center;
    padding: 60px 24px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0;
    color: #1A1A1A;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #666666;
    margin-top: 8px;
    font-weight: 500;
}

.hero-slogan {
    font-size: 1.125rem;
    color: #666666;
    margin-top: 24px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid #CFCFCF;
    border-radius: 999px;
    color: #333333;
    font-size: 0.9rem;
    font-weight: 700;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.secondary-link:hover {
    border-color: #1A1A1A;
    color: #1A1A1A;
}

/* ==============================
   Guides & Tool Sections
   ============================== */
.guides {
    padding: 72px 24px 56px;
    background: #FFFFFF;
    border-top: 1px solid #EDEDED;
    border-bottom: 1px solid #EDEDED;
}

.related-tools {
    padding: 72px 24px 80px;
    background: #FAFAFA;
    border-top: 1px solid #EDEDED;
}

.products {
    padding: 80px 24px 56px;
}

.projects {
    padding: 56px 24px 80px;
    border-top: 1px solid #EDEDED;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: #1A1A1A;
}

.section-description {
    max-width: 560px;
    margin: 0 auto 40px;
    text-align: center;
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.guide-card,
.content-card {
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 28px;
}

.guides .guide-card {
    background: #FAFAFA;
}

.guide-category {
    margin-bottom: 10px;
    color: #767676;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.guide-card h3,
.content-card h2 {
    margin-bottom: 10px;
    color: #1A1A1A;
    font-size: 1.25rem;
    line-height: 1.35;
}

.guide-card p,
.content-card p,
.content-card li {
    color: #606060;
    font-size: 0.96rem;
    line-height: 1.7;
}

.text-link {
    display: inline-flex;
    margin-top: 18px;
    color: #1A1A1A;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.article-list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background: #FAFAFA;
    color: #333333;
    font-size: 0.9rem;
    font-weight: 700;
}

.article-list a:hover {
    border-color: #1A1A1A;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    justify-items: center;
}

.project-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
    justify-content: center;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    max-width: 400px;
    width: 100%;
    transition: box-shadow 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.product-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    margin: 0 auto 20px;
}

.product-name {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-tagline {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 12px;
}

.product-description {
    font-size: 0.9rem;
    color: #888888;
    margin-bottom: 24px;
    line-height: 1.5;
    flex: 1;
}

.store-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}

.store-badge img {
    height: 40px;
    width: auto;
    transition: opacity 0.2s ease;
}

.store-badge:hover img {
    opacity: 0.8;
}

.product-actions {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    background: #1A1A1A;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-link:hover {
    background: #333333;
    transform: translateY(-1px);
}

/* ==============================
   Footer
   ============================== */
.footer {
    padding: 48px 24px;
    border-top: 1px solid #E5E5E5;
    text-align: center;
}

.footer-content {
    margin-bottom: 16px;
}

.footer-business {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 6px;
}

.footer-contact a {
    font-size: 0.9rem;
    color: #666666;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: #1A1A1A;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #999999;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin-top: 16px;
    color: #666666;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: #1A1A1A;
}

/* ==============================
   Content Pages
   ============================== */
.content-page {
    background: #FFFFFF;
}

.content-hero {
    padding: 72px 24px 44px;
    border-bottom: 1px solid #EDEDED;
    background: #FAFAFA;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    color: #767676;
    font-size: 0.86rem;
    font-weight: 700;
}

.breadcrumb a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.content-title {
    max-width: 820px;
    font-size: 2.3rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.content-lead {
    max-width: 760px;
    margin-top: 18px;
    color: #555555;
    font-size: 1.05rem;
    line-height: 1.8;
}

.updated {
    margin-top: 18px;
    color: #767676;
    font-size: 0.86rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 44px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 24px 72px;
}

.content-main {
    display: grid;
    gap: 28px;
}

.content-card ul,
.content-card ol {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-left: 22px;
}

.content-card table {
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.content-card th,
.content-card td {
    padding: 12px;
    border: 1px solid #E5E5E5;
    text-align: left;
    vertical-align: top;
}

.content-card th {
    background: #F5F5F5;
    color: #333333;
}

.note-box {
    margin-top: 16px;
    padding: 16px;
    border-left: 4px solid #1A1A1A;
    background: #F7F7F7;
    color: #555555;
    font-size: 0.94rem;
    line-height: 1.7;
}

.tool-form {
    display: grid;
    gap: 20px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    color: #333333;
    font-size: 0.9rem;
    font-weight: 800;
}

.field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #D8D8D8;
    border-radius: 8px;
    background: #FFFFFF;
    color: #1A1A1A;
    font: inherit;
}

.field input:focus {
    border-color: #1A1A1A;
    outline: 2px solid rgba(26, 26, 26, 0.12);
    outline-offset: 2px;
}

.field small {
    color: #767676;
    font-size: 0.82rem;
    line-height: 1.5;
}

.result-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.result-item {
    min-height: 104px;
    padding: 18px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background: #FAFAFA;
}

.result-label {
    color: #666666;
    font-size: 0.82rem;
    font-weight: 800;
}

.result-value {
    display: block;
    margin-top: 8px;
    color: #1A1A1A;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
}

.result-help {
    margin-top: 6px;
    color: #767676;
    font-size: 0.82rem;
    line-height: 1.45;
}

.formula-list {
    display: grid;
    gap: 10px;
}

.formula-list code {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    background: #F2F2F2;
    color: #333333;
    white-space: normal;
}

.side-nav {
    position: sticky;
    top: 88px;
    align-self: start;
    display: grid;
    gap: 10px;
    padding: 20px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background: #FAFAFA;
}

.side-nav strong {
    font-size: 0.9rem;
}

.side-nav a {
    color: #555555;
    font-size: 0.9rem;
}

.side-nav a:hover {
    color: #1A1A1A;
    text-decoration: underline;
}

/* ==============================
   Responsive
   ============================== */
@media (max-width: 768px) {
    .site-nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .site-nav-links {
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    .hero {
        min-height: 40vh;
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .guides,
    .related-tools,
    .products,
    .projects {
        padding: 60px 20px;
    }

    .guide-grid,
    .article-list,
    .field-grid,
    .result-panel,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 32px 24px;
    }

    .content-title {
        font-size: 1.85rem;
    }

    .content-layout {
        grid-template-columns: 1fr;
        padding: 36px 20px 60px;
    }

    .side-nav {
        position: static;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .hero-slogan {
        font-size: 1rem;
    }

    .store-badges {
        flex-direction: column;
        align-items: center;
    }

    .content-card {
        padding: 22px;
    }

    .content-card th,
    .content-card td {
        padding: 10px;
    }
}

/* ==============================
   Accessibility
   ============================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        transition: none !important;
    }
}
