:root {
    color-scheme: light;
    --page: #f8fafc;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-solid: #ffffff;
    --text: #111827;
    --muted: #657084;
    --line: #e5eaf1;
    --blue: #3d6df2;
    --purple: #8b46f4;
    --cyan: #08b9d5;
    --green: #08b96e;
    --shadow: 0 12px 36px rgba(26, 38, 63, 0.08), 0 2px 7px rgba(26, 38, 63, 0.05);
    --shadow-soft: 0 6px 20px rgba(26, 38, 63, 0.07), 0 1px 4px rgba(26, 38, 63, 0.05);
    --header-gap: 38px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page: #0c111b;
    --surface: rgba(18, 25, 38, 0.9);
    --surface-solid: #121926;
    --text: #f6f8fc;
    --muted: #9ca9bd;
    --line: #263044;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 2px 7px rgba(0, 0, 0, 0.22);
    --shadow-soft: 0 7px 22px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: color 220ms ease, background-color 220ms ease;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent);
    outline-offset: 3px;
}

.ambient {
    position: fixed;
    z-index: -1;
    width: 34vw;
    height: 34vw;
    min-width: 340px;
    min-height: 340px;
    border-radius: 50%;
    filter: blur(92px);
    pointer-events: none;
    opacity: 0.16;
    animation: breathe 9s ease-in-out infinite alternate;
}

.ambient-left {
    top: 130px;
    left: -18vw;
    background: linear-gradient(135deg, #a67cff, #ffbd72);
}

.ambient-right {
    top: 170px;
    right: -18vw;
    background: linear-gradient(135deg, #78b6ff, #4ae3ef);
    animation-delay: -4s;
}

.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;
    margin: 18px var(--header-gap) 0;
    padding: 14px 18px 14px 24px;
    border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 50px;
    height: 68px;
    flex: 0 0 50px;
    overflow: visible;
}

.brand-mark-top {
    fill: #89dcfa;
}

.brand-mark-mid {
    fill: #2899d3;
}

.brand-mark-dark {
    fill: #29556e;
}

.brand-mark-oil {
    fill: #ff780d;
}

.brand-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.brand-copy strong {
    overflow: hidden;
    font-size: clamp(15px, 1.35vw, 22px);
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy span {
    color: var(--muted);
    font-size: clamp(12px, 0.9vw, 15px);
    line-height: 1.25;
}

.theme-toggle {
    position: relative;
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-solid);
    color: var(--text);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 220ms ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
}

.theme-icon {
    position: absolute;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 220ms ease, opacity 180ms ease;
}

.theme-icon-moon {
    fill: currentColor;
    stroke: none;
}

.theme-icon-sun,
html[data-theme="dark"] .theme-icon-moon {
    opacity: 0;
    transform: rotate(-25deg) scale(0.6);
}

html[data-theme="dark"] .theme-icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.page-shell {
    width: min(1334px, calc(100% - 64px));
    margin: 0 auto;
}

.hero {
    display: grid;
    justify-items: center;
    padding: 36px 0 30px;
    text-align: center;
}

.system-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 37px;
    padding: 7px 16px;
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-solid) 72%, #e8f4fb 28%);
    color: var(--muted);
    box-shadow: 0 3px 12px rgba(26, 38, 63, 0.04);
    font-size: 14px;
    font-weight: 600;
    animation: rise-in 520ms 80ms both;
}

.system-badge span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}

.hero h1 {
    max-width: 850px;
    margin: 13px 0 20px;
    font-size: clamp(45px, 5.1vw, 73px);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.055em;
    animation: rise-in 600ms 130ms both;
}

.hero h1 span {
    display: block;
    padding: 7px 10px 3px;
    background: linear-gradient(90deg, #3572ee 4%, #8457ee 48%, #04b9d2 96%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero > p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(15px, 1.2vw, 18px);
    font-weight: 500;
    line-height: 1.45;
    animation: rise-in 600ms 180ms both;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 25px;
    animation: rise-in 620ms 230ms both;
}

.stat {
    display: grid;
    min-height: 86px;
    padding: 15px 30px 13px;
    place-content: center;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.stat strong {
    color: var(--blue);
    font-size: 31px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.services {
    padding: 0 0 52px;
}

.search-box {
    display: flex;
    align-items: center;
    width: min(940px, 100%);
    min-height: 58px;
    margin: 0 auto 29px;
    padding: 0 16px 0 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-box:focus-within {
    border-color: color-mix(in srgb, var(--blue) 52%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 10%, transparent), var(--shadow-soft);
}

.search-box > svg,
.empty-state > svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.search-box > svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: #253148;
}

html[data-theme="dark"] .search-box > svg {
    color: var(--muted);
}

.search-box input {
    min-width: 0;
    flex: 1;
    height: 56px;
    padding: 0 17px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
}

.search-box input::placeholder {
    color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.search-box input::-webkit-search-cancel-button {
    display: none;
}

.search-box button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    opacity: 0.82;
    transition: background 160ms ease, opacity 160ms ease;
}

.search-box button:hover {
    background: color-mix(in srgb, var(--line) 62%, transparent);
    opacity: 1;
}

.search-box button svg {
    width: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.025em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

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

.service-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 162px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    animation: card-in 520ms var(--delay) both;
    transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.service-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--accent);
    content: "";
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
    box-shadow: 0 18px 34px rgba(26, 38, 63, 0.11), 0 2px 6px rgba(26, 38, 63, 0.05);
}

.card-main {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 28px;
    gap: 14px;
    align-items: start;
    padding: 22px 20px 8px 22px;
}

.service-icon {
    display: grid;
    width: 64px;
    height: 56px;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

html[data-theme="dark"] .service-icon {
    background: color-mix(in srgb, var(--accent) 14%, var(--surface-solid));
}

.service-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-copy {
    min-width: 0;
}

.service-copy h3 {
    margin: 2px 0 7px;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.service-copy p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.favorite {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 3px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #96a1b3;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.favorite:hover {
    transform: scale(1.08);
    background: var(--accent-soft);
    color: var(--accent);
}

.favorite[aria-pressed="true"] {
    color: var(--accent);
}

.favorite svg {
    width: 22px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
    transition: fill 150ms ease;
}

.favorite[aria-pressed="true"] svg {
    fill: currentColor;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-self: end;
    gap: 14px;
    padding: 8px 22px 17px 25px;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.availability i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 9%, transparent);
}

.open-service {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 7px;
    background: var(--accent);
    box-shadow: 0 7px 16px color-mix(in srgb, var(--accent) 24%, transparent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.open-service:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px color-mix(in srgb, var(--accent) 32%, transparent);
    filter: saturate(1.08);
}

.open-service span {
    font-size: 17px;
    line-height: 0;
    transition: transform 160ms ease;
}

.open-service:hover span {
    transform: translateX(3px);
}

.empty-state {
    display: grid;
    justify-items: center;
    padding: 60px 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state[hidden] {
    display: none;
}

.empty-state > svg {
    width: 36px;
}

.empty-state h3 {
    margin: 14px 0 4px;
    color: var(--text);
}

.empty-state p {
    margin: 0;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    width: min(1334px, calc(100% - 64px));
    margin: 0 auto;
    padding: 26px 0 34px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
    to { transform: translate3d(32px, 18px, 0) scale(1.08); }
}

@media (max-width: 1080px) {
    .page-shell,
    .site-footer {
        width: min(920px, calc(100% - 40px));
    }

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

@media (max-width: 700px) {
    :root { --header-gap: 14px; }

    .site-header {
        min-height: 72px;
        margin-top: 12px;
        padding: 9px 10px 9px 13px;
        border-radius: 13px;
    }

    .brand { gap: 10px; }
    .brand-mark { width: 35px; height: 50px; flex-basis: 35px; }
    .brand-copy strong { max-width: 58vw; font-size: 13px; }
    .brand-copy span { font-size: 10px; }
    .theme-toggle { width: 44px; height: 44px; flex-basis: 44px; }

    .page-shell,
    .site-footer {
        width: calc(100% - 28px);
    }

    .hero { padding: 32px 0 26px; }
    .system-badge { min-height: 32px; font-size: 12px; }
    .hero h1 { margin-top: 15px; font-size: clamp(39px, 13vw, 57px); line-height: 0.96; }
    .hero > p { font-size: 14px; }

    .stats {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat { min-height: 78px; padding: 12px 8px; }
    .stat strong { font-size: 26px; }
    .stat span { font-size: 11px; }
    .search-box { min-height: 54px; margin-bottom: 25px; }
    .search-box input { height: 52px; padding-inline: 13px; }
    .service-grid { grid-template-columns: 1fr; gap: 14px; }
    .service-card { min-height: 156px; }
    .section-heading { margin-bottom: 14px; }
    .site-footer { display: grid; gap: 7px; }
}

@media (max-width: 420px) {
    .brand-copy strong { max-width: 56vw; }
    .brand-copy span { display: none; }
    .hero h1 { font-size: 39px; }
    .hero h1 span { padding-inline: 0; }
    .hero > p br { display: none; }
    .card-main { grid-template-columns: 52px minmax(0, 1fr) 26px; gap: 11px; padding: 19px 15px 7px 17px; }
    .service-icon { width: 52px; height: 52px; border-radius: 12px; }
    .service-icon svg { width: 27px; }
    .service-copy h3 { font-size: 15px; }
    .card-footer { padding: 8px 17px 15px 20px; }
}

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