/* ==========================================================
   LIFEHANPAN
   SERVICES V01
   PART 1
   Reset + Variables + Background + Intro
========================================================== */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

/* ==========================================================
   RESET
========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: #050816;
    color: #ffffff;
    font-family: "Pretendard", sans-serif;
    line-height: 1.7;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

/* ==========================================================
   VARIABLES
========================================================== */

:root {
    --hp-bg: #050816;
    --hp-bg-soft: #09111f;
    --hp-surface: rgba(255, 255, 255, 0.045);
    --hp-surface-strong: rgba(255, 255, 255, 0.075);
    --hp-border: rgba(255, 255, 255, 0.085);

    --hp-white: #ffffff;
    --hp-text: #dce7f8;
    --hp-muted: #8fa5c7;

    --hp-blue: #4f8dff;
    --hp-cyan: #62dcff;
    --hp-mint: #63dfc7;
    --hp-gold: #efbd66;
    --hp-silver: #dce5f0;

    --hp-container: 1280px;
    --hp-radius-large: 36px;
    --hp-radius-medium: 24px;

    --hp-transition:
        0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================
   GLOBAL
========================================================== */

.hp-services-page {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    isolation: isolate;
}

.hp-services-container {
    width: min(var(--hp-container), 92%);
    margin: 0 auto;
}

.hp-services-intro,
.hp-services-list,
.hp-services-bridge {
    position: relative;
    z-index: 2;
}

.hp-services-kicker {
    color: #83c9ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.28em;
}

/* ==========================================================
   BACKGROUND
========================================================== */

.hp-services-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hp-services-grid {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );
    background-size: 90px 90px;
    mask-image:
        linear-gradient(
            to bottom,
            transparent,
            rgba(0, 0, 0, 0.95) 12%,
            rgba(0, 0, 0, 0.95) 88%,
            transparent
        );
}

.hp-services-glow {
    position: absolute;
    width: 760px;
    height: 760px;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(160px);
    mix-blend-mode: screen;
    will-change: transform;
}

.hp-services-glow-left {
    top: -240px;
    left: -360px;
    background: var(--hp-blue);
}

.hp-services-glow-right {
    top: 45%;
    right: -380px;
    background: var(--hp-cyan);
}

.hp-services-noise {
    position: absolute;
    inset: 0;
    opacity: 0.022;
    background-image:
        radial-gradient(
            circle,
            #ffffff 1px,
            transparent 1px
        );
    background-size: 7px 7px;
}

/* ==========================================================
   INTRO
========================================================== */

.hp-services-intro {
    min-height: 88vh;
    display: flex;
    align-items: center;
    padding: 160px 0 120px;
}

.hp-services-heading {
    max-width: 1040px;
}

.hp-services-heading h1 {
    margin-top: 28px;
    font-size: clamp(64px, 8vw, 120px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hp-services-heading h1 span {
    display: inline-block;
    margin-top: 10px;
    background:
        linear-gradient(
            90deg,
            #ffffff 0%,
            #d4eaff 48%,
            #69baff 100%
        );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hp-services-summary {
    max-width: 680px;
    margin-top: 44px;
    color: #afc0da;
    font-size: 21px;
    line-height: 1.9;
}

/* ==========================================================
   SERVICE LIST BASE
========================================================== */

.hp-services-list {
    padding: 40px 0 180px;
}

.hp-services-list .hp-services-container {
    display: grid;
    gap: 34px;
}

/* ==========================================================
   REVEAL BASE
========================================================== */

.hp-services-reveal {
    opacity: 1;
    transform: none;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1024px) {
    .hp-services-intro {
        min-height: 76vh;
        padding-top: 140px;
    }

    .hp-services-heading h1 {
        font-size: clamp(60px, 9vw, 92px);
    }

    .hp-services-summary {
        font-size: 19px;
    }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 760px) {
    .hp-services-container {
        width: min(92%, 620px);
    }

    .hp-services-intro {
        min-height: auto;
        padding: 120px 0 100px;
    }

    .hp-services-heading h1 {
        margin-top: 22px;
        font-size: 54px;
        line-height: 1.02;
    }

    .hp-services-summary {
        margin-top: 32px;
        font-size: 17px;
        line-height: 1.85;
    }

    .hp-services-list {
        padding: 20px 0 120px;
    }
}

@media (max-width: 430px) {
    .hp-services-heading h1 {
        font-size: 45px;
    }

    .hp-services-summary br {
        display: none;
    }
}

/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .hp-services-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================
   SERVICE CARD
========================================================== */

.hp-service{

    position:relative;

    overflow:hidden;

    display:grid;

    grid-template-columns:130px 1fr 170px;

    gap:60px;

    align-items:center;

    min-height:480px;

    padding:54px;

    border-radius:36px;

    border:1px solid rgba(255,255,255,.08);

    background:

        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.02)
        ),
        rgba(9,14,28,.66);

    transition:.55s cubic-bezier(.22,.61,.36,1);

}

.hp-service:hover{

    transform:translateY(-12px);

    border-color:rgba(255,255,255,.15);

    box-shadow:

        0 40px 100px rgba(0,0,0,.35);

}

/* ==========================================================
   LIGHT
========================================================== */

.hp-service::before{

    content:"";

    position:absolute;

    top:-220px;

    right:-160px;

    width:420px;

    height:420px;

    border-radius:50%;

    filter:blur(90px);

    opacity:.16;

    transition:.6s;

}

.hp-service:hover::before{

    transform:scale(1.2);

    opacity:.28;

}

/* ==========================================================
   COLOR
========================================================== */

.hp-service-development::before{

    background:#4F8DFF;

}

.hp-service-insurance::before{

    background:#5FE4C9;

}

.hp-service-investment::before{

    background:#F3C05E;

}

.hp-service-funeral::before{

    background:#DCE4EF;

}

/* ==========================================================
   INDEX
========================================================== */

.hp-service-index{

    display:flex;

    flex-direction:column;

    gap:10px;

}

.hp-service-index span:first-child{

    font-size:18px;

    font-weight:700;

    color:#ffffff55;

    letter-spacing:.2em;

}

.hp-service-index span:last-child{

    writing-mode:vertical-lr;

    font-size:12px;

    letter-spacing:.35em;

    color:#7F96BA;

}

/* ==========================================================
   MAIN
========================================================== */

.hp-service-main{

    display:grid;

    grid-template-columns:420px 1fr;

    gap:70px;

    align-items:center;

}

.hp-service-label{

    color:#90A6C8;

    font-size:15px;

    margin-bottom:18px;

}

.hp-service-title-wrap h2{

    font-size:68px;

    font-weight:800;

    letter-spacing:-.05em;

    line-height:1;

    margin-bottom:18px;

}

.hp-service-slogan{

    color:#d8e7ff;

    font-size:24px;

    font-weight:500;

    line-height:1.5;

}

.hp-service-description{

    color:#B7C6DD;

    font-size:18px;

    line-height:1.95;

    margin-bottom:34px;

}

/* ==========================================================
   FEATURE
========================================================== */

.hp-service-features{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:18px;

    margin-bottom:42px;

}

.hp-service-features li{

    position:relative;

    padding-left:24px;

    color:#dfe9fb;

    font-size:16px;

}

.hp-service-features li::before{

    content:"";

    position:absolute;

    left:0;

    top:11px;

    width:8px;

    height:8px;

    border-radius:50%;

    background:#66C7FF;

}

/* ==========================================================
   LINK
========================================================== */

.hp-service-link{

    display:inline-flex;

    align-items:center;

    gap:18px;

    font-size:17px;

    font-weight:600;

    transition:.4s;

}

.hp-service-link svg{

    transition:.4s;

}

.hp-service-link:hover{

    color:#6CC6FF;

}

.hp-service-link:hover svg{

    transform:translateX(10px);

}

/* ==========================================================
   SYMBOL
========================================================== */

.hp-service-symbol{

    display:flex;

    flex-direction:column;

    gap:16px;

    justify-content:center;

    align-items:center;

}

.hp-service-symbol span{

    width:90px;

    height:4px;

    border-radius:20px;

    background:rgba(255,255,255,.12);

    transition:.4s;

}

.hp-service:hover .hp-service-symbol span:nth-child(1){

    width:120px;

}

.hp-service:hover .hp-service-symbol span:nth-child(2){

    width:70px;

}

.hp-service:hover .hp-service-symbol span:nth-child(3){

    width:100px;

}

/* ==========================================================
   SERVICE ACCENT COLORS
========================================================== */

.hp-service-development {
    --service-accent: #4f8dff;
    --service-accent-soft: rgba(79, 141, 255, 0.2);
}

.hp-service-insurance {
    --service-accent: #63dfc7;
    --service-accent-soft: rgba(99, 223, 199, 0.18);
}

.hp-service-investment {
    --service-accent: #efbd66;
    --service-accent-soft: rgba(239, 189, 102, 0.18);
}

.hp-service-funeral {
    --service-accent: #dce5f0;
    --service-accent-soft: rgba(220, 229, 240, 0.16);
}

.hp-service {
    transform-style: preserve-3d;
    will-change: transform;
}

.hp-service::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(
            520px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            var(--service-accent-soft),
            transparent 42%
        );
    transition: opacity 0.45s ease;
}

.hp-service:hover::after {
    opacity: 1;
}

.hp-service-features li::before {
    background: var(--service-accent);
    box-shadow: 0 0 14px var(--service-accent-soft);
}

.hp-service-link:hover {
    color: var(--service-accent);
}

.hp-service-symbol span {
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.08),
            var(--service-accent),
            rgba(255, 255, 255, 0.08)
        );
    opacity: 0.54;
}

/* ==========================================================
   BRIDGE
========================================================== */

.hp-services-bridge {
    padding: 80px 0 190px;
}

.hp-services-bridge-inner {
    position: relative;
    overflow: hidden;
    padding: 100px 70px;
    border: 1px solid var(--hp-border);
    border-radius: 40px;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(79, 141, 255, 0.2),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.065),
            rgba(255, 255, 255, 0.022)
        ),
        rgba(9, 14, 28, 0.7);
    text-align: center;
}

.hp-services-bridge-inner::before {
    content: "";
    position: absolute;
    top: -240px;
    left: 50%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: rgba(98, 220, 255, 0.13);
    filter: blur(130px);
    transform: translateX(-50%);
    pointer-events: none;
}

.hp-services-bridge-inner > * {
    position: relative;
    z-index: 1;
}

.hp-services-bridge h2 {
    margin-top: 30px;
    font-size: clamp(48px, 6vw, 86px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.06em;
}

.hp-services-bridge h2 span {
    display: inline-block;
    margin-top: 8px;
    background:
        linear-gradient(
            90deg,
            #ffffff,
            #d8ebff 48%,
            #72bdff
        );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hp-services-bridge-inner > p {
    max-width: 720px;
    margin: 34px auto 0;
    color: #b5c5dc;
    font-size: 20px;
    line-height: 1.9;
}

.hp-services-bridge-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-top: 52px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 17px;
    font-weight: 650;
    transition:
        color var(--hp-transition),
        border-color var(--hp-transition),
        gap var(--hp-transition);
}

.hp-services-bridge-link:hover {
    gap: 24px;
    color: #7bc8ff;
    border-color: #7bc8ff;
}

/* ==========================================================
   RESPONSIVE — SERVICE CARDS
========================================================== */

@media (max-width: 1180px) {
    .hp-service {
        grid-template-columns: 86px 1fr;
        gap: 38px;
        min-height: auto;
        padding: 46px;
    }

    .hp-service-main {
        grid-template-columns: 0.9fr 1.1fr;
        gap: 52px;
    }

    .hp-service-symbol {
        display: none;
    }

    .hp-service-title-wrap h2 {
        font-size: 58px;
    }
}

@media (max-width: 640px) {
    .hp-service {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px;
    }

    .hp-service-index {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hp-service-index span:last-child {
        writing-mode: initial;
    }

    .hp-service-main {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .hp-service-title-wrap h2 {
        font-size: 56px;
    }

    .hp-service-slogan {
        font-size: 22px;
    }

    .hp-services-bridge-inner {
        padding: 82px 42px;
    }
}

@media (max-width: 640px) {
    .hp-services-list .hp-services-container {
        gap: 22px;
    }

    .hp-service {
        padding: 30px 24px;
        border-radius: 26px;
    }

    .hp-service-index span:first-child {
        font-size: 15px;
    }

    .hp-service-index span:last-child {
        font-size: 10px;
    }

    .hp-service-title-wrap h2 {
        font-size: 43px;
    }

    .hp-service-slogan {
        font-size: 19px;
        line-height: 1.55;
    }

    .hp-service-description {
        font-size: 16px;
        line-height: 1.85;
    }

    .hp-service-features {
        grid-template-columns: 1fr;
        gap: 13px;
        margin-bottom: 34px;
    }

    .hp-service-features li {
        font-size: 15px;
    }

    .hp-service-link {
        font-size: 15px;
    }

    .hp-services-bridge {
        padding: 50px 0 120px;
    }

    .hp-services-bridge-inner {
        padding: 70px 24px;
        border-radius: 28px;
    }

    .hp-services-bridge h2 {
        font-size: 41px;
    }

    .hp-services-bridge-inner > p {
        font-size: 17px;
    }
}

/* ==========================================================
   MOBILE / TOUCH
========================================================== */

@media (hover: none) {
    .hp-service {
        transform: none !important;
    }

    .hp-service:hover {
        transform: none;
    }

    .hp-service::after {
        display: none;
    }
}

/* ==========================================================
   ACCESSIBILITY
========================================================== */

.hp-service-link:focus-visible,
.hp-services-bridge-link:focus-visible {
    outline: 2px solid #7bc8ff;
    outline-offset: 8px;
    border-radius: 4px;
}

/* ==========================================================
   JS ACTIVE SERVICE
========================================================== */

.hp-service {
    opacity: 0.82;
    transition:
        opacity var(--hp-transition),
        transform var(--hp-transition),
        border-color var(--hp-transition),
        background var(--hp-transition),
        box-shadow var(--hp-transition);
}

.hp-service.is-active {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.14);
}

.hp-service.is-active .hp-service-index span:first-child,
.hp-service.is-active .hp-service-label,
.hp-service.is-active .hp-service-link {
    color: var(--service-accent);
}

.hp-service.is-active .hp-service-symbol span {
    opacity: 0.9;
}

.hp-services-glow {
    will-change: transform;
}



/* LIFEHANPAN COMPACT SCALE OVERRIDE */
.hp-services-intro{min-height:48vh;padding:81px 0 59px}
.hp-services-heading h1{font-size:clamp(32px,4vw,48px)}
.hp-services-summary{font-size:18px}
.hp-services-list{padding:16px 0 81px}
.hp-service{min-height:400px;padding:42px}
.hp-service-title-wrap h2{font-size:56px}
.hp-service-slogan{font-size:21px}
.hp-service-description{font-size:17px}
@media(max-width:640px){.hp-services-heading h1{font-size:32px}.hp-service-title-wrap h2{font-size:38px}}

/* LIFEHANPAN COMPACT SCALE OVERRIDE 2 (추가 축소) */
.hp-services-intro{min-height:32vh;padding:60px 0 42px}
.hp-services-heading h1{font-size:clamp(28px,3.4vw,40px)}
.hp-services-summary{font-size:16px}
.hp-services-list{padding:12px 0 60px}
.hp-service{min-height:0;padding:32px}
.hp-service-title-wrap h2{font-size:44px}
.hp-service-slogan{font-size:18px}
.hp-service-description{font-size:15px}



/* ==========================================================
   SERVICES TABS (가로 탭 + 아래 패널)
========================================================== */

.hp-tabs-nav{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
    margin-bottom:28px;
}

.hp-tab-btn{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
    padding:18px 10px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.03);
    color:#8fa5c7;
    cursor:pointer;
    transition:.25s ease;
    font-family:inherit;
}

.hp-tab-btn:hover{
    border-color:rgba(255,255,255,.18);
    color:#fff;
}

.hp-tab-index{
    font-size:11px;
    font-weight:800;
    letter-spacing:.14em;
    opacity:.6;
}

.hp-tab-name{
    font-size:16px;
    font-weight:800;
}

.hp-tab-btn.is-active{
    background:rgba(79,141,255,.1);
    border-color:rgba(79,141,255,.4);
    color:#fff;
}

.hp-tab-btn[data-theme="mint"].is-active{
    background:rgba(99,223,199,.1);
    border-color:rgba(99,223,199,.4);
}

.hp-tab-btn[data-theme="gold"].is-active{
    background:rgba(239,189,102,.1);
    border-color:rgba(239,189,102,.4);
}

.hp-tab-btn[data-theme="silver"].is-active{
    background:rgba(220,229,240,.1);
    border-color:rgba(220,229,240,.4);
}

.hp-tabs-panels{
    position:relative;
}

.hp-tabs-panels .hp-tab-panel.hp-service{
    display:block;
    grid-template-columns:none;
    min-height:0;
    padding:36px;
}

.hp-tabs-panels .hp-tab-panel[hidden]{
    display:none;
}

@media(max-width:640px){
    .hp-tabs-nav{
        grid-template-columns:repeat(2,1fr);
    }

    .hp-tabs-panels .hp-tab-panel.hp-service{
        padding:24px;
    }
}