/* ============================================================
   合同会社Rework サイト共通スタイル
   ミニマル・コーポレート。全ページ（トップ / rebuild / rebrand /
   products / partners / partners/portal）がこれを読み込む。
   ページ固有のレイアウトは各HTMLの <style> に置く。

   ページ側で上書きする前提のもの:
     --hero-min-h  ヒーローの高さ（トップは高め、下層は控えめ）
     --sec-pad     セクションの上下余白
   ============================================================ */

:root {
    --ink: #101014;
    --body: #3f3f46;
    --muted: #6f6f78;
    --line: #e8e8ec;
    --bg: #ffffff;
    --alt: #f6f6f8;
    --accent: #ea580c;
    --accent2: #059669;
    /* 白背景で文字に使う濃いめの版（#ea580c / #059669 は小さい文字だとAA未達） */
    --accent-t: #c2410c;
    --accent2-t: #047857;
    --danger: #e11d48;
    --en: "Space Grotesk", "Noto Sans JP", sans-serif;
    --jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    /* ページ側で上書きする既定値 */
    --hero-min-h: 86vh;
    --sec-pad: 120px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--jp); color: var(--ink); background: var(--bg); line-height: 1.9; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
section { scroll-margin-top: 72px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- reveal（スクロールで現れる） ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .1s; }
.rv-d2 { transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
    .rv { opacity: 1; transform: none; transition: none; }
    .sec::before { transform: scaleX(1); transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------- header ---------- */
header.site { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s; }
header.site.scrolled { border-bottom-color: var(--line); }
.site-in { max-width: 1120px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; gap: 28px; }
.wordmark { font-family: var(--en); font-weight: 700; font-size: 19px; letter-spacing: .06em; text-decoration: none; }
.wordmark i { font-style: normal; color: var(--accent-t); }
/* ブランド名は大文字ラベルではなく固有名詞なので、字間は詰めめに */
.wordmark small { font-family: var(--en); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: var(--accent2-t); margin-left: 10px; }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nlink { text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--body); transition: color .15s; }
.nlink:hover { color: var(--accent-t); }
.nav-cta { text-decoration: none; font-size: 13px; font-weight: 700; padding: 9px 20px; border: 1.5px solid var(--ink); border-radius: 999px; transition: background .18s, color .18s, border-color .18s; }
.nav-cta:hover { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */
/* padding-top はヘッダーの高さ分。これが無いと、画面が縦に短い端末で
   中央寄せの内容が上にはみ出し、見出しが固定ヘッダーの下に潜る */
.hero { min-height: var(--hero-min-h); padding-top: 82px; padding-bottom: 24px; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero-dots { position: absolute; right: -40px; bottom: -40px; width: 380px; height: 380px; background-image: radial-gradient(var(--line) 1.5px, transparent 1.5px); background-size: 18px 18px; pointer-events: none; -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent); }
.micro { font-family: var(--en); font-size: 12px; font-weight: 700; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.micro::before { content: ""; width: 40px; height: 1px; background: var(--accent2); }
.hero h1 { font-family: var(--en); font-weight: 700; font-size: clamp(36px, 5.8vw, 76px); line-height: 1.08; letter-spacing: -.02em; margin: 30px 0 0; }
.hero h1 .cursor { display: inline-block; width: .55em; height: .92em; background: var(--accent); vertical-align: -.08em; margin-left: .08em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.typing::after { content: ""; display: inline-block; width: .5em; height: .88em; background: var(--accent); margin-left: .07em; vertical-align: -.05em; animation: blink 1.1s steps(1) infinite; }
.hero .jp { font-size: clamp(15px, 1.8vw, 19px); font-weight: 700; color: var(--body); margin: 34px 0 0; letter-spacing: .06em; }
.hero .desc { font-size: 14.5px; color: var(--muted); margin: 12px 0 0; letter-spacing: .04em; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }

/* ---------- buttons ---------- */
.btn-primary { text-decoration: none; font-size: 14.5px; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--ink); border: 1.5px solid var(--ink); padding: 15px 34px; transition: background .18s, border-color .18s; }
.btn-primary:hover { background: var(--accent-t); border-color: var(--accent-t); }
.btn-ghost { text-decoration: none; font-size: 14.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink); border: 1.5px solid var(--line); padding: 15px 30px; transition: border-color .18s, color .18s; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-t); }

/* ---------- section base ---------- */
.sec { padding: var(--sec-pad) 0; position: relative; }
.sec::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.22,.61,.36,1); }
.sec.in::before { transform: scaleX(1); }
.sec.alt { background: var(--alt); }
.sec-label { font-family: var(--en); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); display: flex; align-items: baseline; gap: 14px; margin-bottom: 46px; }
.sec-label b { font-size: 13px; color: var(--accent-t); }
.sec h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; line-height: 1.5; letter-spacing: .01em; margin: 0; }
.sec .lead2 { font-size: 15.5px; color: var(--body); margin: 20px 0 0; max-width: 680px; }

/* ---------- contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; margin-top: 8px; }
.contact-note { font-size: 14.5px; color: var(--body); margin: 18px 0 0; }
.contact-note a { color: var(--accent-t); font-weight: 700; text-decoration: none; }
.f-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.f-field label { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.req { color: var(--danger); margin-left: 3px; }
.f-field input, .f-field textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 0; background: var(--bg); font-family: inherit; font-size: 15px; color: var(--ink); transition: border-color .15s; -webkit-appearance: none; appearance: none; }
.f-field textarea { min-height: 140px; resize: vertical; }
.f-field input:focus, .f-field textarea:focus { outline: none; border-color: var(--ink); }
.f-field.invalid input, .f-field.invalid textarea { border-color: var(--danger); }
.f-submit { width: auto; font-family: inherit; font-size: 14.5px; font-weight: 700; letter-spacing: .08em; color: #fff; background: var(--ink); border: 1.5px solid var(--ink); padding: 16px 46px; cursor: pointer; transition: background .18s, color .18s; }
.f-submit:hover:not(:disabled) { background: var(--accent-t); border-color: var(--accent-t); }
.f-error-msg { display: none; color: var(--danger); font-weight: 700; font-size: 13px; margin: 14px 0 0; }
.form-done { border: 1px solid var(--line); padding: 44px 30px; text-align: center; }
.form-done .done-check { width: 46px; height: 46px; border-radius: 50%; background: #ecfdf5; color: var(--accent2-t); font-size: 22px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.form-done .big { font-size: 19px; font-weight: 900; }
.form-done p { font-size: 14px; color: var(--body); margin: 12px 0 0; }
.form-done a { color: var(--accent-t); font-weight: 700; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 44px 0 40px; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent-t); }
.copyright { font-family: var(--en); font-size: 12px; color: var(--muted); letter-spacing: .06em; }

/* ---------- responsive（共通部分） ---------- */
@media (max-width: 860px) {
    nav.main .nlink { display: none; }
    .contact-grid { grid-template-columns: 1fr; gap: 34px; }
    .hero-dots { width: 240px; height: 240px; }
    .wordmark small { display: none; }
}
