/* Foundation */
:root {
  --color-key: #17325c;
  --color-key-dark: #0f2342;
  --color-accent: #c23a1e;
  --grid-line: rgba(23, 50, 92, .07);
  --color-key-tint: #eef2f8;
  --color-text: #1c2430;
  --color-text-sub: #4a5565;
  --color-line: #d4dae3;
  --color-border: #7a8696;
  --color-bg: #ffffff;
  --color-link: #1a56b8;
  --color-link-visited: #6a3a9c;
  --color-focus: #1a56b8;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --font-base: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --radius: 6px;
  --content-max: 1120px;
  --measure: 640px;
  --header-h: 80px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body { margin: 0; padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); color: var(--color-text); background: var(--color-bg); font-family: var(--font-base); font-size: 16px; font-weight: 400; line-height: 1.8; letter-spacing: .02em; overflow-wrap: anywhere; word-break: normal; line-break: strict; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.4; font-feature-settings: "palt"; text-wrap: balance; word-break: auto-phrase; }
h1 { font-size: 28px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p + p { margin-top: 16px; }
ul, ol { padding-left: 1.5em; }
a { color: var(--color-link); text-decoration: underline; text-underline-offset: .25em; }
a:visited { color: var(--color-link-visited); }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
:focus { outline: 3px solid var(--color-focus); outline-offset: 3px; }
[id] { scroll-margin-top: 104px; }
[hidden] { display: none !important; }
small { font-size: 14px; }

/* Layout */
.l-container { width: min(calc(100% - 40px), var(--content-max)); margin-inline: auto; }
.l-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--color-line); background: var(--color-bg); }
.l-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; width: min(calc(100% - 40px), var(--content-max)); min-height: var(--header-h); margin-inline: auto; }
.l-header.is-scrolled { --header-h: 64px; }
.l-section { padding-block: 64px; }
.l-section--tint { background-color: var(--color-key-tint); }
.l-section--dark { --grid-line: rgba(255,255,255,.06); --color-focus: white; color: white; background-color: var(--color-key); }
.l-footer { padding-block: 48px 24px; border-top: 1px solid var(--color-line); }

/* Component */
.c-skip { position: fixed; top: 8px; left: 20px; z-index: 100; padding: 12px 20px; transform: translateY(-160%); background: white; font-weight: 700; }
.c-skip:focus { transform: translateY(0); }
.c-button, .c-button:visited { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 56px; padding: 12px 24px; border: 1px solid var(--color-key); border-radius: var(--radius); color: white; background: var(--color-key); font-weight: 700; text-align: center; text-decoration: none; line-height: 1.5; }
.c-button:hover, .c-button:active { color: white; background: var(--color-key-dark); border-color: var(--color-key-dark); }
.c-button--white, .c-button--white:visited { color: var(--color-key); background: white; border-color: white; }
.c-button--white:hover, .c-button--white:active { color: var(--color-key-dark); background: var(--color-key-tint); border-color: var(--color-key-tint); }
.c-text-link { display: inline-flex; align-items: center; min-height: 48px; }
.c-caption { font-size: 14px; }
.c-eyebrow { display: flex; align-items: center; gap: 12px; color: var(--color-key); font-size: 14px; font-weight: 700; }
.c-eyebrow--center { justify-content: center; }
.c-eyebrow--inverse { color: white; }
.c-eyebrow__number { color: var(--color-accent); letter-spacing: .06em; }
.c-eyebrow__label { padding-left: 12px; border-left: 1px solid currentColor; }
.c-eyebrow--inverse::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.c-number { color: var(--color-accent); font-size: 40px; line-height: 1.3; font-weight: 700; }

.c-mark__l { fill: var(--color-key); }
.c-mark__dot { fill: var(--color-accent); }

/* Project: shared navigation */
html:not(.js) .l-header { position: static; }
.p-brand, .p-brand:visited { display: inline-flex; gap: 10px; justify-content: center; align-items: center; min-height: 56px; color: var(--color-key); text-decoration: none; line-height: 1.4; }
.p-brand__symbol { flex: 0 0 32px; width: 32px; height: 32px; }
.p-brand__text { display: flex; flex-direction: column; }
.p-brand__mark { font-size: 28px; font-weight: 700; letter-spacing: .1em; }
.p-brand__name { font-size: 16px; }
.p-menu { display: none; flex-shrink: 0; white-space: nowrap; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); color: var(--color-key); background: white; font-weight: 700; }
html.js .p-menu { display: inline-flex; }
.p-menu__icon { flex: 0 0 18px; width: 18px; height: 12px; border-block: 2px solid currentColor; position: relative; }
.p-menu__icon::before { content: ""; position: absolute; inset: 3px 0 auto; border-top: 2px solid currentColor; }
.p-menu.is-open .p-menu__icon { height: 18px; border: 0; }
.p-menu.is-open .p-menu__icon::before, .p-menu.is-open .p-menu__icon::after { content: ""; position: absolute; inset: 8px 0 auto; border-top: 2px solid currentColor; transform: rotate(45deg); }
.p-menu.is-open .p-menu__icon::after { transform: rotate(-45deg); }
.p-nav { width: 100%; padding-bottom: 16px; }
html.js .p-nav { display: none; }
html.js .p-nav.is-open { display: block; max-height: calc(100dvh - var(--header-h) - 72px); overflow-y: auto; }
.p-nav__list { display: grid; gap: 4px; padding: 0; list-style: none; }
.p-nav__link, .p-nav__link:visited { white-space: nowrap; display: flex; align-items: center; min-height: 48px; padding: 8px 12px; color: var(--color-key); font-weight: 700; line-height: 1.4; text-decoration: none; }
.p-nav__link:hover, .p-nav__link[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.p-nav__link--cta, .p-nav__link--cta:visited { justify-content: center; border-radius: var(--radius); background: var(--color-key); color: white; }
.p-nav__link--cta:hover { background: var(--color-key-dark); }
.p-nav__link--cta:focus { outline-color: var(--color-focus); }

/* Project: home */
.p-hero { padding-block: 40px 0; background-color: var(--color-key-tint); }
.p-hero, .l-section--tint, .l-section--dark, .p-cta-band, .p-contact { background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 24px 24px; }
.p-hero__grid { display: grid; gap: 40px; }
.p-hero__label { position: relative; padding-left: 36px; color: var(--color-key); }
.p-hero__label::before { content: ""; position: absolute; left: 0; top: .55em; width: 24px; height: 10px; border-inline: 1px solid var(--color-accent); background: linear-gradient(var(--color-accent), var(--color-accent)) center / 100% 1px no-repeat; }
.p-hero__name { margin-top: 16px; color: var(--color-key); font-size: 22px; }
.p-hero__catch { margin-top: 16px; color: var(--color-key); font-size: clamp(32px, 10vw, 36px); font-weight: 700; line-height: 1.3; letter-spacing: 0; text-wrap: balance; word-break: auto-phrase; }
.p-hero__lead { max-width: var(--measure); margin-top: 24px; }
.p-hero__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; margin-top: 24px; }
.p-hero__secondary { display: inline-flex; align-items: center; min-height: 56px; }
.p-blueprint { width: 100%; max-width: 520px; min-width: 0; margin: 0; justify-self: center; }
.p-blueprint__drawing { display: block; width: 100%; height: auto; }
.p-blueprint__caption { color: var(--color-key); font-size: 14px; text-align: center; }
.p-form-note { margin-top: 8px; }
.p-hero__services { display: grid; margin-top: 40px; padding: 0; border-top: 1px solid var(--color-border); list-style: none; }
.p-hero__service, .p-hero__service:visited { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); color: var(--color-key); font-weight: 700; text-decoration: none; }
.p-hero__service:hover { background: white; text-decoration: underline; }
.p-section__heading { margin-bottom: 32px; }
.p-section__heading > h2 { margin-top: 16px; }
.p-section__eyebrow { position: relative; padding-bottom: 16px; }
.p-section__eyebrow::after { content: ""; position: absolute; inset: auto 0 0; height: 9px; border-inline: 1px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; opacity: .4; }
.p-section__lead { max-width: var(--measure); margin-top: 24px; }
.p-service__grid, .p-reason__grid { display: grid; gap: 32px; margin-top: 40px; }
.p-service__card, .p-reason__item { position: relative; min-width: 0; padding: 20px; border: 1px solid rgba(23,50,92,.25); border-radius: 0; background: transparent; }
.p-service__card::before, .p-service__card::after, .p-reason__item::before, .p-reason__item::after { content: ""; position: absolute; pointer-events: none; left: -1px; right: -1px; height: 12px; border-inline: 1px solid var(--color-key); background: linear-gradient(var(--color-key),var(--color-key)) left / 12px 1px no-repeat, linear-gradient(var(--color-key),var(--color-key)) right / 12px 1px no-repeat; }
.p-service__card::before, .p-reason__item::before { top: -1px; background-position: left top, right top; }
.p-service__card::after, .p-reason__item::after { bottom: -1px; background-position: left bottom, right bottom; }
.p-service__number, .p-reason__number { margin-bottom: 16px; }
.p-service__label { margin-bottom: 8px; color: var(--color-key); font-weight: 700; }
.p-service__card > h3 { margin-bottom: 24px; }
.p-service__list-title { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--color-line); font-weight: 700; }
.p-service__list { display: grid; gap: 8px; margin-top: 16px; }
.p-reason__item > h3 { margin-bottom: 24px; }
.p-cta-band { padding-block: 40px; color: white; background-color: var(--color-key); text-align: center; --color-focus: white; --grid-line: rgba(255,255,255,.06); }
.p-cta-band__lead { text-wrap: balance; word-break: auto-phrase; margin-bottom: 24px; font-size: 20px; font-weight: 700; }
.p-person__grid { display: grid; gap: 40px; }
.p-person__experience { position: relative; align-self: start; padding-left: 32px; color: var(--color-key); }
.p-person__experience::before { content: ""; position: absolute; left: 0; top: 4px; height: 96px; width: 9px; border-block: 1px solid currentColor; background: linear-gradient(currentColor,currentColor) center / 1px 100% no-repeat; opacity: .4; }
.p-person__value { display: flex; flex-direction: column; }
.p-person__unit { margin-top: 8px; }
.p-person__experience > p + p { margin-top: 8px; }
.p-person__years { font-size: 80px; line-height: 1.2; font-weight: 700; }
.p-person__bio > h3 { margin-top: 8px; margin-bottom: 24px; }
.p-person__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.p-person__tag { padding: 4px 16px; border-radius: var(--radius); background: var(--color-key-tint); color: var(--color-key); }
.p-policy__eyebrow { color: white; }
.p-policy__number { padding-inline: 6px; color: var(--color-accent); background: white; }
.p-policy__link, .p-policy__link:visited { color: white; }
.p-policy__body { max-width: var(--measure); }
.p-policy__note { margin-top: 40px; padding: 24px; border: 1px solid white; background: transparent; }
.p-policy__note > h3 { margin-bottom: 16px; }
.p-flow__list { display: grid; gap: 32px; position: relative; margin-top: 40px; padding: 0 0 0 56px; list-style: none; counter-reset: flow; }
.p-flow__list::before { position: absolute; content: ""; top: 16px; bottom: 0; left: 15px; width: 9px; border-block: 1px solid var(--color-key); background: linear-gradient(var(--color-key),var(--color-key)) center / 1px 100% no-repeat; }
.p-flow__step { position: relative; min-width: 0; }
.p-flow__step::before { counter-increment: flow; position: absolute; content: counter(flow, decimal-leading-zero); display: grid; place-items: center; left: -56px; top: 0; width: 40px; height: 40px; border: 1px solid var(--color-accent); border-radius: 50%; background: white; color: var(--color-accent); font-weight: 700; }
.p-flow__step > h3 { margin-bottom: 16px; }
.p-flow__note { margin-top: 40px; padding: 24px; border-radius: var(--radius); background: var(--color-key-tint); }
.p-faq__list { max-width: 800px; }
.p-faq__item { margin-top: 16px; border-radius: var(--radius); background: white; }
.p-faq__question { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 20px; font-weight: 700; cursor: pointer; list-style: none; }
.p-faq__question::-webkit-details-marker { display: none; }
.p-faq__symbol::before { content: "+"; color: var(--color-key); font-size: 24px; }
.p-faq__item[open] .p-faq__symbol::before { content: "−"; }
.p-faq__answer { padding: 0 20px 24px; }
.p-company__data { max-width: 800px; border-top: 1px solid var(--color-line); }
.p-company__data-row { display: grid; gap: 8px; padding-block: 24px; border-bottom: 1px solid var(--color-line); }
.p-company__data-row > dt { font-weight: 700; color: var(--color-key); }
.p-contact { background-color: var(--color-key); color: white; text-align: center; --color-focus: white; --grid-line: rgba(255,255,255,.06); }
.p-contact__lead { max-width: var(--measure); margin-inline: auto; }
.p-contact__purpose { max-width: var(--measure); margin: 32px auto; text-align: left; }
.p-contact__email { margin-top: 24px; }
.p-contact__link, .p-contact__link:visited { color: white; }
.p-mobile-cta { position: fixed; bottom: 0; left: 0; right: 0; z-index: 15; padding: 0 20px env(safe-area-inset-bottom, 0px); background: white; border-top: 1px solid var(--color-border); }
.p-mobile-cta__button { display: flex; width: 100%; }

/* Project: footer and document pages */
.p-footer__grid { display: grid; gap: 32px; }
.p-footer__address { max-width: var(--measure); margin-top: 24px; }
.p-footer__email { display: inline-flex; align-items: center; min-height: 48px; }
.p-footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; padding: 0; list-style: none; }
.p-footer__link, .p-footer__link:visited { display: inline-flex; align-items: center; min-height: 48px; color: var(--color-key); text-decoration: none; }
.p-footer__link:hover { text-decoration: underline; }
.p-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--color-line); }
.p-breadcrumb { margin-bottom: 40px; }
.p-breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0; list-style: none; }
.p-breadcrumb__list > li + li::before { content: "›"; padding-right: 16px; color: var(--color-text-sub); }
.p-breadcrumb a { display: inline-flex; align-items: center; min-height: 48px; }
.p-legal { max-width: var(--measure); padding-block: 32px 64px; }
.p-legal > h1 { margin-bottom: 32px; font-size: 28px; }
.p-legal__section { margin-block: 40px; }
.p-legal__section > h2 { margin-bottom: 16px; font-size: 22px; }
.p-legal__data-row { margin-top: 16px; }
.p-legal__data-row > dt { font-weight: 700; }
.p-legal__cta { display: inline-flex; align-items: center; min-height: 48px; margin-top: 24px; }
.p-error { min-height: 60vh; padding-block: 32px 64px; }
.p-error > h1 { margin-bottom: 24px; }
.p-error__links { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 40px; }
.p-error__contact { display: inline-flex; align-items: center; min-height: 48px; }

@media (min-width: 768px) {
  .l-container, .l-header__inner { width: min(calc(100% - 80px), var(--content-max)); }
  .l-section { padding-block: 128px; }
  .l-footer { padding-top: 64px; }
  h1, h2 { font-size: 40px; }
  h3 { font-size: 22px; }
  .p-brand { flex-shrink: 0; }
  .p-hero { padding-top: 40px; }
  .p-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 32px; }
  .p-hero__name { margin-top: 8px; font-size: 24px; }
  .p-hero__catch { margin-top: 8px; font-size: clamp(36px, 5vw, 64px); }
  .p-hero__lead { margin-top: 16px; }
  .p-hero__copy { display: flex; flex-direction: column; min-width: 0; }
  .p-hero__actions { margin-top: 16px; order: 1; }
  .p-hero__lead { order: 2; }
  .p-hero__services { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; }
  .p-hero__service { min-height: 80px; }
  .p-service__grid, .p-reason__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-service__card, .p-reason__item { padding: 24px; }
  .p-person__years { font-size: 120px; }
  .p-person__experience::before { height: 144px; }
  .p-person__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; }
  .p-flow__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding: 56px 0 0; }
  .p-flow__list::before { inset: 15px 0 auto; height: 9px; width: auto; border-block: 0; border-inline: 1px solid var(--color-key); background-size: 100% 1px; }
  .p-flow__step::before { top: -56px; left: 0; }
  .p-company__data-row { grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
  .p-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-legal, .p-error { padding-bottom: 128px; }
}

@media (max-width: 767px) {
  .p-contact { text-align: left; }
  .p-contact__heading { text-align: center; }
}
@media (min-width: 1100px) {
  body { padding-bottom: 0; }
  .l-header__inner { flex-wrap: nowrap; gap: 16px; }
  html.js .p-menu { display: none; }
  .p-brand { flex-shrink: 0; }
  .p-nav, html.js .p-nav, html.js .p-nav.is-open { display: block; width: auto; flex: 1; min-width: 0; max-height: none; overflow: visible; padding: 0; }
  .p-nav__list { grid-template-columns: repeat(7, auto); align-items: center; gap: 4px; }
  .p-nav__link { justify-content: center; min-height: 56px; padding: 4px 2px; text-align: center; letter-spacing: 0; }
  .p-mobile-cta { display: none; }
}

/* Utility and progressive enhancement */
.u-nowrap { display: inline-block; white-space: nowrap; }
html.js .js-reveal { opacity: 0; transform: translateY(8px); transition: opacity 300ms ease, transform 300ms ease; }
html.js .js-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js .js-reveal { opacity: 1; transform: none; }
}
