/* Payners corporate site */

:root {
  color-scheme: light;

  --paper: #ffffff;
  --mist: #eef3f7;
  --ink: #13263a;
  --ink-soft: #4a5d70;
  --brand: #2b4d80;
  --brand-deep: #1f3a61;
  --line: #c9d6e2;
  --signal: #e8a33d;
  --signal-soft: #fcebc9;

  --font: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-mono: "BIZ UDGothic", ui-monospace, monospace;

  /* type scale */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-h3: 1.25rem;
  --fs-h2: 1.75rem;
  --fs-h1: 2.25rem;
  --fs-display: clamp(2.25rem, 1.4rem + 3.4vw, 3.5rem);

  --wrap: 1120px;
  --gutter: 24px;
  --section-space: clamp(64px, 8vw, 112px);
  --radius: 10px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 0;
}

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

a { color: var(--brand); text-underline-offset: 0.2em; }
a:hover { color: var(--brand-deep); }

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

h1, h2, h3 {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 0.03em;
}

p { margin: 0; }

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

@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 8px 12px;
  background: var(--brand);
  color: #fff;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

/* buttons */

.button {
  display: inline-block;
  padding: 0.7em 1.6em;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.button:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }

.button--ghost { background: transparent; color: var(--brand); }
.button--ghost:hover { background: var(--mist); color: var(--brand-deep); }

.button--small { padding: 0.45em 1.2em; font-size: var(--fs-small); }

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--mist);
  backdrop-filter: blur(6px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-logo img { width: 128px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { color: var(--brand); }
.site-nav ul a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.nav-toggle {
  display: none;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 700;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 10px 0; }
  .site-nav .button { align-self: flex-start; }
}

/* hero */

.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--brand);
}

.hero__lead {
  margin-top: 28px;
  max-width: 32em;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
}

/* structure figure: 1冊の文書 → DITA トピック → 質問で見つかる */

.structure {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 20px 40px;
  margin: 0;
  padding: 28px;
  background: var(--mist);
  border-radius: 16px;
}

.structure__doc {
  position: relative;
  align-self: start;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 12px;
  aspect-ratio: 1 / 1.35;
  background: var(--paper);
  border: 1.5px solid #9fb3c6;
  border-radius: 4px;
}
.structure__doc span { height: 4px; border-radius: 2px; background: #b3c3d3; }
/* 1冊の文書から構造へ、の矢印 */
.structure__doc::after {
  content: "";
  position: absolute;
  top: 10px;
  right: -28px;
  width: 14px;
  height: 14px;
  border-top: 2.5px solid var(--brand);
  border-right: 2.5px solid var(--brand);
  transform: rotate(45deg);
}
.structure__doc .short { width: 60%; margin-bottom: 6px; }

.structure__tree,
.structure__tree ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.structure__tree { font-size: 0.9375rem; line-height: 1.5; }

.structure__tree ol {
  margin: 10px 0 0 9px;
  padding-left: 18px;
  border-left: 2px solid var(--line);
}

.node { padding: 6px 0; }
.node--map { font-weight: 700; }

.structure__tree ol .node {
  position: relative;
  margin: 4px 0;
  padding: 7px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.structure__tree ol .node::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  width: 18px;
  border-top: 2px solid var(--line);
}

.node code {
  margin-right: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand);
}

.structure__tree ol .node--hit {
  background: var(--signal-soft);
  border-color: var(--signal);
}

.structure__query {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
}
.structure__query::before {
  content: "AI";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  .structure__doc { animation: doc-settle 0.8s ease-out both; }
  .structure__tree .node { animation: node-in 0.45s ease-out both; }
  .structure__tree .node--map { animation-delay: 0.5s; }
  .structure__tree ol .node:nth-child(1) { animation-delay: 0.75s; }
  .structure__tree ol .node:nth-child(2) { animation-delay: 0.9s; }
  .structure__tree ol .node:nth-child(3) { animation-delay: 1.05s; }
  .structure__tree ol .node:nth-child(4) { animation-delay: 1.2s; }
  .structure__query { animation: node-in 0.45s ease-out 1.8s both; }
  .structure__q { display: inline-block; overflow: hidden; white-space: nowrap; animation: type 0.9s steps(11) 2.1s both; }
  .structure__tree .node--hit { animation: node-in 0.45s ease-out 0.9s both, hit 0.5s ease-out 3.2s both; }

  @keyframes doc-settle { from { opacity: 0; transform: translateY(6px); } }
  @keyframes node-in { from { opacity: 0; transform: translateX(-8px); } }
  @keyframes type { from { width: 0; } to { width: 11em; } }
  @keyframes hit {
    from { background: var(--paper); border-color: var(--line); }
    to { background: var(--signal-soft); border-color: var(--signal); }
  }
}

@media (max-width: 420px) {
  .structure { grid-template-columns: 1fr; padding: 20px; }
  .structure__doc { display: none; }
}

/* sections */

.section { padding: var(--section-space) 0; }
.section--tint { background: var(--mist); }

.section__title { font-size: var(--fs-h2); }

.section__lead {
  margin-top: 16px;
  max-width: 40em;
  color: var(--ink-soft);
}

/* こんなことはありませんか: チェックリストとして見せる */

.problems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 48px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.problems li {
  position: relative;
  padding-left: 40px;
  font-size: 1.125rem;
  line-height: 1.75;
}
.problems li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 22px;
  height: 22px;
  border: 2px solid var(--brand);
  border-radius: 4px;
}

@media (max-width: 720px) {
  .problems { grid-template-columns: 1fr; }
}

/* services */

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 64px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.service {
  padding-top: 20px;
  border-top: 3px solid var(--brand);
}

.service h2,
.service h3 { font-size: var(--fs-h3); }
.service h2 a,
.service h3 a { color: var(--ink); text-decoration: none; }
.service h2 a:hover,
.service h3 a:hover { color: var(--brand); text-decoration: underline; }

.service p { margin-top: 12px; color: var(--ink-soft); }

@media (max-width: 720px) {
  .service-list { grid-template-columns: 1fr; gap: 36px; }
}

/* strengths */

.strengths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 48px;
}

.strength h3 { font-size: var(--fs-h3); color: var(--brand); }
.strength p { margin-top: 12px; color: var(--ink-soft); }

@media (max-width: 860px) {
  .strengths { grid-template-columns: 1fr; gap: 32px; }
}

/* process: 実際に順番がある流れなので番号を付ける */

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.process__step {
  position: relative;
  padding-top: 56px;
  counter-increment: step;
}
.process__step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.process__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 52px;
  right: -20px;
  border-top: 2px solid var(--line);
}

.process__step h3 { font-size: var(--fs-h3); }
.process__step p { margin-top: 8px; color: var(--ink-soft); font-size: 0.9375rem; }

@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; gap: 28px; }
  .process__step { padding: 0 0 0 60px; }
  .process__step:not(:last-child)::after {
    top: 48px;
    bottom: -24px;
    left: 19px;
    right: auto;
    border-top: 0;
    border-left: 2px solid var(--line);
  }
}

/* closing */

.closing { background: var(--brand); color: #fff; }
.closing__inner > * { max-width: 40em; }
.closing h2 { font-size: var(--fs-h2); }
.closing p { margin-top: 16px; color: #dce7f1; }
.closing .button { margin-top: 16px; background: #fff; border-color: #fff; color: var(--brand); }
.closing .button:hover { background: var(--mist); border-color: var(--mist); }
.closing :focus-visible { outline-color: #fff; }

/* sub pages */

.page-head {
  padding: clamp(48px, 6vw, 80px) 0 40px;
  background: var(--mist);
}
.page-head h1 { font-size: var(--fs-h1); color: var(--brand); }
.page-head__parent { font-size: var(--fs-small); font-weight: 700; }
.page-head__parent a { text-decoration: none; }
.page-head__lead { margin-top: 16px; max-width: 40em; color: var(--ink-soft); }

.page-head + .wrap { padding-top: 56px; padding-bottom: var(--section-space); }

.prose { max-width: 44em; }
.prose > * + * { margin-top: 1.2em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4em; font-size: var(--fs-h2); }
.prose h3 { margin-top: 2em; font-size: var(--fs-h3); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }

.service-list + .prose { margin-top: 56px; }
.page-head + .wrap > .service-list:first-child { margin-top: 0; }

.facts {
  max-width: 44em;
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
}
.facts__row {
  display: grid;
  grid-template-columns: 10em minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

@media (max-width: 600px) {
  .facts__row { grid-template-columns: 1fr; gap: 4px; }
}

/* footer */

.site-footer {
  padding: 64px 0 32px;
  background: var(--ink);
  color: #c4d0dc;
  font-size: var(--fs-small);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.site-footer__brand img {
  width: 120px;
  filter: brightness(0) invert(1);
}
.site-footer__brand p { margin-top: 16px; line-height: 1.8; }

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; }

.site-footer__legal { margin-top: 48px; }
.site-footer__legal small {
  display: block;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* 開発実績 */

.works {
  display: grid;
  gap: 0;
  max-width: 48em;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.work {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.work h2 { font-size: var(--fs-h2); color: var(--brand); }
.work h2 + p { margin-top: 12px; }

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

.contact-form { max-width: 40em; }

.contact-form .form-field { margin-bottom: 24px; }

.contact-form .form-label label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.contact-form .required {
  margin-left: 0.4em;
  color: #b3261e;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #9fb3c6;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  border-color: var(--brand);
  outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent);
  outline-offset: 0;
}

.contact-form input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0 8px 0 0;
  vertical-align: -4px;
  accent-color: var(--brand);
}

.contact-form .checkboxes label,
.contact-form .form-data label { font-weight: 400; }

.contact-form button[type="submit"] {
  padding: 0.75em 2.4em;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.contact-form button[type="submit"]:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

.contact-form .notices,
.contact-form .alert {
  margin-bottom: 24px;
  padding: 14px 18px;
  border-radius: 6px;
  background: var(--mist);
  border-left: 4px solid var(--brand);
}

.contact-note { margin-top: 24px; max-width: 40em; color: var(--ink-soft); font-size: var(--fs-small); }

.prose:empty { display: none; }
.prose:empty + .facts { margin-top: 0; }
