/* ==============================================
   SHARED BASE — Design Tokens, Reset, Utilities
   Simplex Fourth v4
   ============================================== */

/* --- Design Tokens --- */
:root {
  /* Accent: Cyan */
  --c-accent:         #00B3AE;
  --c-accent-hover:   #009590;
  --c-accent-light:   #00E7E1;
  --c-accent-muted:   #ECFDFB;
  --c-accent-subtle:  #CCFAF7;
  --c-accent-border:  rgba(0,179,174,0.20);
  --c-accent-line:    rgba(0,179,174,0.30);
  --c-accent-glow:    rgba(0,231,225,0.10);

  /* Backgrounds */
  --c-bg:       #FFFFFF;
  --c-bg-alt:   #F8F8FC;
  --c-bg-sub:   #F1F5F9;
  --c-bg-alt-2: #EEF2F6;
  --c-surface:  #FFFFFF;

  /* Text */
  --c-text:       #0F172A;
  --c-text-2:     #374151;
  --c-text-3:     #6B7280;
  --c-text-inv:   #F8FAFC;
  --c-text-inv-2: rgba(248,250,252,0.65);
  --c-text-inv-3: rgba(248,250,252,0.40);

  /* Borders */
  --c-border:       #D1D5DB;
  --c-border-light: #E5E7EB;
  --c-border-dark:  rgba(255,255,255,0.08);
  --c-border-dark-2: rgba(255,255,255,0.12);

  /* Dark sections */
  --c-dark:       #0F172A;
  --c-dark-deep:  #020617;
  --c-dark-card:  #1E293B;
  --c-dark-card-hover: #334155;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl:   0 20px 25px -5px rgba(0,0,0,0.06), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 6px 16px rgba(0,0,0,0.04);

  /* Typography */
  --f-en:   'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-ja:   'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  --f-body: 'Noto Sans', 'Noto Sans JP', -apple-system, sans-serif;

  --fs-display: clamp(44px, 6vw, 72px);
  --fs-h1:      clamp(32px, 3.5vw, 44px);
  --fs-h2:      clamp(24px, 2.8vw, 36px);
  --fs-h3:      clamp(18px, 2vw, 24px);
  --fs-body:    clamp(16px, 1.1vw, 16px);
  --fs-small:   clamp(12px, 0.9vw, 12px);
  --fs-xs:      20px;

  --fw-bold:     700;
  --fw-semibold: 600;
  --fw-medium:   500;
  --fw-regular:  400;

  --lh-tight: 1.3;
  --lh-snug:  1.5;
  --lh-body:  1.75;

  /* Spacing & Radius */
  --r-sm:   8px;
  --r-md:   8px;
  --r-lg:   8px;
  --r-xl:   8px;
  --r-full: 9999px;

  --section-gap: clamp(80px, 10vw, 136px);

  /* Motion */
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --dur:      0.3s;
  --dur-slow: 0.5s;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-family: var(--f-ja);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* IDターゲットへのスクロール時にヘッダーと重ならないように調整 */
[id] {
  scroll-margin-top: 100px; /* ヘッダーの高さに合わせて調整 */
}
@media (max-width: 768px) {
  [id] {
    scroll-margin-top: 80px;
  }
}
html, body { overflow-x: clip; }
body {
  font-family: var(--f-body);
  font-weight: 400;
  background: var(--c-bg-alt);
  color: var(--c-text);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* body::before gradient moved to 01_top.html (Top page only) */
a { text-decoration: none; color: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1 !important; transform: none !important; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  border-radius: 8px;
}

/* --- View Transitions --- */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: 200ms ease-out both vt-fade-out;
}
::view-transition-new(root) {
  animation: 280ms ease-in both vt-fade-in;
}
@keyframes vt-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes vt-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.header { view-transition-name: header; }
.footer { view-transition-name: footer; }
::view-transition-old(header),
::view-transition-new(header),
::view-transition-old(footer),
::view-transition-new(footer) {
  animation: none;
}

/* --- Scroll-driven Fade-in --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.08s; }
.fade-in-delay-2 { transition-delay: 0.16s; }
.fade-in-delay-3 { transition-delay: 0.24s; }

/* --- Image Placeholder Shimmer --- */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.mag-card-thumb,
.insight-thumb {
  position: relative;
  background: var(--c-bg-alt);
}
.mag-card-thumb::before,
.insight-thumb::before {
  display: none; /* 画像表示時に被るため非表示化 */
}

/* 挿入された画像が領域にピッタリ収まるように調整 */
.mag-card-thumb img,
.insight-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Content Visibility (off-screen optimization) --- */
.cta-section,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 48px;
}
.br-pc { display: inline; }

/* --- Section Labels & Headings --- */
.section-label {
  font-family: var(--f-en);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  color: var(--c-accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-headline {
  font-family: var(--f-body);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: var(--lh-snug);
  color: var(--c-text);
}
.section-headline--dark {
  color: var(--c-text-inv);
}
.section-sub {
  font-family: var(--f-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  font-size: var(--fs-body);
  color: var(--c-text-2);
}
.section-sub--dark { color: var(--c-text-inv-2); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
  padding: 12px 28px;
  border-radius: var(--r-full);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease);
}
.btn--primary {
  background: var(--c-accent);
  color: var(--c-text-inv);
  padding: 14px 40px;
  box-shadow: 0 2px 8px rgba(0,179,174,0.15), 0 8px 24px rgba(0,179,174,0.10);
}
.btn--primary:hover {
  background: var(--c-accent-hover);
  box-shadow: 0 4px 12px rgba(0,179,174,0.25), 0 12px 32px rgba(0,179,174,0.18);
  transform: translateY(-2px);
}
.btn--secondary {
  background: #FFFFFF;
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn--secondary:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  transform: translateY(-2px);
}
.btn--inv {
  background: #000000;
  color: var(--c-text-inv);
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}
.btn--inv:hover {
  background: #222222;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10), 0 12px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: var(--c-text-inv);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn--outline:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}
.btn-arrow {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}
.btn:has(.btn-arrow) {
  position: relative;
  padding-right: 56px;
  padding-left: 56px;
}

/* ==============================================
   CTA + FOOTER UNIFIED WRAP
   ============================================== */
.cta-footer-wrap {
  position: relative;
  overflow: hidden;
}
.cta-footer-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/images/hero-bg.png') no-repeat center / cover;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.cta-footer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.5);
  pointer-events: none;
  z-index: 0;
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  padding: var(--section-gap) 0;
  background: transparent;
  overflow: hidden;
  z-index: 1;
  border-top: 1px solid var(--c-border-light);
}
.cta-section::before {
  display: none;
}
.cta-inner {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.cta-inner .section-label {
  justify-content: center;
}
.cta-headline {
  font-family: var(--f-body);
  /* font-size: clamp(28px, 3.5vw, 44px); */
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: var(--lh-snug);
  color: var(--c-text);
  margin-bottom: 16px;
}
.cta-sub {
  font-size: var(--fs-body);
  color: var(--c-text-2);
  margin-bottom: 36px;
  line-height: var(--lh-body);
}
.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* --- Footer --- */
.footer {
  position: relative;
  background: transparent;
  padding: 72px 0 36px;
  border-top: 1px solid var(--c-border-light);
  z-index: 1;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  padding-bottom: 56px;
}
.footer-brand .header-logo {
  margin-bottom: 16px;
}
.footer-brand .header-logo img {
  height: 40px;
}
.footer-brand-text {
  font-size: 12px;
  color: var(--c-text-2);
  line-height: var(--lh-body);
  max-width: 280px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.footer-col-title {
  font-family: var(--f-en);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: 24px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--c-text-2);
  padding: 4px 0;
}
.footer-col a:hover {
  color: var(--c-accent);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
}
.footer-copy {
  font-family: var(--f-en);
  font-size: 14px;
  color: var(--c-text-3);
}
.footer-legal {
  display: flex;
  gap: 24px;
}
.footer-legal a {
  font-size: 14px;
  color: var(--c-text-3);
}
.footer-legal a:hover {
  color: var(--c-text-2);
}

/* ==============================================
   SHARED CARDS — insight / usecase
   ============================================== */

/* --- Insight Card (magazine, case studies) --- */
.insight-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.insight-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 6px 16px rgba(0,0,0,0.04);
}
.insight-thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--c-bg-alt), var(--c-bg-sub));
  position: relative;
  overflow: hidden;
  margin: 12px 12px 0;
  border-radius: var(--r-md);
}
.insight-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--f-en);
  font-size: 14px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: var(--c-bg);
  border: 1px solid var(--c-accent-border);
  padding: 4px 12px;
  border-radius: var(--r-full);
}
.insight-body {
  padding: 24px;
}
.insight-date {
  font-family: var(--f-en);
  font-size: 12px;
  color: var(--c-text-3);
  margin-bottom: 8px;
}
.insight-title {
  font-family: var(--f-body);
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 1.6;
  color: var(--c-text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.insight-client {
  font-family: var(--f-ja);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.insight-excerpt {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Usecase Card --- */
.usecase-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.usecase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 6px 16px rgba(0,0,0,0.04);
}
.usecase-icon-area {
  aspect-ratio: 16/9;
  background: var(--c-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 12px 12px 0;
  border-radius: var(--r-md);
}
.usecase-icon-area svg {
  width: 48px;
  height: 48px;
  stroke: var(--c-accent);
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}
.usecase-body {
  padding: 24px;
}
.usecase-tag {
  font-family: var(--f-en);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.usecase-title {
  font-family: var(--f-body);
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 1.6;
  color: var(--c-text);
  margin-bottom: 8px;
}
.usecase-excerpt {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Media Card (external media links) --- */
.media-pickup {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.media-card {
  background: #F8F8FC;
  border: none;
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
  position: relative;
}
.media-card:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 6px 16px rgba(0,0,0,0.04);
  transform: translateY(-6px);
}
.media-card-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--c-bg-alt), var(--c-bg-sub));
  overflow: hidden;
  margin: 12px 12px 0;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.media-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.media-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.media-card-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-en);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--c-text);
}
.media-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-card-external {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--c-bg-alt);
  border-radius: 50%;
  color: var(--c-text-3);
}
.media-card-external svg {
  width: 16px;
  height: 16px;
  stroke: var(--c-text-3);
}
.media-card-title {
  font-size: 16px;
  font-weight: var(--fw-bold);
  line-height: 1.6;
  color: var(--c-text);
  flex: 1;
}
.media-card:hover .media-card-title {
  color: var(--c-accent);
}
.media-card-date {
  font-family: var(--f-en);
  font-size: 12px;
  color: var(--c-text-3);
}

/* --- News Preview List (shared news list component) --- */
.news-preview-list {
  display: flex;
  flex-direction: column;
}
.news-preview-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border);
}
.news-preview-item:last-child {
  border-bottom: none;
}
.news-preview-item:hover .news-preview-title {
  color: var(--c-accent);
}
.news-preview-date {
  font-family: var(--f-en);
  font-size: var(--fs-small);
  color: var(--c-text-3);
  flex-shrink: 0;
  min-width: 90px;
}
.news-preview-badge {
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: var(--fw-medium);
  padding: 4px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
  display: inline-flex;
  justify-content: center;
  min-width: 120px;
  flex-shrink: 0;
}
.news-preview-badge--press,
.news-badge--press {
  background: var(--c-accent-muted);
  color: var(--c-accent);
}
.news-preview-badge--info,
.news-badge--info {
  background: var(--c-bg-sub);
  color: var(--c-text-2);
}
.news-preview-badge--media,
.news-badge--media {
  background: rgba(245,158,11,0.10);
  color: #D97706;
}
.news-preview-badge--update,
.news-badge--update {
  background: rgba(27,138,158,0.10);
  color: #1B8A9E;
}
.news-preview-badge--event,
.news-badge--event {
  background: rgba(108,99,255,0.10);
  color: #6C63FF;
}
.news-preview-body {
  flex: 1;
  display: flex;
  align-items: baseline;
  min-width: 0;
}
.news-preview-title {
  font-size: 16px;
  font-weight: var(--fw-regular);
  color: var(--c-text-2);
  line-height: 1.6;
  flex: 1;
  transition: color var(--dur) var(--ease);
}
.news-preview-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--c-text-3);
  margin-left: 16px;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.news-preview-item:hover .news-preview-arrow {
  color: var(--c-accent);
  transform: translateX(4px);
}

/* ==============================================
   用語集要（glossary） 20260611追加
   ============================================== */
.glossary-thumb {
    position: relative;
    /* overflow: hidden; */
    margin: 12px 12px 0;
    border-radius: var(--r-md);
}
.glossary-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    font-family: var(--f-en);
    font-size: 14px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-accent);
    background: none;
    border: 1px solid var(--c-accent-border);
    padding: 4px 12px;
    border-radius: var(--r-full);
}
.glossary-body {
    padding: 24px;
}
.insight-card.glossary-has-tag .insight-title {
  padding-top: 40px;
}


/* ==============================================
   SHARED RESPONSIVE
   ============================================== */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .footer-top { grid-template-columns: 1fr; gap: 48px; }
  .media-pickup { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section-label { font-size: 16px; }
  .br-pc { display: none; }
  .cta-headline br { display: none; }
  .cta-buttons { flex-direction: column; width: 100%; max-width: 320px; margin: 0 auto; }
  .cta-buttons .btn { width: 100%; }
  .footer-links { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .news-preview-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 6px;
    padding: 20px 0;
    align-items: center;
  }
  .news-preview-date { grid-column: 1; grid-row: 1; display: block; min-width: auto; font-size: 12px; }
  .news-preview-badge { grid-column: 2; grid-row: 1; justify-self: start; display: inline-flex; }
  .news-preview-body { grid-column: 1 / 3; grid-row: 2; display: inline; }
  .news-preview-title { display: inline; }
  .news-preview-arrow { display: inline-flex; vertical-align: middle; margin-left: 4px; width: 16px; height: 16px; margin-bottom: 2px; }
  .media-pickup { grid-template-columns: 1fr; }
}
