/* ナオス株式会社（架空）エンジニア採用LP — recruit-02 制作デモ
   base #FFFFFF / text #161C24 / accent #2F62EB / 密度3/5・小さめ角丸・線で仕切る設計 */

:root {
  --bg: #FFFFFF;
  --panel: #F7F9FC;
  --ink: #161C24;
  --muted: #5B6672;
  --accent: #2F62EB;
  --accent-soft: #E7EEFC;
  --line: #E3E9F1;
  --amber: #B45309;
  --amber-bg: #FFFBF0;
  --amber-line: #F2D8A7;
  --radius: 6px;
  --font-head: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.9;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

/* ── ヘッダー ── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px clamp(16px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.head-logo {
  font-family: var(--font-head); font-weight: 900; font-size: 20px;
  letter-spacing: 0.08em; color: var(--ink); text-decoration: none;
  display: flex; align-items: baseline; gap: 10px;
}
.head-logo-sub { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; }
.head-nav { display: flex; gap: 8px; }

/* ── ボタン ── */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  padding: 12px 26px; border-radius: var(--radius); cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  border: 1px solid var(--accent);
}
.btn-fill { background: var(--accent); color: #FFFFFF; }
.btn-fill:hover { background: #2451C7; border-color: #2451C7; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); transform: translateY(-2px); }
.btn-s { font-size: 13px; padding: 8px 16px; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── FV ── */
.hero { border-bottom: 1px solid var(--line); }
.hero-inner {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(40px, 8vh, 88px) clamp(16px, 4vw, 32px) clamp(36px, 6vh, 72px);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.18em; margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(30px, 4.6vw, 50px); line-height: 1.42; letter-spacing: 0.02em;
  text-wrap: balance; margin-bottom: 20px;
}
.hero-lead { color: var(--muted); max-width: 34em; margin-bottom: 26px; }
.hero-cta-row { margin-bottom: 20px; }
.hero-info { font-size: 12.5px; color: var(--muted); }
.nw { display: inline-block; }
.hero-photo img { border-radius: var(--radius); border: 1px solid var(--line); }
.hero-photo figcaption, .stack-photo figcaption, .flow-photo figcaption {
  font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.7;
}

/* ── セクション共通 ── */
.sec { border-bottom: 1px solid var(--line); }
.sec-inner {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(48px, 8vh, 84px) clamp(16px, 4vw, 32px);
  position: relative;
}
.sec-title {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(22px, 3vw, 30px); letter-spacing: 0.03em;
  text-wrap: balance; margin-bottom: 14px;
}
.sec-title::before {
  content: ""; display: block; width: 34px; height: 3px;
  background: var(--accent); margin-bottom: 14px; border-radius: 2px;
}
.sec-lead { color: var(--muted); max-width: 40em; margin-bottom: 30px; }

/* ── 条件サマリ ── */
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sum-card {
  padding: 22px 20px; display: flex; flex-direction: column; gap: 4px;
  border-left: 1px solid var(--line); background: #FFFFFF;
}
.sum-card:first-child { border-left: none; }
.sum-label { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: 0.08em; }
.sum-value { font-family: var(--font-head); font-weight: 900; font-size: 22px; line-height: 1.4; }
.sum-value small { font-size: 13px; font-weight: 700; margin-left: 2px; }
.sum-note { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ── 技術スタック ── */
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag-list li {
  font-family: var(--font-mono); font-size: 13px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink);
}
.tag-list li.tag-legacy { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber); }
.ops-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 34px; }
.ops-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: #FFFFFF; }
.ops-card h3 { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.ops-card p { font-size: 13.5px; color: var(--muted); }
.stack-media { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; align-items: start; }
.stack-photo img { border-radius: var(--radius); border: 1px solid var(--line); }

/* ── ASCIIターミナル（ascii-field 白地×淡ブルー翻案） ── */
.term { border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; overflow: hidden; }
.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: #D6DEE8; }
.term-title { font-family: var(--font-mono); font-size: 12px; color: var(--muted); flex: 1; }
.term-toggle {
  font-family: var(--font-mono); font-size: 11px; cursor: pointer;
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  padding: 3px 10px; border-radius: 999px; transition: background 0.2s ease, color 0.2s ease;
}
.term-toggle:hover { background: var(--accent); color: #FFFFFF; }
.term-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.term-body { position: relative; aspect-ratio: 16 / 10; background: var(--panel); }
#termCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: drop-shadow(0 0 2px rgba(47, 98, 235, 0.55));
}
.term-prompt {
  position: absolute; left: 12px; bottom: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
}
.term-cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-caption { font-size: 12px; color: var(--muted); padding: 10px 14px; line-height: 1.7; border-top: 1px solid var(--line); }

/* ── 窓のタイポ（window-type） ── */
.gwin { width: 100%; user-select: none; pointer-events: none; }
.gwin svg { display: block; }
.gwin-wide { max-width: 760px; height: clamp(90px, 16vw, 170px); margin-bottom: 8px; }
.gwin-cta { max-width: 520px; height: clamp(80px, 14vw, 150px); margin: 0 auto 10px; }

/* ── 大変なところ（琥珀色の枠） ── */
.honne-list { display: grid; gap: 16px; }
.honne-card {
  border: 1px solid var(--amber-line); border-left: 4px solid var(--amber);
  background: var(--amber-bg); border-radius: var(--radius); padding: 22px 26px;
}
.honne-card h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--amber); margin-bottom: 8px; }
.honne-card p { font-size: 14px; color: #6B5232; }

/* ── メンバーデッキ（spin-deck）── 既定は静的グリッド（no-JS / reduced-motion） */
.deck-zone { margin-bottom: 40px; }
.deck-ring {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
}
.mcard { position: relative; min-height: 230px; }
.mcard-face {
  border-radius: 8px; overflow: hidden; border: 1px solid var(--line);
  background: #FFFFFF;
}
.mcard-front { position: relative; height: 100%; min-height: 230px; }
.mcard-back { display: none; }
.mcard-bg {
  position: absolute; top: 0; bottom: 0; left: -15%; width: 130%;
  background: var(--panel);
}
.mcard-bg::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(130% 80% at 50% -12%, rgba(255, 255, 255, 0.7), transparent 55%);
}
.mcard-body {
  position: relative; height: 100%; min-height: 230px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px; text-align: center;
}
.mcard-top, .mcard-bot {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--muted);
}
.mcard-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mcard-label { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.3em; color: var(--accent); }
.mcard-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: 0.04em; }
.mcard-rule { width: 26px; height: 1px; background: var(--accent); opacity: 0.5; }
.mcard-note { font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.deck-readout { display: none; }
.deck-hint { display: none; }

/* リングモード（JSが .is-ring を付与） */
.deck-zone.is-ring .deck-stage {
  position: relative; height: 400px; perspective: 1400px; overflow: hidden;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  outline: none;
}
.deck-zone.is-ring .deck-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }
.deck-zone.is-ring .deck-stage.is-drag { cursor: grabbing; }
.deck-zone.is-ring .deck-scale { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.deck-zone.is-ring .deck-tilt { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.deck-zone.is-ring .deck-ring { display: block; position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.deck-zone.is-ring .mcard {
  position: absolute; left: 0; top: 0; width: 180px; height: 260px; min-height: 0;
  transform-style: preserve-3d;
}
.deck-zone.is-ring .mcard-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.deck-zone.is-ring .mcard-front { min-height: 0; }
.deck-zone.is-ring .mcard-body { min-height: 0; }
.deck-zone.is-ring .mcard-back {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(0deg, rgba(47, 98, 235, 0.06) 0 1px, transparent 1px 12px),
    var(--panel);
}
.mcard-mono { font-family: var(--font-head); font-weight: 900; font-size: 56px; color: var(--accent); }
.mcard-microlabel { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.3em; color: var(--muted); }
.deck-zone.is-ring .deck-readout {
  display: block; text-align: center; margin-top: 10px; min-height: 3.2em;
}
.deck-readout .ro-no { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.2em; }
.deck-readout .ro-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; display: block; }
.deck-readout .ro-note { font-size: 12px; color: var(--muted); }
.deck-zone.is-ring .deck-hint { display: block; text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── 社員の声 ── */
.voice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.voice-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; background: #FFFFFF; }
.voice-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.voice-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.voice-head strong { font-family: var(--font-head); font-size: 16px; display: block; }
.voice-head span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.voice-card p { font-size: 13.5px; color: var(--ink); margin-top: 10px; }
.demo-note { font-size: 11.5px; color: var(--muted); margin-top: 18px; }

/* ── 評価とキャリア ── */
.grade-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grade-row {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 20px 24px; background: #FFFFFF; border-top: 1px solid var(--line);
}
.grade-row:first-child { border-top: none; }
.grade-tag {
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 4px 10px; flex-shrink: 0;
}
.grade-body strong { font-family: var(--font-head); font-size: 16px; display: block; margin-bottom: 2px; }
.grade-body p { font-size: 13.5px; color: var(--muted); }

/* ── 数字 ── */
.num-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.num-card { padding: 26px 18px; text-align: center; border-left: 1px solid var(--line); background: #FFFFFF; }
.num-card:first-child { border-left: none; }
.num-card strong { font-family: var(--font-head); font-weight: 900; font-size: 34px; color: var(--accent); display: block; line-height: 1.2; }
.num-card strong small { font-size: 14px; margin-left: 2px; }
.num-card span { font-size: 12.5px; color: var(--muted); }
.num-note { font-size: 12.5px; color: var(--muted); margin-top: 16px; max-width: 44em; }

/* ── 募集要項・会社概要 ── */
.req-table, .company-table { border-top: 1px solid var(--line); }
.req-table > div, .company-table > div {
  display: grid; grid-template-columns: 160px 1fr; gap: 12px;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
}
.req-table dt, .company-table dt { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--ink); }
.req-table dd, .company-table dd { font-size: 14px; color: var(--ink); }
.req-table ul { padding-left: 1.3em; }
.req-sub { font-size: 12.5px; color: var(--muted); }

/* ── 選考フロー ── */
.flow-list { list-style: none; counter-reset: flow; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.flow-list li {
  counter-increment: flow; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; background: #FFFFFF; position: relative;
}
.flow-list li::before {
  content: counter(flow, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.16em;
  display: block; margin-bottom: 8px;
}
.flow-list strong { font-family: var(--font-head); font-size: 14.5px; display: block; margin-bottom: 6px; line-height: 1.6; }
.flow-list p { font-size: 12.5px; color: var(--muted); }
.flow-photo { max-width: 720px; margin-inline: auto; }
.flow-photo img { border-radius: var(--radius); border: 1px solid var(--line); }

/* ── CTA帯 ── */
.sec-cta { background: var(--panel); border-bottom: 1px solid var(--line); }
.sec-cta .sec-inner { text-align: center; }
.cta-title {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(24px, 3.4vw, 34px); letter-spacing: 0.03em; text-wrap: balance;
  margin-bottom: 12px;
}
.cta-lead { margin-left: auto; margin-right: auto; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }

/* ── フォーム ── */
.entry-form {
  max-width: 620px; margin: 0 auto; text-align: left;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px clamp(18px, 3vw, 30px);
}
.form-demo-note { font-size: 12px; color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 18px; line-height: 1.7; }
.form-kind { border: none; margin-bottom: 16px; }
.form-kind legend { font-family: var(--font-head); font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.form-kind label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; cursor: pointer; }
.form-kind input { accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.entry-form label { font-family: var(--font-head); font-weight: 700; font-size: 13px; display: block; }
.entry-form input[type="text"], .entry-form input[type="email"], .entry-form textarea {
  display: block; width: 100%; margin-top: 6px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.entry-form input:focus-visible, .entry-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.form-wide { margin-bottom: 14px; }
.form-purpose { font-size: 12px; color: var(--muted); margin-bottom: 16px; line-height: 1.8; }
.btn-submit { width: 100%; border: 1px solid var(--accent); font-size: 15px; }
.form-done { margin-top: 12px; font-size: 13px; color: var(--accent); font-weight: 700; }

/* ── フッター ── */
.footer { background: var(--panel); }
.footer .sec-inner { padding-top: 48px; padding-bottom: 40px; }
.footer-title { font-family: var(--font-head); font-weight: 900; font-size: 20px; margin-bottom: 16px; }
.company-table { margin-bottom: 22px; }
.privacy { border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; margin-bottom: 22px; }
.privacy summary { font-family: var(--font-head); font-weight: 700; font-size: 14px; padding: 12px 16px; cursor: pointer; color: var(--accent); }
.privacy-body { padding: 0 20px 16px; font-size: 13px; color: var(--muted); }
.privacy-body ul { padding-left: 1.4em; margin-top: 6px; }
.footer-demo { font-size: 12px; color: var(--muted); line-height: 1.9; margin-bottom: 10px; }
.footer-credit { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ── レスポンシブ ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .sum-grid { grid-template-columns: 1fr 1fr; }
  .sum-card:nth-child(odd) { border-left: none; }
  .sum-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ops-grid { grid-template-columns: 1fr; }
  .stack-media { grid-template-columns: 1fr; }
  .voice-grid { grid-template-columns: 1fr; }
  .num-grid { grid-template-columns: 1fr 1fr; }
  .num-card:nth-child(odd) { border-left: none; }
  .num-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .flow-list { grid-template-columns: 1fr 1fr; }
  .req-table > div, .company-table > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .hero-inner { padding-top: 28px; padding-bottom: 32px; gap: 20px; }
  .hero-title { font-size: clamp(26px, 8vw, 32px); margin-bottom: 14px; }
  .hero-lead { margin-bottom: 18px; }
  .hero-photo figcaption { display: none; }
  .head-logo-sub { display: none; }
  .flow-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .deck-zone.is-ring .deck-stage { height: 300px; }
}

/* ── reduced-motion: 全モーション無効（教訓準拠・静止レイアウトで成立） ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .term-cursor { animation: none !important; }
}
