/* ==========================================================================
   Components — header, hero, footer, tables, reveals
   Contact Form 7: contact-form.css
   ========================================================================== */

/* --- Header / navigation --- */
.logo {
  color: inherit;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.logo img {
  max-width: 150px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav-logo {
  display: none;
  text-decoration: none;
  line-height: 0;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
@media screen and (max-width: 768px) {
  .site-header-main {
    align-items: end;
  }
}

.nav-toggle {
  display: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: #6f7ea8;
  transition: opacity 0.2s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* 閉じる ×：span の rotate 重ねは iOS で ※ 状に崩れるため疑似要素で描画 */
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  border-radius: 1px;
  background: #6f7ea8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.nav-toggle span + span {
  margin-top: 0;
}

.site-nav-links a {
  color: inherit;
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  opacity: 0.9;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.site-nav-links a:hover {
  opacity: 1;
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 31;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 30;
    padding: 13.6px 16px;
    background: rgba(34, 56, 98, 0.96);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 1.25rem) 1.5rem
      calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.24s ease,
      transform 0.24s ease;
  }

  .site-nav-logo {
    display: block;
    flex-shrink: 0;
    margin-bottom: 2rem;
    opacity: 0.95;
  }

  .site-nav-logo img {
    display: block;
    width: auto;
    max-width: min(150px, 42vw);
    height: auto;
  }

  .site-nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
    min-height: 0;
  }

  .site-nav-links a {
    color: #fff;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
  }

  .site-header.is-nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header.is-nav-open .nav-toggle span {
    opacity: 0;
  }

  .site-header.is-nav-open .nav-toggle::before,
  .site-header.is-nav-open .nav-toggle::after {
    opacity: 1;
  }

  .site-header.is-nav-open .nav-toggle::before {
    transform: rotate(45deg);
  }

  .site-header.is-nav-open .nav-toggle::after {
    transform: rotate(-45deg);
  }
}

.heading {
  position: absolute;
  top: 43%;
  z-index: 10;
  color: white;
  text-align: left;
  padding: 0 6vw;
}

.heading h2 {
  margin-bottom: 2rem;
  font-size: 5.1rem;
  line-height: 1.5;
  font-family: "Shippori Mincho", serif;
  font-weight: 500;
}

.heading h2.hero-heading-intro {
  opacity: 0;
  transform: translateY(36px);
  will-change: opacity, transform;
  transition:
    opacity 2s ease,
    transform 2s cubic-bezier(0.19, 1, 0.22, 1);
}

.heading h2.hero-heading-intro.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* FVコピー：JSで hero-copy-reveal 化するまで非表示（Live Link 初回フラッシュ防止） */
.heading p {
  opacity: 0;
  margin-bottom: 4rem;
  font-size: var(--text-sm);
  line-height: 1.8;
  font-weight: 400;
}

@media (min-width: 768px) {
  .heading p,
  .heading p.hero-copy-reveal .hero-copy-line-text {
    font-size: var(--text-xl);
  }
}

.heading p.hero-copy-reveal {
  opacity: 1;
}

.hero-fixed-fade {
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-fixed-fade.is-visible {
  opacity: 1;
}

.heading-first-line {
  display: inline-block;
  transform: translateX(-0.22em);
}

.fv-wordmark {
  position: absolute;
  right: 3vw;
  top: 11.5vh;
  z-index: 2;
  color: rgba(255, 255, 255, 0.2);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.fv-wordmark-brand {
  font-family: "Shippori Mincho", serif;
  font-size: clamp(4rem, 11vw, 10rem);
  letter-spacing: 0.04em;
  line-height: 0.9;
  text-align: right;
}

.fv-wordmark-tech {
  margin-top: 0.5em;
  font-family: "Poppins", sans-serif;
  font-size: clamp(4rem, 11vw, 10rem);
  letter-spacing: 0.04em;
  line-height: 0.9;
}

.fv-wordmark-cross {
  position: absolute;
  left: 56%;
  top: 52%;
  width: clamp(64px, 8vw, 120px);
  height: clamp(64px, 8vw, 120px);
  transform: translate(-50%, -50%);
}

.fv-wordmark-cross::before,
.fv-wordmark-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.55);
  transform-origin: center;
}

.fv-wordmark-cross::before {
  transform: translateX(-50%) rotate(45deg);
}

.fv-wordmark-cross::after {
  transform: translateX(-50%) rotate(-45deg);
}

.scroll-ring {
  position: absolute;
  right: clamp(1rem, 4vw, 2.5rem);
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  width: clamp(100px, 13vw, 152px);
  height: clamp(100px, 13vw, 152px);
  z-index: 10;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.scroll-ring-text {
  width: 100%;
  height: 100%;
  animation: spin-scroll-ring 12s linear infinite;
}

.scroll-ring text {
  fill: currentColor;
  font-family: "Shippori Mincho", serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.scroll-ring-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 24px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.scroll-ring-center::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  animation: scroll-dot-flow 1.6s ease-in-out infinite;
}

@keyframes spin-scroll-ring {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes scroll-dot-flow {
  0% {
    opacity: 0;
    top: 0;
  }
  20% {
    opacity: 1;
    top: 2px;
  }
  80% {
    opacity: 1;
    top: 22px;
  }
  100% {
    opacity: 0;
    top: 24px;
  }
}

@media (max-width: 900px) {
  .fv-wordmark {
    right: 1rem;
    top: 26vh;
  }

  .fv-wordmark-brand,
  .fv-wordmark-tech {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .heading {
    top: 50%;
  }

  .heading h2 {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }
}
@media screen and (max-width: 768px) {
  .fv-wordmark {
    right: 0;
    top: 12vh;
  }
  .heading {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 5vw;
    box-sizing: border-box;
  }
  .heading h2 {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }
  .heading-first-line {
    transform: translateX(-0.18em);
  }
  .scroll-ring {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1.25rem);
    right: 1rem;
  }
}

/* FV見出し：1・2行目同サイズ（500px以下は 9.5vw 基準・1行目 nowrap） */
@media (max-width: 500px) {
  .heading {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 max(2vw, env(safe-area-inset-right, 0px)) 0 5vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .heading h2 {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-size: clamp(1.5rem, 9.5vw, 3rem);
    line-height: 1.15;
    margin-bottom: 1.3rem;
  }

  .heading h2 br {
    display: none;
  }

  .heading-first-line,
  .heading-second-line {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
    margin-bottom: 0.5rem;
  }

  .heading-first-line {
    transform: translateX(-0.16em);
  }
}
table {
  border-collapse: collapse;
}

tr td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

tr:last-child td {
  border-bottom: none;
}
td {
  padding: 1.6rem 0;
}
.site-footer {
  padding: 2rem;
  border-top: 1px solid rgb(253, 253, 253);
}
.site-footer img {
  max-width: 150px;
}

/* 768px以上：ロゴ左・プラポリ右（1025px と同じ） */
@media (min-width: 768px) {
  .site-footer > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .site-footer > div > div {
    display: block;
    align-items: flex-start;
    text-align: left;
  }

  .site-footer > div > a {
    order: unset;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .site-footer img {
    margin-bottom: 0;
  }
}

/* --- About reveal --- */
#about {
  --about-opacity: 0.3;
}

#about .text-2xl {
  opacity: 1;
}

#about .reveal-char {
  opacity: var(--about-opacity);
  transition: opacity 0.08s linear;
}

/* --- Heading / copy reveal animations（共通：トップ h2 など） --- */
h2.h2-reveal .h2-reveal-line {
  display: block;
  overflow: hidden;
  font-size: inherit;
  line-height: inherit;
}

h2.h2-reveal .h2-reveal-text {
  display: block;
  line-height: inherit;
  transform: translate3d(0, 108%, 0);
  opacity: 1;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

h2.h2-reveal.is-inview .h2-reveal-text {
  animation: h2-slide-reveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes h2-slide-reveal {
  0% {
    transform: translate3d(0, 108%, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.heading p.hero-copy-reveal .hero-copy-line {
  display: block;
  overflow: hidden;
}

.heading p.hero-copy-reveal .hero-copy-line-text {
  display: block;
  transform: translateY(112%);
  will-change: transform;
}

.heading p.hero-copy-reveal.is-inview .hero-copy-line-text {
  animation: hero-copy-slide-reveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes hero-copy-slide-reveal {
  0% {
    transform: translateY(112%);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  h2.h2-reveal.is-inview {
    font-size: var(--text-4xl);
  }
  h2.h2-reveal .h2-reveal-text {
    font-size: var(--text-3xl);
  }

  /* Culture：SP も 5xl（48px） */
  #culture h2.h2-reveal .h2-reveal-text {
    font-size: var(--text-5xl);
  }

  /* Company / Contact：表示テキスト 4xl（40px） */
  .company-heading h2.h2-reveal .h2-reveal-text,
  #contact .contact-title.h2-reveal .h2-reveal-text {
    font-size: var(--text-4xl);
  }

  /* iOS Safari：グラデーション clip + translate の組み合わせ対策（#business） */
  #business h2.h2-reveal.is-inview .h2-reveal-text {
    transform: translate3d(0, 0, 0);
  }

  #company .company-table-wrap table {
    table-layout: fixed;
  }

  #company .company-table-wrap td:first-child {
    width: 35%;
  }

  #company .company-table-wrap td:last-child {
    width: 62%;
  }

  td {
    padding: 1rem 0;
    font-size: 14px;
  }
}

/* 767px以下：フッター SP（プラポリ上・中央寄せ） */
@media (max-width: 767px) {
  .site-footer {
    padding: 2rem 1rem 1.5rem;
  }

  .site-footer > div {
    align-items: center;
    text-align: center;
  }

  .site-footer > div > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-footer > div > a {
    order: -1;
    margin-bottom: 3rem;
    text-align: center;
  }

  .site-footer img {
    max-width: 120px;
    margin-bottom: 16px;
  }
}
