.slowgan-en{
  padding-top:30px;
    text-align: center;
    FONT-SIZE: 96PX;
    color: var(--dx-dim);
    font-family: "agency-fb", sans-serif;
    font-weight: 400; }

.slowgan-logo{
  height: 30px;
  display: inline-block;
  vertical-align: text-top; /* 上寄せ */
  /* no filter here: external white SVG should stay white */
  mix-blend-mode: normal;
}
.slowgan-info{
    margin-top:20px;
    text-align: center;
    FONT-SIZE: 18PX;
    color: var(--dx-dim);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
}


/* Inline SVG: force fills/strokes to white */
.slowgan-logo svg,
.slowgan-logo svg * {
  fill: #fff !important;
  stroke: #fff !important;
}

/* img-specific fallback (if needed) */
/* Ensure external SVG (<img src="...">) stays visible */
img.slowgan-logo {
  -webkit-filter: none !important;
  filter: none !important;
  background-color: transparent;
}

/* Carousel uniform scaling without changing internal ratios */
#carousel-section {
  --carousel-scale: 1.0; /* tweak 0.6 - 1.0 as needed */
}

#carousel-section .carousel-container {
  transform: scale(var(--carousel-scale));
  transform-origin: top center;
}

/* Optional: keep it visually centered if parent is full-width */
#carousel-section .carousel-container {
  margin-left: auto;
  margin-right: auto;
}

/* Drag/Swipe UX for carousel */
#carousel {
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}
#carousel.dragging {
  cursor: grabbing;
}
/* Prevent default image dragging ghost */
.carousel img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
/* Base and Layout Styles */
body {
    background-color: var(--bg-dark, #050309);
    color: var(--text-light, #f0f0f0);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Topview Section */
.topview {
    width: 100%;
    /* Reduce viewport height by header height so fixed header doesn't overlap centered content */
    min-height: calc(100vh - 110px); /* header approx 110px */
    height: auto;
    overflow: hidden;
    position: relative; /* For positioning children like #container */
    background-color: var(--bg-dark, #050309); /* Ensure it has a background */
    padding-top: 110px; /* reserve space for the fixed header */
    box-sizing: border-box;
}

.topview-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  width: 100%; /* 幅を100%に */
  padding: 0 2rem; /* 左右に余白を追加 */
  z-index: 10;
}

.glitch, .glitch-sub {
  padding-top:10%;
  position: relative;
  color: white;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.glitch {
  font-size: 2rem; /* 少し小さく */
  font-weight: 600;
  margin-bottom: 1rem;
}

.glitch-sub {
  font-size: 2rem; /* 同じサイズに */
  font-weight: 600;
}

.glitch span, .glitch-sub span {
    position: relative;
    display: inline-block;
}

.glitch span:before,
.glitch span:after,
.glitch-sub span:before,
.glitch-sub span:after {
  content: attr(data-char);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch span.glitch-active:before,
.glitch span.glitch-active:after,
.glitch-sub span.glitch-active:before,
.glitch-sub span.glitch-active:after {
    opacity: 1;
}

.glitch span:before, .glitch-sub span:before {
  left: 2px;
  text-shadow: -1px 0 #00ffea;
  animation: glitch-anim-1 0.4s 1;
}

.glitch span:after, .glitch-sub span:after {
  left: -2px;
  text-shadow: -1px 0 #fe3a7f;
  animation: glitch-anim-2 0.4s 1;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(40% 0 61% 0); }
  5% { clip-path: inset(4% 0 33% 0); }
  10% { clip-path: inset(43% 0 25% 0); }
  15% { clip-path: inset(49% 0 53% 0); }
  20% { clip-path: inset(7% 0 54% 0); }
  25% { clip-path: inset(33% 0 32% 0); }
  30% { clip-path: inset(33% 0 4% 0); }
  35% { clip-path: inset(21% 0 35% 0); }
  40% { clip-path: inset(38% 0 59% 0); }
  45% { clip-path: inset(49% 0 1% 0); }
  50% { clip-path: inset(2% 0 79% 0); }
  55% { clip-path: inset(26% 0 19% 0); }
  60% { clip-path: inset(35% 0 44% 0); }
  65% { clip-path: inset(80% 0 1% 0); }
  70% { clip-path: inset(46% 0 53% 0); }
  75% { clip-path: inset(59% 0 3% 0); }
  80% { clip-path: inset(43% 0 4% 0); }
  85% { clip-path: inset(71% 0 28% 0); }
  90% { clip-path: inset(71% 0 24% 0); }
  95% { clip-path: inset(1% 0 16% 0); }
  100% { clip-path: inset(74% 0 12% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(83% 0 13% 0); }
  5% { clip-path: inset(20% 0 16% 0); }
  10% { clip-path: inset(40% 0 4% 0); }
  15% { clip-path: inset(49% 0 18% 0); }
  20% { clip-path: inset(13% 0 2% 0); }
  25% { clip-path: inset(4% 0 43% 0); }
  30% { clip-path: inset(83% 0 15% 0); }
  35% { clip-path: inset(39% 0 54% 0); }
  40% { clip-path: inset(9% 0 34% 0); }
  45% { clip-path: inset(53% 0 2% 0); }
  50% { clip-path: inset(44% 0 51% 0); }
  55% { clip-path: inset(60% 0 38% 0); }
  60% { clip-path: inset(94% 0 3% 0); }
  65% { clip-path: inset(8% 0 1% 0); }
  70% { clip-path: inset(82% 0 13% 0); }
  75% { clip-path: inset(28% 0 13% 0); }
  80% { clip-path: inset(98% 0 1% 0); }
  85% { clip-path: inset(49% 0 6% 0); }
  90% { clip-path: inset(3% 0 12% 0); }
  95% { clip-path: inset(19% 0 14% 0); }
  100% { clip-path: inset(75% 0 21% 0); }
}

#container {
    width: 100%;
    height: 100%;
}

/* General Content Sections */
section {
    padding: 60px 20px;
    border-bottom: 1px solid var(--border-color, #2a2a2a);
    position: relative; /* Good practice for potential z-index needs later */
    background-color: var(--bg-dark, #050309); /* Explicit background for all sections */
}

/* Remove bottom border for topview section and for the slogan area */
section.topview, section.slowgan {
  border-bottom: none;
}
.slowgan-en {
  /* ensure the slogan block itself doesn't show a border */
  display: block;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Logo hover overlay: shows ▶HOME on hover/focus (click bubbles to parent anchor) */
.logo { position: relative; display: inline-block; }
.logo-icon { position: relative; display: inline-block; }
.logo-overlay { position: absolute; inset: 0; display:flex; align-items:flex-start; justify-content:flex-end; padding-right:0; padding-top:0; color:#8d8d8d; background: rgba(0,0,0,0.56); font-weight:700; font-size:14px; letter-spacing:0.04em; border-radius:6px; opacity:0; transform: translateY(0) scale(0.98); transition: opacity .22s ease, transform .28s cubic-bezier(.2,.9,.2,1); pointer-events: none; text-align:right; }
.logo:hover .logo-overlay, .logo:focus .logo-overlay, .logo:focus-within .logo-overlay { opacity:1; transform: none; pointer-events: auto; }
.logo:focus-visible .logo-overlay { box-shadow: 0 0 0 6px rgba(139,92,246,0.12); }
@media (max-width:520px) { .logo-overlay { font-size:12px; } }
@media (prefers-reduced-motion: reduce) { .logo-overlay { transition: none; transform: none; opacity:1; } }

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--accent-purple, #8b5cf6);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted, #888);
}

/* Hero (Carousel) Section */
.hero {
    min-height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-12px);
}

/* Override: set padding-top to 0 for hero to align with layout preference */
.hero { padding-top: 0 !important; }
/* Fade-in when section enters viewport */
.topview,
.slowgan {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 2.0s ease-out, transform 2.0s ease-out;
  will-change: opacity, transform;
}
.topview.in-view,
.slowgan.in-view {
  opacity: 1;
  transform: none;
}

.slowgan .slowgan-en,
.slowgan .slowgan-info {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  transition-delay: 0.15s;
}
.slowgan.in-view .slowgan-en,
.slowgan.in-view .slowgan-info {
  opacity: 1;
  transform: none;
}

/* slowgan-logo fades last (longer delay) */
.slowgan .slowgan-logo {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 2.0s ease-out 0.9s, transform 2.0s ease-out 0.9s;
}
.slowgan.in-view .slowgan-logo {
  opacity: 1;
  transform: none;
}

/* ---------- Drama headline (slowgan) ---------- */
.drama { margin-top: 18px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:8px; }
.drama-headline { display:block; font-size: clamp(20px, 3.4vw, 34px); line-height: 1.05; font-weight: 700; letter-spacing: 0.02em; margin: 6px 0; height: auto; max-width: 1100px; }
.drama-sub { color: var(--text-muted,#9aa); margin-top:6px; font-size: 0.98rem; max-width: 760px; }

/* per-letter animation */
.drama-headline .char { display:inline-block; opacity:0; transform: translateY(10px); will-change: transform, opacity; }
.drama-headline .char.animate { animation: charIn .75s cubic-bezier(.2,.9,.2,1) forwards; }
@keyframes charIn { to { transform: none; opacity: 1; } }

/* moving gradient overlay for a cool look */
/* Use feature query: if background-clip:text supported, use gradient text, else fall back to a visible color */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .drama-headline { background: linear-gradient(90deg,#8b5cf6 0%, #00ffe6 40%, #fe3a7f 90%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; background-size: 200% 100%; background-position: 0% 50%; transition: background-position .9s ease; position: relative; z-index: 2; }
  .drama-headline.reveal { background-position: 100% 50%; }
}
@supports not (-webkit-background-clip: text) {
  .drama-headline { color: var(--text-light,#fff); position: relative; z-index: 2; }
}

/* inline divider inside the headline (replaces textual dashes) */
.drama-headline .divider-inline { display:inline-block; vertical-align: middle; width: 72px; height: 2px; margin: 0 10px; background: #ffffff; border-radius: 2px; opacity: 1; transform: scaleX(0.98); transition: transform .45s cubic-bezier(.2,.9,.2,1), opacity .45s ease; }
@media (max-width:720px) { .drama-headline .divider-inline { width: 48px; height: 1px; margin: 0 8px; } }
.drama-headline.reveal .divider-inline { transform: scaleX(1); opacity: 1; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
@media (prefers-reduced-motion: reduce) { .drama-headline .divider-inline { transition: none; transform: none; } }

/* Drama divider — simple subtle line */
.drama-divider { width: 220px; height: 1px; display:block; margin: 8px 0; background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04), rgba(255,255,255,0.12)); border-radius: 2px; opacity: 0.92; }

/* reveal effect for the divider (keeps the pop animation) */
.drama-divider.reveal { transform-origin: center; animation: dividerPop .45s cubic-bezier(.2,.9,.2,1); box-shadow: 0 4px 14px rgba(0,0,0,0.06); opacity:1; }
@keyframes dividerPop { 0% { transform: scale(0.98); opacity:0.85; } 60% { transform: scale(1.03); opacity:1; } 100% { transform: scale(1); opacity:1; } }

/* make it subtle on small screens */
@media (max-width:720px) { .drama-divider { width: 140px; height: 1px; } }



/* reduced motion respects */
@media (prefers-reduced-motion: reduce) {
  .drama-headline .char { transform:none; opacity:1; animation:none; }
  .drama-headline { background-position: 100% 50%; transition:none; }
}

/* Force white text for the drama headline to ensure visibility */
.drama-headline {
  color: #ffffff !important;
  background-image: none !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}


/* Prevent main content from being hidden behind a fixed header */
main#about-content {
  padding-top: 110px; /* adjust if header height changes */
}

@media (max-width: 720px) {
  main#about-content {
    padding-top: 90px; /* slightly smaller on narrow screens */
  }
}

/* About page specific layout to match reference */
.section-header::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #1e64ff; /* blue marker */
  border-radius: 50%;
  margin-right: 12px;
  vertical-align: middle;
}
.section-header h2, .section-header .section-title {
  display: inline-block;
  vertical-align: middle;
}

.company-info .section-container dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 28px;
  align-items: start;
}
.company-info dl dt {
  color: var(--text-muted, #999);
  text-align: center; /* label centered per request */
  font-weight: 600;
  letter-spacing: 0.2em; /* spaced small labels like the reference */
  writing-mode: horizontal-tb;
  padding-top: 0px;
}
.company-info dl dd {
  margin: 0 0 12px 0;
  color: var(--text-light, #f0f0f0);
  line-height: 1.6;
}

/* Reusable DL grid for consistent two-column term/detail lists */
.dl-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px 42px;
  align-items: start;
}
.dl-grid dt {
  color: var(--text-muted, #999);
  text-align: right; /* align numbers to right so digits line up vertically */
  font-weight: 600;
  letter-spacing: 0.2em;
  writing-mode: horizontal-tb;
  padding-top: 0px;
  /* Use tabular numbers for consistent digit width */
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum" 1;
  font-feature-settings: "tnum" 1;
}
.dl-grid dd {
  margin: 0 0 12px 0;
  color: var(--text-light, #f0f0f0);
  line-height: 1.6;
  text-align: left; /* Ensure details are left-aligned */
}

/* Date grid inside dt: 5 columns; era wider for proper alignment */
.dl-date {
  display: inline-grid;
  /* Wider era column, compact labels for 年/月 */
  grid-template-columns: 1.6fr 0.9fr 0.4fr 0.9fr 0.4fr;
  gap: 0 8px;
  width: 100%;
  align-items: center;
}
/* Remove global text-align; use per-element alignment for better control */
.dl-date span { display: block; font-variant-numeric: tabular-nums; }
.dl-date .era { justify-self: start; padding-right: 6px; white-space: nowrap; letter-spacing: normal; }
.dl-date .yr, .dl-date .mo { font-weight: 700; justify-self: end; }
.dl-date .yr-label, .dl-date .mo-label { justify-self: start; color: var(--text-muted,#777); }

@media (max-width: 720px) {
  /* On small screens, keep simple left-aligned text */
  .dl-date { grid-template-columns: auto; gap: 0; }
  .dl-date span { display: inline; margin-right: 6px; }
}

/* Make list bullets and spacing similar to reference */
.section-container ul {
  margin: 0;
  padding-left: 1rem;
  list-style: none;
}
/* Add padding to list items for improved spacing */
.section-container ul li {
  padding: 10px 0;
}
.section-container ul li::before {
  content: '\2022';
  color: #1e64ff;
  display: inline-block;
  width: 1.2em;
  margin-left: -1.2em;
}

@media (max-width: 720px) {
  .company-info .section-container dl {
    grid-template-columns: 1fr;
  }
  .company-info dl dt, .dl-grid dt {
    letter-spacing: normal;
    text-align: left;
  }
}

/* Center section frames and constrain width while keeping text left-aligned */
main#about-content {
  max-width: 1080px; /* expanded to allow 4-up flyer row */
  margin-left: auto;
  margin-right: auto;
}

.section-container {
  text-align: center;
  max-width: 760px; /* main content width for each section */
  margin-left: auto;
  margin-right: auto;
  text-align: left; /* keep inner text left-aligned */
  padding-left: 12px;
  padding-right: 12px;
}

@media (max-width: 920px) {
  .section-container {
    max-width: 92%;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 480px) {
  main#about-content {
    padding-top: 80px; /* ensure spacing on very small screens remains OK */
  }
}

/* Organization chart styles */
.org-chart {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}
.org-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  position: relative;
}
.org-branches {
  display: flex;
  gap: 24px;
  width: 100%;
  justify-content: space-between;
  margin-top: -18px; /* lift branches so horizontal meets box top */
}

/* Client list link (placed right-aligned under the third pillar) */
.client-list-link-wrap { text-align: right; margin-top: 8px; margin-bottom: 16px; }
.client-list-link { display: inline-block; color: var(--accent-blue, #00d1ff); background: rgba(139,92,246,0.06); padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight:700; font-size:0.95rem; }
.client-list-link:hover, .client-list-link:focus { background: rgba(139,92,246,0.12); color: #ffffff; outline: none; }
@media (max-width: 720px) { .client-list-link-wrap { text-align: center; } }
.org-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  flex: 1 1 0;
}
.org-box {
  border: 2px solid rgba(255,255,255,0.15);
  padding: 14px 18px;
  background: rgba(0,0,0,0.35);
  color: var(--text-light,#fff);
  text-align: center;
  border-radius: 2px;
  position: relative;
}
.org-box.large {
  padding: 12px 20px;
  font-weight: 600;
}
.org-box.small {
  padding: 10px 14px;
  font-size: 0.95rem;
}
/* downward arrow under top group removed per request */
.org-branches::before {
  content: '';
  position: absolute;
}

/* add small left/right separators on each column to simulate connectors */
.org-column {
  position: relative;
}

/* upward arrowheads removed — cleaned redundant empty pseudo-element rules */
.org-column::after {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  width: calc(100% + 24px);
  height: 2px;
  transform: translateX(-50%);
  background: #ffffff; /* horizontal branch connector */
  z-index: -1;
}

@media (max-width: 920px) {
  .org-branches { flex-direction: column; gap: 18px; }
  .org-column::after { display: none; }
  .org-column::before { left: 12px; }
}

/* small upward arrow at top of each column (meets central connector) */
/* upward arrow at top of each column removed per request */

/* connector bar between top group and branches */
.org-connector {
  position: relative;
  width: 100%;
  height: 40px;
  display: block;
}
.org-connector::before {
  /* horizontal line */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 2px;
  background: #ffffff; /* solid white */
}
.org-connector .arrow { display: none; } /* hide arrowheads */
.org-connector .org-vertical {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: #ffffff; /* solid white vertical */
}

@media (max-width: 920px) {
  .org-connector { height: 28px; }
  .org-connector::before { top: 12px; }
  .org-connector .org-vertical { display: none; }
  .org-connector .arrow.left, .org-connector .arrow.right { display: none; }
}

/* Center contact form while keeping its current size */
.contact-container {
  display: flex;
  justify-content: center;
}

/* keep the form's intrinsic size; allow it to shrink on very small screens */
.contact-form {
  margin: 0;
  width: 760px; /* match section-container max-width */
  max-width: 100%;
  box-sizing: border-box;
}

/* make inputs and textarea fill the form width */
.contact-form .form-group input,
.contact-form .form-group textarea {
  width: 100%;
  box-sizing: border-box;
}

/* center the submit button and give it breathing room */
.contact-form .submit-btn,
.contact-form button[type="submit"] {
  display: block;
  margin: 18px auto 0;
}

@media (max-width: 720px) {
  .contact-form { width: 100%; max-width: 100%; }
}

/* Strengths grid: four octagonal boxes around a central logo with connectors */
.strengths .section-container .strengths-grid {
  text-align: center;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 260px 1fr;
  grid-template-rows: 140px 140px;
  gap: 28px;
  align-items: center;
  justify-items: center;
  padding: 18px 12px;
}

.strengths .section-container .strength-box {
  width: 420px;
  max-width: 96%;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  color: var(--text-light,#fff);
  box-sizing: border-box;
  padding: 8px 18px;
  font-size: 1.45rem;
  font-weight: 500;
  text-align: center;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.strengths .section-container .top-left  { grid-column: 1 / 2; grid-row: 1 / 2; }
.strengths .section-container .top-right { grid-column: 3 / 4; grid-row: 1 / 2; }
.strengths .section-container .bottom-left  { grid-column: 1 / 2; grid-row: 2 / 3; }
.strengths .section-container .bottom-right { grid-column: 3 / 4; grid-row: 2 / 3; }

.strengths .section-container .center-logo {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  z-index: 3;
  position: relative;
}
.strengths .section-container .center-logo img { width: 56px; height: auto; display:block; }

/* draw continuous octagon stroke using an SVG background on a pseudo-element */
.strengths .section-container .strength-box::before,
.strengths .section-container .center-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  z-index: 1;
  /* SVG polygon stroke: white at 25% opacity, stroke-width tuned to 6 */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><polygon points='33,0 66,0 100,33 100,66 66,100 33,100 0,66 0,33' fill='none' stroke='%23ffffff' stroke-opacity='0.25' stroke-width='6' stroke-linejoin='miter'/></svg>");
}

/* place label above the SVG stroke */
.strengths .section-container .strength-box > *,
.strengths .section-container .center-logo > * {
  position: relative;
  z-index: 2;
}

/* connectors: horizontal and vertical bars crossing the center; center logo sits above them */
.strengths .section-container .strengths-grid::before,
.strengths .section-container .strengths-grid::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.25);
  z-index: 1;
}
.strengths .section-container .strengths-grid::before {
  /* horizontal */
  left: 6%; right: 6%; top: 50%; height: 6px; transform: translateY(-50%);
}
.strengths .section-container .strengths-grid::after {
  /* vertical */
  top: 6%; bottom: 6%; left: 50%; width: 6px; transform: translateX(-50%);
}

/* small gap around center to mimic separate connector ends */
.strengths .section-container .center-logo { box-shadow: 0 0 0 8px rgba(0,0,0,0.85); }

@media (max-width: 920px) {
  .strengths .section-container .strengths-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
  }
  .strengths .section-container .center-logo { grid-row: 3 / 4; }
  .strengths .section-container .top-left,
  .strengths .section-container .top-right,
  .strengths .section-container .bottom-left,
  .strengths .section-container .bottom-right { grid-column: 1 / -1; }
  .strengths .section-container .strengths-grid::before,
  .strengths .section-container .strengths-grid::after { display: none; }
}

/* Flyer grid: rows with 2 / 3 / 4 / 1 layout, centered */
/* Allow the flyer section a wider container than the default section to fit 4-up layout */
.company-info .section-container { max-width: 980px; }

:root { --flyer-item-width: 220px; --flyer-item-height: 300px; --flyer-gap: 24px; }

/* Constrain the flyer grid to exactly fit 4 items (4 * item-width + 3 * gap) and center it */
.flyer-grid { width: 100%; max-width: calc(var(--flyer-item-width) * 4 + var(--flyer-gap) * 3); margin-left: auto; margin-right: auto; box-sizing: border-box; }
.flyer-row { display: flex; justify-content: center; gap: var(--flyer-gap); flex-wrap: wrap; margin-bottom: 24px; }
/* Use a single fixed size for every flyer item so 2/3/4 rows show the same display size */
 .flyer-row .flyer-item { flex: 1 1 var(--flyer-item-width); min-width: 200px; max-width: var(--flyer-item-width); text-align: center; padding: 8px; box-sizing: border-box; }
/* Link container (positioned) */
.flyer-row .flyer-item a { position: relative; display: block; overflow: hidden; border-radius: 8px; box-shadow: 0 6px 14px rgba(0,0,0,0.06); transition: box-shadow .18s ease, transform .18s ease; }

/* Image box: show full image inside fixed box (subtle padding) */
.flyer-row .flyer-item img { width: 100%; height: var(--flyer-item-height); object-fit: contain; background-color: rgba(0,0,0,0.04); display: block; margin-left: auto; margin-right: auto; padding: 4px; box-sizing: border-box; transition: transform .12s ease; }

/* Hover overlay (dim + label) — made more subtle */
.flyer-row .flyer-item a::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.28); opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.flyer-row .flyer-item a::after { content: "PDFを開く"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; background: rgba(0,0,0,0.55); padding: 6px 10px; border-radius: 4px; font-weight: 700; font-size: 0.9rem; opacity: 0; transition: opacity .18s ease, transform .18s ease; pointer-events: none; white-space: nowrap; }

/* Hover & focus states — softer scale and shadow */
.flyer-row .flyer-item a:hover::before, .flyer-row .flyer-item a:focus::before, .flyer-row .flyer-item a:active::before { opacity: 1; }
.flyer-row .flyer-item a:hover::after, .flyer-row .flyer-item a:focus::after, .flyer-row .flyer-item a:active::after { opacity: 1; transform: translate(-50%, -50%) scale(1.01); }
.flyer-row .flyer-item a:hover img, .flyer-row .flyer-item a:focus img { transform: scale(1.01); }
.flyer-row .flyer-item a:hover, .flyer-row .flyer-item a:focus { box-shadow: 0 10px 26px rgba(0,0,0,0.08); }

/* Landscape presentation: wider horizontal frame so the presentation image displays larger */
:root { --flyer-landscape-width: 360px; --flyer-landscape-height: 220px; }
.flyer-row.row-1 { justify-content: center; }
.flyer-row.row-1 .flyer-item { flex: 0 0 var(--flyer-landscape-width); max-width: var(--flyer-landscape-width); }
.flyer-row.row-1 .flyer-item img.landscape { width: 100%; height: var(--flyer-landscape-height); object-fit: contain; border: solid 1px #666; }

/* Note text under the flyer heading (match page subtitle style, centered) */
.flyer-note {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 8px auto 14px; /* center horizontally */
  text-align: center;
  color: var(--text-muted, #888);
  font-size: 1rem;
}
/* Responsive fallbacks: switch to percent-based cards on narrower screens */
@media (max-width: 920px) {
  :root { --flyer-landscape-width: 320px; --flyer-landscape-height: 200px; }
  .flyer-row .flyer-item { flex: 0 0 31%; max-width: 31%; }
  .flyer-row.row-1 .flyer-item { flex: 0 0 var(--flyer-landscape-width); max-width: var(--flyer-landscape-width); }
}
@media (max-width: 720px) {
  .flyer-row .flyer-item { flex: 0 0 46%; max-width: 46%; }
  .flyer-row.row-1 .flyer-item { flex: 0 0 90%; max-width: 90%; }
  :root { --flyer-item-height: 220px; }
  .flyer-row.row-1 .flyer-item img.landscape { width: 100%; height: auto; max-height: 220px; }
}
@media (max-width: 420px) {
  .flyer-row .flyer-item { flex: 0 0 90%; max-width: 90%; }
  :root { --flyer-item-height: 180px; }
}

.flyer-row-caption { text-align: center; color: var(--text-muted,#ffffff); font-weight: 600; margin: 8px 0 20px; }
.flyer-item .flyer-title { margin-top: 8px; font-weight: 600; }
.flyer-item .flyer-subtitle { color: var(--text-muted,#888); font-size: 0.95rem; margin-top: 4px; }

@media (max-width: 920px) {
  /* on medium screens, allow 2 per row for better readability */
  .flyer-row.row-4 .flyer-item { flex: 0 0 46%; max-width: 46%; }
}
@media (max-width: 720px) {
  .flyer-row .flyer-item { flex: 0 0 46%; max-width: 46%; }
  .flyer-row { gap: 12px; }
}
@media (max-width: 420px) {
  .flyer-row .flyer-item { flex: 0 0 90%; max-width: 90%; }
}

/* Back to Top button (right-bottom, discreet) */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.60);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  z-index: 999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(-70px);
  pointer-events: auto;
}
.back-to-top:focus { outline: 2px solid #8b5cf6; outline-offset: 3px }
@media (max-width: 520px){ .back-to-top { right:12px; bottom:12px; width:40px; height:40px; font-size:18px } }
