/*
Theme Name: aimme Editorial VOICE
Version: 3.3
Purpose: AI-generated VOICE articles
Operation:
- Office manages this CSS.
- Store staff never edits CSS.
- AI outputs only the approved HTML classes.
*/

/* =========================================================
   1. Scope / reset
========================================================= */

.aimme-article--voice-v2 {
  --aimme-text: #111111;
  --aimme-muted: #747474;
  --aimme-accent: #e84f82;
  --aimme-line: #b3a071;
  --aimme-content: 1040px;
  --aimme-reading: 680px;

  width: min(100%, var(--aimme-content));
  margin: 0 auto;
  color: var(--aimme-text);
  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
}

.aimme-article--voice-v2,
.aimme-article--voice-v2 * {
  box-sizing: border-box;
}

.aimme-article--voice-v2 img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: cover;
}

.aimme-article--voice-v2 p {
  margin-top: 0;
}

/* =========================================================
   2. Hero
========================================================= */

.aimme-voice-hero-v2 {
  margin-bottom: clamp(36px, 5vw, 58px);
}

.aimme-voice-hero-v2__image {
  aspect-ratio: 16 / 10;
  object-position: center 36%;
}

.aimme-voice-hero-v2__copy {
  margin-top: clamp(24px, 4vw, 42px);
}

.aimme-voice-hero-v2__category {
  margin-bottom: 12px;
  color: var(--aimme-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.aimme-voice-hero-v2__title {
    max-width: 40ch;
    font-size: clamp(26px, 7.8vw, 36px);
    line-height: 1.4;
  }

/* =========================================================
   3. Lead / text sections
========================================================= */

.aimme-voice-lead-v2 {
  width: min(100%, 760px);
  margin: 0 auto clamp(96px, 12vw, 150px);
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 2.15;
}

.aimme-voice-section-v2 {
  margin-bottom: clamp(104px, 13vw, 168px);
}

.aimme-voice-heading-v2 {
  margin-bottom: clamp(34px, 5vw, 56px);
}

.aimme-voice-heading-v2__label {
  margin-bottom: 11px;
  color: var(--aimme-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.aimme-voice-heading-v2__title {
  margin: 0;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--aimme-line);
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 400;
  line-height: 1.4;
}

.aimme-voice-body-v2 {
  width: min(100%, var(--aimme-reading));
  margin-left: auto;
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
  font-size: 16px;
  line-height: 2.05;
}

.aimme-voice-body-v2 p {
  margin-bottom: 1.5em;
}

/* =========================================================
   4. Gallery system v3
   WordPress対応:
   - 画像が直接配置される場合
   - <p><img></p>
   - <figure><img></figure>
   - Gutenbergの .wp-block-image
   AI only chooses:
   aimme-gallery--1 / --2 / --3 / --4 / --5
   Optional:
   aimme-gallery--reverse
========================================================= */

.aimme-gallery {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  column-gap: clamp(20px, 3vw, 38px) !important;
  row-gap: clamp(46px, 7vw, 88px) !important;
  align-items: start !important;
  width: 100% !important;
}

.aimme-gallery > img,
.aimme-gallery > p,
.aimme-gallery > figure,
.aimme-gallery > .wp-block-image {
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.aimme-gallery > p:empty {
  display: none !important;
}

.aimme-gallery > p > img,
.aimme-gallery > figure > img,
.aimme-gallery > .wp-block-image > img,
.aimme-gallery > .wp-block-image img,
.aimme-gallery > img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: cover;
}

/* 1 image */
.aimme-gallery--1 > img:nth-of-type(1),
.aimme-gallery--1 > p:nth-of-type(1),
.aimme-gallery--1 > figure:nth-of-type(1) {
  grid-column: 2 / 12;
}

/* 2 images */
.aimme-gallery--2 > img:nth-of-type(1),
.aimme-gallery--2 > p:nth-of-type(1),
.aimme-gallery--2 > figure:nth-of-type(1) {
  grid-column: 1 / 8;
  grid-row: 1 / 4;
}

.aimme-gallery--2 > img:nth-of-type(2),
.aimme-gallery--2 > p:nth-of-type(2),
.aimme-gallery--2 > figure:nth-of-type(2) {
  grid-column: 8 / 13;
  grid-row: 2 / 4;
  margin-top: clamp(54px, 8vw, 112px) !important;
}

.aimme-gallery--reverse.aimme-gallery--2 > img:nth-of-type(1),
.aimme-gallery--reverse.aimme-gallery--2 > p:nth-of-type(1),
.aimme-gallery--reverse.aimme-gallery--2 > figure:nth-of-type(1) {
  grid-column: 6 / 13;
}

.aimme-gallery--reverse.aimme-gallery--2 > img:nth-of-type(2),
.aimme-gallery--reverse.aimme-gallery--2 > p:nth-of-type(2),
.aimme-gallery--reverse.aimme-gallery--2 > figure:nth-of-type(2) {
  grid-column: 1 / 6;
  grid-row: 1 / 3;
  margin-top: clamp(18px, 4vw, 52px) !important;
}

/* 3 images */
.aimme-gallery--3 > img:nth-of-type(1),
.aimme-gallery--3 > p:nth-of-type(1),
.aimme-gallery--3 > figure:nth-of-type(1) {
  grid-column: 1 / 8;
  grid-row: 1 / 4;
}

.aimme-gallery--3 > img:nth-of-type(2),
.aimme-gallery--3 > p:nth-of-type(2),
.aimme-gallery--3 > figure:nth-of-type(2) {
  grid-column: 8 / 13;
  grid-row: 1 / 3;
  margin-top: clamp(48px, 7vw, 98px) !important;
}

.aimme-gallery--3 > img:nth-of-type(3),
.aimme-gallery--3 > p:nth-of-type(3),
.aimme-gallery--3 > figure:nth-of-type(3) {
  grid-column: 4 / 10;
  grid-row: 4;
}

.aimme-gallery--reverse.aimme-gallery--3 > img:nth-of-type(1),
.aimme-gallery--reverse.aimme-gallery--3 > p:nth-of-type(1),
.aimme-gallery--reverse.aimme-gallery--3 > figure:nth-of-type(1) {
  grid-column: 6 / 13;
}

.aimme-gallery--reverse.aimme-gallery--3 > img:nth-of-type(2),
.aimme-gallery--reverse.aimme-gallery--3 > p:nth-of-type(2),
.aimme-gallery--reverse.aimme-gallery--3 > figure:nth-of-type(2) {
  grid-column: 1 / 6;
}

.aimme-gallery--reverse.aimme-gallery--3 > img:nth-of-type(3),
.aimme-gallery--reverse.aimme-gallery--3 > p:nth-of-type(3),
.aimme-gallery--reverse.aimme-gallery--3 > figure:nth-of-type(3) {
  grid-column: 3 / 9;
}

/* 4 images */
.aimme-gallery--4 > img:nth-of-type(1),
.aimme-gallery--4 > p:nth-of-type(1),
.aimme-gallery--4 > figure:nth-of-type(1) {
  grid-column: 1 / 8;
  grid-row: 1 / 4;
}

.aimme-gallery--4 > img:nth-of-type(2),
.aimme-gallery--4 > p:nth-of-type(2),
.aimme-gallery--4 > figure:nth-of-type(2) {
  grid-column: 8 / 13;
  grid-row: 1;
}

.aimme-gallery--4 > img:nth-of-type(3),
.aimme-gallery--4 > p:nth-of-type(3),
.aimme-gallery--4 > figure:nth-of-type(3) {
  grid-column: 8 / 13;
  grid-row: 2 / 4;
}

.aimme-gallery--4 > img:nth-of-type(4),
.aimme-gallery--4 > p:nth-of-type(4),
.aimme-gallery--4 > figure:nth-of-type(4) {
  grid-column: 3 / 12;
  grid-row: 4;
}

/* 5 images */
.aimme-gallery--5 > img:nth-of-type(1),
.aimme-gallery--5 > p:nth-of-type(1),
.aimme-gallery--5 > figure:nth-of-type(1) {
  grid-column: 1 / 8;
  grid-row: 1 / 4;
}

.aimme-gallery--5 > img:nth-of-type(2),
.aimme-gallery--5 > p:nth-of-type(2),
.aimme-gallery--5 > figure:nth-of-type(2) {
  grid-column: 8 / 13;
  grid-row: 1 / 3;
  margin-top: clamp(42px, 6vw, 82px) !important;
}

.aimme-gallery--5 > img:nth-of-type(3),
.aimme-gallery--5 > p:nth-of-type(3),
.aimme-gallery--5 > figure:nth-of-type(3) {
  grid-column: 4 / 11;
  grid-row: 4;
}

.aimme-gallery--5 > img:nth-of-type(4),
.aimme-gallery--5 > p:nth-of-type(4),
.aimme-gallery--5 > figure:nth-of-type(4) {
  grid-column: 1 / 6;
  grid-row: 5;
  margin-top: clamp(58px, 8vw, 100px) !important;
}

.aimme-gallery--5 > img:nth-of-type(5),
.aimme-gallery--5 > p:nth-of-type(5),
.aimme-gallery--5 > figure:nth-of-type(5) {
  grid-column: 6 / 13;
  grid-row: 5 / 7;
}


/* Before / After comparison groups */
.aimme-comparison {
  margin-bottom: clamp(72px, 10vw, 120px);
}

.aimme-comparison:last-child {
  margin-bottom: 0;
}

.aimme-comparison__label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(18px, 3vw, 28px) !important;
  color: var(--aimme-accent);
  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.aimme-comparison__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(179, 160, 113, 0.65);
}

/* =========================================================
   5. Gallery caption / description
========================================================= */

.aimme-gallery-description {
  width: min(100%, 620px);
  margin: clamp(30px, 5vw, 54px) 0 0 auto;
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
  font-size: 16px;
  line-height: 2.05;
}

/* =========================================================
   6. CTA
========================================================= */

.aimme-voice-cta-v2 {
  margin-top: clamp(112px, 14vw, 176px);
  padding: clamp(48px, 8vw, 82px) 0;
  text-align: center;
}

.aimme-voice-cta-v2__label {
  margin-bottom: 12px;
  color: var(--aimme-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.aimme-voice-cta-v2__title {
  margin: 0 0 22px;
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.45;
}

.aimme-voice-cta-v2__text {
  width: min(100%, 660px);
  margin: 0 auto 34px;
  font-size: 15px;
  line-height: 1.9;
}

.aimme-voice-button-v2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(280px, 100%);
  min-height: 60px;
  padding: 15px 24px;
  background: #111;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: opacity 0.25s ease;
}

.aimme-voice-button-v2:hover {
  opacity: 0.72;
}

/* =========================================================
   7. Mobile
========================================================= */

@media (max-width: 767px) {
  .aimme-article--voice-v2 {
    width: 100%;
  }

  .aimme-voice-hero-v2 {
    margin-bottom: 58px;
  }

  .aimme-voice-hero-v2__image {
    aspect-ratio: 4 / 5;
  }

  .aimme-voice-hero-v2__title {
    font-size: clamp(34px, 10vw, 46px);
  }

  .aimme-voice-lead-v2 {
    margin-bottom: 88px;
    font-size: 16px;
  }

  .aimme-voice-section-v2 {
    margin-bottom: 92px;
  }

  .aimme-voice-heading-v2 {
    margin-bottom: 30px;
  }

  .aimme-voice-heading-v2__title {
    font-size: 29px;
  }

  .aimme-voice-body-v2,
  .aimme-gallery-description {
    font-size: 15px;
  }

  .aimme-gallery {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    column-gap: 10px !important;
    row-gap: 32px !important;
  }

  .aimme-gallery--1 > img:nth-of-type(1),
  .aimme-gallery--1 > p:nth-of-type(1),
  .aimme-gallery--1 > figure:nth-of-type(1) {
    grid-column: 1 / 12;
  }

  .aimme-gallery--2 > img:nth-of-type(1),
  .aimme-gallery--2 > p:nth-of-type(1),
  .aimme-gallery--2 > figure:nth-of-type(1) {
    grid-column: 1 / 12;
    grid-row: auto;
  }

  .aimme-gallery--2 > img:nth-of-type(2),
  .aimme-gallery--2 > p:nth-of-type(2),
  .aimme-gallery--2 > figure:nth-of-type(2) {
    grid-column: 5 / 13;
    grid-row: auto;
    margin-top: 0 !important;
  }

  .aimme-gallery--reverse.aimme-gallery--2 > img:nth-of-type(1),
  .aimme-gallery--reverse.aimme-gallery--2 > p:nth-of-type(1),
  .aimme-gallery--reverse.aimme-gallery--2 > figure:nth-of-type(1) {
    grid-column: 2 / 13;
  }

  .aimme-gallery--reverse.aimme-gallery--2 > img:nth-of-type(2),
  .aimme-gallery--reverse.aimme-gallery--2 > p:nth-of-type(2),
  .aimme-gallery--reverse.aimme-gallery--2 > figure:nth-of-type(2) {
    grid-column: 1 / 9;
    grid-row: auto;
    margin-top: 0 !important;
  }

  .aimme-gallery--3 > img:nth-of-type(1),
  .aimme-gallery--3 > p:nth-of-type(1),
  .aimme-gallery--3 > figure:nth-of-type(1) {
    grid-column: 1 / 12;
    grid-row: auto;
  }

  .aimme-gallery--3 > img:nth-of-type(2),
  .aimme-gallery--3 > p:nth-of-type(2),
  .aimme-gallery--3 > figure:nth-of-type(2) {
    grid-column: 5 / 13;
    grid-row: auto;
    margin-top: 0 !important;
  }

  .aimme-gallery--3 > img:nth-of-type(3),
  .aimme-gallery--3 > p:nth-of-type(3),
  .aimme-gallery--3 > figure:nth-of-type(3) {
    grid-column: 1 / 11;
    grid-row: auto;
  }

  .aimme-gallery--reverse.aimme-gallery--3 > img:nth-of-type(1),
  .aimme-gallery--reverse.aimme-gallery--3 > p:nth-of-type(1),
  .aimme-gallery--reverse.aimme-gallery--3 > figure:nth-of-type(1) {
    grid-column: 2 / 13;
  }

  .aimme-gallery--reverse.aimme-gallery--3 > img:nth-of-type(2),
  .aimme-gallery--reverse.aimme-gallery--3 > p:nth-of-type(2),
  .aimme-gallery--reverse.aimme-gallery--3 > figure:nth-of-type(2) {
    grid-column: 1 / 9;
  }

  .aimme-gallery--reverse.aimme-gallery--3 > img:nth-of-type(3),
  .aimme-gallery--reverse.aimme-gallery--3 > p:nth-of-type(3),
  .aimme-gallery--reverse.aimme-gallery--3 > figure:nth-of-type(3) {
    grid-column: 3 / 13;
  }

  .aimme-gallery--4 > img:nth-of-type(1),
  .aimme-gallery--4 > p:nth-of-type(1),
  .aimme-gallery--4 > figure:nth-of-type(1),
  .aimme-gallery--5 > img:nth-of-type(1),
  .aimme-gallery--5 > p:nth-of-type(1),
  .aimme-gallery--5 > figure:nth-of-type(1) {
    grid-column: 1 / 12;
    grid-row: auto;
  }

  .aimme-gallery--4 > img:nth-of-type(2),
  .aimme-gallery--4 > p:nth-of-type(2),
  .aimme-gallery--4 > figure:nth-of-type(2),
  .aimme-gallery--5 > img:nth-of-type(2),
  .aimme-gallery--5 > p:nth-of-type(2),
  .aimme-gallery--5 > figure:nth-of-type(2) {
    grid-column: 5 / 13;
    grid-row: auto;
    margin-top: 0 !important;
  }

  .aimme-gallery--4 > img:nth-of-type(3),
  .aimme-gallery--4 > p:nth-of-type(3),
  .aimme-gallery--4 > figure:nth-of-type(3),
  .aimme-gallery--5 > img:nth-of-type(3),
  .aimme-gallery--5 > p:nth-of-type(3),
  .aimme-gallery--5 > figure:nth-of-type(3) {
    grid-column: 1 / 11;
    grid-row: auto;
  }

  .aimme-gallery--4 > img:nth-of-type(4),
  .aimme-gallery--4 > p:nth-of-type(4),
  .aimme-gallery--4 > figure:nth-of-type(4),
  .aimme-gallery--5 > img:nth-of-type(4),
  .aimme-gallery--5 > p:nth-of-type(4),
  .aimme-gallery--5 > figure:nth-of-type(4) {
    grid-column: 3 / 13;
    grid-row: auto;
    margin-top: 0 !important;
  }

  .aimme-gallery--5 > img:nth-of-type(5),
  .aimme-gallery--5 > p:nth-of-type(5),
  .aimme-gallery--5 > figure:nth-of-type(5) {
    grid-column: 1 / 12;
    grid-row: auto;
  }

  .aimme-comparison {
    margin-bottom: 64px;
  }

  .aimme-comparison__label {
    gap: 12px;
    margin-bottom: 16px !important;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .aimme-gallery-description {
    margin-top: 26px;
  }

  .aimme-voice-cta-v2 {
    margin-top: 90px;
    padding: 44px 0;
  }
}