/* First screen: editorial layout for a practical website finishing service. */
:root {
    --first-cream: #f5f1e9;
    --first-cream-light: #fbf8f2;
    --first-espresso: #35251b;
    --first-muted: #77665a;
    --first-terracotta: #a95337;
    --first-terracotta-dark: #843f2a;
    --first-rule: #d8cabe;
    --first-serif: "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
}

/* Keep the existing fixed navigation and its JavaScript hooks. */
#navbar,
#navbar.scrolled {
    background: rgba(245, 241, 233, 0.96);
    border-bottom: 1px solid rgba(95, 70, 54, 0.17);
    box-shadow: 0 3px 18px rgba(53, 37, 27, 0.04);
    backdrop-filter: blur(12px);
}

#navbar .container {
    width: 100%;
    max-width: none;
    padding-inline: clamp(1.25rem, 4.5vw, 4.5rem);
}

#navbar .nav-menu {
    background: transparent;
}

#navbar .logo {
    background: none;
    color: var(--first-espresso);
    filter: none;
    -webkit-text-fill-color: var(--first-espresso);
    font-family: var(--first-serif);
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

#navbar .nav-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 0.75rem;
    color: var(--first-espresso);
    text-shadow: none;
    font-size: 0.92rem;
    font-weight: 500;
}

#navbar .hamburger {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    padding: 0;
}

#navbar .nav-link:hover,
#navbar .nav-link:focus-visible {
    color: var(--first-terracotta-dark);
}

#navbar .nav-link::after,
#navbar .scroll-indicator {
    background: var(--first-terracotta);
}

#navbar .hamburger span {
    background: var(--first-espresso);
}

/* The existing module still finds #heroCanvas; the new opaque hero surface
   covers its old dark visual treatment without changing its script hook. */
#expert-intro > .hero-autumn-bg,
#expert-intro > .hero-background,
#expert-intro > .hero-gradient-cover {
    display: none;
}

#expert-intro > .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

#expert-intro > .container > .career-content {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--spacing-lg);
}

#expert-intro .portfolio-first-screen {
    position: relative;
    z-index: 10;
    display: block;
    width: 100%;
    max-width: none;
    min-height: 100svh;
    margin: 0 auto;
    padding: 6.75rem clamp(1.25rem, 4.5vw, 4.5rem) 0;
    color: var(--first-espresso);
    text-align: left;
    isolation: isolate;
}

#expert-intro .portfolio-first-screen::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    width: 100%;
    background:
        radial-gradient(ellipse at 87% 44%, rgba(185, 101, 71, 0.055), transparent 43%),
        var(--first-cream);
    content: "";
}

.portfolio-first-screen__main {
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 3.75rem);
    min-height: clamp(500px, calc(100svh - 18rem), 760px);
    padding: 1.1rem 0 1.5rem;
    margin-inline: auto;
    max-width: 1392px;
}

.portfolio-first-screen__copy {
    max-width: 540px;
    padding: 0.75rem 0;
}

.portfolio-first-screen__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.3rem;
    color: var(--first-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.055em;
}

.portfolio-first-screen__eyebrow::before {
    width: 1.55rem;
    height: 1px;
    background: var(--first-terracotta);
    content: "";
}

.portfolio-first-screen__title {
    margin: 0;
    color: var(--first-espresso);
    font-family: var(--first-serif);
    font-size: clamp(2.8rem, 4.2vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.065em;
    line-height: 1.27;
    word-break: keep-all;
}

.portfolio-first-screen__title span {
    display: block;
}

.portfolio-first-screen__lead {
    max-width: 31rem;
    margin: 1.15rem 0 0;
    color: #68574a;
    font-family: var(--first-serif);
    font-size: clamp(1.05rem, 1.45vw, 1.3rem);
    letter-spacing: -0.035em;
    line-height: 1.75;
    word-break: keep-all;
}

.portfolio-first-screen__reason {
    margin: 0.85rem 0 0;
    color: var(--first-muted);
    font-size: 0.93rem;
    line-height: 1.8;
    word-break: keep-all;
}

.portfolio-first-screen__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.55rem;
}

.portfolio-first-screen__button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.portfolio-first-screen__button-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    white-space: nowrap;
}

.portfolio-first-screen__button-group > span {
    font-size: 1.12em;
    font-weight: 400;
    line-height: 1;
}

.portfolio-first-screen__button--primary {
    min-width: 260px;
    background: var(--first-terracotta);
    color: #fffaf4;
}

.portfolio-first-screen__button--primary:hover {
    background: var(--first-terracotta-dark);
    transform: translateY(-1px);
}

.portfolio-first-screen__button--secondary {
    min-width: 190px;
    border-color: var(--first-terracotta);
    background: transparent;
    color: var(--first-espresso);
}

.portfolio-first-screen__button--secondary:hover {
    background: rgba(185, 101, 71, 0.08);
}

.portfolio-first-screen__button:focus-visible {
    outline: 3px solid rgba(185, 101, 71, 0.46);
    outline-offset: 3px;
}

.portfolio-first-screen__agreement {
    margin: 0.75rem 0 0;
    color: var(--first-muted);
    font-family: var(--first-serif);
    font-size: 0.86rem;
    letter-spacing: -0.025em;
}

.portfolio-first-screen__delivery-note {
    margin: 0.35rem 0 0;
    color: var(--first-espresso);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.portfolio-first-screen__preview {
    position: relative;
    width: 100%;
    min-height: 440px;
    margin: 0;
}

.portfolio-first-screen__desktop-preview {
    position: absolute;
    top: 3%;
    left: 0;
    display: flex;
    width: 88%;
    height: clamp(330px, 35vw, 405px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(103, 78, 61, 0.3);
    border-radius: 15px;
    background: var(--first-cream-light);
    box-shadow: 0 20px 45px rgba(64, 44, 31, 0.16), 0 2px 6px rgba(64, 44, 31, 0.08);
}

.portfolio-first-screen__window-bar {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.85rem;
    border-bottom: 1px solid rgba(103, 78, 61, 0.16);
    background: #eee8de;
}

.portfolio-first-screen__window-bar > span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ba7056;
}

.portfolio-first-screen__window-bar > span:nth-child(2) { background: #d6a45d; }
.portfolio-first-screen__window-bar > span:nth-child(3) { background: #8e9873; }

.portfolio-first-screen__window-bar small {
    margin-left: auto;
    color: #88786b;
    font-size: 0.61rem;
    letter-spacing: 0.08em;
}

.portfolio-first-screen__mini-nav {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(103, 78, 61, 0.14);
    color: var(--first-espresso);
    font-size: 0.66rem;
}

.portfolio-first-screen__mini-nav strong {
    margin-right: auto;
    font-family: var(--first-serif);
    font-size: 0.92rem;
}

.portfolio-first-screen__mini-hero {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.83fr);
    align-items: center;
    gap: 0.85rem;
    padding: 1.2rem 1.3rem 1.05rem 1.5rem;
}

.portfolio-first-screen__mini-copy {
    min-width: 0;
}

.portfolio-first-screen__mini-kicker {
    color: #937d6e;
    font-family: var(--first-serif);
    font-size: 0.58rem;
}

.portfolio-first-screen__mini-copy h2 {
    margin: 0.7rem 0 0.55rem;
    color: var(--first-espresso);
    font-family: var(--first-serif);
    font-size: clamp(1.05rem, 1.7vw, 1.45rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.5;
    word-break: keep-all;
}

.portfolio-first-screen__mini-copy p {
    margin: 0;
    color: #75665a;
    font-family: var(--first-serif);
    font-size: 0.67rem;
    line-height: 1.7;
}

.portfolio-first-screen__mini-button,
.portfolio-first-screen__phone-button {
    display: flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--first-terracotta);
    color: white;
    font-size: 0.61rem;
    font-weight: 600;
    text-align: center;
}

.portfolio-first-screen__mini-button b,
.portfolio-first-screen__phone-button b {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1;
}

.portfolio-first-screen__mini-image {
    height: min(100%, 220px);
    min-height: 160px;
    overflow: hidden;
    background: #e8dfd2;
}

.portfolio-first-screen__mini-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 64%;
}

.portfolio-first-screen__mini-deliverables {
    display: grid;
    min-height: 48px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    border-top: 1px solid rgba(103, 78, 61, 0.18);
    color: #59483c;
    font-family: var(--first-serif);
    font-size: 0.59rem;
    text-align: center;
}

.portfolio-first-screen__mini-deliverables span + span {
    border-left: 1px solid rgba(103, 78, 61, 0.22);
}

.portfolio-first-screen__phone-preview {
    position: absolute;
    z-index: 2;
    top: 21%;
    right: 0;
    width: min(34%, 180px);
    min-width: 146px;
    height: 77%;
    max-height: 375px;
    padding: 7px;
    border: 2px solid #43362d;
    border-radius: 28px;
    background: #fffdf9;
    box-shadow: 0 14px 35px rgba(46, 33, 24, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.portfolio-first-screen__phone-speaker {
    position: absolute;
    z-index: 2;
    top: 6px;
    left: 50%;
    width: 35%;
    height: 9px;
    border-radius: 0 0 9px 9px;
    background: #43362d;
    transform: translateX(-50%);
}

.portfolio-first-screen__phone-screen {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: 1.05rem 0.65rem 0.55rem;
    border-radius: 21px;
    background: var(--first-cream-light);
    color: var(--first-espresso);
}

.portfolio-first-screen__phone-nav {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(103, 78, 61, 0.18);
    font-size: 0.6rem;
}

.portfolio-first-screen__phone-nav strong {
    font-family: var(--first-serif);
    font-size: 0.7rem;
}

.portfolio-first-screen__phone-screen h2 {
    margin: 0.8rem 0 0;
    font-family: var(--first-serif);
    font-size: clamp(0.73rem, 1.05vw, 0.94rem);
    font-weight: 600;
    letter-spacing: -0.06em;
    line-height: 1.45;
    word-break: keep-all;
}

.portfolio-first-screen__phone-screen p {
    margin: 0.38rem 0 0;
    color: #76665b;
    font-family: var(--first-serif);
    font-size: 0.53rem;
    line-height: 1.6;
    word-break: keep-all;
}

.portfolio-first-screen__phone-button {
    min-height: 27px;
    margin-top: 0.55rem;
    padding: 0.25rem 0.35rem;
    font-size: 0.52rem;
}

.portfolio-first-screen__phone-screen img {
    display: block;
    width: 100%;
    min-height: 0;
    flex: 1;
    margin-top: 0.55rem;
    object-fit: cover;
    object-position: center 59%;
}

.portfolio-first-screen__phone-screen small {
    padding-top: 0.35rem;
    color: #75665a;
    font-size: 0.5rem;
    text-align: center;
}

.portfolio-first-screen__preview figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    color: var(--first-muted);
    font-family: var(--first-serif);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.portfolio-first-screen__scope {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 1.35rem 0 1.65rem;
    border-top: 1px solid var(--first-rule);
    margin-inline: auto;
    max-width: 1392px;
}

.portfolio-first-screen__scope-item {
    display: flex;
    min-height: 66px;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 0 1.6rem;
}

.portfolio-first-screen__scope-item:first-child { padding-left: 0; }
.portfolio-first-screen__scope-item:last-child { padding-right: 0; }

.portfolio-first-screen__scope-item + .portfolio-first-screen__scope-item {
    border-left: 1px solid var(--first-rule);
}

.portfolio-first-screen__scope-item strong {
    color: var(--first-espresso);
    font-family: var(--first-serif);
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.portfolio-first-screen__scope-item span {
    color: var(--first-muted);
    font-size: 0.76rem;
    line-height: 1.6;
    word-break: keep-all;
}

#expert-intro .music-control {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(83, 62, 47, 0.42);
    background: rgba(251, 248, 242, 0.94);
    color: var(--first-espresso);
    font-size: 1.05rem;
    box-shadow: 0 5px 18px rgba(53, 37, 27, 0.12);
}

#expert-intro .music-control:hover {
    background: #fffdf9;
    color: var(--first-terracotta-dark);
    box-shadow: 0 7px 22px rgba(53, 37, 27, 0.16);
}

@media (max-width: 968px) {
    .portfolio-first-screen__main {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
        min-height: auto;
        padding-top: 1.6rem;
    }

    .portfolio-first-screen__copy {
        max-width: 680px;
    }

    .portfolio-first-screen__title {
        font-size: clamp(2.55rem, 6.8vw, 3.7rem);
    }

    .portfolio-first-screen__preview {
        width: min(100%, 680px);
        min-height: clamp(350px, 58vw, 440px);
        margin-inline: auto;
    }

    .portfolio-first-screen__desktop-preview {
        width: 88%;
        height: clamp(305px, 48vw, 390px);
    }

    .portfolio-first-screen__phone-preview {
        min-width: 152px;
        max-width: 180px;
    }

    .portfolio-first-screen__mini-copy h2 {
        font-size: clamp(1.2rem, 3vw, 1.55rem);
    }
}

@media (max-width: 768px) {
    #navbar .nav-menu {
        box-sizing: border-box;
        width: 100%;
        border-bottom: 1px solid var(--first-rule);
        background: var(--first-cream-light);
    }

    #navbar .nav-menu > li {
        display: flex;
    }

    #navbar .nav-link {
        width: 100%;
        min-height: 44px;
    }

    #expert-intro .portfolio-first-screen {
        min-height: 100svh;
        padding-top: 6.25rem;
    }

    .portfolio-first-screen__main {
        gap: 1.35rem;
        padding-top: 0.8rem;
    }

    .portfolio-first-screen__eyebrow {
        margin-bottom: 0.85rem;
        font-size: 0.78rem;
    }

    .portfolio-first-screen__title {
        font-size: clamp(2.15rem, 8.2vw, 3.45rem);
        line-height: 1.32;
    }

    .portfolio-first-screen__lead {
        margin-top: 0.85rem;
        font-size: 1.04rem;
        line-height: 1.7;
    }

    .portfolio-first-screen__reason {
        margin-top: 0.6rem;
        font-size: 0.88rem;
    }

    .portfolio-first-screen__desktop-break { display: none; }

    .portfolio-first-screen__actions {
        gap: 0.6rem;
        margin-top: 1.1rem;
    }

    .portfolio-first-screen__button--primary { min-width: min(100%, 255px); }
    .portfolio-first-screen__button--secondary { min-width: 175px; }

    .portfolio-first-screen__agreement {
        margin-top: 0.55rem;
        font-size: 0.8rem;
    }

    .portfolio-first-screen__delivery-note {
        margin-top: 0.3rem;
        font-size: 0.77rem;
    }

    .portfolio-first-screen__preview {
        min-height: clamp(320px, 86vw, 410px);
    }

    .portfolio-first-screen__desktop-preview {
        top: 2%;
        width: 89%;
        height: clamp(285px, 74vw, 350px);
    }

    .portfolio-first-screen__window-bar { min-height: 30px; }
    .portfolio-first-screen__mini-nav { min-height: 36px; padding-inline: 0.75rem; gap: 0.6rem; font-size: 0.56rem; }
    .portfolio-first-screen__mini-hero { gap: 0.45rem; padding: 0.8rem 0.7rem; }
    .portfolio-first-screen__mini-copy h2 { margin-top: 0.45rem; font-size: clamp(0.9rem, 4vw, 1.2rem); }
    .portfolio-first-screen__mini-copy p { font-size: 0.58rem; }
    .portfolio-first-screen__mini-image { min-height: 125px; }
    .portfolio-first-screen__mini-deliverables { min-height: 39px; font-size: 0.48rem; }

    .portfolio-first-screen__phone-preview {
        top: 18%;
        width: 34%;
        min-width: 142px;
        height: 77%;
        max-height: 335px;
        border-radius: 25px;
    }

    .portfolio-first-screen__phone-screen { border-radius: 18px; }

    .portfolio-first-screen__scope {
        grid-template-columns: 1fr;
        padding: 0.7rem 0 1.2rem;
    }

    .portfolio-first-screen__scope-item,
    .portfolio-first-screen__scope-item:first-child,
    .portfolio-first-screen__scope-item:last-child {
        min-height: 0;
        padding: 0.85rem 0;
    }

    .portfolio-first-screen__scope-item + .portfolio-first-screen__scope-item {
        border-top: 1px solid var(--first-rule);
        border-left: 0;
    }

    .portfolio-first-screen__scope-item strong { font-size: 0.98rem; }
    .portfolio-first-screen__scope-item span { font-size: 0.76rem; }
}

@media (max-width: 480px) {
    #expert-intro .portfolio-first-screen {
        padding-top: 5.8rem;
    }

    .portfolio-first-screen__title {
        font-size: clamp(1.9rem, 8.05vw, 2.35rem);
        letter-spacing: -0.07em;
        line-height: 1.4;
    }

    .portfolio-first-screen__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .portfolio-first-screen__button,
    .portfolio-first-screen__button--primary,
    .portfolio-first-screen__button--secondary {
        width: min(100%, 320px);
        min-width: 0;
        margin-inline: auto;
    }

    .portfolio-first-screen__preview {
        min-height: 315px;
    }

    .portfolio-first-screen__desktop-preview {
        width: 89%;
        height: 275px;
        border-radius: 11px;
    }

    .portfolio-first-screen__window-bar {
        min-height: 26px;
        padding-inline: 0.55rem;
    }

    .portfolio-first-screen__window-bar > span { width: 7px; height: 7px; }
    .portfolio-first-screen__window-bar small { font-size: 0.48rem; }
    .portfolio-first-screen__mini-nav { min-height: 31px; font-size: 0.5rem; }
    .portfolio-first-screen__mini-nav strong { font-size: 0.72rem; }
    .portfolio-first-screen__mini-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.74fr); padding: 0.65rem 0.55rem; }
    .portfolio-first-screen__mini-kicker { font-size: 0.47rem; }
    .portfolio-first-screen__mini-copy h2 { font-size: 0.88rem; }
    .portfolio-first-screen__mini-copy p { font-size: 0.5rem; }
    .portfolio-first-screen__mini-button { min-height: 27px; padding-inline: 0.35rem; font-size: 0.49rem; }
    .portfolio-first-screen__mini-image { min-height: 105px; }
    .portfolio-first-screen__mini-deliverables { min-height: 34px; font-size: 0.42rem; }

    .portfolio-first-screen__phone-preview {
        top: 18%;
        right: -1%;
        width: 37%;
        min-width: 132px;
        max-height: 282px;
        padding: 6px;
        border-radius: 22px;
    }

    .portfolio-first-screen__phone-screen { padding-inline: 0.5rem; border-radius: 16px; }
    .portfolio-first-screen__phone-screen h2 { font-size: 0.7rem; }
    .portfolio-first-screen__phone-screen p { font-size: 0.47rem; }
    .portfolio-first-screen__phone-button { min-height: 24px; font-size: 0.46rem; }
    .portfolio-first-screen__preview figcaption { right: 0.15rem; bottom: -0.25rem; font-size: 0.68rem; }
}

@media (max-width: 340px) {
    .portfolio-first-screen__title { font-size: 1.78rem; }
    .portfolio-first-screen__reason { font-size: 0.83rem; }
    .portfolio-first-screen__phone-preview { min-width: 122px; }

    #contact .btn-submit {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    #contact .btn-submit > span {
        min-width: 0;
        flex-shrink: 1;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-first-screen__button { transition: none; }
}
