/* ============================================
   CueWorker, Inc. コーポレートサイト
   ============================================ */

:root {
    --paper: #F5F1EA;
    --surface: #FFFFFF;
    --ink: #1A1714;
    --ink-soft: #3A342E;
    --muted: #6B645C;
    --line: #E2DACE;
    --accent: #B5472B;
    --accent-ink: #8E3520;

    /* 文化資産タイルの色 */
    --indigo: #24365E;
    --vermilion: #B5472B;
    --ochre: #C08A2A;
    --jade: #3E7C6B;
    --plum: #6E3B5C;
    --clay: #8C5A3C;

    --font-display: "Fraunces", "Noto Serif", Georgia, "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", "PMingLiU", serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "PingFang SC", "PingFang TC",
        "Microsoft YaHei", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans Thai", sans-serif;

    --radius: 14px;
    --max: 1160px;
    --gutter: clamp(16px, 4vw, 40px);

    /* i18n.js の言語切替ボタン用 */
    --border-color: var(--line);
    --bg-primary: var(--surface);
    --bg-tertiary: #EFE9DF;
    --text-primary: var(--ink);
    --text-tertiary: var(--muted);
}

/* 言語ごとのフォント優先順位（漢字の字形を言語に合わせる） */
:lang(ja) { --font-display: "Hiragino Mincho ProN", "Yu Mincho", "Fraunces", serif; --font-body: "Inter", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; }
:lang(zh-CN) { --font-display: "Songti SC", "Noto Serif SC", "Fraunces", serif; --font-body: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:lang(zh-TW) { --font-display: "Songti TC", "PMingLiU", "Noto Serif TC", "Fraunces", serif; --font-body: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
:lang(ko) { --font-display: "AppleMyungjo", "Noto Serif KR", "Fraunces", serif; --font-body: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
:lang(th) { --font-display: "Fraunces", "Noto Serif Thai", "Thonburi", serif; --font-body: "Inter", "Noto Sans Thai", "Thonburi", "Leelawadee UI", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* CJK・タイ語は行間を少し広げる */
:lang(ja) body, :lang(zh-CN) body, :lang(zh-TW) body, :lang(ko) body, :lang(th) body { line-height: 1.8; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link {
    position: absolute; left: 16px; top: 12px; z-index: 100; transform: translateY(-200%);
    background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
    margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
:lang(ja) .eyebrow, :lang(zh-CN) .eyebrow, :lang(zh-TW) .eyebrow, :lang(ko) .eyebrow, :lang(th) .eyebrow { letter-spacing: .04em; text-transform: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; margin: 0; color: var(--ink); }
h1 { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.04; }
h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.12; }
h3 { font-size: 22px; line-height: 1.3; }
/* 見出しの改行を整える（日本語は文節単位、韓国語は単語単位） */
h1, h2 { text-wrap: balance; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
:lang(ko) body { word-break: keep-all; }
:lang(ja) h1, :lang(zh-CN) h1, :lang(zh-TW) h1, :lang(ko) h1 { font-size: clamp(34px, 5.2vw, 64px); line-height: 1.25; letter-spacing: 0; }
:lang(ja) h2, :lang(zh-CN) h2, :lang(zh-TW) h2, :lang(ko) h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.35; letter-spacing: 0; }

.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-soft); max-width: 640px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
    border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn svg { width: 16px; height: 16px; }

/* ---------- ヘッダー ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { text-decoration: none; font-size: 15px; color: var(--ink-soft); white-space: nowrap; }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { padding: 9px 16px; font-size: 14px; white-space: nowrap; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 18px; height: 18px; }

@media (max-width: 1100px) {
    .site-nav {
        display: none; position: absolute; left: 0; right: 0; top: 68px;
        flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; margin: 0;
        background: var(--paper); border-bottom: 1px solid var(--line);
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
    .menu-btn { display: inline-flex; }
    .header-actions { margin-left: auto; }
    .header-actions .btn { display: none; }
}

/* ---------- ヒーロー ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent-ink); }
.hero .lead { margin: 28px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.mosaic {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 10px; aspect-ratio: 1 / 1;
    grid-template-areas: "a a b" "c d e" "f f e";
}
.mosaic .tile { border-radius: var(--radius); overflow: hidden; }
.mosaic .tile:nth-child(1) { grid-area: a; }
.mosaic .tile:nth-child(2) { grid-area: b; }
.mosaic .tile:nth-child(3) { grid-area: c; }
.mosaic .tile:nth-child(4) { grid-area: d; }
.mosaic .tile:nth-child(5) { grid-area: e; }
.mosaic .tile:nth-child(6) { grid-area: f; }
.mosaic svg { width: 100%; height: 100%; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .mosaic { aspect-ratio: 3 / 2; max-width: 560px; }
}

/* ---------- セクション共通 ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark h2, .section-dark h3 { color: var(--paper); }
.section-dark .eyebrow { color: #E7A08C; }
.section-dark .lead, .section-dark p { color: #CFC7BC; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .lead { margin: 0; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- 文化資産 ---------- */
.assets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.asset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.section-alt .asset { background: var(--paper); }
.asset-icon { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex: none; }
.asset h3 { font-size: 20px; }
.asset p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 900px) { .assets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .assets { grid-template-columns: 1fr; } }

/* ---------- 事業 ---------- */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pillar { position: relative; border-radius: calc(var(--radius) + 4px); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.pillar-product { background: var(--indigo); color: #F2EEE6; }
.pillar-platform { background: var(--surface); border: 1px solid var(--line); }
.pillar-product h3, .pillar-product .pillar-num { color: #F2EEE6; }
.pillar-num { font-family: var(--font-display); font-size: 15px; letter-spacing: .06em; color: var(--muted); }
.pillar h3 { font-size: clamp(26px, 2.6vw, 34px); }
.pillar p { margin: 0; }
.pillar-product p { color: #D5D9E6; }
.pillar-platform p { color: var(--ink-soft); }
.pillar ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.pillar li { display: flex; gap: 12px; align-items: baseline; font-size: 15.5px; }
.pillar li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px; transform: translateY(-2px); background: currentColor; opacity: .55; }
.pillar .pillar-cta { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.pillar-product .btn-ghost { border-color: rgba(242, 238, 230, .6); color: #F2EEE6; }
.pillar-product .btn-ghost:hover { background: #F2EEE6; color: var(--indigo); }
.pillar-pattern { position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; opacity: .14; pointer-events: none; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- サービス一覧 ---------- */
.services { display: grid; gap: 20px; }
.service {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 56px); align-items: center;
    background: var(--paper); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(24px, 4vw, 48px);
}
.service-kind { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.service-kind .badge { text-transform: none; letter-spacing: .02em; }
.service-name { font-size: clamp(32px, 4vw, 44px); margin-bottom: 14px; }
.service p { color: var(--ink-soft); margin: 0 0 18px; }
.service ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.service li { display: flex; gap: 12px; align-items: baseline; font-size: 15.5px; color: var(--ink-soft); }
.service li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px; transform: translateY(-2px); background: var(--accent); }
.service-visual { display: flex; justify-content: center; }
.mock-card {
    width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
    box-shadow: 0 18px 40px rgba(26, 23, 20, .08); font-size: 14px;
}
.mock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.mock-label { color: var(--muted); font-size: 12.5px; }
.mock-chip { background: #E3F0EB; color: var(--jade); font-weight: 600; font-size: 12px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.mock-title { font-family: var(--font-display); font-size: 19px; color: var(--ink); margin: 0 0 14px; }
.mock-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: mock; }
.mock-steps li { counter-increment: mock; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-soft); font-size: 13.5px; }
.mock-steps li::before {
    content: counter(mock); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    font-size: 11px; font-weight: 600; background: var(--paper); border: 1px solid var(--line); color: var(--muted); transform: none;
}
.mock-steps li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.mock-steps li.done::before { content: "✓"; background: var(--jade); border-color: var(--jade); color: #fff; }
.mock-steps li.current { background: #F7EEE6; color: var(--ink); font-weight: 500; }
.mock-steps li.current::before { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 900px) { .service { grid-template-columns: 1fr; } }

.service-cta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.service-art { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; }
.service-art svg { width: 100%; height: 100%; }

/* ---------- 生産者ネットワーク ---------- */
.network { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.network-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.network-featured { background: var(--ink); border-color: var(--ink); }
.network-featured h3, .network-featured .network-kind { color: var(--paper); }
.network-featured p { color: #CFC7BC; }
.network-kind { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.network-featured .network-kind { color: #E7A08C; }
.network-item h3 { font-size: 22px; }
.network-item p { margin: 0; color: var(--muted); font-size: 15.5px; }
.network-link { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: #F3D9A2; font-weight: 600; font-size: 15px; text-decoration: none; }
.network-link svg { width: 15px; height: 15px; }
.network-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .network { grid-template-columns: 1fr; } }

/* ---------- 進め方 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(245, 241, 234, .2); counter-reset: step; }
.step { padding: 28px 24px 8px 0; border-right: 1px solid rgba(245, 241, 234, .12); }
.step:last-child { border-right: 0; }
.step + .step { padding-left: 24px; }
.step-num { font-family: var(--font-display); font-size: 44px; line-height: 1; color: #E7A08C; display: block; margin-bottom: 18px; }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { margin: 0; font-size: 15.5px; }
@media (max-width: 900px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step { border-right: 0; border-bottom: 1px solid rgba(245, 241, 234, .12); padding: 24px 16px 24px 0; }
    .step + .step { padding-left: 0; }
    .step:nth-child(even) { padding-left: 16px; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step:nth-child(even) { padding-left: 0; } }

/* ---------- 指針 ---------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.principle { border-top: 2px solid var(--ink); padding-top: 22px; }
.principle h3 { margin-bottom: 10px; }
.principle p { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 会社概要 ---------- */
.company-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); }
.company-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.company-table th, .company-table td { text-align: left; vertical-align: top; padding: 18px 0; border-bottom: 1px solid var(--line); }
.company-table th { width: 34%; font-weight: 600; color: var(--muted); padding-right: 20px; font-size: 14.5px; }
.company-table td a { color: var(--accent-ink); text-underline-offset: 3px; }
.company-table address { font-style: normal; }
@media (max-width: 900px) { .company-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
    .company-table th, .company-table td { display: block; width: 100%; padding: 0; border: 0; }
    .company-table th { padding-top: 16px; }
    .company-table td { padding: 4px 0 16px; border-bottom: 1px solid var(--line); }
}

/* ---------- お問い合わせ ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(24px, 4vw, 40px); }
.contact-card hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.contact-card address { font-style: normal; color: var(--ink-soft); line-height: 1.7; }
.contact-label { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-email { display: inline-block; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); color: var(--ink); text-decoration: none; word-break: break-all; }
.contact-email:hover { color: var(--accent-ink); }
.contact-note { margin: 8px 0 22px; color: var(--muted); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* 「準備中」バッジ */
.badge { display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: #F3E3D6; color: var(--accent-ink); font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .02em; vertical-align: middle; }

/* ---------- フッター ---------- */
.site-footer { background: var(--ink); color: #CFC7BC; padding: 64px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.site-footer .brand { color: var(--paper); }
.site-footer address { font-style: normal; margin-top: 14px; line-height: 1.7; }
.site-footer h4 { margin: 0 0 14px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #8F877C; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; color: #E9E3D9; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(245, 241, 234, .14); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: 14px; color: #8F877C; }
.footer-bottom .cue-lang-btn { background: transparent; color: #E9E3D9; border-color: rgba(245, 241, 234, .3); }
.footer-bottom .cue-lang-btn:hover { background: rgba(245, 241, 234, .08); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 文書ページ（プライバシーポリシー） ---------- */
.doc { padding: clamp(48px, 8vw, 96px) 0; }
.doc .container { max-width: 820px; }
.doc h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 12px; }
.doc .doc-meta { color: var(--muted); font-size: 15px; margin: 0 0 40px; }
.doc .doc-notice { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; font-size: 15px; color: var(--ink-soft); margin-bottom: 40px; }
.doc h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 44px 0 14px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc a { color: var(--accent-ink); text-underline-offset: 3px; }
.doc address { font-style: normal; color: var(--ink-soft); }
