/* =====================================================
   benefits.css — 英検®活用のメリット (/benefits/)
   -----------------------------------------------------
   Page-specific styles for the admissions-benefits deep
   dive. Restyles the legacy LP "Benefits" content into
   the current editorial system. Relies on base.css +
   layout.css for tokens and shared components
   (.section, .container, .section-tag, .btn, .fade).
   ===================================================== */

/* =====================
   1. HERO — breadcrumb + headline over a feathered photo
   Mirrors the about-hero rhythm: a photograph fills the
   right ~55% with a cream gradient feathering its edges
   into the surrounding wash; the left half carries the
   breadcrumb + headline.
   ===================== */
.benefits-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 60vh, 560px);
  padding: calc(var(--header-h) + var(--sp-lg)) 0 var(--sp-xl);
  background-color: var(--bg-cream);
}
.benefits-hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  z-index: 0;
}
.benefits-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.benefits-hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  z-index: 1;
  background:
    linear-gradient(90deg,
      var(--bg-cream) 0%,
      rgba(250, 247, 243, 0.85) 8%,
      rgba(250, 247, 243, 0.4) 22%,
      transparent 42%),
    linear-gradient(180deg,
      var(--bg-cream) 0%,
      transparent 18%,
      transparent 82%,
      var(--bg-cream) 100%);
}
/* Bottom feather into the white intro section below */
.benefits-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent 0%, var(--bg-white) 100%);
  pointer-events: none;
  z-index: 1;
}
.benefits-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.benefits-hero-text {
  max-width: 560px;
}
.benefits-hero-breadcrumb {
  margin: 0 0 1.25rem;
}
.benefits-hero-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}
.benefits-hero-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.benefits-hero-breadcrumb-item + .benefits-hero-breadcrumb-item::before {
  content: '/';
  color: var(--text-muted);
  font-weight: 400;
}
.benefits-hero-breadcrumb-link {
  color: var(--text-light);
  transition: color var(--transition);
}
.benefits-hero-breadcrumb-link:hover {
  opacity: 1;
  color: var(--primary);
}
.benefits-hero-breadcrumb-current {
  font-weight: 700;
  color: var(--text-main);
}
.benefits-hero-tag {
  display: block;
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.benefits-hero-title {
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0 0 1.25rem;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.benefits-hero-title-em {
  position: relative;
  display: inline-block;
  font-style: normal;
  white-space: nowrap;
}
.benefits-hero-title-em::after {
  content: '';
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: -0.12em;
  height: 0.32em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 18' preserveAspectRatio='none'><path d='M4 12 Q 80 2, 160 8 T 316 6' fill='none' stroke='%23F59E0B' stroke-width='5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.benefits-hero-sub {
  font-size: 0.98rem;
  color: var(--text-light);
  line-height: 1.95;
  margin: 0;
  max-width: 520px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.benefits-hero-sub em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-main);
}

/* =====================
   2. INTRO — short framing lead above the case blocks
   ===================== */
.section-benefits-intro {
  background: var(--bg-white);
}
.benefits-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.benefits-intro-title {
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  font-weight: 800;
  line-height: 1.55;
  margin: 0.35rem 0 1.1rem;
}
/* Keyword treatment — amber squiggle underline, matching the site's
   editorial section titles (courses/success/about). Dark text keeps the
   contrast accessible; the amber lives in the underline. */
.benefits-intro-title em {
  position: relative;
  display: inline-block;
  font-style: normal;
  color: var(--text-main);
  white-space: nowrap;
}
.benefits-intro-title em::after {
  content: '';
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: -0.12em;
  height: 0.32em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 18' preserveAspectRatio='none'><path d='M4 12 Q 80 2, 160 8 T 316 6' fill='none' stroke='%23F59E0B' stroke-width='5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.benefits-intro-lead {
  font-size: 0.96rem;
  color: var(--text-light);
  line-height: 1.95;
  margin: 0;
}
.benefits-intro-lead em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-main);
}

/* =====================
   3. CASE BLOCKS — one per admission stage
   ===================== */
.section-benefits {
  background: var(--bg-white);
  position: relative;
  overflow: hidden;
  padding-top: var(--sp-lg);
}

.benefit-block {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 0;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.benefit-block + .benefit-block {
  border-top: 1px solid var(--border-warm);
}

/* ---- Block header — index + category eyebrow + title ---- */
.benefit-block-head {
  margin-bottom: 1.85rem;
}
.benefit-block-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}
.benefit-block-index {
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.benefit-block-cat {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: var(--r-full);
  background: rgba(0, 174, 239, 0.10);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.benefit-block-eyebrow-rule {
  flex: 1;
  height: 1px;
  background: var(--border-warm);
}
.benefit-block-title {
  font-size: clamp(1.3rem, 2.8vw, 1.75rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0 0 0.6rem;
  letter-spacing: 0.005em;
}
/* Same amber squiggle keyword treatment as the editorial section titles */
.benefit-block-title em {
  position: relative;
  display: inline-block;
  font-style: normal;
  color: var(--text-main);
  white-space: nowrap;
}
.benefit-block-title em::after {
  content: '';
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: -0.1em;
  height: 0.3em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 18' preserveAspectRatio='none'><path d='M4 12 Q 80 2, 160 8 T 316 6' fill='none' stroke='%23F59E0B' stroke-width='5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.benefit-block-subtitle {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0;
}

/* ---- Block body — prose + chart, two columns on desktop ---- */
.benefit-block-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.benefit-block-prose p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 2;
  margin: 0;
}
.benefit-block-prose strong,
.benefit-block-prose em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-main);
}
.benefit-block-prose .mark {
  font-style: normal;
  font-weight: 700;
  color: var(--text-main);
  background: linear-gradient(transparent 62%, rgba(245, 158, 11, 0.32) 62%);
  padding: 0 0.05em;
}

/* =====================
   4. CHART — clean horizontal comparison bars
   ===================== */
.benefit-chart {
  background: var(--bg-cream);
  border: 1px solid var(--border-warm);
  border-radius: var(--r-md);
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.benefit-chart-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.02em;
  margin: 0 0 1.15rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--border-warm);
}
.benefit-chart-row {
  display: grid;
  grid-template-columns: 4.2rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
}
.benefit-chart-row + .benefit-chart-row {
  margin-top: 0.9rem;
}
.benefit-chart-rowlabel {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  text-align: right;
  line-height: 1.3;
}
.benefit-chart-meter {
  position: relative;
  height: 2.5rem;
  background: rgba(44, 44, 44, 0.06);
  border-radius: var(--r-full);
  overflow: hidden;
}
.benefit-chart-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-w, 0%);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.benefit-chart-fill.is-base {
  background: linear-gradient(90deg, #cfc8bf, #b9b1a6);
}
.benefit-chart-fill.is-win {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.benefit-chart-fill.is-win.is-accent {
  background: linear-gradient(90deg, #fbbf24, var(--accent));
}
.benefit-chart-badge {
  margin-right: 0.5rem;
  padding: 0.18rem 0.6rem;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.benefit-chart-fill.is-accent .benefit-chart-badge {
  color: #b45309;
}
.benefit-chart-figure {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  white-space: nowrap;
}
.benefit-chart-figure.is-strong {
  font-size: 0.98rem;
  color: var(--text-main);
}
.benefit-chart-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.15rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-warm);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}
.benefit-chart-note-arrow {
  color: var(--accent);
  font-weight: 800;
}
.benefit-chart-note strong {
  color: var(--accent);
  font-size: 1.05em;
}

/* Bar grow-in on reveal (skipped when reduced motion is preferred, so the
   bars render at their final width without JS-driven animation) */
@media (prefers-reduced-motion: no-preference) {
  .fade .benefit-chart-fill {
    width: 0;
    transition: width 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s;
  }
  .fade.visible .benefit-chart-fill {
    width: var(--bar-w, 0%);
  }
}

/* =====================
   5. CASE STUDY — highlighted testimonial-style callout
   ===================== */
.benefit-case {
  position: relative;
  margin-top: 2rem;
  padding: 1.6rem 1.75rem 1.7rem;
  background: var(--bg-warm);
  border: 1px solid var(--border-warm);
  border-radius: var(--r-md);
  border-left: 4px solid var(--accent);
}
.benefit-case-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-en);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.benefit-case-label::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.benefit-case-title {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.65;
  color: var(--text-main);
  margin: 0 0 0.7rem;
}
.benefit-case-text {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.95;
  margin: 0;
}
.benefit-case-text em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-main);
}

/* =====================
   6. CLOSING NOTE — trademark / disclaimer line
   ===================== */
.benefits-disclaimer {
  max-width: 920px;
  margin: 1.5rem auto 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.8;
  text-align: center;
}

/* =====================
   7. RESPONSIVE
   ===================== */
@media (max-width: 1023px) {
  .benefits-hero-visual,
  .benefits-hero-overlay { width: 50%; }
  .benefits-hero { min-height: clamp(420px, 54vh, 500px); }
  .benefits-hero-text { max-width: min(460px, 52%); }
}

@media (max-width: 767px) {
  /* Hero: photo becomes a soft full-width backdrop behind full-width text */
  .benefits-hero {
    min-height: 0;
    padding: calc(var(--header-h) + 2rem) 0 2.5rem;
  }
  .benefits-hero-visual,
  .benefits-hero-overlay { width: 100%; }
  .benefits-hero-overlay {
    background:
      linear-gradient(180deg,
        var(--bg-cream) 0%,
        rgba(250, 247, 243, 0.92) 30%,
        rgba(250, 247, 243, 0.82) 100%);
  }
  .benefits-hero-text { max-width: none; }
  .benefits-hero-title { font-size: 1.45rem; line-height: 1.6; }
  .benefits-hero-sub { font-size: 0.9rem; line-height: 1.85; max-width: none; }

  .benefit-block { padding: 2.5rem 0; }
  .benefit-block-body {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .benefit-case { padding: 1.4rem 1.35rem 1.45rem; }
  .benefit-chart-row {
    grid-template-columns: 3.4rem 1fr auto;
    gap: 0.55rem;
  }
  .benefit-chart-rowlabel { font-size: 0.72rem; }
  .benefit-chart-meter { height: 2.25rem; }
  .benefit-chart-badge {
    margin-right: 0.4rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.64rem;
  }
  .benefit-chart-figure { font-size: 0.78rem; }
  .benefit-chart-figure.is-strong { font-size: 0.86rem; }
}

@media (max-width: 520px) {
  .benefits-hero-title { font-size: 1.4rem; line-height: 1.55; }
}

@media (max-width: 380px) {
  /* Very narrow: drop the trailing figure so the bar keeps room to read */
  .benefit-chart-row { grid-template-columns: 3rem 1fr; }
  .benefit-chart-figure { display: none; }
}
