/*
 * ifオートサービス — PC_完全版 / SP_完全版
 * PC: 中央コンテンツ1000px / SP: 414pxのデザインを画面幅に追従。
 * 色は各 .service--*、余白はセクションごとに変更できます。
 */

@font-face {
    font-family: "Noto Sans JP";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/noto-sans-jp-regular.woff2") format("woff2");
}

@font-face {
    font-family: "Noto Sans JP";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/noto-sans-jp-medium.woff2") format("woff2");
}

@font-face {
    font-family: "Noto Sans JP";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/noto-sans-jp-semibold.woff2") format("woff2");
}

:root {
    --content-width: 1000px;
    --outline: #323232;
    --blue: #026dbd;
    --green: #039752;
    --orange: #fd6103;
    color-scheme: light;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 16px;
    color: #000;
    background: #fff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
p,
ul,
dl,
dd {
    margin: 0;
}

body {
    min-width: 280px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

picture {
    display: block;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 3px solid #1b437a;
    outline-offset: 5px;
}

.sp-only {
    display: none;
}

.content-width {
    width: min(var(--content-width), calc(100% - 32px));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    z-index: 10;
    top: 10px;
    left: 10px;
    padding: 12px 20px;
    background: #fff;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: none;
}

/* メインビジュアル：背景だけ cover で画面全幅に伸ばします。 */
.hero-visual {
    height: 482px;
    background-image: url("../images/hero-background.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-inner {
    position: relative;
    width: min(100%, var(--content-width));
    height: 100%;
    margin-inline: auto;
}

.hero-art {
    position: absolute;
    top: 0;
    left: calc(50% - 352px);
    width: 849px;
}

.hero-art img {
    width: 100%;
}

.service-nav {
    position: relative;
    margin-top: -41px;
}

.service-nav-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 719px;
    max-width: calc(100% - 32px);
    margin-inline: auto;
}

.service-nav-link,
.detail-link {
    display: block;
    border-radius: 14px;
    transition: opacity 160ms ease, transform 160ms ease;
}

.service-nav-link img,
.detail-link img {
    width: 100%;
}

@media (hover: hover) {
    .service-nav-link:hover,
    .detail-link:hover {
        opacity: 0.82;
        transform: translateY(-2px);
    }
}

/* 新車・中古車・レンタカー */
.services {
    display: grid;
    gap: 28px;
    margin-top: 50px;
}

.service {
    --section-color: var(--blue);
    --section-dark: #143f5f;
    --section-background: #eaf8ff;
    --comparison-gap-top: 42px;
    --button-gap-top: 38px;
    --body-padding-bottom: 28px;
    border: 3px solid var(--outline);
    border-radius: 14px;
    background: var(--section-background);
    scroll-margin-top: 20px;
}

.service--used {
    --section-color: var(--green);
    --section-dark: #063921;
    --section-background: #f1fff8;
    --comparison-gap-top: 46px;
    --button-gap-top: 28px;
    --body-padding-bottom: 36px;
}

.service--rental {
    --section-color: var(--orange);
    --section-dark: #9f3d02;
    --section-background: #fff5ef;
    --comparison-gap-top: 28px;
    --body-padding-bottom: 36px;
}

.service:focus {
    outline: none;
}

.service-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 86px;
    border-bottom: 3px solid var(--outline);
    border-radius: 10px 10px 0 0;
    background: var(--section-color);
}

.service-title img {
    width: auto;
    height: 72px;
}

.service-body {
    padding: 38px 32px var(--body-padding-bottom);
}

.pill-heading {
    display: flex;
    align-items: center;
    gap: 17px;
    min-height: 60px;
    padding-inline: 30px;
    border-radius: 99px;
    background: var(--section-color);
}

.pill-heading::before {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.pill-heading img {
    width: auto;
    height: 48px;
}

.pill-heading--dark {
    background: var(--section-dark);
}

.recommendation-copy {
    margin: 21px 39px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 30px;
    overflow-wrap: anywhere;
}

.comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    margin-top: var(--comparison-gap-top);
}

.feature-list {
    margin-top: 21px;
    padding: 0 20px 0 30px;
    list-style: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 30px;
    overflow-wrap: anywhere;
}

.feature-list li {
    padding-left: 1em;
    text-indent: -1em;
}

.feature-list li::before {
    content: "・";
}

.comparison-column--demerits .feature-list {
    padding-left: 39px;
}

.detail-link {
    width: 445px;
    max-width: 100%;
    margin: var(--button-gap-top) auto 0;
}

/* 会社概要：本文と電話番号はHTMLです。 */
.company {
    width: min(850px, calc(100% - 32px));
    margin: 88px auto 0;
}

.company-title {
    width: 192px;
    margin-inline: auto;
}

.company-title img {
    width: 100%;
}

.company-table {
    margin-top: 53px;
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 0.08em;
}

.company-row {
    display: grid;
    grid-template-columns: 198px minmax(0, 1fr);
}

.company-row dt {
    padding: 33px 16px 32px 39px;
    border-top: 2px solid #000;
    font-weight: 600;
    line-height: 26px;
}

.company-row dd {
    padding: 33px 20px 32px 29px;
    border-top: 2px solid #d6d6d6;
    overflow-wrap: anywhere;
}

.company-row--name dt,
.company-row--name dd {
    padding-top: 29px;
}

.company-row--name {
    min-height: 89px;
}

.company-row--president {
    min-height: 94px;
}

.company-row--locations {
    min-height: 500px;
}

.company-row:last-child dt,
.company-row:last-child dd {
    border-bottom: 2px solid;
}

.company-row:last-child dd {
    border-bottom-color: #d6d6d6;
}

.location {
    font-style: normal;
}

.location + .location {
    margin-top: 22px;
}

.location > span {
    display: block;
}

.location .location-contact {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1em;
}

.location-contact a {
    text-decoration: none;
}

.location-contact a:hover {
    text-decoration: underline;
}

.site-footer {
    margin-top: 83px;
    padding-bottom: 28px;
    text-align: center;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: 0.08em;
}

.site-footer small {
    font-size: inherit;
}

/* タブレット：中央コンテンツが1000px未満になった場合も自然に折り返します。 */
@media (min-width: 768px) and (max-width: 1031px) {
    .hero-art {
        left: 5%;
        width: 90%;
    }

    .hero-visual {
        height: calc(100vw * 0.511);
    }

    .service-body {
        padding-inline: 24px;
    }

    .recommendation-copy {
        margin-inline: 20px;
    }

    .comparison {
        gap: 24px;
    }

    .pill-heading {
        padding-inline: 20px;
    }

    .feature-list,
    .comparison-column--demerits .feature-list {
        padding-inline: 12px;
    }

    .company-row {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .company-row dt {
        padding-left: 20px;
    }

    .company-row dd {
        padding-left: 20px;
    }
}

/* SP：remを414px基準で可変にし、375pxなどでも画面幅100%で表示。 */
@media (max-width: 767px) {
    :root {
        font-size: calc(100vw * 16 / 414);
    }

    .pc-only {
        display: none !important;
    }

    .sp-only {
        display: block;
    }

    .content-width {
        width: calc(100% - 1.875rem);
    }

    .hero-visual {
        height: auto;
        aspect-ratio: 414 / 526;
        background-image: url("../images/hero-background_sp.png");
    }

    .hero-inner {
        width: 100%;
        height: 100%;
        aspect-ratio: 414 / 526;
    }

    .hero-art {
        top: 1.0625rem;
        left: 0.625rem;
        width: calc(100% - 1.25rem);
    }

    .hero-art img {
        aspect-ratio: 394 / 496;
    }

    .service-nav {
        margin-top: 1rem;
    }

    .nav-heading {
        width: 22.125rem;
        margin: 0 auto 0.625rem;
    }

    .nav-heading img {
        width: 100%;
    }

    .service-nav-links {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        width: 22rem;
        max-width: none;
    }

    .service-nav-link img {
        aspect-ratio: 352 / 89;
    }

    .services {
        gap: 1.375rem;
        margin-top: 3rem;
    }

    .service {
        --comparison-gap-top: 2rem;
        --button-gap-top: 1.5rem;
        --body-padding-bottom: 1.5rem;
        --column-gap: 3.5rem;
        border-width: 0.125rem;
        border-radius: 0.875rem;
        scroll-margin-top: 1rem;
    }

    .service--used {
        --button-gap-top: 2rem;
        --body-padding-bottom: 1.875rem;
        --column-gap: 2rem;
    }

    .service--rental {
        --button-gap-top: 3.5rem;
        --body-padding-bottom: 2.375rem;
        margin-top: -0.0625rem;
    }

    .service-title {
        height: 6.5rem;
        border-bottom-width: 0.125rem;
        border-radius: 0.6875rem 0.6875rem 0 0;
    }

    .service-title img {
        width: 12.5rem;
        height: 4.5rem;
    }

    .service-body {
        padding: 2rem 0.875rem var(--body-padding-bottom);
    }

    .pill-heading {
        gap: 0.625rem;
        min-height: 3.125rem;
        padding-inline: 2rem;
    }

    .pill-heading::before {
        flex-basis: 0.9375rem;
        width: 0.9375rem;
        height: 0.9375rem;
    }

    .pill-heading img {
        width: auto;
        height: 1.6875rem;
    }

    .recommendation-copy {
        margin: 1rem 0 0;
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.5;
    }

    .comparison {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--column-gap);
    }

    .feature-list,
    .comparison-column--demerits .feature-list {
        margin-top: 1rem;
        padding: 0;
        font-size: 1rem;
        line-height: 1.5;
    }

    .detail-link {
        width: 100%;
        border-radius: 0.75rem;
    }

    .detail-link img {
        aspect-ratio: 352 / 70;
    }

    .company {
        width: calc(100% - 1.875rem);
        margin-top: 3.6875rem;
    }

    .company-title {
        width: 8rem;
    }

    .company-title img {
        aspect-ratio: 128 / 64;
    }

    .company-table {
        margin-top: 3.5rem;
        font-size: 0.75rem;
        line-height: 0.875rem;
    }

    .company-row {
        grid-template-columns: 8rem minmax(0, 1fr);
    }

    .company-row dt,
    .company-row dd {
        padding-top: 1.875rem;
        padding-bottom: 2rem;
        border-top-width: 0.125rem;
    }

    .company-row dt {
        padding-inline: 0.25rem;
        text-align: center;
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .company-row dd {
        padding-left: 0.8125rem;
        padding-right: 0;
    }

    .company-row .company-value--short {
        font-size: 0.8125rem;
        line-height: 1rem;
        padding-top: 2rem;
    }

    .company-row--name,
    .company-row--president {
        min-height: 5.25rem;
    }

    .company-row--locations {
        min-height: 19rem;
    }

    .company-row--locations dd {
        padding-top: 2rem;
    }

    .company-row:last-child dt,
    .company-row:last-child dd {
        border-bottom-width: 0.125rem;
    }

    .location + .location {
        margin-top: 0.875rem;
    }

    .location .location-contact {
        display: block;
    }

    .location-contact a,
    .location-contact span {
        display: block;
    }

    .site-footer {
        margin-top: 1.875rem;
        padding-bottom: 1.0625rem;
        font-size: 0.875rem;
        line-height: 1.0625rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .service-nav-link,
    .detail-link {
        transition: none;
    }
}
