:root {
    color-scheme: dark;
}

/* =====================================================================
   언제자요 — standalone page design
   Mood: calm, dreamy night sky. A serene crescent moon over a starfield,
   indigo midnight fading to a warm dawn horizon. Warm-gold moonlight is
   the accent on recommended bedtime. Quiet bedtime ritual — soft, not loud.
   ===================================================================== */

.service-body--sleep {
    --sl-bg: #0a1530;
    --sl-bg-2: #0e1b3d;
    --sl-surface: rgba(22, 36, 74, 0.6);
    --sl-surface-2: rgba(16, 27, 61, 0.85);
    --sl-gold: #ffd27a;
    --sl-gold-2: #f5b955;
    --sl-peri: #8fa6ff;
    --sl-ink: #eef2ff;
    --sl-muted: #9aa6cf;
    --sl-line: rgba(143, 166, 255, 0.16);
    color: var(--sl-ink);
    background:
        radial-gradient(95% 55% at 50% 118%, rgba(245, 185, 85, 0.22) 0%, rgba(245, 185, 85, 0) 55%),
        radial-gradient(80% 50% at 80% -5%, rgba(143, 166, 255, 0.12) 0%, rgba(143, 166, 255, 0) 55%),
        linear-gradient(180deg, #0a1530 0%, #0c1838 55%, #122046 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Pretendard", "Space Grotesk", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ===== Starfield ===== */
.sl-sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.sl-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.7;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
    animation: sl-twinkle 4s ease-in-out infinite;
}

.sl-star.s1 { top: 8%; left: 12%; }
.sl-star.s2 { top: 14%; left: 78%; width: 3px; height: 3px; animation-delay: 0.6s; }
.sl-star.s3 { top: 20%; left: 40%; animation-delay: 1.2s; }
.sl-star.s4 { top: 26%; left: 88%; animation-delay: 0.3s; }
.sl-star.s5 { top: 33%; left: 22%; width: 3px; height: 3px; animation-delay: 1.8s; }
.sl-star.s6 { top: 9%; left: 55%; animation-delay: 2.4s; }
.sl-star.s7 { top: 44%; left: 8%; animation-delay: 0.9s; }
.sl-star.s8 { top: 40%; left: 67%; animation-delay: 1.5s; }
.sl-star.s9 { top: 17%; left: 30%; width: 1px; height: 1px; animation-delay: 2.1s; }
.sl-star.s10 { top: 52%; left: 90%; animation-delay: 0.4s; }
.sl-star.s11 { top: 30%; left: 95%; width: 3px; height: 3px; animation-delay: 1.1s; }
.sl-star.s12 { top: 48%; left: 48%; animation-delay: 2.7s; }

.service-body--sleep .service-main,
.service-body--sleep .sl-topbar,
.service-body--sleep .service-footer {
    position: relative;
    z-index: 1;
}

/* ===== Top bar ===== */
.sl-topbar {
    padding-top: clamp(1.4rem, 3vw, 2rem);
}

.sl-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sl-topbar__brand {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--sl-muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 8px;
    background: rgba(22, 36, 74, 0.55);
    color: var(--sl-ink);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid var(--sl-line);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.back-link__icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--sl-gold), var(--sl-gold-2));
    color: #2a1c05;
    font-size: 1rem;
    font-weight: 700;
}

.back-link:hover,
.back-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 210, 122, 0.45);
    box-shadow: 0 14px 34px -22px rgba(255, 210, 122, 0.7);
}

/* ===== Buttons ===== */
.sl-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sl-btn--primary {
    background: linear-gradient(135deg, var(--sl-gold), var(--sl-gold-2));
    color: #2a1c05;
    box-shadow: 0 18px 40px -18px rgba(255, 210, 122, 0.7);
}

.sl-btn--primary:hover,
.sl-btn--primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 50px -18px rgba(255, 210, 122, 0.85);
}

.sl-btn--ghost {
    background: rgba(22, 36, 74, 0.5);
    color: var(--sl-ink);
    border: 1px solid var(--sl-line);
}

.sl-btn--ghost:hover,
.sl-btn--ghost:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(143, 166, 255, 0.5);
    background: rgba(30, 48, 96, 0.7);
}

/* ===== Hero ===== */
.sl-hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding-top: clamp(2.5rem, 6vw, 5rem);
    padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.sl-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(143, 166, 255, 0.1);
    border: 1px solid var(--sl-line);
    font-size: 0.82rem;
    font-weight: 600;
    color: #c3cdff;
}

.sl-moon-mini {
    position: relative;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--sl-gold);
    box-shadow: 0 0 8px rgba(255, 210, 122, 0.7);
    overflow: hidden;
}

.sl-moon-mini::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--sl-bg);
}

.sl-hero__title {
    font-family: "Space Grotesk", "Pretendard", sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.1rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 1.1rem 0 0;
}

.sl-hero__title span {
    background: linear-gradient(110deg, var(--sl-gold) 0%, #ffe6b0 50%, var(--sl-gold-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sl-hero__lead {
    margin: 1.3rem 0 0;
    max-width: 30rem;
    color: var(--sl-muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.sl-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.sl-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin: 2.4rem 0 0;
    padding: 0;
    list-style: none;
}

.sl-stats li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sl-stats strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
    color: var(--sl-ink);
}

.sl-stats span {
    font-size: 0.84rem;
    color: var(--sl-muted);
}

/* ===== Hero visual — night card ===== */
.sl-hero__visual {
    position: relative;
    display: grid;
    place-items: center;
}

.sl-card {
    position: relative;
    width: min(100%, 390px);
    padding: 26px 24px 24px;
    border-radius: 30px;
    text-align: center;
    background:
        radial-gradient(120% 70% at 50% 120%, rgba(245, 185, 85, 0.16) 0%, rgba(245, 185, 85, 0) 60%),
        var(--sl-surface-2);
    border: 1px solid var(--sl-line);
    backdrop-filter: blur(14px);
    box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sl-card__greet {
    display: block;
    font-size: 0.92rem;
    color: var(--sl-muted);
    letter-spacing: 0.04em;
}

/* CSS crescent moon */
.sl-moon {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 18px auto 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, #fff3d6 0%, var(--sl-gold) 55%, var(--sl-gold-2) 100%);
    box-shadow: 0 0 40px rgba(255, 210, 122, 0.5), 0 0 90px rgba(255, 210, 122, 0.25);
}

.sl-moon::after {
    content: "";
    position: absolute;
    top: -10px;
    left: -16px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--sl-bg-2);
    box-shadow: 0 0 0 6px rgba(16, 27, 61, 0.6);
}

.sl-calc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(10, 18, 42, 0.55);
    border: 1px solid var(--sl-line);
}

.sl-calc__side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sl-calc__label {
    font-size: 0.74rem;
    color: var(--sl-muted);
}

.sl-calc__time {
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--sl-ink);
}

.sl-calc__time--gold {
    color: var(--sl-gold);
    text-shadow: 0 0 20px rgba(255, 210, 122, 0.45);
}

.sl-calc__arrow {
    color: var(--sl-peri);
    font-size: 1.2rem;
}

.sl-card__note {
    display: block;
    margin-top: 16px;
    font-size: 0.84rem;
    color: var(--sl-muted);
}

.sl-countdown {
    position: absolute;
    right: -6px;
    bottom: 30px;
    padding: 9px 15px;
    border-radius: 14px;
    background: rgba(16, 27, 61, 0.92);
    border: 1px solid var(--sl-line);
    color: #c3cdff;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    animation: sl-bob 5s ease-in-out infinite;
}

/* ===== Section heads ===== */
.sl-section__head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.sl-section__eyebrow {
    font-family: "Space Grotesk", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--sl-gold);
}

.sl-section__title {
    font-family: "Space Grotesk", "Pretendard", sans-serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.16;
    letter-spacing: -0.01em;
    margin: 0.7rem 0 0;
}

.sl-section__title span {
    color: var(--sl-gold);
}

.sl-section__sub {
    margin: 0.9rem 0 0;
    color: var(--sl-muted);
    font-size: 1rem;
    line-height: 1.65;
}

/* ===== Calc band timeline ===== */
.sl-calc-band {
    padding-top: clamp(2rem, 5vw, 3.5rem);
}

.sl-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.6rem, 2vw, 1.4rem);
    max-width: 720px;
    margin: 0 auto;
    padding: 28px clamp(1rem, 3vw, 2rem);
    border-radius: 24px;
    background: var(--sl-surface);
    border: 1px solid var(--sl-line);
    backdrop-filter: blur(10px);
}

.sl-tl-node {
    display: grid;
    place-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.sl-tl-icon {
    font-size: 1.7rem;
}

.sl-tl-time {
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 1.5rem;
}

.sl-tl-node--bed .sl-tl-time { color: var(--sl-gold); }
.sl-tl-node--wake .sl-tl-time { color: #ffe0a3; }

.sl-tl-tag {
    font-size: 0.78rem;
    color: var(--sl-muted);
}

.sl-tl-track {
    position: relative;
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(143, 166, 255, 0.16);
    min-width: 80px;
}

.sl-tl-fill {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sl-gold-2), var(--sl-gold), #ffe6b0);
    box-shadow: 0 0 16px rgba(255, 210, 122, 0.4);
}

.sl-tl-mid {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sl-ink);
}

/* ===== How it works ===== */
.sl-flow {
    padding-top: clamp(3rem, 7vw, 5.5rem);
}

.sl-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sl-step {
    padding: 30px 24px 26px;
    border-radius: 22px;
    background: var(--sl-surface);
    border: 1px solid var(--sl-line);
    backdrop-filter: blur(10px);
}

.sl-step__num {
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--sl-gold);
    letter-spacing: 0.08em;
}

.sl-step__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 14px 0 16px;
    border-radius: 15px;
    background: rgba(143, 166, 255, 0.1);
    border: 1px solid rgba(143, 166, 255, 0.2);
    font-size: 1.4rem;
}

.sl-step h3 {
    margin: 0 0 8px;
    font-size: 1.18rem;
    font-weight: 700;
}

.sl-step p {
    margin: 0;
    color: var(--sl-muted);
    font-size: 0.94rem;
    line-height: 1.62;
}

/* ===== Features ===== */
.sl-features {
    padding-top: clamp(3rem, 7vw, 5.5rem);
}

/* row-list layout — distinct from the numbered step cards */
.sl-feat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem 1.4rem;
}

.sl-feat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px 18px 18px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(255, 210, 122, 0.06), rgba(255, 210, 122, 0) 60%);
    border-left: 2px solid rgba(255, 210, 122, 0.4);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.sl-feat-row:hover {
    transform: translateX(4px);
    border-left-color: var(--sl-gold);
    background: linear-gradient(90deg, rgba(255, 210, 122, 0.12), rgba(255, 210, 122, 0) 60%);
}

.sl-feat-row__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(143, 166, 255, 0.1);
    font-size: 1.3rem;
}

.sl-feat-row__text {
    min-width: 0;
}

.sl-feat-row h3 {
    margin: 0 0 4px;
    font-size: 1.02rem;
    font-weight: 700;
}

.sl-feat-row p {
    margin: 0;
    color: var(--sl-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ===== Screenshots ===== */
.sl-shots {
    padding-top: clamp(3rem, 7vw, 5.5rem);
}

.sl-shot-row {
    display: flex;
    justify-content: center;
    gap: clamp(1.2rem, 4vw, 2.6rem);
    flex-wrap: wrap;
}

.sl-phone {
    margin: 0;
    width: min(46%, 280px);
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid var(--sl-line);
    box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95);
    transition: transform 0.3s ease;
}

.sl-phone:first-child {
    transform: rotate(-3deg);
}

.sl-phone:last-child {
    transform: rotate(3deg);
}

.sl-phone:hover {
    transform: rotate(0) translateY(-6px);
}

.sl-phone img {
    display: block;
    width: 100%;
    height: auto;
}

/* ===== CTA ===== */
.sl-cta {
    padding-top: clamp(3.5rem, 8vw, 6rem);
    padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.sl-cta__card {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(2.6rem, 5vw, 3.8rem) clamp(2.4rem, 5vw, 3.6rem);
    border-radius: 30px;
    text-align: center;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(255, 210, 122, 0.14) 0%, rgba(255, 210, 122, 0) 60%),
        var(--sl-surface-2);
    border: 1px solid rgba(255, 210, 122, 0.24);
    overflow: hidden;
}

.sl-moon--cta {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
}

.sl-moon--cta::after {
    top: -7px;
    left: -11px;
    width: 64px;
    height: 64px;
}

.sl-cta__card h2 {
    position: relative;
    font-family: "Space Grotesk", "Pretendard", sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4.5vw, 2.7rem);
    line-height: 1.18;
    margin: 0;
}

.sl-cta__card p {
    position: relative;
    max-width: 32rem;
    margin: 1.1rem auto 0;
    color: var(--sl-muted);
    font-size: 1.04rem;
    line-height: 1.7;
}

.sl-cta__actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ===== Footer ===== */
.service-footer {
    padding: 2.4rem 0 3rem;
    text-align: center;
    border-top: 1px solid var(--sl-line);
}

.service-footer p {
    margin: 0;
    color: var(--sl-muted);
    font-size: 0.88rem;
}

/* ===== Animations ===== */
@keyframes sl-twinkle {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.9; }
}

@keyframes sl-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

[data-animate] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].is-visible {
    opacity: 1;
    transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sl-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .sl-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .sl-hero__actions,
    .sl-stats {
        justify-content: center;
    }

    .sl-hero__visual {
        order: -1;
    }

    .sl-countdown {
        bottom: -16px;
        right: 14px;
    }

    .sl-feat-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .sl-steps {
        grid-template-columns: 1fr;
    }

    .sl-feat-list {
        grid-template-columns: 1fr;
    }

    .sl-stats {
        gap: 1.1rem;
    }

    .sl-timeline {
        flex-direction: column;
        gap: 1.6rem;
    }

    .sl-tl-track {
        width: 6px;
        height: 70px;
        min-width: 0;
    }

    .sl-tl-mid {
        top: 50%;
        left: 22px;
        transform: translateY(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sl-star,
    .sl-countdown {
        animation: none;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
