:root {
    --bg: #F1EFEA;
    --bg-deep: #F1EFEA;
    --fg: #17171A;
    --muted: #6D6C76;
    --muted-dark: #4A4A54;
    --accent: #A97B3E;
    --accent-soft: rgba(169,123,62,0.35);
    --accent-faint: rgba(169,123,62,0.10);
    --line: rgba(23,23,26,0.10);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body,
html {
    min-height: 100%;
    background: var(--bg);
    
}

body {
  background: radial-gradient(
    90% 70% at 50% 0%,
    var(--bg) 0%,
    var(--bg) 55%,
    var(--bg) 100%
  );
  color: var(--fg);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  -webkit-font-smoothing: antialiased;

  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---- corner ticks : quiet precision motif ---- */
.corner {
    position: fixed;
    width: 14px;
    height: 14px;
    z-index: 5;
    pointer-events: none;
    opacity: 0.55;
}
.corner::after,
.corner::before {
    content: "";
    position: absolute;
    background: var(--line);
}
.corner::before {
    width: 14px;
    height: 1px;
    top: 6px;
    left: 0;
}
.corner::after {
    width: 1px;
    height: 14px;
    left: 6px;
    top: 0;
}
.corner.tl {
    top: 22px;
    left: 22px;
}
.corner.tr {
    top: 22px;
    right: 22px;
}
.corner.bl {
    bottom: 22px;
    left: 22px;
}
.corner.br {
    bottom: 22px;
    right: 22px;
}

/* ---- page shell ---- */
.page {
    position: relative;
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- nav ---- */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px clamp(24px, 6vw, 64px);
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: clamp(11px, 1.4vw, 14px);
    letter-spacing: 0.16em;
    color: var(--fg);
}
.brand svg {
    width: 15px;
    height: 19px;
    display: block;
}
.brand .en {
    font-weight: 500;
    color: var(--fg);
}
.brand .yr {
    color: var(--muted-dark);
    font-size: clamp(9px, 1.1vw, 11px);
    letter-spacing: 0.1em;
    margin-left: 2px;
    font-weight: 400;
}

.navlinks {
    display: flex;
    gap: clamp(18px, 3vw, 34px);
}
.navlinks a {
    position: relative;
    font-size: clamp(10px, 1.2vw, 12px);
    letter-spacing: 0.1em;
    color: var(--muted-dark);
    font-weight: 400;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}
.navlinks a:focus-visible,
.navlinks a:hover {
    color: var(--fg);
}
.navlinks a.active {
    color: var(--muted-dark);
}
.navlinks a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--muted-dark);
}

/* ---- hero (centered, single screen) ---- */
main.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px clamp(24px, 8vw, 80px);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.eyebrow .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-faint);
}
.eyebrow span {
    font-size: clamp(11px, 1.3vw, 13px);
    letter-spacing: 0.3em;
    color: var(--muted);
}

h1 {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 2vw, 18px);
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--muted-dark);
}
h1 .thin {
    font-weight: 400;
    color: var(--muted);
}

.lead {
    margin-top: 26px;
    font-size: clamp(14px, 1.4vw, 16px);
    line-height: 1.95;
    color: #45454C;
    max-width: 480px;
}

.cta {
    margin-top: 44px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--fg);
    border: 1px solid var(--accent-soft);
    padding: 14px 28px;
    border-radius: 999px;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.cta:focus-visible,
.cta:hover {
    border-color: var(--accent);
    background: var(--accent-faint);
    transform: translateY(-1px);
}
.cta:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.cta .arrow {
    color: var(--accent);
    transition: transform 0.25s ease;
}
.cta:hover .arrow {
    transform: translateX(4px);
}

.cta.ghost {
    border-color: var(--line);
    color: var(--muted);
}
.cta.ghost:hover {
    border-color: var(--accent-soft);
    color: var(--fg);
    background: transparent;
}

/* ---- pillars (services page) ---- */
.pillars {
    margin-top: 42px;
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pillar {
    font-size: clamp(11px, 1.4vw, 14px);
    letter-spacing: 0.22em;
    color: var(--fg);
    padding: 0 20px;
    text-align: center;
}

.pillar span {
    display: block;
    font-family: 'Shippori Mincho', serif;
    font-size: clamp(9px, 1.1vw, 11px);
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-top: 6px;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--line);
}

/* ---- fact grid (about page) ---- */
.facts {
    margin-top: 48px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: left;
    max-width: 640px;
    width: 100%;
    /* 幅を100%確保する */
    flex-shrink: 0;
    /* 親がFlexboxでも縮ませない */
}
.facts .f {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.facts .f b {
    flex: 0 0 264px;
    font-size: clamp(10px, 1.2vw, 12px);
    letter-spacing: 0.16em;
    color: var(--muted);
    font-weight: 300;
    text-align: right;
}
.facts .f p {
    flex: 1;
    font-size: clamp(10px, 1.2vw, 12px);
    line-height: 1.8;
    color: var(--muted);
}

/* ---- footer ---- */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px clamp(24px, 6vw, 64px);
    border-top: 1px solid var(--line);
    font-size: clamp(8px, 1vw, 10px);
    color: var(--muted);
}
footer a:focus-visible,
footer a:hover {
    color: var(--accent);
}

/* ---- mobile menu toggle ---- */
.menu-toggle {
    display: none;
    /* スマホ用メディアクエリ内で flex 等に変更 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* 左右中央に確実に配置 */
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0;
    background: var(--fg);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* gap の代わりに margin で間隔を作る（2本目と3本目の上に 6px 付与） */
.menu-toggle span + span {
    margin-top: 6px;
    /* 線の高さ2px + 余白6px で計8px周期の整った配置に */
}

/* × 印にアニメーションする時の処理（整数で移動させる） */
.menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.sp-only {
    display: none;
}

/* ---- contact form ---- */
.confirm-wrap,
.form-wrap {
    width: 100%;
    max-width: 460px;
    margin-top: 44px;
    text-align: left;
}

.error-box {
    width: 100%;
    max-width: 460px;
    margin-top: 28px;
    padding: 14px 18px;
    border: 1px solid rgba(176,58,46,0.35);
    background: rgba(176,58,46,0.06);
    border-radius: 8px;
    text-align: left;
    font-size: clamp(11px, 1.4vw, 14px);
    line-height: 1.9;
    color: #8A2C22;
}
.error-box ul {
    padding-left: 18px;
}

.field {
    margin-bottom: 22px;
}
.field label {
    display: block;
    font-size: clamp(11px, 1.3vw, 14px);
    letter-spacing: 0.06em;
    color: var(--fg);
    opacity: 0.6;
    margin-bottom: 8px;
}
.field label .req {
    display: inline-block;
    margin-left: 8px;
    font-size: clamp(9px, 1.1vw, 11px);
    letter-spacing: 0.04em;
    color: var(--accent);
    opacity: 1;
    border: 1px solid var(--accent-soft);
    border-radius: 4px;
    padding: 1px 6px;
    vertical-align: middle;
}
.field label .opt {
    display: inline-block;
    margin-left: 8px;
    font-size: clamp(9px, 1.1vw, 11px);
    color: var(--muted);
    opacity: 1;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
    width: 100%;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(12px, 1.5vw, 15px);
    color: var(--fg);
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    transition: border-color 0.2s ease;
}
.field textarea {
    min-height: 150px;
    line-height: 1.85;
    resize: vertical;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent-soft);
}

/* honeypot: 画面外に隠すダミー項目（ボットだけが入力する） */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
}

.form-actions {
    margin-top: 34px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.btn {
    font-family: inherit;
    font-size: clamp(11px, 1.3vw, 14px);
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: 999px;
    padding: 14px 30px;
    border: 1px solid var(--accent-soft);
    background: transparent;
    color: var(--fg);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.btn:focus-visible,
.btn:hover {
    border-color: var(--accent);
    background: var(--accent-faint);
    transform: translateY(-1px);
}
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.btn.primary {
    background: var(--fg);
    color: #fff;
    border-color: var(--fg);
}
.btn.primary:hover {
    opacity: 0.88;
    background: var(--fg);
    transform: translateY(-1px);
}
.btn.ghost {
    border-color: var(--line);
    color: var(--muted);
}
.btn.ghost:hover {
    border-color: var(--accent-soft);
    color: var(--fg);
    background: transparent;
}

.confirm-table {
    width: 100%;
    border-top: 1px solid var(--line);
}
.confirm-table .row {
    display: flex;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    align-items: flex-start;
}
.confirm-table .row b {
    flex: 0 0 84px;
    font-size: clamp(11px, 1.3vw, 14px);
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--fg);
    opacity: 0.5;
}
.confirm-table .row span {
    flex: 1;
    font-size: clamp(11px, 1.3vw, 14px);
    line-height: 1.85;
    color: var(--fg);
    white-space: pre-wrap;
    word-break: break-word;
}

.note-small {
    margin-top: 18px;
    font-size: clamp(10px, 1.2vw, 12px);
    line-height: 1.9;
    color: var(--muted);
}

/* ---- privacy consent box ---- */
.consent {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
}
.consent-label {
    font-size: clamp(11px, 1.3vw, 14px);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--fg);
    opacity: 0.7;
}
.consent-box {
    width: 100%;
    height: 160px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-deep);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.05);
    padding: 16px;
    font-size: clamp(10px, 1.2vw, 12px);
    line-height: 1.9;
    color: var(--muted);
}
.consent-box p {
    margin-bottom: 10px;
}
.consent-box p:last-child {
    margin-bottom: 0;
}
.consent-box .c-title {
    font-weight: 700;
    text-align: center;
    color: var(--fg);
}
.consent-box .c-heading {
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 3px;
}
.consent-box .c-sign {
    text-align: right;
    color: var(--muted);
    opacity: 0.7;
}
.consent-note {
    font-size: clamp(9px, 1.1vw, 11px);
    text-align: center;
    color: var(--muted);
    margin-top: 4px;
}
/* ---- hero text wrapper & SVG animation ---- */
.hero-text-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 35px 45px;
}

.hero-text-wrap h1 {
    position: relative;
    z-index: 2;
}

.hero-bg-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    max-width: 360px;
    max-height: 150px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

/* --- 軌跡ラインの共通設定 --- */
.svg-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1px;
    transform-origin: center;
}

/* 軌跡1（内側：周長 約430px） */
.svg-line.line-1 {
    /* 線の長さ: 100px, 隙間: 330px（合計430px） */
    stroke: #d84b13;
    stroke-dasharray: 100 330;
    animation: dashFadeLoop1 10s ease-in-out infinite, rotateLoop 28s linear infinite;
}

/* 軌跡2（中間：周長 約510px） */
.svg-line.line-2 {
    stroke: #1f82fa;
    stroke-dasharray: 80 430;
    animation: dashFadeLoop2 14s ease-in-out infinite reverse, rotateLoop 36s linear infinite reverse;
}

/* 軌跡3（外側：周長 約600px） */
.svg-line.line-3 {
    /* 線の長さ: 120px, 隙間: 480px（合計600px） */
    stroke:#13965f;
    stroke-dasharray: 120 480;
    animation: dashFadeLoop3 18s ease-in-out infinite, rotateLoop 44s linear infinite;
}

/* --- アニメーションキーフレーム（移動 + フェードイン・アウトで完全に継ぎ目を消す） --- */

/* 軌跡1用キーフレーム */
@keyframes dashFadeLoop1 {
    0% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
    15% {
        opacity: 0.45;
    }
    85% {
        opacity: 0.45;
    }
    100% {
        stroke-dashoffset: -430; /* 正確に周長1回分を移動 */
        opacity: 0;
    }
}

/* 軌跡2用キーフレーム */
@keyframes dashFadeLoop2 {
    0% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
    15% {
        opacity: 0.35;
    }
    85% {
        opacity: 0.35;
    }
    100% {
        stroke-dashoffset: -510; /* 正確に周長1回分を移動 */
        opacity: 0;
    }
}

/* 軌跡3用キーフレーム */
@keyframes dashFadeLoop3 {
    0% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
    15% {
        opacity: 0.25;
    }
    85% {
        opacity: 0.25;
    }
    100% {
        stroke-dashoffset: -600; /* 正確に周長1回分を移動 */
        opacity: 0;
    }
}

/* 緩やかな角度回転 */
@keyframes rotateLoop {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* スマホ表示時の調整 */
@media (max-width: 640px) {
    .hero-text-wrap {
        padding: 25px 15px;
    }
    .hero-bg-svg {
        max-width: 280px;
        max-height: 130px;
    }
    nav {
        flex-wrap: wrap;
    }
    .menu-toggle {
        display: flex;
    }
    .navlinks {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .navlinks.open {
        max-height: 280px;
        margin-top: 18px;
    }
    .navlinks a {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .facts {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .facts .f {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .facts .f b {
        flex: none;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--line);
        /* 縦線の代わりに下線を引く */
    }

    .pillars {
        flex-direction: column;
        /* 縦1列に並べる */
        align-items: stretch;
        /* 下線を全幅まで伸ばす（中央揃えにしたい場合は align-items: center に変更） */
        max-width: 300px;
        /* スマホ時の全体の最大幅（お好みに合わせて調整） */
        margin-left: auto;
        /* 中央配置 */
        margin-right: auto;
        gap: 16px;
        /* 各要素間の縦の間隔 */
    }

    /* 縦線 | を隠す */
    .divider {
        display: none;
    }

    .pillar {
        padding: 0 0 16px;
        /* 下の余白 */
        border-bottom: 1px solid var(--line);
        /* 縦線の代わりに下線を引く */
    }

    /* 一番最後の要素の下線は消す */
    .pillar:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
    }
    .confirm-wrap,
    .form-wrap {
        max-width: 100%;
    }
    .sp-only {
        display: inline;
        /* <br> タグを有効化 */
    }

    .corner {
        display: none;
    }
}
