/* ========================================
   GRAFACTA Solena LP - Stylesheet
   ======================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #940D79;
  --color-primary-dark: #5E064D;
  --color-darkgray: #3D3D3D;
  --color-accent: #FFDD00;
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-gray20: #F6F6F6;
  --color-glow: #00d9ff;

  --font-gothic: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro", "Yu Gothic", "游ゴシック", "Meiryo", sans-serif;
  --font-serif: "Noto Serif JP", "Yu Mincho", "游明朝", serif;
  --font-din: "DIN 2014", "DIN Alternate", "Arial Black", sans-serif;
  --font-noto-black: "Noto Sans JP", "Yu Gothic", "游ゴシック", sans-serif;

  --container-max: 1200px;
  --section-padding-x: 6.1vw;
  --sp-padding-x: 20px;
  --img-buildings: url('../images/buildings-bg.jpg');
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-gothic);
  color: var(--color-darkgray);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.sp-only {
  display: none;
}

.nw {
  white-space: nowrap;
}
@media (max-width: 767px) {
  .sp-only {
    display: inline !important;
  }
  .pc-only {
    display: none !important;
  }
}

/* --- Utility --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: var(--color-accent);
  border-radius: 4px;
  padding: 14px 46px;
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-darkgray);
  line-height: 1.6;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-primary--large {
  font-size: 32px;
  padding: 14px 46px;
}

.btn-primary__arrow {
  flex-shrink: 0;
}

/* SP */
@media (max-width: 767px) {
  .btn-primary {
    font-size: 16px;
    padding: 12px 24px;
  }
  .btn-primary--large {
    font-size: 20px;
    padding: 12px 32px;
  }
}

/* ========================================
   Hero / AI Section
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 790px;
  display: flex;
  align-items: center;
  padding: 5.9vw 6.1vw;
  overflow: hidden;
  background: var(--color-black);
}

.hero__bg {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  bottom: -20%;
  z-index: 0;
  will-change: transform;
}

@keyframes hero-reveal {
  from {
    opacity: 0;
    filter: blur(20px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-reveal 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 3.5vw;
  align-items: center;
  text-align: center;
  width: fit-content;
}

.hero__title {
  color: var(--color-white);
  text-shadow: 0 0 20px var(--color-glow), 0 0 20px var(--color-glow);
}

.hero__title-line {
  display: block;
  font-size: clamp(48px, 6.44vw, 88px);
  font-weight: 700;
  line-height: 1.6;
  font-feature-settings: 'palt' 1;
}

.hero__title-line--sub {
  font-size: clamp(32px, 4.03vw, 55px);
}

.hero__lead {
  font-size: clamp(16px, 1.46vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-white);
}

.hero__cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8vw;
}

.hero__logo img {
  width: 554px;
  height: auto;
}

.hero__free-text {
  font-size: clamp(16px, 1.46vw, 20px);
  font-weight: 700;
  color: var(--color-white);
}

.hero__title-line--sub,
.hero__lead,
.hero__cta-block {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero--revealed .hero__title-line--sub {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.0s;
}

.hero--revealed .hero__lead {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.25s;
}

.hero--revealed .hero__cta-block {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.5s;
}

@keyframes typewriter-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__title-line--typing::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--color-white);
  margin-left: 4px;
  vertical-align: baseline;
  animation: typewriter-cursor 0.7s step-end infinite;
}

/* SP */
@media (max-width: 767px) {
  .hero {
    padding: 60px 20px;
    min-height: 0;
  }
  .hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .hero--revealed .hero__bg::after {
    opacity: 1;
  }
  .hero__copy {
    width: 100%;
    gap: 32px;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
  }
  .hero--revealed .hero__copy {
    opacity: 1;
  }
  .hero__title-line--sub,
  .hero__lead,
  .hero__cta-block {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__title-line {
    font-size: 48px;
  }
  .hero__title-line--sub {
    font-size: 32px;
  }
  .hero__lead {
    font-size: 16px;
  }
  .hero__cta-block {
    gap: 16px;
  }
  .hero__bg img {
    object-position: 80% center;
  }
  .hero__logo img {
    width: 100%;
    max-width: 400px;
  }
  .hero__free-text {
    font-size: 16px;
  }
}

/* ========================================
   Problem Section
   ======================================== */
.problem {
  position: relative;
  z-index: 1;
  padding: 11.1vw 6.1vw;
  background: var(--color-white);
  overflow: hidden;
}

.problem__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.1vw;
}

.problem__issue {
  position: relative;
  padding: 2.6vw;
}

.problem__issue::before,
.problem__issue::after {
  content: '';
  position: absolute;
  width: 82px;
  height: 82px;
  background: url('../images/bracket.svg') no-repeat center / contain;
}

.problem__issue::before {
  top: 0;
  left: 0;
}

.problem__issue::after {
  bottom: 0;
  right: 0;
  transform: rotate(180deg);
}

.problem__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(24px, 3.44vw, 47px);
  color: var(--color-primary);
  line-height: 1.6;
}

.problem__dots {
  display: flex;
  justify-content: center;
}

.problem__desc {
  font-size: clamp(18px, 2.05vw, 28px);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  color: var(--color-darkgray);
}

.problem__cards {
  display: flex;
  gap: 6.4vw;
  justify-content: center;
  width: 100%;
}

.problem-card {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.problem-card__visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: 2.9vw;
}

.problem-card__img {
  width: 100%;
  height: 284px;
  margin-bottom: -2.9vw;
  overflow: hidden;
}

.problem-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.problem-card__number {
  display: block;
  width: 100%;
  height: 70px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.problem-card__text {
  font-size: clamp(16px, 1.46vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  color: var(--color-darkgray);
}

.problem__conclusion {
  text-align: center;
}

.problem__conclusion p {
  font-size: clamp(20px, 2.34vw, 32px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-darkgray);
  display: inline;
  background: linear-gradient(transparent 60%, var(--color-accent) 40%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* SP */
@media (max-width: 767px) {
  .problem {
    padding: 20px 20px;
  }
  .problem__inner {
    gap: 40px;
  }
  .problem__issue {
    padding: 24px 14px;
  }
  .problem__issue::before,
  .problem__issue::after {
    width: 50px;
    height: 50px;
  }
  .problem__title {
    font-size: 24px;
    text-align: center;
  }
  .problem__dots img {
    width: 6px;
    height: auto;
  }
  .problem__desc {
    font-size: 18px;
  }
  .problem__cards {
    flex-direction: column;
    gap: 40px;
  }
  .problem-card__visual {
    padding-bottom: 20px;
  }
  .problem-card__img {
    height: 200px;
    margin-bottom: -27px;
  }
  .problem-card__number {
    height: 50px;
  }
  .problem-card__text {
    font-size: 16px;
  }
  .problem__conclusion p {
    font-size: 20px;
  }
}

/* ========================================
   Affinity Section
   ======================================== */
.affinity {
  position: relative;
  padding: 5vw 6.1vw;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.affinity__bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-7.5deg) skewX(-7.5deg);
  width: 100%;
  height: 110%;
  background: linear-gradient(to bottom, var(--color-primary-dark), var(--color-primary));
  z-index: 0;
}

.affinity__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7vw;
}

.affinity__intro,
.affinity__outro {
  font-size: clamp(16px, 1.76vw, 24px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-white);
  text-align: center;
}

.affinity__cards {
  display: flex;
  gap: clamp(16px, 4vw, 88px);
  justify-content: center;
}

.affinity-card {
  flex: 1;
  min-width: 0;
  background: var(--color-white);
  border-radius: 40px;
  padding: 2.3vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8vw;
  box-shadow: 0 5px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.affinity-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.affinity-card__icon img {
  height: 83px;
  width: auto;
  max-width: none;
}

.affinity-card__title {
  font-size: clamp(18px, 1.46vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-black);
  text-align: center;
}

.affinity-card__desc {
  font-family: var(--font-gothic);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-black);
  text-align: center;
}

.affinity__arrow {
  position: absolute;
  bottom: -8.1vw;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.affinity__arrow img {
  width: clamp(64px, 7.6vw, 104px);
  height: auto;
  max-width: none;
}


/* SP */
@media (max-width: 767px) {
  .affinity {
    padding: 140px 20px;
  }
  .affinity__bg {
    height: 94%;
  }
  .affinity__inner {
    gap: 48px;
  }
  .affinity__intro,
  .affinity__outro {
    font-size: 16px;
  }
  .affinity__cards {
    flex-direction: column;
    gap: 32px;
  }
  .affinity-card {
    padding: 16px 12px;
    border-radius: 20px;
    gap: 12px;
  }
  .affinity__arrow img {
    width: 16vw;
  }
  .affinity-card__icon img {
    height: 60px;
  }
  .affinity-card__icon {
    min-height: 70px;
  }
  .affinity-card__title {
    font-size: 18px;
  }
  .affinity__arrow {
    bottom: -2vw;
  }
}

/* ========================================
   Solution Section
   ======================================== */
.solution {
  position: relative;
  z-index: 1;
  padding: 11.1vw 6.1vw;
  background: var(--color-white);
  overflow: hidden;
}

.solution__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.9vw;
}

.solution__heading {
  font-size: clamp(20px, 2.34vw, 32px);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  color: var(--color-darkgray);
}

.solution__tagline {
  font-size: clamp(24px, 2.93vw, 40px);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  color: var(--color-primary);
}

.solution__logo {
  width: 100%;
  max-width: 1072px;
}

.solution__logo img {
  width: 100%;
  height: auto;
}

/* SP */
@media (max-width: 767px) {
  .solution {
    padding: 80px 20px;
  }
  .solution__heading {
    font-size: 20px;
  }
  .solution__tagline {
    font-size: 24px;
  }
}

/* ========================================
   Features Section (buildings)
   ======================================== */
.features {
  position: relative;
  padding: 6.4vw 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.7vw;
  background: var(--img-buildings) no-repeat top left / 100% auto;
}

.features__hero {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4.7vw;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 6.1vw;
}

.features__hero-text {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2vw;
}

.features__hero-title {
  font-size: clamp(24px, 2.93vw, 40px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-darkgray);
}

.features__hero-desc {
  font-size: clamp(16px, 1.46vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-darkgray);
}

.features__hero-device {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.features__ipad {
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.3)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.features__list {
  position: relative;
  z-index: 1;
  width: 100%;
}

.feature-row {
  display: flex;
  width: 100%;
  height: 450px;
}

.feature-row__image {
  flex: 0 0 50%;
  background: center / cover no-repeat;
}

.feature-row__image--01 {
  background-image: url('../images/feature01.jpg');
  background-position: right top;
}

.feature-row__image--02 {
  background-image: url('../images/feature02.jpg');
}

.feature-row__image--03 {
  background-image: url('../images/feature03.jpg');
}

.feature-row__content {
  flex: 0 0 50%;
  background: var(--color-gray20);
  padding: 4.7vw max(3vw, calc((100vw - var(--container-max)) / 2)) 4.7vw 4.7vw;
  display: flex;
}

.feature-row--reverse .feature-row__content {
  padding: 4.7vw 4.7vw 4.7vw max(3vw, calc((100vw - var(--container-max)) / 2));
}

.feature-row__body {
  max-width: 536px;
  display: flex;
  flex-direction: column;
  gap: 1.8vw;
}

.feature-row--reverse .feature-row__body {
  margin-left: auto;
}

.feature-row__title {
  font-size: clamp(24px, 2.34vw, 32px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-primary);
}

.feature-row__desc {
  font-size: clamp(16px, 1.46vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-darkgray);
}

.features-bottom {
  width: 100%;
  background: var(--img-buildings) no-repeat center / cover;
  padding: 14.1vw 6.1vw 9.4vw;
  margin-top: -4.7vw;
}

.features-bottom__text {
  font-size: clamp(20px, 2.34vw, 32px);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  color: var(--color-darkgray);
}

/* SP */
@media (max-width: 767px) {
  .features {
    padding: 0;
    gap: 0px;
    background: none;
  }
  .features__hero {
    flex-direction: column;
    gap: 32px;
    padding: 60px 20px;
    background: var(--img-buildings) no-repeat center / cover;
  }
  .features__hero-text {
    flex-shrink: initial;
    text-align: center;
  }
  .features__hero-title {
    font-size: 24px;
  }
  .features__hero-desc {
    font-size: 16px;
  }
  .feature-row {
    flex-direction: column;
    height: auto;
  }
  .feature-row--reverse {
    flex-direction: column-reverse;
  }
  .feature-row__image {
    flex: none;
    height: 240px;
  }
  .feature-row__content {
    flex: none;
    padding: 40px 20px;
  }
  .feature-row--reverse .feature-row__content {
    padding: 40px 20px;
  }
  .feature-row__body {
    max-width: none;
  }
  .feature-row--reverse .feature-row__body {
    margin-left: 0;
  }
  .feature-row__title {
    font-size: 24px;
  }
  .feature-row__desc {
    font-size: 16px;
  }
  .features-bottom {
    padding: 124px 20px 60px;
  }
  .features-bottom__text {
    font-size: 20px;
  }
}

/* ========================================
   Professional Section
   ======================================== */
.professional {
  position: relative;
  padding: 11.1vw 0;
  min-height: 600px;
  overflow: hidden;
}

.professional::before {
  content: '';
  position: absolute;
  top: 0;
  left: -15%;   /* ↔ 左の余裕（横パララックス用） */
  right: -15%;  /* ↔ 右の余裕 */
  bottom: 0;
  background: url('../images/pro-bg.jpg') no-repeat center / cover;
  z-index: 0;
  transform: translate(var(--parallax-x, 0), var(--parallax-y, 0));
  will-change: transform;
}

.professional__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 6.1vw;
  display: flex;
  flex-direction: column;
  gap: 7vw;
  color: var(--color-white);
}

.professional__title {
  font-family: var(--font-noto-black);
  font-weight: 900;
  font-size: clamp(26px, 3.51vw, 48px);
  line-height: 1.6;
  color: var(--color-white);
}

.professional__text {
  font-size: clamp(16px, 1.46vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-white);
}

.professional__text p {
  margin-bottom: 1.8vw;
}

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

/* SP */
@media (max-width: 767px) {
  .professional {
    padding: 80px 0;
    min-height: 0;
  }
  .professional::before {
    left: 0;
    right: 0;
    background-position-x: 81%; /* ← ここで左右調整 */
  }
  .professional__inner {
    padding: 0 20px;
    gap: 48px;
  }
  .professional__title {
    font-size: 26px;
  }
  .professional__text {
    font-size: 16px;
  }
}

/* ========================================
   CTA Section
   ======================================== */
.cta {
  background: linear-gradient(to bottom, var(--color-primary-dark), var(--color-primary));
  padding: 11.1vw 0;
}

.cta__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.7vw;
}

.cta__heading {
  font-size: clamp(24px, 2.93vw, 40px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-white);
  text-align: center;
}

/* SP */
@media (max-width: 767px) {
  .cta {
    padding: 80px 20px;
  }
  .cta__inner {
    gap: 40px;
  }
  .cta__heading {
    font-size: 24px;
  }
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--color-white);
  padding: 4.7vw 0;
}

.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 6.1vw;
  display: flex;
  flex-direction: column;
  gap: 2.3vw;
}

.footer__logo img {
  width: 380px;
  height: auto;
}

.footer__content {
  display: flex;
  align-items: flex-end;
  gap: 2.3vw;
}

.footer__company {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.8vw;
}

.footer__company-name,
.footer__address {
  font-family: var(--font-gothic);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-black);
}

.footer__credit {
  flex: 1;
  text-align: right;
}

.footer__credit p {
  font-family: var(--font-gothic);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-black);
}

/* SP */
@media (max-width: 767px) {
  .footer {
    padding: 40px 0;
  }
  .footer__inner {
    padding: 0 20px;
  }
  .footer__logo img {
    width: 240px;
  }
  .footer__content {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer__credit {
    text-align: left;
  }
}
