/* ==========================================================================
   DAILY Works / Common
   全ページ共通のサイト構造、見出し、下層ヒーロー、モーダル、CTA、フッター。
   ========================================================================== */

/* ==========================================================================
   DAILY Works 製品紹介サイト / 共通スタイル
   Design Guide v1.2 準拠。
   - 色は foundation.css のトークンのみ。ページ固有色は定義しない。
   - 主要CTAは黒（Ink）。緑（Brand）は強調・状態・接続だけに使う。
   - 囲いは入力・操作・状態差がある場合のみ。説明は罫線で連続させる。
   - 角丸はボタン4px／入力6px／それ以外0px。影は使わない。
   ========================================================================== */

:root {
  /* コンテナ幅・左右余白は Tailwind（mx-auto max-w-6xl px-5 md:px-8）で指定する。
     この変数はモバイルメニューの左右余白を本文に揃えるためだけに使う。 */
  --site-gutter: 32px;
  --header-height: 64px;       /* Guide: ヘッダー高さ64px */

  /* 濃色面（ヒーロー）で使う緑。ご指示により追加。 */
  --ag-brand-on-dark: #41e83b;
  --ag-brand-counter: #04b8b8;
}

::selection {
  background-color: #c0dac0;
}

body.ag-body {
  min-width: 320px;
  overflow-x: clip;            /* hidden だと sticky ヘッダーが追従しなくなる */
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--ag-brand);
  outline-offset: 2px;
}

  .hidden-mobile {
    display: block;
  }
/* --------------------------------------------------------------------------
   ヘッダー
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  border-radius: var(--ag-radius-sm);
  padding: 10px 16px;
  background: var(--ag-ink);
  color: var(--ag-white);
  font-size: 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ヘッダーを包む div の高さがヘッダーと同じだと、sticky は親の箱から出られない。
   display: contents で包み箱をなくし、body を基準に追従させる。 */
[data-site-header] {
  display: contents;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: var(--ag-paper);
}

.site-header.is-scrolled {
  border-bottom-color: var(--ag-line);
}

.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ロゴを小さくして上下の余白を確保する（ヘッダー高さはガイドの64pxを維持） */
.brand-lockup {
  display: flex;
  width: 120px;
  align-items: center;
}

.brand-lockup img {
  width: 100%;
  height: auto;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  line-height: var(--ag-leading-meta);
}

.global-nav > a:not(.nav-cta) {
  position: relative;
  padding-block: 9px;
  color: var(--ag-ink-soft);
}

.global-nav > a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;                 /* Guide: アクティブ表示は緑の2px下線だけ */
  transform: scaleX(0);
  transform-origin: left;
  background: var(--ag-brand);
  content: "";
  transition: transform 180ms ease;
}

.global-nav > a:not(.nav-cta):hover::after,
.global-nav > a:not(.nav-cta):focus-visible::after,
.global-nav > a.is-active::after,
.global-nav > a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* 文字色は .ag-body a { color: inherit } に負けるため、詳細度を上げて指定する */
.ag-body .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--ag-radius-sm);
  padding: 9px 20px;
  background: var(--ag-ink);
  color: var(--ag-white);
  font-weight: 500;
}

.ag-body .nav-cta:hover,
.ag-body .nav-cta:focus-visible {
  background: var(--ag-ink-soft);
  color: var(--ag-white);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: var(--ag-radius-sm);
  background: transparent;
  cursor: pointer;
}

.menu-button span,
.menu-button span::before,
.menu-button span::after {
  display: block;
  width: 24px;
  height: 1px;
  margin-inline: auto;
  background: var(--ag-ink);
  content: "";
  transition: transform 180ms ease;
}

.menu-button span::before {
  transform: translateY(-6px);
}

.menu-button span::after {
  transform: translateY(5px);
}

.menu-button[aria-expanded="true"] span {
  background: transparent;
}

.menu-button[aria-expanded="true"] span::before {
  transform: translateY(1px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   共通の見出しまわり
   -------------------------------------------------------------------------- */

.eyebrow {
  display: block;
  color: var(--ag-brand);
  font-size: 14px;
  font-weight: var(--ag-weight-strong);
  line-height: var(--ag-leading-meta);
}

.section {
  padding-block: var(--ag-space-24) var(--ag-space-32);
  /* border-bottom: 1px solid var(--ag-line); */
}

.section--white {
  background: var(--ag-white);
}

.section-head h2 {
  margin-top: var(--ag-space-4);
  font-size: 40px;                        /* Guide: SECTION H2 40 / 1.50 / 400 */
  font-weight: var(--ag-weight-display);
  letter-spacing: 0.015em;
  line-height: var(--ag-leading-section);
}

.section-head > p {
  margin-top: var(--ag-space-5);
  color: var(--ag-text-2);
  font-size: 18px;                        /* Guide: PRIMARY BODY 18 */
  line-height: 1.9;
}

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

/* 背景写真は白い壁と天井が主体の明るい写真。トリミングは既定の center / cover、
   オーバーレイは締める目的の 10% のみ。文字は Ink とし、写真を暗くしない。 */

/* 下層ページのヒーロー */
.page-hero {
  --page-hero-parallax: 0px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--ag-space-12) var(--ag-space-20);
  background-color: var(--ag-paper);
  border-bottom: 1px solid var(--ag-line-strong);
}

.page-hero::before {
  position: absolute;
  z-index: -1;
  inset: -64px 0;
  background-image: url("../images/second_dir_bg.webp");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
  content: "";
  pointer-events: none;
  transform: translate3d(0, var(--page-hero-parallax), 0);
  will-change: transform;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: var(--ag-space-10);
  color: var(--ag-text-3);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--ag-text-2);
  text-decoration: underline;
  text-decoration-color: var(--ag-line-strong);
  text-underline-offset: 4px;
}

.breadcrumbs__separator {
  color: var(--ag-text-3);
  font-size: 9px;
  line-height: 1;
}

.page-hero h1 {
  margin-top: var(--ag-space-4);
  font-size: 48px;                        /* Guide: PAGE H1 48 / 1.40 / 400 */
  font-weight: var(--ag-weight-display);
  letter-spacing: 0.015em;
  line-height: var(--ag-leading-page);
}

.page-hero > .site-shell > p {
  margin-top: var(--ag-space-6);
  color: var(--ag-ink-soft);
  font-size: 18px;
  line-height: 1.9;
}

/* 旧SVG向けの汎用スタイルは他ページからも利用されるため残す */

/* 図版。デスクトップはSVG、モバイルは同じ内容を縦積みのHTMLで見せる */
.diagram {
  margin: var(--ag-space-12) 0 0;
}

.diagram__svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram__image {
  display: block;
  height: auto;
}

.diagram__stack {
  display: none;
}

.diagram figcaption {
  margin-top: var(--ag-space-6);
  color: var(--ag-brand);
  font-size: 16px;
  font-weight: var(--ag-weight-strong);
  line-height: var(--ag-leading-compact);
}

.diagram .diagram__conclusion {
  max-width: 100%;
  margin-top: var(--ag-space-3);
  text-align: center;
  color: var(--ag-ink);
  font-size: 20px;
  font-weight: var(--ag-weight-heading);
  line-height: var(--ag-leading-section);
}

.diagram__conclusion strong {
  display: block;
  margin-top: var(--ag-space-3);
  color: var(--ag-brand);
  font-weight: var(--ag-weight-heading);
}

/* モバイル用の縦積み表現 */
.stack-group {
  border-top: 1px solid var(--ag-line-strong);
}

.stack-group > section {
  border-bottom: 1px solid var(--ag-line);
  padding-block: var(--ag-space-6);
}

.stack-group > section.is-core {
  background: var(--ag-ink);
  color: var(--ag-white);
  padding-inline: var(--ag-space-5);
}

.stack-group > section.is-before {
  border-left: 3px solid var(--ag-signal);
  padding-left: var(--ag-space-5);
}

.stack-group > section.is-after {
  border-left: 3px solid var(--ag-brand);
  background: var(--ag-sage-light);
  padding-left: var(--ag-space-5);
  padding-right: var(--ag-space-5);
}

.stack-group span {
  display: block;
  color: var(--ag-text-3);
  font-size: 14px;
  font-weight: 500;
}

.stack-group .is-core span {
  color: var(--ag-brand-tint);
}

.stack-group .is-before span {
  color: var(--ag-signal);
}

.stack-group .is-after span {
  color: var(--ag-brand);
}

.stack-group strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: var(--ag-weight-heading);
  line-height: var(--ag-leading-heading);
}

.stack-group ul {
  display: grid;
  gap: 8px;
  margin-top: var(--ag-space-3);
  list-style: none;
}

.stack-group li {
  position: relative;
  padding-left: 15px;
  font-size: 16px;
  line-height: var(--ag-leading-compact);
}

.stack-group li::before {
  position: absolute;
  top: 0.85em;
  left: 0;
  width: 7px;
  height: 1.5px;
  background: var(--ag-brand);
  content: "";
}

.stack-group .is-core li::before {
  background: var(--ag-brand-tint);
}

.stack-group .is-before li::before {
  background: var(--ag-signal);
}

@media (max-width: 900px) {
  .diagram__svg {
    display: none;                 /* 縮小すると図中の文字が読めなくなるため */
  }

  .diagram__stack {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   機能ページ
   -------------------------------------------------------------------------- */

.feature-rows {
  margin-top: var(--ag-space-12);
  border-top: 1px solid var(--ag-line-strong);
}

.feature-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--ag-space-10);
  align-items: start;
  border-bottom: 1px solid var(--ag-line);
  padding-block: var(--ag-space-8);
}

.feature-row h3 {
  font-size: 20px;
  font-weight: var(--ag-weight-heading);
  line-height: var(--ag-leading-heading);
}

.feature-row p {
  color: var(--ag-ink-soft);
  font-size: 16px;
  line-height: var(--ag-leading-body);
}

.feature-row dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--ag-space-4);
  margin-top: var(--ag-space-4);
  border-top: 1px solid var(--ag-line);
  padding-top: var(--ag-space-4);
}

.feature-row dt {
  color: var(--ag-text-3);
  font-size: 14px;
  font-weight: 500;
}

.feature-row dd {
  margin: 0;
  color: var(--ag-ink-soft);
  font-size: 16px;
  line-height: var(--ag-leading-compact);
}

/* 製品キャプチャのプレースホルダー */
.product-shot {
  margin: var(--ag-space-12) 0 0;
}

.product-shot__frame {
  overflow: hidden;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-radius-xl);
  background: var(--ag-white);
}

.product-shot__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  border-bottom: 1px solid var(--ag-line);
  padding-inline: 14px;
  color: var(--ag-text-3);
  font-family: var(--ag-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.product-shot__body {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: var(--ag-space-8);
  background: var(--ag-paper);
}

.product-shot__body strong {
  display: block;
  max-width: 380px;
  border: 1px dashed var(--ag-line-strong);
  border-radius: var(--ag-radius-md);
  padding: 22px 26px;
  color: var(--ag-text-2);
  font-size: 16px;
  font-weight: 500;
  line-height: var(--ag-leading-compact);
  text-align: center;
}

.product-shot figcaption {
  margin-top: var(--ag-space-3);
  color: var(--ag-text-3);
  font-size: 14px;
}

.review-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--ag-space-12);
  border-block: 1px solid var(--ag-line-strong);
  list-style: none;
}

.review-steps li {
  position: relative;
  padding: var(--ag-space-6) var(--ag-space-6) var(--ag-space-8) 0;
}

.review-steps li + li {
  border-left: 1px solid var(--ag-line-strong);
  padding-left: var(--ag-space-6);
}

.review-steps li::after {
  position: absolute;
  top: calc(var(--ag-space-6) + 7px);
  right: calc(var(--ag-space-6) * -1 - 5px);
  color: var(--ag-brand);
  font-size: 14px;
  content: "→";
}

.review-steps li:last-child::after {
  content: none;
}

.review-steps span {
  display: block;
  color: var(--ag-text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.review-steps strong {
  display: block;
  margin-top: var(--ag-space-3);
  font-size: 20px;
  font-weight: var(--ag-weight-heading);
  line-height: var(--ag-leading-heading);
}

.review-steps p {
  margin-top: var(--ag-space-3);
  color: var(--ag-text-2);
  font-size: 16px;
  line-height: var(--ag-leading-compact);
}

/* --------------------------------------------------------------------------
   共通ポリシー・同意モーダル
   -------------------------------------------------------------------------- */

body.consent-modal-open {
  overflow: hidden;
}

.consent-dialog {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0 auto;
  border: 0;
  padding: var(--ag-space-5);
  background: rgba(18, 18, 18, 0.64);
  color: var(--ag-ink);
}

.consent-dialog[hidden] {
  display: none;
}

.consent-dialog__panel {
  display: flex;
  overflow: hidden;
  width: min(880px, 100%);
  max-height: min(86vh, 900px);
  flex-direction: column;
  border: 1px solid var(--ag-line-strong);
  border-radius: var(--ag-radius-lg);
  background: var(--ag-white);
}

.consent-dialog__header {
  display: flex;
  gap: var(--ag-space-6);
  align-items: center;
  justify-content: space-between;
  border-bottom: 0;
  padding: var(--ag-space-6) var(--ag-space-8);
  background: var(--ag-white);
  color: var(--ag-ink);
}

.consent-dialog__header h2 {
  color: var(--ag-ink);
  font-size: 24px;
  font-weight: var(--ag-weight-heading);
  line-height: var(--ag-leading-heading);
}

.consent-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 50%;
  background: var(--ag-paper);
  color: var(--ag-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.consent-dialog__body {
  overflow-y: auto;
  padding: var(--ag-space-8);
  color: var(--ag-ink-soft);
  font-size: 15px;
  line-height: var(--ag-leading-body);
}

.consent-dialog__body > section {
  margin-top: var(--ag-space-8);
}
.consent__first-section {
  margin-top: 0 !important;
}
.consent-dialog__body h3 {
  margin-bottom: var(--ag-space-3);
  color: var(--ag-ink);
  font-size: 18px;
  font-weight: var(--ag-weight-heading);
  line-height: var(--ag-leading-heading);
}

.consent-table-wrap {
  overflow-x: auto;
}

.consent-dialog table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ag-ink-soft);
  font-size: 14px;
  line-height: var(--ag-leading-compact);
}

.consent-dialog th,
.consent-dialog td {
  border: 1px solid var(--ag-line-strong);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.consent-dialog th {
  background: var(--ag-paper);
  color: var(--ag-ink);
  font-weight: var(--ag-weight-strong);
}

.consent-dialog__body a {
  color: var(--ag-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-dialog__contact {
  margin-top: var(--ag-space-8);
  border-left: 3px solid var(--ag-brand);
  padding: var(--ag-space-5);
  background: var(--ag-brand-pale);
  color: var(--ag-ink);
  font-style: normal;
  line-height: var(--ag-leading-compact);
}

.policy-dialog .consent-dialog__body p + p {
  margin-top: var(--ag-space-3);
}

.policy-list {
  margin-top: var(--ag-space-4);
  padding-left: 1.5em;
}

.policy-list > li + li,
.policy-list ul > li + li {
  margin-top: var(--ag-space-3);
}

.policy-list h4 {
  margin-bottom: var(--ag-space-2);
  color: var(--ag-ink);
  font-weight: var(--ag-weight-strong);
}

.policy-list ul {
  margin-top: var(--ag-space-2);
  padding-left: 1.25em;
}

.policy-signature {
  margin-top: var(--ag-space-6) !important;
  color: var(--ag-ink);
  text-align: right;
}

.consent-dialog__footer {
  display: flex;
  justify-content: center;
  border-top: 0;
  padding: var(--ag-space-5) var(--ag-space-8);
  background: var(--ag-white);
  color: var(--ag-ink);
}

@media (max-width: 640px) {
  .contact-checkbox-group {
    grid-template-columns: 1fr;
  }

  .consent-dialog {
    width: 100%;
    padding: 12px;
  }

  .consent-dialog__panel {
    max-height: 90dvh;
  }

  .consent-dialog__header,
  .consent-dialog__body,
  .consent-dialog__footer {
    padding-right: var(--ag-space-5);
    padding-left: var(--ag-space-5);
  }

  .consent-dialog__header h2 {
    font-size: 20px;
  }

}

/* --------------------------------------------------------------------------
   共通CTA・フッター
   -------------------------------------------------------------------------- */

.site-cta {
  padding-block: var(--ag-space-20);
  background: var(--ag-ink);            /* Guide: 問い合わせ誘導は濃色CTA面 */
  color: var(--ag-white);
}

.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ag-space-12);
  align-items: end;
  border-left: 4px solid var(--ag-brand);
  padding-left: var(--ag-space-8);
}

.cta-inner h2 {
  font-size: 28px;
  font-weight: var(--ag-weight-strong);
  line-height: var(--ag-leading-section);
}

.cta-inner p {
  margin-top: var(--ag-space-3);
  color: var(--ag-line-strong);
  font-size: 16px;
  line-height: var(--ag-leading-body);
}

.site-footer {
  padding-block: var(--ag-space-10);
  border-top: 1px solid var(--ag-line-strong);
  background: var(--ag-paper);
}

.footer-inner {
  display: flex;
  gap: var(--ag-space-10);
  align-items: flex-end;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  max-width: 720px;
}

.footer-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 0;
  padding: 0;
  color: var(--ag-ink-soft);
  font-size: 14px;
  line-height: var(--ag-leading-compact);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ag-brand);
}

.footer-social-links {
  display: flex;
  gap: var(--ag-space-2);
  align-items: center;
  min-height: 40px;
}

.footer-links .footer-social-link {
  display: inline-flex;
  width: 40px;
  height: 40px;
  min-height: 40px;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.footer-social-link i {
  display: block;
}

.footer-social-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.footer-social-icon--note {
  -webkit-mask-image: url("../images/footer_icon_note.svg");
  mask-image: url("../images/footer_icon_note.svg");
}

.footer-social-icon--eigyo-tech {
  -webkit-mask-image: url("../images/footer_icon_eigyo-tech.svg");
  mask-image: url("../images/footer_icon_eigyo-tech.svg");
}

.footer-copyright {
  flex: 0 0 auto;
  color: var(--ag-text-3);
  font-size: 12px;
  line-height: var(--ag-leading-meta);
  text-align: right;
}
