:root {
  --dq-bg-window: #f5f5e8;
  --dq-border-outer: #0d0d0d;
  --dq-border-inner: #ffffff;
  --dq-text: #101010;
  --dq-accent: #1e4a8a;
  --dq-cursor: #c62828;
  --dq-shadow-overlay: rgb(13 26 51 / 45%);
  /* 背景写真: 下げすぎると地のグラデが見える、上げすぎると文字が読みにくい */
  --bg-photo-opacity: 0.62;
  --bg-veil-strength: 0.38;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  color: var(--dq-text);
  background: #080c14;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--dq-bg-window);
  color: var(--dq-text);
  border: 3px solid var(--dq-border-outer);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
  outline: 3px solid var(--dq-accent);
  outline-offset: 2px;
}

.skip-link--second:focus {
  top: 3.6rem;
}

.app {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-layer__fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgb(73 139 92 / 35%), transparent 55%),
    linear-gradient(180deg, #1a2d4d 0%, #0b1324 45%, #060a12 100%);
}

.bg-layer__stack {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.bg-layer__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: var(--bg-photo-opacity);
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.bg-layer__photo--hidden {
  opacity: 0;
  visibility: hidden;
}

.bg-layer__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgb(6 12 22 / calc(var(--bg-veil-strength) + 0.08)) 0%,
      rgb(6 14 26 / calc(var(--bg-veil-strength) * 0.85)) 40%,
      rgb(8 10 18 / calc(var(--bg-veil-strength) * 0.75)) 100%
    );
  transition: opacity 0.35s ease;
}

.app[data-phase="menu"] .bg-layer__photo,
.app[data-phase="visitor"] .bg-layer__photo,
.app[data-phase="page"] .bg-layer__photo {
  filter: brightness(0.82) saturate(0.93);
  opacity: calc(var(--bg-photo-opacity) * 0.88);
}

.app[data-phase="menu"] .bg-layer__veil,
.app[data-phase="visitor"] .bg-layer__veil,
.app[data-phase="page"] .bg-layer__veil {
  --bg-veil-strength: 0.52;
}

.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(0.75rem, 3vw, 1.25rem);
  padding-bottom: 0;
}

.fv-header {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.app[data-phase="menu"] .fv-header,
.app[data-phase="visitor"] .fv-header,
.app[data-phase="page"] .fv-header {
  opacity: 0;
  transform: translateY(-12%);
  pointer-events: none;
  position: absolute;
  inset: 0;
  flex: unset;
}

.fv-title {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.08;
  color: #fdfdf5;
  text-shadow:
    0 0 2px #000,
    0 0 18px rgb(255 247 214 / 28%),
    3px 4px 0 #000,
    -1px -1px 0 #000;
}

.viewport-hero {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.app[data-phase="fv"] .viewport-hero {
  min-height: min(100dvh, 960px);
  flex: 1 1 auto;
}

.app:not([data-phase="fv"]) .viewport-hero {
  flex: 0 0 auto;
  min-height: 0;
}

.scroll-sections {
  position: relative;
  z-index: 2;
  width: min(52rem, 100%);
  margin: 0 auto;
  padding: 0 clamp(0.85rem, 4vw, 1.75rem);
  scroll-margin-top: 0.75rem;
}

.scroll-block {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(1.25rem, 4vw, 1.85rem);
  background: var(--dq-bg-window);
  color: var(--dq-text);
  border: 4px solid var(--dq-border-outer);
  box-shadow:
    inset 0 0 0 2px var(--dq-border-inner),
    6px 6px 0 rgb(0 0 0 / 30%);
}

.scroll-band.scroll-block {
  padding: clamp(1.35rem, 4.5vw, 2rem);
}

.scroll-band--alt {
  background: #ececd8;
}

.scroll-hero-banner.scroll-block {
  margin-top: 0;
}

.scroll-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: rgb(62 73 122);
}

.scroll-heading-lg {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 4.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.35;
}

.scroll-heading {
  margin: 0 0 0.75rem;
  font-size: clamp(1.12rem, 3.8vw, 1.42rem);
  font-weight: 400;
}

.scroll-heading-plain {
  margin: 0 0 0.65rem;
  font-weight: 400;
}

.scroll-lead,
.scroll-intro,
.scroll-caption,
.scroll-tags-intro,
.scroll-appr {
  margin: 0 0 1rem;
  line-height: 1.75;
  font-size: clamp(0.92rem, 2.6vw, 1.03rem);
}

.scroll-caption {
  margin-top: -0.25rem;
  font-size: 0.88rem;
  color: rgb(55 58 74);
}

.scroll-cta-cluster {
  margin: 1rem 0 0.85rem;
}

.scroll-btn-primary {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--dq-text);
  background: rgb(240 226 156 / 95%);
  border: 4px solid var(--dq-border-outer);
  box-shadow: inset 0 0 0 2px var(--dq-border-inner), 5px 5px 0 rgb(0 0 0 / 32%);
}

.scroll-btn-primary:hover {
  filter: brightness(1.03);
}

.scroll-btn-primary:focus-visible {
  outline: 3px solid var(--dq-accent);
  outline-offset: 4px;
}

.scroll-banner-fig {
  margin: 1.15rem 0 0;
  padding: 0;
}

.scroll-banner-fig img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(320px, 48vw);
  object-fit: cover;
  vertical-align: middle;
  border: 3px solid var(--dq-border-outer);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 28%);
}

.scroll-banner-fig--wide img {
  max-height: min(340px, 54vw);
}

.scroll-banner-fig--tall img {
  max-height: min(380px, 58vw);
}

.scroll-banner-fig--small img {
  max-height: min(200px, 36vw);
}

.scroll-tech-fig-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
  margin: 1rem 0 0;
}

@media (max-width: 620px) {
  .scroll-tech-fig-grid {
    grid-template-columns: 1fr;
  }
}

.scroll-service-grid {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.scroll-service-grid > li {
  padding: 0.65rem 0.72rem;
  border: 2px solid rgb(13 13 13 / 18%);
  background: rgb(253 253 247 / 80%);
}

.scroll-service-grid strong {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 400;
}

.scroll-service-desc {
  display: block;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgb(38 43 62);
}

.scroll-columns {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0 0 0.85rem;
}

.scroll-col ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
}

.scroll-subheading {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 400;
}

.scroll-subheading-inline {
  margin: 1.25rem 0 0.5rem;
}

.scroll-work-list {
  margin: 0 0 0.85rem;
  padding: 0;
  list-style: none;
}

.scroll-work-list li {
  padding: 0.55rem 0;
  border-bottom: 1px dashed rgb(0 0 0 / 16%);
  line-height: 1.62;
  font-size: clamp(0.89rem, 2.4vw, 0.97rem);
}

.scroll-work-tag {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  border: 2px solid var(--dq-border-outer);
  background: rgb(30 74 138 / 12%);
  vertical-align: middle;
}

.scroll-strength-list {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
  line-height: 1.7;
}

.scroll-dl-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: fit-content(8rem) 1fr;
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
}

@media (max-width: 520px) {
  .scroll-dl-grid {
    grid-template-columns: 1fr;
  }

  .scroll-dl-grid dt {
    margin-top: 0.65rem;
    font-weight: 700;
  }

  .scroll-dl-grid dt:first-child {
    margin-top: 0;
  }
}

.scroll-tag-cloud {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.85rem;
  border: 3px dashed rgb(30 74 138 / 25%);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.scroll-tag-cloud li {
  padding: 0.2rem 0.45rem;
  background: rgb(255 255 255 / 75%);
  border: 2px solid rgb(0 0 0 / 15%);
}

.scroll-flow ol {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.65;
  font-size: 0.92rem;
}

.scroll-faq {
  margin: 0;
}

.scroll-faq dt {
  margin: 0.85rem 0 0.35rem;
  font-weight: 700;
}

.scroll-faq dt:first-child {
  margin-top: 0;
}

.scroll-faq dd {
  margin: 0;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid rgb(0 0 0 / 12%);
  line-height: 1.62;
}

.scroll-footer-banner {
  text-align: center;
  margin-bottom: 1.5rem;
}

.scroll-footer-banner p {
  margin: 0;
  line-height: 1.7;
}

.scroll-sections a {
  color: var(--dq-accent);
  text-decoration-thickness: 2px;
}

.scroll-sections a:focus-visible {
  outline: 3px solid var(--dq-accent);
  outline-offset: 2px;
}

.content-panel {
  flex: 1;
  margin: 0 auto 0.75rem;
  width: min(42rem, 100%);
}

.content-panel[hidden] {
  display: none;
}

.content-panel:focus {
  outline: none;
}

.content-panel:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.content-panel__inner {
  max-height: min(42vh, 22rem);
  overflow-y: auto;
  padding: 1rem 1.1rem;
  background: var(--dq-bg-window);
  color: var(--dq-text);
  border: 4px solid var(--dq-border-outer);
  box-shadow:
    inset 0 0 0 2px var(--dq-border-inner),
    4px 4px 0 rgb(0 0 0 / 35%);
  line-height: 1.75;
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
}

.content-panel--tall .content-panel__inner {
  max-height: min(62vh, 32rem);
}

.content-panel__inner h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 400;
}

.content-panel__inner p {
  margin: 0 0 0.85rem;
}

.content-panel__inner code {
  font-size: 0.88em;
  padding: 0.1em 0.25em;
  background: rgb(0 0 0 / 6%);
  border-radius: 2px;
}

.content-panel__cta {
  margin: 0 0 1rem;
}

.content-panel__form-link {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 3px solid var(--dq-border-outer);
  background: rgb(30 74 138 / 12%);
  color: var(--dq-accent);
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--dq-border-inner), 3px 3px 0 rgb(0 0 0 / 25%);
}

.content-panel__form-link:hover {
  background: rgb(30 74 138 / 20%);
}

.content-panel__form-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 2px dashed rgb(0 0 0 / 28%);
  background: rgb(255 230 150 / 25%);
  font-size: 0.92rem;
}

/* サイト内フォーム（ベース） */
.dq-form {
  margin: 0;
}

.dq-form__lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.dq-form__field {
  margin: 0 0 1rem;
}

.dq-form__field label {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--dq-text);
}

.dq-form__req {
  color: var(--dq-cursor);
  font-weight: 700;
}

.dq-form__field input,
.dq-form__field textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--dq-text);
  background: #fdfdf6;
  border: 3px solid var(--dq-border-outer);
  box-shadow: inset 0 0 0 1px var(--dq-border-inner);
  border-radius: 2px;
}

.dq-form__field textarea {
  resize: vertical;
  min-height: 7rem;
}

.dq-form__field input:focus-visible,
.dq-form__field textarea:focus-visible {
  outline: 3px solid var(--dq-accent);
  outline-offset: 2px;
}

.dq-form__muted {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.82rem;
  color: rgb(58 58 58 / 90%);
}

.dq-form__submit {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.5rem 1.15rem;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  color: var(--dq-text);
  background: rgb(240 226 156 / 90%);
  border: 4px solid var(--dq-border-outer);
  box-shadow: inset 0 0 0 2px var(--dq-border-inner), 4px 4px 0 rgb(0 0 0 / 35%);
}

.dq-form__submit:hover {
  background: rgb(240 226 156);
}

.dq-form__submit:focus-visible {
  outline: 3px solid var(--dq-accent);
  outline-offset: 3px;
}

.content-panel__inner ul {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
}

.content-panel__inner a:focus-visible {
  outline: 3px solid var(--dq-accent);
  outline-offset: 2px;
}

.dq-panel {
  position: sticky;
  bottom: max(0.35rem, env(safe-area-inset-bottom, 0));
  z-index: 25;
  margin-top: auto;
  width: min(52rem, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
}

.dq-panel__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: stretch;
  padding: 0.75rem 1rem;
  background: var(--dq-bg-window);
  border: 4px solid var(--dq-border-outer);
  box-shadow:
    inset 0 0 0 2px var(--dq-border-inner),
    6px 6px 0 rgb(0 0 0 / 42%);
}
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: end;
}

.dq-panel__portrait--hidden {
  visibility: hidden;
  width: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
}

.dq-panel__portrait-img {
  display: block;
  width: clamp(52px, 14vw, 72px);
  height: auto;
  image-rendering: pixelated;
}

.dq-panel__body {
  min-width: 0;
}

.dq-panel__line {
  margin: 0 0 0.5rem;
  min-height: 1.5em;
  font-size: clamp(0.95rem, 2.8vw, 1.08rem);
  line-height: 1.55;
  color: var(--dq-text);
}

.dq-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dq-menu li {
  margin: 0.12rem 0;
}

.dq-option {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  width: 100%;
  padding: 0.28rem 0.4rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
}

.dq-option:hover {
  background: rgb(30 74 138 / 8%);
}

.dq-option:focus {
  outline: none;
}

.dq-option:focus-visible {
  border-color: var(--dq-accent);
  background: rgb(30 74 138 / 12%);
}

.dq-option[aria-selected="true"] {
  background: rgb(30 74 138 / 15%);
}

.dq-option__cursor {
  color: var(--dq-cursor);
  font-weight: 700;
  width: 1em;
  flex-shrink: 0;
  visibility: hidden;
}

.dq-option[aria-selected="true"] .dq-option__cursor {
  visibility: visible;
}

.dq-panel__hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: #3a3a3a;
}

.site-footer {
  position: relative;
  z-index: 2;
  padding: 0.35rem 1rem 1rem;
  margin-top: 0;
  text-align: center;
}

.site-footer small {
  font-size: 0.82rem;
  color: #e3eafc;
}

.site-footer a {
  color: #ffffff;
}

.site-footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .dq-panel__row {
    grid-template-columns: 1fr;
  }

  .dq-panel__portrait {
    display: none;
  }
}

@media (prefers-reduced-data: reduce) {
  :root {
    --bg-photo-opacity: 0.45;
    --bg-veil-strength: 0.48;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
