/* about.css (QUBO++とは) */
/* NOTE: This file is loaded only on page-about.php */

:root{
  --hq-about-bg-alt:#f4f4f4;
  --hq-about-border:#e0e0e0;
  --hq-about-text:#161616;
  --hq-about-muted:#525252;
  --hq-about-link:#0f62fe;
}

/* Reset only inside about scope */
.hq-about *{ box-sizing:border-box; }
.hq-about img{ max-width:100%; height:auto; display:block; }
.hq-about a{ text-decoration:none; }
.hq-about a:hover{ text-decoration:underline; }


.hq-aboutHero{
  padding: 64px 0 50px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.hq-aboutHero__kicker{
  margin: 0 0 10px;
  font-size: var(--fz-small);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "Poppins", "IBM Plex Sans", sans-serif;
}

.hq-aboutHero__title{
  margin: 0 0 10px;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hq-aboutHero__head{
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: var(--fz-head);
  line-height: 1.65;
}

/* Section wrapper (match the site's container rhythm) */
.hq-aboutSection{
  padding:64px 0;
}
.hq-aboutSection--alt{
  background:var(--hq-about-bg-alt);
}
@media (max-width: 767px){
  .hq-aboutSection{ padding:44px 0; }
}

/* Section title (NO vertical bar) */
.hq-aboutSection__title{
  margin:0 0 20px;
  font-size:24px;
  line-height:1.25;
  font-weight:600;
  color:var(--hq-about-text);
}
.hq-aboutSection__title::before{ content:none !important; }

/* Lead text */
.hq-aboutLead{
  color:var(--hq-about-muted);
  line-height:1.9;
  font-size:16px;
}
.hq-aboutLead p{ margin:0 0 14px; }
.hq-aboutLead p:last-child{ margin-bottom:0; }

/* Two-column sections */
.hq-aboutGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:34px;
  align-items:start;
}
@media (max-width: 980px){
  .hq-aboutGrid{ grid-template-columns: 1fr; gap:22px; }
}

/* Figure placeholder */
.hq-aboutFigure{
  background:#d0d0d0;
  border:1px solid var(--hq-about-border);
  width:100%;
  aspect-ratio: 16/9;
}
.hq-aboutFigure--wide{
  /* aspect-ratio: 21/9; */
}
.hq-aboutCaption{
  margin-top:8px;
  font-size:12px;
  color:#6f6f6f;
}

/* Reason: small bullets */
.hq-aboutBullets{
  margin:12px 0 0;
  padding-left:18px;
  color:var(--hq-about-muted);
  line-height:1.9;
}
.hq-aboutBullets li{ margin:4px 0; }

/* QUBO approach: image + 3-step cards */
.hq-approach{
  display:grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap:28px;
  align-items:start;
}
@media (max-width: 980px){
  .hq-approach{ grid-template-columns:1fr; }
}
.hq-approach__cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin:14px 0 0;
}
@media (max-width: 980px){
  .hq-approach__cards{ grid-template-columns:1fr; }
}
.hq-stepCard{
  background:#fff;
  border:1px solid var(--hq-about-border);
  padding:12px 12px 14px;
}
.hq-stepCard__num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border:1px solid var(--hq-about-border);
  font-weight:600;
  font-size:12px;
  color:var(--hq-about-text);
  margin-bottom:8px;
}
.hq-stepCard__title{
  margin:0 0 6px;
  font-size:14px;
  font-weight:600;
  color:var(--hq-about-text);
}
.hq-stepCard__desc{
  margin:0;
  font-size:13px;
  line-height:1.7;
  color:var(--hq-about-muted);
}

/* FLOW (vertical line + image per step on desktop; straight list on mobile) */
.hq-flow{
  --flow-media-w: 240px;
  --flow-gap: 26px;

  position:relative;
  margin:0;
  padding:0;
  list-style:none;
}
@media (min-width: 981px){
  .hq-flow::before{
    content:"";
    position:absolute;
    left: calc(var(--flow-media-w) / 2);
    top: 8px;
    bottom: 8px;
    width:2px;
    background: var(--hq-about-border);
  }
}

.hq-flow__item{
  position:relative;
  display:grid;
  grid-template-columns: var(--flow-media-w) 1fr;
  gap: var(--flow-gap);
  padding:18px 0;
  align-items:start;
}
@media (max-width: 980px){
  .hq-flow__item{
    grid-template-columns:1fr;
    padding:14px 0;
  }
}
@media (min-width: 981px){
  .hq-flow__item::before{
    content:"";
    position:absolute;
    left: calc(var(--flow-media-w) / 2 - 6px);
    top: 26px;
    width:12px;
    height:12px;
    background:#fff;
    border:2px solid var(--hq-about-link);
    border-radius:999px;
    z-index:1;
  }
}

.hq-flow__media{
  width:100%;
  border:1px solid var(--hq-about-border);
  background:#efefef;
  aspect-ratio: 4 / 3;
  overflow:hidden;
}
.hq-flow__media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
@media (max-width: 980px){
  .hq-flow::before{ content:none; }
  .hq-flow__item::before{ content:none; }
  .hq-flow__media{ aspect-ratio: 16/9; }
}

.hq-flow__meta{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:8px;
}
.hq-flow__num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border:1px solid var(--hq-about-border);
  font-weight:600;
  color:var(--hq-about-text);
  font-size:12px;
  background:#fff;
}
.hq-flow__title{
  margin:0;
  font-size:18px;
  font-weight:600;
  color:var(--hq-about-text);
}
.hq-flow__desc{
  margin:8px 0 0;
  color:var(--hq-about-muted);
  line-height:1.9;
  font-size:15px;
}
.hq-flow__desc ul{
  margin:10px 0 0;
  padding-left:18px;
}
.hq-flow__desc li{ margin:4px 0; }

/* FEATURES (left list -> right pane via radio + CSS) */
.hq-feat{
  position:relative;
}
.hq-feat__radio{
  position:absolute;
  left:-9999px;
  opacity:0;
}

.hq-feat__grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:0;
  border:1px solid var(--hq-about-border);
  background:#fff;
}
@media (max-width: 980px){
  .hq-feat__grid{ grid-template-columns:1fr; }
}

.hq-feat__menu{
  border-right:1px solid var(--hq-about-border);
}
@media (max-width: 980px){
  .hq-feat__menu{ border-right:none; border-bottom:1px solid var(--hq-about-border); }
}

.hq-feat__item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    cursor: pointer;
    border-bottom: 1px solid var(--hq-about-border);
    color: var(--hq-about-text);
    background: #fff;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}
.hq-feat__item:hover{ background:#f7f7f7; }
.hq-feat__item:last-child{ border-bottom:none; }
.hq-feat__arrow{
  color:var(--hq-about-muted);
  flex:0 0 auto;
}
.hq-feat__menuNote{
  padding:12px 14px;
  color:var(--hq-about-muted);
  font-size:12px;
  line-height:1.7;
  border-top:1px solid var(--hq-about-border);
  background:#fafafa;
}

.hq-feat__panes{
  position:relative;
  /* keep height stable (desktop); panes scroll internally */
  height: 600px;
}
@media (max-width: 980px){
  .hq-feat__panes{ height:auto; }
}

.hq-feat__pane{
  position:absolute;
  inset:0;
  padding:18px 18px 20px;
  opacity:0;
  pointer-events:none;
  overflow:auto;
}
@media (max-width: 980px){
  .hq-feat__pane{
    position:static;
    inset:auto;
    opacity:1;
    pointer-events:auto;
    overflow:visible;
    border-top:1px solid var(--hq-about-border);
  }
}

.hq-feat__pane h3{
  margin:0 0 10px;
  font-size:18px;
  font-weight:600;
  color:var(--hq-about-text);
}
.hq-feat__pane p, .hq-feat__pane li{
  color:var(--hq-about-muted);
  line-height:1.9;
  font-size:15px;
}
.hq-feat__pane ul{
  margin:10px 0 0;
  padding-left:18px;
}
.hq-feat__pane hr{
  border:none;
  border-top:1px solid var(--hq-about-border);
  margin:14px 0;
}
.hq-feat__paneImg{
  border:1px solid var(--hq-about-border);
  background:#efefef;
  aspect-ratio: 16/9;
  margin:12px 0 0;
  overflow:hidden;
}
.hq-feat__paneImg img{ width:100%; height:100%; object-fit:cover; }

/* Active states: highlight menu + show pane */
#feat-1:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-1"],
#feat-2:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-2"],
#feat-3:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-3"],
#feat-4:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-4"],
#feat-5:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-5"],
#feat-6:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-6"]{
  background:#f2f5ff;
  color:var(--hq-about-text);
}
#feat-1:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-1"] .hq-feat__arrow,
#feat-2:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-2"] .hq-feat__arrow,
#feat-3:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-3"] .hq-feat__arrow,
#feat-4:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-4"] .hq-feat__arrow,
#feat-5:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-5"] .hq-feat__arrow,
#feat-6:checked ~ .hq-feat__grid .hq-feat__menu label[for="feat-6"] .hq-feat__arrow{
  color:var(--hq-about-link);
}

#feat-1:checked ~ .hq-feat__grid .hq-feat__panes .hq-feat__pane:nth-child(1),
#feat-2:checked ~ .hq-feat__grid .hq-feat__panes .hq-feat__pane:nth-child(2),
#feat-3:checked ~ .hq-feat__grid .hq-feat__panes .hq-feat__pane:nth-child(3),
#feat-4:checked ~ .hq-feat__grid .hq-feat__panes .hq-feat__pane:nth-child(4),
#feat-5:checked ~ .hq-feat__grid .hq-feat__panes .hq-feat__pane:nth-child(5),
#feat-6:checked ~ .hq-feat__grid .hq-feat__panes .hq-feat__pane:nth-child(6){
  opacity:1;
  pointer-events:auto;
}

/* Code blocks: keep readable */
.hq-about pre{
  background:#0f0f0f;
  color:#f4f4f4;
  padding:14px;
  overflow:auto;
  border-radius:0;
  border:1px solid #2a2a2a;
  font-size:13px;
  line-height:1.6;
}
.hq-about code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}


/* ===== Horizontal Flow ===== */
:root{
  --hq-blue: #356ae6; /* テーマ青に合わせて変更OK */
  --hq-line: rgba(0,0,0,.14);
  --hq-text: rgba(0,0,0,.88);
  --hq-muted: rgba(0,0,0,.68);
}

.hq-process{
  padding: 40px 0;
}

.hq-process__head{
  margin-bottom: 18px;
}

.hq-process__ttl{
  margin: 0 0 8px;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.25;
  color: var(--hq-text);
  letter-spacing: .02em;
}

.hq-process__lead{
  margin: 0;
  color: var(--hq-muted);
  line-height: 1.8;
  max-width: 72ch;
}

.hq-process__list{
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.hq-process__item{
  position: relative;
}

/* dotted connector */
.hq-process__item:not(:last-child)::after{
  content: "";
  position: absolute;
  top: 44px;                /* 箱の中央付近 */
  left: calc(100% + 9px);   /* gapの半分 */
  width: 18px;              /* gapと同じくらい */
    /* border-top: 2px dotted var(--hq-blue); */
  opacity: .9;
}

/* box (title area) */
.hq-process__box{
  border: 1px solid var(--hq-line);
  background: #f1f1f1;      /* 添付2枚目の薄グレー箱 */
  padding: 18px 18px;
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-radius: 0;         /* 角丸なし */
}

.hq-process__label{
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--hq-muted);
}

.hq-process__title{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hq-blue);
}

/* last box highlighted */
.hq-process__item--last .hq-process__box{
  background: var(--hq-blue);
  border-color: var(--hq-blue);
}
.hq-process__item--last .hq-process__title,
.hq-process__item--last .hq-process__label{
  color: #fff;
}

/* description under each column */
.hq-process__desc{
  margin-top: 10px;
  color: var(--hq-text);
  font-size: 14px;
  line-height: 1.85;
}

.hq-process__desc ul{
  margin: 8px 0 0;
  padding-left: 1.1em;
}

.hq-process__desc li{
  margin: 4px 0;
}

/* Responsive: 2 columns */
@media (max-width: 980px){
  .hq-process__list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .hq-process__item:not(:last-child)::after{
    content: none; /* 2段になるので点線は消す（崩れを防ぐ） */
  }
}

/* Responsive: 1 column */
@media (max-width: 640px){
  .hq-process__list{
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Process (Flow): "QUBO++を用いた最適化計算の流れ"
   - Keep within .hq-container width rules (no 100vw / negative margins)
   - Equal-height columns per row
   - Dotted connectors always aligned and continuous
   ========================================================================== */

.hq-process {
  --hq-process-gap: 18px;
  --hq-process-box-pad: 18px;
  --hq-process-box-min: 92px; /* adjust if you want taller boxes */
  margin-top: 16px;
}

.hq-process__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hq-process-gap);
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.hq-process__item {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.hq-process__box {
  position: relative;
  border: 1px solid rgba(0,0,0,.14);
  background: #f4f4f4;
  padding: var(--hq-process-box-pad);
  min-height: var(--hq-process-box-min);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hq-process__step {
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(0,0,0,.62);
}

.hq-process__title {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hq-blue, #0f62fe);
  word-break: break-word;
}

.hq-process__item.is-last .hq-process__box,
.hq-process__item:last-child .hq-process__box {
  background: var(--hq-blue, #0f62fe);
  border-color: var(--hq-blue, #0f62fe);
}

.hq-process__item.is-last .hq-process__step,
.hq-process__item.is-last .hq-process__title,
.hq-process__item:last-child .hq-process__step,
.hq-process__item:last-child .hq-process__title {
  color: #fff;
}

.hq-process__item:not(:last-child) .hq-process__box::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: var(--hq-process-gap);
  border-top: 2px dotted var(--hq-blue, #0f62fe);
  transform: translateY(-50%);
  pointer-events: none;
}

.hq-process__desc {
  margin-top: 12px;
  color: rgba(0,0,0,.78);
  line-height: 1.8;
  font-size: 14px;
}

.hq-process__desc ul {
  margin: 10px 0 0;
  padding-left: 1.2em;
}
.hq-process__desc li {
  margin: 6px 0 0;
}

@media (max-width: 1024px) {
  .hq-process__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-process__item .hq-process__box::after { display: none; }
}

@media (max-width: 640px) {
  .hq-process__list { grid-template-columns: 1fr; }
}


/* =========================
   Features (1col)
   ========================= */
#features-hq .hq-featureStack{
  --hq-line: rgba(0,0,0,.14);
  --hq-soft: rgba(0,0,0,.06);
  --hq-text: rgba(0,0,0,.86);
  --hq-muted: rgba(0,0,0,.66);
  --hq-blue: var(--hq-accent, #0f62fe);

  display: grid;
  gap: 20px;
  margin-top: 18px;
}

#features-hq .hq-featureStack__item{
  background: #fff;
  border: 1px solid var(--hq-line);
  border-radius: 0;         /* 角丸なし */
  box-shadow: none;         /* 影なし */
  padding: 20px 22px;
}

#features-hq .hq-featureStack__head{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hq-soft);
  margin-bottom: 14px;
}

#features-hq .hq-featureStack__kicker{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: var(--hq-blue);
  border-radius: 0;         /* 角丸なし */
  padding: 4px 10px;
  line-height: 1.4;
  height: fit-content;
}

#features-hq .hq-featureStack__title{
  margin: 0;
  color: var(--hq-text);
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.35;
}

#features-hq .hq-featureStack__body{
  color: var(--hq-text);
  font-size: 15px;
  line-height: 1.9;
}

#features-hq .hq-featureStack__body p{
  margin: 0 0 12px;
}

#features-hq .hq-featureStack__body p:last-child{
  margin-bottom: 0;
}

#features-hq .hq-featureStack__subBlock{
  border-left: 3px solid var(--hq-soft);
  padding-left: 14px;
  margin: 14px 0;
}

#features-hq .hq-featureStack__subTitle{
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--hq-text);
}

#features-hq code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .95em;
  padding: 1px 6px;
  border: 1px solid var(--hq-soft);
  background: #fff;
  border-radius: 0; /* 角丸なし */
}

/* table */
#features-hq .hq-featureStack__tableWrap{
  overflow-x: auto;
  border: 1px solid var(--hq-line);
  border-radius: 0; /* 角丸なし */
  margin-top: 10px;
}

#features-hq .hq-featureTable{
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: #fff;
}

#features-hq .hq-featureTable thead th{
  text-align: left;
  font-weight: 700;
  color: var(--hq-text);
  background: rgba(0,0,0,.06);
  border-bottom: 1px solid var(--hq-line);
  padding: 10px 12px;
  font-size: 14px;
}

#features-hq .hq-featureTable tbody th,
#features-hq .hq-featureTable tbody td{
  border-top: 1px solid var(--hq-soft);
  padding: 10px 12px;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.7;
}

#features-hq .hq-featureTable tbody th{
  width: 34%;
  font-weight: 700;
  white-space: nowrap;
}

/* responsive */
@media (max-width: 640px){
  #features-hq .hq-featureStack__item{
    padding: 16px;
  }
  #features-hq .hq-featureStack__head{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #features-hq .hq-featureStack__kicker{
    width: fit-content;
  }
  #features-hq .hq-featureTable{
    min-width: 480px;
  }
}

/* CTA banner */
.hq-aboutCta{
  padding:64px 0;
  background:#fff;
}
.hq-aboutCta__inner{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:24px;
  border:1px solid var(--hq-about-border);
  background:#fff;
}
@media (max-width: 980px){
  .hq-aboutCta__inner{
    grid-template-columns:1fr;
  }
}
.hq-aboutCta__media{
  min-height:100%;
  background:#efefef;
  border-right:1px solid var(--hq-about-border);
}
@media (max-width: 980px){
  .hq-aboutCta__media{
    border-right:none;
    border-bottom:1px solid var(--hq-about-border);
  }
}
.hq-aboutCta__media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.hq-aboutCta__body{
  padding:24px;
}
.hq-aboutCta__kicker{
  margin:0 0 8px;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--hq-about-muted);
  font-family:"Poppins", "IBM Plex Sans", sans-serif;
}
.hq-aboutCta__title{
  margin:0 0 10px;
  font-size:clamp(24px, 2.4vw, 34px);
  line-height:1.2;
  color:var(--hq-about-text);
}
.hq-aboutCta__desc{
  margin:0;
  color:var(--hq-about-muted);
  line-height:1.85;
  font-size:16px;
}
.hq-aboutCta__actions{
  margin-top:20px;
}