/* トップページの各欄: ヘッダー、事業内容、ローカルヒストリア、代表者紹介、会社概要、お問い合わせ、フッター。
   導入（ファーストビュー）は hero.css、ローカルヒストリアの「1 つの記事が生まれるまで」は making.css。 */

/* ── HEADER ── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 1240px;
    margin: 0 auto;
    padding: 26px 0 22px;
    border-bottom: 1px solid var(--ink);
}

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

.brand .logo-mark {
    width: 44px;
    color: var(--brand);
}

.brand b {
    display: block;
    font-family: var(--mincho);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.3;
}

.brand small {
    display: block;
    font: italic 500 14px / 1.2 var(--latin);
    color: var(--muted);
}

.header nav {
    display: flex;
    align-items: center;
    gap: 36px;
    font-family: var(--mincho);
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.header nav a:not(.header__cta) {
    position: relative;
}

.header nav a:not(.header__cta)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -4px;
    height: 1px;
    background: var(--ink);
    transition: right 0.3s;
}

.header nav a:not(.header__cta):hover::after {
    right: 0;
}

.header__cta {
    padding: 12px 24px;
    background: var(--ink);
    color: var(--paper-3);
    font-weight: 700;
    line-height: 1.3;
    transition: background-color 0.25s;
}

.header__cta:hover {
    background: var(--blue);
}

/* ── SERVICES ── */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.services > li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 48px 40px 44px;
}

.services > li + li {
    border-left: 1px solid var(--line);
}

.services__no {
    position: absolute;
    right: 32px;
    top: 26px;
    font-family: var(--latin);
    font-size: 76px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--paper-2);
    -webkit-text-stroke: 1px var(--line);
}

.services__en {
    font: italic 500 16px / 1 var(--latin);
    letter-spacing: 0.06em;
    color: var(--blue);
    text-transform: capitalize;
}

.services h3 {
    margin: 22px 0 14px;
    font-family: var(--mincho);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.services__catch {
    font-family: var(--mincho);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;
}

.services__body {
    margin-top: 16px;
    font-size: 14px;
    line-height: 2.05;
    color: var(--ink-2);
}

.services ul {
    display: grid;
    gap: 6px;
    width: 100%;
    margin: 24px 0 32px;
    padding: 20px 0 0;
    border-top: 1px dotted var(--muted);
    font-size: 14px;
}

.services ul li {
    display: flex;
    gap: 10px;
}

.services ul li::before {
    content: "—";
    color: var(--blue);
}

.services .link {
    margin-top: auto;
}

/* ── LOCAL HISTORIA ── */
.lh {
    padding-top: 120px;
    background: var(--paper-2);
    border-top: 1px solid var(--line);
}

.lh__grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 80px;
    align-items: center;
}

.lh__text h2 {
    margin: 20px 0 30px;
    font-size: 40px;
    letter-spacing: 0.1em;
}

.lh__catch {
    margin-bottom: 14px;
    font-family: var(--mincho);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--blue);
}

.lh__text > p {
    color: var(--ink-2);
}

.lh__text > p.lh__note {
    margin: 28px 0 32px;
    padding: 22px 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    font-family: var(--mincho);
    font-size: 17px;
    font-weight: 700;
    line-height: 2;
    color: var(--ink);
}

.lh__main {
    position: relative;
    box-shadow: 0 30px 60px rgb(60 45 20 / 0.22);
}

.lh__main img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.lh__main figcaption {
    position: absolute;
    inset: 0 0 auto;
    display: grid;
    gap: 2px;
    padding: 26px 32px 80px;
    background: linear-gradient(rgb(16 22 34 / 0.78), transparent);
    color: #fff;
    font-family: var(--mincho);
}

.lh__main figcaption small {
    font-size: 12px;
    letter-spacing: 0.24em;
}

.lh__main figcaption strong {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.2em;
}

.lh__main figcaption span {
    font-size: 14px;
    letter-spacing: 0.06em;
}

.lh__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.lh__thumbs img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.lh__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 88px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.lh__stats li {
    display: grid;
    gap: 6px;
    padding: 30px 32px 28px;
}

.lh__stats li + li {
    border-left: 1px solid var(--line);
}

.lh__stats span {
    font-family: var(--mincho);
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--ink-2);
}

.lh__stats strong {
    font: 600 62px / 1 var(--latin);
}

.lh__stats strong small {
    margin-left: 8px;
    font-family: var(--mincho);
    font-size: 16px;
    font-weight: 700;
    color: var(--blue);
}

.lh__open {
    display: grid;
    justify-items: center;
    gap: 34px;
    padding: 88px 0 110px;
    text-align: center;
}

.lh__open p {
    font-family: var(--mincho);
    font-size: 20px;
    font-weight: 700;
    line-height: 2.1;
    letter-spacing: 0.06em;
}

.openbtn {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 24px 44px 24px 34px;
    background: var(--navy);
    color: #fff;
    font-family: var(--mincho);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.1em;
    box-shadow:
        0 0 0 1px var(--navy),
        0 0 0 6px var(--paper-2),
        0 0 0 7px var(--navy);
    transition:
        background-color 0.25s,
        transform 0.25s;
}

.openbtn:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

.openbtn svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--cyan);
    stroke-width: 2;
    stroke-linecap: round;
}

/* ── MEMBER ── */
.members {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.members li {
    padding: 52px 56px 56px;
}

.members li + li {
    border-left: 1px solid var(--line);
}

.members__en {
    font: italic 500 20px / 1 var(--latin);
    color: var(--blue);
}

.members h3 {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin: 18px 0 22px;
    font-family: var(--mincho);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.4;
}

.members h3 small {
    order: 2;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.members li > p:last-child {
    font-size: 14.5px;
    line-height: 2.15;
    color: var(--ink-2);
}

/* ── COMPANY ── */
.company {
    background: var(--paper-3);
}

.company__grid {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 72px;
    align-items: start;
}

.table {
    border-top: 1px solid var(--ink);
}

.table > div {
    display: grid;
    grid-template-columns: 160px 1fr;
    padding: 22px 8px;
    border-bottom: 1px solid var(--line);
}

.table dt {
    font-family: var(--mincho);
    font-weight: 700;
    letter-spacing: 0.16em;
}

.table dd {
    line-height: 1.95;
}

.table dd span {
    display: block;
}

.table dd small {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
}

.map {
    padding: 10px;
    border: 1px solid var(--ink);
    background: var(--paper);
}

.map iframe {
    width: 100%;
    height: 400px;
    filter: grayscale(0.85) sepia(0.22) contrast(0.95);
}

.map figcaption {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 12px 6px 4px;
    font-size: 13.5px;
}

.map figcaption i {
    font: italic 500 18px / 1 var(--latin);
    color: var(--blue);
}

/* ── CONTACT ── */
.contact {
    padding: 130px 0 120px;
    background: var(--navy);
    color: #f3efe6;
}

.contact .heading__en {
    color: var(--cyan);
}

.contact__head {
    display: grid;
    justify-items: center;
    gap: 22px;
    text-align: center;
}

.contact__head h2 {
    font-family: var(--mincho);
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.5;
}

.contact__head mark {
    background: linear-gradient(transparent 6%, var(--yellow) 6%, var(--yellow) 94%, transparent 94%);
    color: var(--navy);
    padding: 0 0.12em;
    margin: 0 0.08em;
}

.contact__head > p:last-child {
    font-family: var(--mincho);
    font-size: 17px;
    line-height: 2.1;
    color: #c9d3e3;
}

.contact__topics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 64px 0 0;
    border: 1px solid rgb(243 239 230 / 0.5);
}

.contact__topics li + li {
    border-left: 1px solid rgb(243 239 230 / 0.25);
}

.contact__topics a {
    display: grid;
    align-content: start;
    gap: 12px;
    height: 100%;
    padding: 36px 36px 32px;
    transition: background-color 0.3s;
}

.contact__topics a:hover {
    background: rgb(111 214 255 / 0.1);
}

.contact__topics span {
    font-family: var(--latin);
    font-size: 36px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--yellow);
}

.contact__topics b {
    text-wrap: balance;
    font-family: var(--mincho);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: 0.04em;
}

.contact__topics small {
    font-size: 12.5px;
    line-height: 1.8;
    color: #a9b6ca;
}

.contact__topics i {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-family: var(--mincho);
    font-style: normal;
    font-size: 14px;
    font-weight: 700;
    color: var(--cyan);
}

.contact__topics i::after {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
    transition: width 0.25s;
}

.contact__topics a:hover i::after {
    width: 48px;
}

.contact__form {
    margin-top: 28px;
    padding: 56px 64px 52px;
    background: var(--paper-3);
    color: var(--ink);
}

.contact__form h3 {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ink);
    font-family: var(--mincho);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.contact__form h3 small {
    font: italic 500 18px / 1 var(--latin);
    letter-spacing: 0.02em;
    color: var(--blue);
}

/* お問い合わせフォーム（src/components/contact-form.tsx） */
.contact-form {
    position: relative;
    display: grid;
    gap: 28px;
}

.contact-form__topics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.contact-form__topics legend {
    margin-bottom: 10px;
    font-family: var(--mincho);
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ご相談の種類: ラジオボタンを隠し、カード全体で選ぶ */
.topic-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.topic-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.topic-card__body {
    display: grid;
    gap: 6px;
    height: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: #fff;
    transition:
        border-color 0.2s,
        background-color 0.2s,
        box-shadow 0.2s;
}

.topic-card__label {
    font-family: var(--mincho);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-wrap: balance;
}

.topic-card__note {
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

.topic-card input:checked + .topic-card__body {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
    background: #fffbe0;
}

.topic-card input:focus-visible + .topic-card__body {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.contact-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

.field--wide {
    grid-column: 1 / -1;
}

.field label {
    font-family: var(--mincho);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.field label em {
    margin-left: 6px;
    padding: 2px 6px;
    background: var(--red);
    color: #fff;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid var(--ink);
    background: #fff;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus {
    box-shadow: 0 2px 0 var(--blue);
    border-color: var(--blue);
}

.field textarea {
    resize: vertical;
    line-height: 1.7;
}

.field textarea::placeholder {
    color: #b0a898;
}

.contact-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Cloudflare Turnstile のウィジェット（src/client/turnstile.ts）。読み込む前から同じ大きさの場所を取っておく。
   ウィジェットの iframe は行の中に置かれるので、行の高さ（line-height）の分だけ下にすき間ができ、
   出たときに送信ボタンがずれる。line-height を 0 にしてすき間を無くす（iframe の中の表示には効かない） */
.turnstile {
    width: 300px;
    min-height: 65px;
    line-height: 0;
}

.contact-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 300px;
    padding: 20px 36px;
    background: var(--ink);
    color: var(--paper-3);
    font-family: var(--mincho);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.14em;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        background-color 0.2s;
}

.contact-form__submit::after {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
}

.contact-form__submit:hover {
    background: var(--blue);
}

.contact-form__submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.contact-form__error {
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
}

/* 送信後: フォームの上に重ねて完了メッセージを出す */
.contact-form__done {
    position: absolute;
    inset: -8px;
    display: grid;
    place-content: center;
    gap: 12px;
    padding: 40px;
    background: var(--paper-3);
    font-family: var(--mincho);
    text-align: center;
    animation: drop-in 0.5s both;
}

.contact-form__done strong {
    font-size: 24px;
    letter-spacing: 0.1em;
}

/* ── FOOTER ── */
.footer {
    padding: 44px 0 100px;
    background: var(--paper);
    border-top: 1px solid var(--ink);
}

.footer .container {
    display: flex;
    align-items: center;
    gap: 44px;
}

.footer p {
    font-family: var(--mincho);
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--ink-2);
}

.footer small {
    margin-left: auto;
    font:
        italic 500 15px / 1 var(--latin),
        var(--mincho);
    color: var(--muted);
}
