:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #eef3f5;
    --text: #172126;
    --muted: #66747b;
    --border: #dfe5e8;
    --accent: #176b74;
    --accent-dark: #10545b;
    --shadow: 0 10px 30px rgba(20, 40, 50, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    font-weight: 800;
    font-size: 22px;
}

.brand-name {
    font-weight: 750;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.hero {
    padding: 72px 0 58px;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #edf5f5 100%
        );
    border-bottom: 1px solid var(--border);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

h1,
h2,
h3 {
    margin-top: 0;
    letter-spacing: -0.035em;
}

h1 {
    max-width: 700px;
    margin-bottom: 14px;
    font-size: clamp(38px, 7vw, 66px);
    line-height: 0.98;
}

h2 {
    margin-bottom: 0;
    font-size: 30px;
}

.hero-text {
    max-width: 620px;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.search-box {
    max-width: 760px;
    display: flex;
    gap: 10px;
    padding: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.search-box input {
    min-width: 0;
    flex: 1;
    padding: 14px;
    border: 0;
    outline: 0;
    background: transparent;
}

.search-box button {
    padding: 13px 22px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: white;
    font-weight: 700;
}

.search-box button:hover {
    background: var(--accent-dark);
}

.area-control {
    max-width: 360px;
    margin-top: 20px;
}

.area-control label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.area-control select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    color: var(--text);
}

.section {
    padding: 48px 0;
}

.section-muted {
    background: var(--surface-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.category-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.category-button {
    min-height: 110px;
    padding: 20px;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 3px 12px rgba(20, 40, 50, 0.03);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.category-button:hover {
    transform: translateY(-2px);
    border-color: #b9c9cd;
    box-shadow: var(--shadow);
}

.category-number {
    display: block;
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.category-name {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.service-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-button {
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: white;
    color: var(--text);
}

.service-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.back-button {
    margin-bottom: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-weight: 700;
}

.results-list {
    display: grid;
    gap: 12px;
}

.result-card {
    width: 100%;
    padding: 20px;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    color: var(--text);
}

.result-card:hover {
    border-color: #b7c8cc;
    box-shadow: var(--shadow);
}

.result-card h3 {
    margin-bottom: 7px;
    font-size: 19px;
}

.result-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.result-meta {
    margin-top: 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.result-count {
    color: var(--muted);
    font-size: 14px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 24, 0.58);
}

.company-card {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 30px;
    border-radius: 22px;
    background: white;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--bg);
    font-size: 24px;
}

.detail-description {
    color: var(--muted);
    line-height: 1.55;
}

.detail-section {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--border);
}

.detail-section h3 {
    margin-bottom: 10px;
    font-size: 15px;
}

.detail-chip {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 13px;
}

.contact-link {
    display: block;
    margin-top: 8px;
    color: var(--accent);
    text-decoration: none;
    word-break: break-word;
}

.contact-link:hover {
    text-decoration: underline;
}

.loading,
.empty-state,
.error-state {
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: white;
}

.error-state {
    color: #8a3030;
}

.site-footer {
    padding: 30px 0;
    border-top: 1px solid var(--border);
    background: white;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer strong {
    color: var(--text);
}

.hidden {
    display: none !important;
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .hero {
        padding: 48px 0 40px;
    }

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

    .search-box {
        display: block;
    }

    .search-box button {
        width: 100%;
        margin-top: 5px;
    }

    .section {
        padding: 36px 0;
    }

    .company-card {
        padding: 24px 20px;
    }
}

@media (max-width: 420px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .site-footer .container {
        display: block;
    }

    .site-footer span {
        display: block;
        margin-top: 6px;
    }
}

/* =========================================================
   PSP UI v0.2
   Search filters: Location -> Category -> Service
   ========================================================= */

.filter-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.filter-control {
    min-width: 0;
}

.filter-control label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.filter-control select {
    width: 100%;
    min-height: 48px;
    padding: 0 42px 0 14px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background-color: var(--surface);
    color: var(--text);

    font: inherit;
    cursor: pointer;
}

.filter-control select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.filter-control select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: var(--surface-soft);
}

@media (max-width: 700px) {
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
    }

    .filter-control select {
        min-height: 52px;
        font-size: 16px;
    }
}
