/* =========================================================================
   Ask White - Service / About page styles
   Shares tokens & components with askwhite-top.css (.card, .container, .btn,
   .icon-wrap, .section-title, .grid, hero graphics, dark theme, etc.)
   ========================================================================= */

:root {
  --brand-gradient: linear-gradient(135deg, #e45656, #59a673, #5ab0cb, #ce9855, #9776bd, #d6bf5e, #da7eb0);
  --brand-soft: rgba(90, 176, 203, 0.14);
}

/* Standalone page shell: neutralise AFFINGER chrome the same way the TOP does,
   but scoped to our page wrapper so nothing else is affected. On these standalone
   templates the body lacks the `front-page` class, so AFFINGER reserves a sidebar
   column on <main> (margin-right ~320px). Cancel it and take the full width. */
.askwhite-page {
  background: var(--bg) !important;
  overflow-x: hidden;
}

.askwhite-page .askwhite-top,
.askwhite-page .askwhite-top > main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.askwhite-top main {
  display: block;
}

/* ------------------------------------------------------------------ hero */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(52px, 8vw, 84px) 0 clamp(46px, 7vw, 72px);
}

.page-hero-copy {
  max-width: 820px;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--subtext);
}

.page-eyebrow::before {
  content: "";
  width: 38px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
}

.askwhite-top .page-hero h1 {
  margin: 0 0 22px !important;
  font-size: clamp(2rem, 4.6vw, 3.3rem) !important;
  line-height: 1.14 !important;
  font-weight: 800 !important;
}

.page-hero .lead {
  margin: 0;
  max-width: 760px;
  color: var(--subtext);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 2;
  letter-spacing: 0.01em;
}

.page-hero .lead + .lead {
  margin-top: 16px;
}

/* category quick-nav chips */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.cat-nav a {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text) !important;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cat-nav a:hover {
  transform: translateY(-2px);
  border-color: #b7b7b7;
  opacity: 1;
}

/* offset sticky header when jumping to a category */
.svc-cat[id] {
  scroll-margin-top: 104px;
}

/* decorative graphics reuse the TOP hero look but calmer */
.page-hero .hero-graphics {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.page-hero .hero-circle {
  top: -40px;
  right: 6%;
  width: 150px;
  height: 150px;
}

/* --------------------------------------------------------- section frame */
.page-section {
  padding-top: clamp(56px, 8vw, 88px);
}

.page-section.is-last {
  padding-bottom: clamp(40px, 6vw, 64px);
}

.section-head {
  margin-bottom: clamp(26px, 4vw, 40px);
  max-width: 760px;
}

.section-eyebrow {
  display: block;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.askwhite-top .section-head h2 {
  margin: 0 0 12px !important;
  font-size: clamp(1.55rem, 3vw, 2.15rem) !important;
  line-height: 1.28 !important;
  font-weight: 700 !important;
}

.section-head p {
  margin: 0;
  color: var(--subtext);
  font-size: 1rem;
  line-height: 1.9;
}

/* ------------------------------------------------- service category block */
.svc-cat {
  padding-top: clamp(44px, 6vw, 66px);
}

.svc-cat-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.svc-cat-index {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: #141414;
  position: relative;
}

.svc-cat-index::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 2px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.9;
}

.svc-cat-titles {
  min-width: 0;
}

.svc-cat-en {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9a9a9a;
  margin-bottom: 4px;
}

.askwhite-top .svc-cat-titles h2 {
  margin: 0 !important;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem) !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
}

.svc-note {
  margin: -8px 0 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--subtext);
  font-size: 0.9rem;
  line-height: 1.7;
}

.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.svc-item {
  display: flex;
  gap: 16px;
  padding: 24px 24px 24px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.svc-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.svc-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.svc-item:hover::before {
  opacity: 1;
}

.svc-item .icon-wrap {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  font-size: 1.1rem;
}

.svc-item .icon-wrap svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svc-item-body {
  min-width: 0;
}

.askwhite-top .svc-item h3 {
  margin: 2px 0 7px !important;
  font-size: 1.08rem !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

.svc-item p {
  margin: 0;
  color: var(--subtext);
  font-size: 0.93rem;
  line-height: 1.75;
}

/* ---------------------------------------------------------- generic grids */
.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card {
  padding: 28px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.08);
}

.info-card .icon-wrap {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
}

.info-card .icon-wrap svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.askwhite-top .info-card h3 {
  margin: 0 0 8px !important;
  font-size: 1.12rem !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

.info-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 0.93rem;
  line-height: 1.8;
}

/* ------------------------------------------------------------- profile */
.profile-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(28px, 4vw, 46px);
  align-items: start;
  padding: clamp(28px, 4vw, 44px);
}

.profile-media {
  position: relative;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  border: 1px solid var(--line);
}

.profile-photo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  padding: 2px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

.profile-role {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.askwhite-top .profile-name {
  margin: 0 0 4px !important;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

.profile-name span {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--subtext);
  margin-left: 10px;
}

.profile-bio {
  margin: 18px 0 0;
}

.profile-bio p {
  margin: 0 0 14px;
  color: var(--subtext);
  font-size: 0.97rem;
  line-height: 1.95;
}

.profile-bio p:last-child {
  margin-bottom: 0;
}

.profile-sns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sns-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text) !important;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sns-chip:hover {
  transform: translateY(-2px);
  border-color: #b9b9b9;
}

.sns-chip svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ------------------------------------------------------------- cert tags */
.cert-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cert-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
}

.cert-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
  flex: 0 0 auto;
}

.cert-note {
  margin: 16px 0 0;
  color: var(--subtext);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* --------------------------------------------------------- owned service */
.owned-card,
.owned-card:visited {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.askwhite-top .owned-card h3 {
  color: var(--text) !important;
}

.owned-card p {
  color: var(--subtext) !important;
}

.owned-card:hover {
  opacity: 1;
}

.owned-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.08);
}

.owned-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f2f2f2;
}

.owned-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}

.owned-card:hover .owned-thumb img {
  transform: scale(1.03);
}

.owned-body {
  display: flex;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.owned-badge {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  background: var(--brand-soft);
}

body.theme-dark .owned-thumb {
  background: #1a1f28;
}

.askwhite-top .owned-card h3 {
  margin: 0 0 10px !important;
  font-size: 1.1rem !important;
  line-height: 1.45 !important;
  font-weight: 700 !important;
}

.owned-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 0.92rem;
  line-height: 1.85;
}

/* ----------------------------------------------------------------- misc */
.mini-cta {
  margin-top: 12px;
}

/* ----------------------------------------------------------- dark theme */
body.theme-dark .svc-cat-index {
  background: #e7ebf4;
  color: #101318;
}

body.theme-dark .info-card:hover,
body.theme-dark .svc-item:hover,
body.theme-dark .owned-card:hover {
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.42);
}

body.theme-dark .sns-chip,
body.theme-dark .cert-tag {
  background: var(--surface);
}

body.theme-dark .section-eyebrow,
body.theme-dark .svc-cat-en,
body.theme-dark .profile-role {
  color: #93a0b4;
}

/* --------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 680px) {
  .svc-grid,
  .card-grid.cols-3,
  .card-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .svc-cat-head {
    gap: 15px;
  }

  .svc-cat-index {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-media {
    max-width: 240px;
    margin: 0 auto;
  }

  .profile-photo {
    aspect-ratio: 1 / 1;
  }
}

/* =========================================================================
   Case studies (past-results page)
   ========================================================================= */
.case-list {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 44px);
}

.case-card {
  padding: clamp(26px, 4vw, 44px);
}

.case-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.case-index {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: #141414;
  position: relative;
}

.case-index::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  padding: 2px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.9;
}

.case-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--brand-soft);
}

.askwhite-top .case-head h2 {
  flex: 1 1 100%;
  margin: 4px 0 0 !important;
  font-size: clamp(1.3rem, 2.5vw, 1.72rem) !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

.case-lead {
  margin: 0 0 24px;
  color: var(--subtext);
  font-size: 1rem;
  line-height: 1.9;
}

/* result metric tiles */
.case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.metric-tile {
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 246, 246, 0.9) 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--subtext);
}

.metric-value {
  font-size: clamp(2.4rem, 5vw, 3.1rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.metric-value small {
  font-size: 0.95rem;
  font-weight: 700;
  margin-left: 4px;
  color: var(--subtext);
}

.metric-note {
  font-size: 0.78rem;
  color: #8a8a8a;
}

.case-visual {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 26px;
  display: block;
}

/* 課題 / 施策 two columns */
.case-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.case-block {
  padding: 22px 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.case-block h4 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.case-block h4::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--brand-soft);
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.case-issue h4::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c85a5a' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 4l9 16H3z'/%3E%3Cline x1='12' y1='10' x2='12' y2='14'/%3E%3Ccircle cx='12' cy='17.5' r='.4'/%3E%3C/svg%3E");
}

.case-fix h4::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a9e6a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}

.case-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-block li {
  position: relative;
  padding-left: 18px;
  color: var(--subtext);
  font-size: 0.93rem;
  line-height: 1.7;
}

.case-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b9b9b9;
}

/* spec box (ご依頼時の状況) */
.spec-box {
  padding: 22px 24px;
  border-radius: 12px;
  background: rgba(90, 176, 203, 0.08);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}

.spec-box h4 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.spec-box dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.spec-box dl > div {
  display: flex;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}

.spec-box dl > div.spec-full {
  grid-column: 1 / -1;
}

.spec-box dt {
  flex: 0 0 40%;
  color: var(--subtext);
  font-weight: 600;
}

.spec-box dd {
  margin: 0;
  color: var(--text);
}

/* flow narrative */
.case-flow {
  margin-bottom: 24px;
}

.case-flow h4 {
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.case-flow p {
  margin: 0 0 12px;
  color: var(--subtext);
  font-size: 0.95rem;
  line-height: 1.9;
}

.case-flow p:last-child {
  margin-bottom: 0;
}

/* client voice */
.voice {
  position: relative;
  margin: 0;
  padding: 24px 26px 24px 30px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.voice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-gradient);
}

.voice-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--subtext);
}

.voice-label svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.voice p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.9;
}

.case-note {
  margin: 8px 0 0;
  color: var(--subtext);
  font-size: 0.9rem;
  line-height: 1.85;
}

/* dark */
body.theme-dark .case-index {
  background: #e7ebf4;
  color: #101318;
}

body.theme-dark .metric-tile {
  background: linear-gradient(165deg, rgba(30, 36, 48, 0.9) 0%, rgba(23, 28, 36, 0.9) 100%);
}

body.theme-dark .spec-box {
  background: rgba(90, 176, 203, 0.06);
}

@media (max-width: 680px) {
  .case-cols,
  .spec-box dl {
    grid-template-columns: 1fr;
  }

  .spec-box dt {
    flex-basis: 44%;
  }
}
