:root {
    color-scheme: light;
    --ink: #111827;
    --muted: #5f6878;
    --line: rgba(17, 24, 39, 0.11);
    --panel: rgba(255, 255, 255, 0.82);
    --blue: #1568ff;
    --cyan: #11b8d8;
    --green: #1fbf75;
    --yellow: #ffbf1c;
    --red: #ff315c;
    --violet: #7c3cff;
    --shadow: 0 24px 70px rgba(21, 35, 70, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 16%, rgba(255, 49, 92, 0.18), transparent 28%),
        radial-gradient(circle at 86% 14%, rgba(17, 184, 216, 0.18), transparent 30%),
        linear-gradient(135deg, #fff9f0 0%, #f6fbff 42%, #f7f4ff 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(17, 24, 39, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 24, 39, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 70%);
}

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

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

.site-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    position: relative;
}

.site-header {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(21, 104, 255, 0.2);
}

.brand-name {
    font-size: 24px;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    backdrop-filter: blur(16px);
}

.top-nav a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 999px;
    color: #384152;
    font-size: 14px;
    font-weight: 700;
}

.top-nav a:hover {
    background: #ffffff;
    color: var(--blue);
}

.hero {
    min-height: calc(100vh - 118px);
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.78fr);
    align-items: center;
    gap: clamp(28px, 6vw, 88px);
    padding: 24px 0 72px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.hero h1,
.hero-subtitle,
.section-heading h2,
.feature-card h3,
.feature-card p,
.top-nav a,
.button,
.tool-panel-header h3,
.section-note,
.upload-title,
.upload-meta {
    word-break: keep-all;
    overflow-wrap: break-word;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-subtitle {
    max-width: 640px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(18px, 2.4vw, 25px);
    line-height: 1.55;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 900;
    border: 1px solid transparent;
}

.button.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    box-shadow: 0 16px 34px rgba(21, 104, 255, 0.28);
}

.button.secondary {
    color: #222b3a;
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--line);
}

.hero-visual {
    position: relative;
    min-height: 440px;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.3)),
        conic-gradient(from 210deg, rgba(255, 49, 92, 0.2), rgba(255, 191, 28, 0.22), rgba(31, 191, 117, 0.2), rgba(17, 184, 216, 0.2), rgba(124, 60, 255, 0.18), rgba(255, 49, 92, 0.2));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-visual img {
    width: min(360px, 88%);
    border-radius: 30px;
    filter: drop-shadow(0 30px 34px rgba(21, 35, 70, 0.2));
}

.swatch-strip {
    position: absolute;
    right: 24px;
    bottom: 24px;
    left: 24px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.swatch {
    min-height: 12px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.swatch.red { background: var(--red); }
.swatch.orange { background: var(--yellow); }
.swatch.green { background: var(--green); }
.swatch.blue { background: var(--blue); }
.swatch.violet { background: var(--violet); }

.features {
    padding: 20px 0 86px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading h2 {
    max-width: 560px;
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.16;
    letter-spacing: 0;
}

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

.feature-card {
    min-height: 268px;
    position: relative;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 18px 48px rgba(21, 35, 70, 0.11);
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 7px;
    background: var(--accent, var(--blue));
}

.feature-card::after {
    content: "";
    position: absolute;
    right: -24px;
    top: 46px;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent, var(--blue)) 22%, transparent);
}

.card-palette { --accent: var(--red); }
.card-extract { --accent: var(--cyan); }
.card-brand { --accent: var(--green); }
.card-code { --accent: var(--violet); }

.feature-number {
    display: inline-flex;
    min-width: 46px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.07);
    color: #273244;
    font-weight: 900;
}

.feature-kicker {
    margin: 34px 0 8px;
    color: var(--accent, var(--blue));
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.feature-card h3 {
    margin: 0;
    font-size: 23px;
    line-height: 1.24;
    letter-spacing: 0;
}

.feature-card p:last-child {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 600;
}

.demo-section {
    padding: 14px 0 104px;
}

.demo-heading {
    align-items: start;
}

.section-note {
    max-width: 360px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 700;
}

.demo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: 16px;
    align-items: stretch;
}

.tool-panel {
    position: relative;
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 48px rgba(21, 35, 70, 0.1);
    backdrop-filter: blur(18px);
}

.color-panel {
    grid-row: span 2;
    overflow: hidden;
}

.color-panel::before {
    content: "";
    position: absolute;
    inset: auto -16% -36% -16%;
    height: 58%;
    background: linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--cyan), var(--violet));
    opacity: 0.13;
    filter: blur(20px);
}

.tool-panel-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.tool-panel-header h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.current-color {
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
    border: 8px solid #ffffff;
    border-radius: 20px;
    background: #1568ff;
    box-shadow: 0 18px 36px rgba(21, 104, 255, 0.25);
}

.color-input-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px;
    margin: 0 0 18px;
    color: #384152;
    font-size: 15px;
    font-weight: 900;
}

.color-picker {
    width: 100%;
    min-height: 56px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: 0;
    border-radius: 14px;
}

.color-picker::-moz-color-swatch {
    border: 0;
    border-radius: 14px;
}

.color-values {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.value-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.value-label {
    color: #273244;
    font-size: 13px;
    font-weight: 950;
}

.value-output {
    min-width: 0;
    color: #111827;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 15px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-button,
.palette-choice {
    font: inherit;
    cursor: pointer;
}

.copy-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(21, 104, 255, 0.22);
    border-radius: 10px;
    color: var(--blue);
    background: rgba(21, 104, 255, 0.08);
    font-size: 13px;
    font-weight: 950;
}

.copy-button:hover,
.copy-button.is-copied {
    color: #ffffff;
    background: var(--blue);
}

.copy-status,
.upload-status {
    min-height: 24px;
    margin: 14px 0 0;
    color: var(--blue);
    font-size: 14px;
    font-weight: 900;
}

.recommended-palette {
    display: grid;
    gap: 10px;
}

.palette-choice {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #222b3a;
    background: rgba(255, 255, 255, 0.72);
    text-align: left;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-weight: 900;
}

.palette-choice:hover,
.palette-choice.is-active {
    border-color: color-mix(in srgb, var(--swatch-color) 55%, white);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--swatch-color) 38%, transparent);
}

.palette-dot {
    width: 42px;
    height: 42px;
    border: 5px solid #ffffff;
    border-radius: 14px;
    background: var(--swatch-color);
    box-shadow: 0 12px 22px color-mix(in srgb, var(--swatch-color) 28%, transparent);
}

.upload-zone {
    display: grid;
    place-items: center;
    min-height: 214px;
    padding: 26px;
    border: 2px dashed rgba(21, 104, 255, 0.28);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(21, 104, 255, 0.07), rgba(31, 191, 117, 0.07));
    text-align: center;
    cursor: pointer;
}

.upload-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background:
        linear-gradient(#ffffff, #ffffff) center / 4px 28px no-repeat,
        linear-gradient(90deg, #ffffff, #ffffff) center / 28px 4px no-repeat,
        linear-gradient(135deg, var(--blue), var(--violet));
    box-shadow: 0 18px 30px rgba(21, 104, 255, 0.22);
}

.upload-title {
    display: block;
    margin-top: 16px;
    color: #202938;
    font-size: 18px;
    font-weight: 950;
}

.upload-meta {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.upload-zone.is-ready {
    border-color: rgba(31, 191, 117, 0.52);
    background: linear-gradient(135deg, rgba(31, 191, 117, 0.12), rgba(21, 104, 255, 0.08));
}

@supports not (background: color-mix(in srgb, red 20%, transparent)) {
    .feature-card::after {
        background: rgba(21, 104, 255, 0.12);
    }

    .palette-choice:hover,
    .palette-choice.is-active {
        border-color: rgba(21, 104, 255, 0.34);
        box-shadow: inset 0 0 0 1px rgba(21, 104, 255, 0.18);
    }

    .palette-dot {
        box-shadow: 0 12px 22px rgba(21, 104, 255, 0.16);
    }
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 28px;
    }

    .hero-visual {
        min-height: 360px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-layout {
        grid-template-columns: 1fr;
    }

    .color-panel {
        grid-row: auto;
    }
}

@media (max-width: 680px) {
    .site-shell {
        width: min(100% - 28px, 1180px);
    }

    .site-header {
        min-height: 78px;
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0 10px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .brand-name {
        font-size: 21px;
    }

    .top-nav {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        border-radius: 16px;
    }

    .top-nav a {
        flex: 1 0 auto;
        padding: 0 12px;
        font-size: 13px;
    }

    .hero {
        gap: 26px;
        padding: 28px 0 56px;
    }

    .hero h1 {
        font-size: clamp(42px, 13vw, 58px);
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-actions {
        margin-top: 26px;
    }

    .button {
        width: 100%;
    }

    .hero-visual {
        min-height: 300px;
        border-radius: 22px;
    }

    .hero-visual img {
        width: min(280px, 86%);
        border-radius: 24px;
    }

    .section-heading {
        display: block;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 220px;
        padding: 22px;
    }

    .demo-section {
        padding-bottom: 72px;
    }

    .tool-panel {
        padding: 20px;
        border-radius: 16px;
    }

    .tool-panel-header h3 {
        font-size: 24px;
    }

    .current-color {
        width: 62px;
        height: 62px;
        border-width: 6px;
        border-radius: 16px;
    }

    .color-input-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .value-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .copy-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .palette-choice {
        min-height: 54px;
    }

    .upload-zone {
        min-height: 190px;
        padding: 22px;
    }
}
