@charset "utf-8";

/* ---------------------------------------------------------------
   Editmate corporate site
   色と間の取り方は logo/README.md の規則に合わせている。
   青緑（Lift）は「点」の色なので、面では使わず差し色だけに留める。
   --------------------------------------------------------------- */

:root {
  color-scheme: light;

  --ink: #0C2227;
  --ink-soft: #1B383D;
  --text: #15292D;
  --muted: #556E71;
  --line: #DEEAE8;
  --bg: #FFFFFF;
  --bg-soft: #F4F8F7;

  --lift: #23C0AE;          /* ロゴの点。面や大きな文字に使う */
  --lift-text: #07746C;     /* 白地の小さい文字・リンク用 */
  --lift-dark: #35DBC6;     /* 濃色地の上 */

  --font-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-en: "Outfit", var(--font-jp);

  --gut: max(20px, env(safe-area-inset-left, 0px));
  --wrap: 1060px;
  --radius: 16px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--lift-text); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--lift); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
  text-decoration: none;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

/* ---------- 見出し ---------- */

.eyebrow {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lift-text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 社名は常に「株式会社Editmate」。.eyebrow の uppercase を打ち消す。
   字間も詰める。.16em は大文字を並べるための値で、小文字混じりだと開きすぎる */
.eyebrow.name {
  text-transform: none;
  letter-spacing: .08em;
}
.eyebrow::before {
  content: "";
  /* 文字が13pxなので、線もそれに合わせて20px。短いと見出しから浮く */
  width: 20px; height: 2px; border-radius: 1px;
  background: var(--lift);
  flex: none;
}

h1, h2, h3 {
  font-weight: 700; letter-spacing: .01em; line-height: 1.5; margin: 0;
  /* 日本語を文節で折り返す（未対応ブラウザでは normal にフォールバック） */
  word-break: auto-phrase;
  line-break: strict;
}
h2 { font-size: clamp(25px, 4.2vw, 35px); }
h3 { font-size: 19px; }

.lead { color: var(--muted); font-size: 15.5px; line-height: 2.1; max-width: 62ch; margin: 18px 0 0; }

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 68px;
}
.brand { display: block; flex: none; line-height: 0; }
.brand img { width: 158px; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-size: 13.5px; font-weight: 500; color: var(--text); text-decoration: none;
  padding: 9px 13px; border-radius: 9px; white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--lift-text); }
/* .site-nav a のほうが詳細度が高いので、ボタンは明示的に上書きする */
.site-nav a.btn { margin-left: 8px; color: #fff; }
.site-nav a.btn:hover { color: #fff; background: #163238; }

.nav-toggle { display: none; }

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-jp); font-size: 14.5px; font-weight: 500;
  padding: 13px 24px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; border: 1px solid var(--ink);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #163238; transform: translateY(-1px); }
.btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lift-dark); flex: none; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: #C6DAD7; }
.btn-ghost .dot { background: var(--lift); }

/* ---------- セクション ---------- */

section { padding-block: clamp(64px, 9vw, 108px); }
.section-head { max-width: 62ch; }
/* 事業は、見出しもリードも本文の measure（62ch＝500px）に収まらない。
   見出し「FDE（Forward Deployed Engineer）」は1行で571px、
   リードはいちばん長い文が981px要る。枠を外して、リード側で1000pxに止める。
   画面がこれより狭いときは素直に折り返す */
#business .section-head { max-width: none; }
#business .lead { max-width: 1000px; }

/* 理念のリードも1行で置く。759px要るので 780px */
#philosophy .section-head { max-width: none; }
#philosophy .lead { max-width: 780px; }

/* お問い合わせの見出しは1行で530px要る。62ch（500px）だと2行になる */
#contact .section-head { max-width: 560px; }
/* 狭い画面で折り返すときに、語の途中で割れないようにする。
   word-break: auto-phrase が効かない環境では「お声が／けください」と割れた */
.nb { display: inline-block; }

.band { background: var(--bg-soft); border-block: 1px solid var(--line); }

.dark { background: var(--ink); color: #E6F2F0; }
.dark h2, .dark h3 { color: #fff; }
.dark .lead { color: #fff; }
.dark .eyebrow { color: var(--lift-dark); }
.dark .eyebrow::before { background: var(--lift-dark); }
.dark a { color: var(--lift-dark); }

/* ---------- ヒーロー ---------- */

.hero { padding-block: clamp(72px, 12vw, 136px); position: relative; overflow: hidden; }
.hero .wrap { position: relative; }
.hero h1 {
  font-size: clamp(34px, 7.4vw, 62px);
  line-height: 1.34;
  letter-spacing: .005em;
}
/* ヒーローのリードは2文を1行ずつ置く。1文目が 840px 必要なので 860px まで許す。
   62ch（本文の measure）のままだと、<br> の前でさらに折り返して4行になる。
   画面がこれより狭いときは素直に折り返す */
.hero .lead { font-size: 16.5px; margin-top: 26px; max-width: 860px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

.hero-mark {
  position: absolute; right: -40px; top: -30px;
  width: min(330px, 42vw); opacity: .07; pointer-events: none;
}


/* ---------- 事業カード ---------- */

.cards { display: grid; gap: 20px; margin-top: 44px; }
@media (min-width: 820px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 36px);
  display: flex; flex-direction: column; gap: 14px;
}
.card-no {
  font-family: var(--font-en); font-weight: 600; font-size: 12px; letter-spacing: .14em;
  color: var(--muted);
}
/* subgrid が使える環境では、番号・見出し・本文・箇条書きの4行そのものを
   2枚のあいだで揃える。本文の行数が違っても、箇条書きの「頭」が同じ高さに並ぶ */
@media (min-width: 820px) {
  @supports (grid-template-rows: subgrid) {
    .cards { grid-template-rows: auto auto 1fr auto; row-gap: 14px; column-gap: 20px; }
    .card { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 14px; }
  }
}
.card p { margin: 0; font-size: 14.5px; line-height: 2.05; color: var(--muted); }
/* margin-top を auto にして下端に寄せる。2枚のカードは同じ高さなので、
   本文が何行でも箇条書きの下が揃う（subgrid が効く環境では頭も揃う） */
.card ul { margin: auto 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.card li {
  position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.9; color: var(--text);
}
.card li::before {
  content: ""; position: absolute; left: 2px; top: .78em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--lift);
}
.status {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); display: flex; align-items: flex-start; gap: 9px;
  line-height: 1.9;
}
.status b { font-weight: 500; color: var(--text); white-space: nowrap; }
.status .pip {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lift);
  flex: none; margin-top: .62em;
}
.status .pip.wip { background: #D9A441; }

/* ---------- 理念 ---------- */

.credo { display: grid; gap: 0; margin-top: 46px; border-top: 1px solid #28474C; }
.credo-row {
  display: grid; gap: 6px 28px; padding-block: 22px; border-bottom: 1px solid #28474C;
  align-items: baseline;
}
@media (min-width: 760px) { .credo-row { grid-template-columns: 220px 1fr; } }
/* 最後の行（どう生きるか）は、下に五箇条が続くので線を引かない */
.credo-row:last-child { border-bottom: none; }
.credo-k { display: flex; align-items: baseline; gap: 12px; }
.credo-k em {
  font-family: var(--font-en); font-style: normal; font-weight: 600; font-size: 14px;
  letter-spacing: .06em; color: var(--lift-dark);
}
.credo-k span { font-size: 12.5px; color: #8FADAA; }
.credo-v {
  font-size: clamp(17px, 2.6vw, 21px); font-weight: 500; color: #fff; line-height: 1.7;
  word-break: auto-phrase;
}

/* 五箇条。「一生懸命愛される」のすぐ下に続けるので、上に線を引かない。
   項目のあいだだけ線で区切る */
.gokajo { margin: 18px 0 0; }
.gokajo div { display: grid; gap: 2px 24px; padding-block: 13px; }
.gokajo div + div { border-top: 1px solid #28474C; }
@media (min-width: 620px) { .gokajo div { grid-template-columns: 200px 1fr; } }
.gokajo dt {
  margin: 0; font-size: 13px; color: #8FADAA; letter-spacing: .04em; line-height: 1.9;
}
.gokajo dd {
  margin: 0; font-size: clamp(15px, 2.2vw, 17px); font-weight: 500; color: #E6F2F0;
  line-height: 1.9;
}

/* ---------- 会社概要 ---------- */

.facts { margin-top: 40px; border-top: 1px solid var(--line); }
.facts dl { margin: 0; }
.facts div {
  display: grid; gap: 2px 28px; padding-block: 18px; border-bottom: 1px solid var(--line);
}
@media (min-width: 680px) { .facts div { grid-template-columns: 180px 1fr; } }
.facts dt { font-size: 13.5px; font-weight: 500; color: var(--muted); margin: 0; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.95; }

.tbd {
  display: inline-block;
  font-size: 12.5px; color: #9A7B2E; background: #FDF6E3;
  border: 1px dashed #E0C470; border-radius: 6px;
  padding: 1px 10px; letter-spacing: .04em;
}

/* ---------- お問い合わせ ---------- */

.contact-box {
  margin-top: 40px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
}
.contact-box > p { margin: 0 0 22px; font-size: 14.5px; line-height: 2.05; color: var(--muted); }
.contact-box .note { margin: 22px 0 0; font-size: 13px; }

/* ---------- 問い合わせフォーム ---------- */

.form { display: grid; gap: 18px; margin-top: 26px; }
@media (min-width: 680px) {
  /* 1行目 お名前｜会社名　2行目 メール｜ご用件　3行目以降は全幅
     .hp は1番目の子なので、数えるときの基準がひとつずれる */
  .form { grid-template-columns: 1fr 1fr; }
  .form .field:nth-child(6),            /* お問い合わせ内容 */
  .form .check, .form .form-msg, .form button { grid-column: 1 / -1; }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { display: grid; gap: 7px; min-width: 0; }
.field > label { font-size: 13.5px; font-weight: 500; color: var(--text); }
.req {
  font-family: var(--font-en); font-size: 10px; font-weight: 600; letter-spacing: .08em;
  color: #fff; background: var(--lift-text); border-radius: 4px; padding: 2px 6px;
  margin-left: 4px; vertical-align: 1px;
}

.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  font-family: var(--font-jp); font-size: 15px; line-height: 1.8; color: var(--text);
  background: #fff; border: 1px solid #CDDEDC; border-radius: 10px;
  padding: 12px 14px; width: 100%; min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23556E71' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.field :is(input, select, textarea):focus {
  outline: none; border-color: var(--lift); box-shadow: 0 0 0 3px rgba(35, 192, 174, .18);
}
/* 入力済みで不正なときだけ赤くする（空欄のまま赤くしない） */
.field :is(input, textarea):user-invalid { border-color: #C8352B; }

.check > label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; font-weight: 400; color: var(--muted); line-height: 1.8; cursor: pointer;
}
.check input[type="checkbox"] {
  width: 18px; height: 18px; margin: .28em 0 0; flex: none; accent-color: var(--lift-text); cursor: pointer;
}

.form-msg { margin: 0; font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.form-msg:empty { display: none; }
.form-msg.is-ok {
  color: #06635C; background: #E7F7F5; border: 1px solid #A8E3DB;
  border-radius: 10px; padding: 12px 15px;
}
.form-msg.is-err {
  color: #9A2A21; background: #FDEEEC; border: 1px solid #F0BDB7;
  border-radius: 10px; padding: 12px 15px;
}

.form button[type="submit"] { justify-self: start; }
.form button[disabled] { opacity: .55; cursor: progress; transform: none; }

/* ---------- ブランド ---------- */

.brand-box { margin-top: 40px; display: grid; gap: 34px; align-items: center; }
@media (min-width: 860px) { .brand-box { grid-template-columns: 300px 1fr; gap: 56px; } }
.brand-stack { width: 258px; max-width: 100%; height: auto; }
.brand-text p { margin: 0 0 18px; font-size: 15px; line-height: 2.1; color: var(--muted); }
.brand-text p:last-child { margin-bottom: 0; }
.brand-text b { color: var(--text); font-weight: 700; }

/* ---------- フッター ---------- */

.site-footer { background: var(--ink); color: #9FBBB8; padding-block: 52px 36px; }
.site-footer .wrap { display: grid; gap: 30px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer img.fl { width: 170px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { font-size: 13.5px; color: #C6DCD9; text-decoration: none; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }
.copy {
  grid-column: 1 / -1; border-top: 1px solid #28474C; padding-top: 22px; margin-top: 8px;
  font-family: var(--font-en); font-size: 12px; letter-spacing: .06em; color: #7E9B98;
}

/* ---------- 下層ページ ---------- */

.page-head { padding-block: clamp(48px, 7vw, 84px) 0; }
.prose { padding-block: clamp(32px, 5vw, 56px) clamp(64px, 9vw, 104px); }
.prose h2 { font-size: 20px; margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 14.5px; line-height: 2.1; color: var(--muted); }
.prose ul { padding-left: 1.3em; }
.prose .wrap { max-width: 780px; }

/* ---------- 狭い画面 ---------- */

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
    font-family: var(--font-jp); font-size: 13px; font-weight: 500;
    background: transparent; border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 16px; color: var(--text); cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px var(--gut) 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin: 14px 0 0; justify-content: center; border-bottom: 0; }
  .hero-mark { opacity: .05; right: -70px; }
}
