/* =============================================
   IRODORI - top.css
   トップページ固有スタイル
   ============================================= */

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  background: white;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-line {
  position: absolute;
  left: 8%;
  height: 100%;
  width: 1px;
  background: rgba(0,0,0,0.03);
  transform-origin: top;
  transform: scaleY(0);
  animation: heroLineReveal 2s 1s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes heroLineReveal {
  to { transform: scaleY(1); }
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  position: relative;
  z-index: 10;
}

@media (min-width: 1024px) {
  .hero-container {
    padding: 0 64px;
  }
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeSlideUp 1s cubic-bezier(0.16,1,0.3,1) 1.5s forwards;
}

.hero-label span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  font-weight: 700;
  color: rgba(17,17,17,0.2);
}

.hero-label-line {
  height: 1px;
  width: 80px;
  background: rgba(0,0,0,0.1);
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-brand-primary);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 48px;
}

.hero-title-words {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.2em;
}

/* overflow:hidden is not used on the wrap — no compositing layer issue.
   Words fade + slide up; background-clip:text on .hero-word-3 is safe. */
.hero-word-wrap {
  padding: 8px 4px;
  overflow: visible;
}

.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: wordReveal 1.2s cubic-bezier(0.16,1,0.3,1) forwards;
}

.hero-word-1 { animation-delay: 1.5s; }
.hero-word-2 { animation-delay: 1.6s; }
.hero-word-3 { animation-delay: 1.7s; }
.hero-word-4 { animation-delay: 1.8s; }
.hero-word-5 { animation-delay: 1.9s; }
.hero-word-6 { animation-delay: 2.0s; }

/* "colors" — gradient colour block, white text, handwritten accent */
.hero-word-3 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.12em;
  background: linear-gradient(to right, #ff3366, #ff9933, #ffcc33, #33cc99, #3399ff, #9966ff);
  color: white;
  -webkit-text-fill-color: white;
  padding: 0 0.28em 0 0.15em;
  border-radius: 0;
}

/* Lab image column wrapper — allows detail card to overflow the image */
.lab-image-col-wrap {
  position: relative;
}

@keyframes wordReveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: flex-start;
  opacity: 0;
  animation: fadeSlideUp 1s cubic-bezier(0.16,1,0.3,1) 2.1s forwards;
}

@media (min-width: 768px) {
  .hero-bottom {
    flex-direction: row;
    align-items: flex-end;
  }
}

.hero-desc {
  color: rgba(17,17,17,0.4);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  line-height: 1.8;
  max-width: 320px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.3s ease;
}

.hero-cta:hover {
  transform: translateX(10px);
}

.hero-cta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--color-brand-primary);
}

.hero-cta-line {
  height: 2px;
  width: 48px;
  transition: width 0.7s ease;
}

.hero-cta:hover .hero-cta-line {
  width: 112px;
}

.hero-cta-primary .hero-cta-line {
  background: var(--gradient-irodori);
}

.hero-cta-secondary .hero-cta-line {
  background: var(--color-brand-primary);
}

/* Pick-up card */
.hero-pickup {
  position: absolute;
  bottom: 48px;
  right: 128px;
  z-index: 20;
  display: none;
  opacity: 0;
  transform: translateX(40px);
  animation: fadeSlideLeft 1s cubic-bezier(0.16,1,0.3,1) 2.8s forwards;
}

@keyframes fadeSlideLeft {
  to { opacity: 1; transform: translateX(0); }
}

@media (min-width: 1280px) {
  .hero-pickup {
    display: block;
  }
}

.hero-pickup-card {
  background: white;
  border: 1px solid rgba(0,0,0,0.05);
  padding: 32px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.12);
  max-width: 280px;
  transition: box-shadow 0.5s;
  display: block;
}

.hero-pickup-card:hover {
  box-shadow: 0 30px 70px rgba(0,0,0,0.18);
}

.hero-pickup-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-pickup-tag span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-irodori-orange);
}

.hero-pickup-tag-line {
  flex: 1;
  height: 1px;
  background: rgba(255,153,51,0.2);
}

.hero-pickup-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.hero-pickup-desc {
  font-size: 11px;
  color: rgba(17,17,17,0.4);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-pickup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-pickup-footer span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-brand-primary);
}

/* Decorative vertical rail */
.hero-rail {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 96px;
  border-left: 1px solid rgba(0,0,0,0.05);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeIn 1s 2.2s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@media (min-width: 1280px) {
  .hero-rail {
    display: flex;
  }
}

.hero-rail-text {
  writing-mode: vertical-rl;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.6em;
  font-weight: 700;
  color: rgba(17,17,17,0.1);
  transform: rotate(180deg);
}

/* Large background IRODORI text */
.hero-bg-text {
  position: absolute;
  bottom: -80px;
  right: -160px;
  font-size: clamp(6rem, 18vw, 24rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(0,0,0,0.02);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translateX(200px);
  animation: heroBgText 3s 1s ease-out forwards;
}

@keyframes heroBgText {
  to { opacity: 1; transform: translateX(100px); }
}

/* =============================================
   WORKS SECTION
   ============================================= */
.works-section {
  background: white;
}

.works-header {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-bottom: 128px;
}

@media (min-width: 1024px) {
  .works-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.works-title {
  font-size: clamp(1.875rem, 6vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.works-desc {
  max-width: 480px;
  color: rgba(17,17,17,0.4);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  line-height: 1.8;
}

/* Service list */
.service-item {
  border-top: 1px solid rgba(17,17,17,0.06);
  display: block;
  transition: background 0.5s;
}

.service-item:last-child {
  border-bottom: 1px solid rgba(17,17,17,0.06);
}

.service-item:hover {
  background: var(--color-brand-sub);
}

.service-item-inner {
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .service-item-inner {
    display: grid;
    grid-template-columns: 1fr 4fr 1fr 5fr 1fr;
    align-items: center;
    gap: 32px;
    padding: 80px 16px;
  }
}

.service-num {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.5rem;
  color: #e5e5e5;
  transition: color 0.3s;
}

.service-item:hover .service-num {
  color: var(--color-brand-primary);
}

.service-name {
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 0.5s;
}

.service-item:hover .service-name {
  transform: translateX(16px);
}

.service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.service-text {
  font-size: 14px;
  color: rgba(17,17,17,0.4);
  line-height: 1.6;
}

.service-arrow {
  display: flex;
  justify-content: flex-end;
  color: #e5e5e5;
  opacity: 0;
  transition: all 0.3s;
}

.service-item:hover .service-arrow {
  color: var(--color-brand-primary);
  opacity: 1;
}

/* Industry grid */
.industries-section {
  background: #FCFAF8;
  padding: 48px;
  margin-top: 0;
}

@media (min-width: 768px) {
  .industries-section {
    padding: 96px;
  }
}

.industries-label {
  text-align: center;
  margin-bottom: 64px;
}

.industries-label span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.3);
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px 32px;
}

@media (min-width: 768px) {
  .industries-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.industry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.industry-icon {
  color: #FCA862;
}

.industry-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.4);
  transition: color 0.3s;
}

.industry-item:hover .industry-name {
  color: var(--color-brand-primary);
}

/* =============================================
   LAB SECTION
   ============================================= */
.lab-section {
  background: var(--gradient-lab);
  position: relative;
  overflow: hidden;
}

.lab-image-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.lab-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.7s;
}

.lab-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.05);
  transition: all 0.3s;
}

.lab-image-wrap:hover .lab-image-overlay {
  background: transparent;
}

.lab-detail-card {
  position: absolute;
  top: -48px;
  right: -24px;
  background: rgba(255,255,255,0.9);
  padding: 40px 64px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  max-width: 280px;
}

@media (min-width: 768px) {
  .lab-detail-card {
    right: -48px;
  }
}

.lab-detail-line {
  width: 48px;
  height: 2px;
  background: var(--gradient-irodori);
  margin-bottom: 24px;
}

.lab-detail-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.3);
  margin-bottom: 16px;
}

.lab-detail-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 32px;
}

.lab-detail-link {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-brand-primary);
  padding-bottom: 4px;
}

.lab-content-title {
  font-size: clamp(1.875rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
}

.lab-bg-text {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
  pointer-events: none;
  opacity: 0.03;
  white-space: nowrap;
}

.lab-bg-text span {
  font-size: clamp(80px, 15vw, 140px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

/* =============================================
   VALUE / PHILOSOPHY SECTION
   ============================================= */
.value-section {
  background: white;
}

.value-header {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-bottom: 128px;
}

@media (min-width: 1024px) {
  .value-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.value-main-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-brand-primary);
  line-height: 1.3;
  margin-bottom: 24px;
}

.value-image {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}

.value-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.value-pillar {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.value-pillar-item {
  margin-bottom: 0;
}

.value-pillar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.value-pillar-line {
  width: 48px;
  height: 1px;
}

.value-pillar-title {
  font-size: 1.5rem;
  font-weight: 700;
  white-space: pre-line;
  line-height: 1.3;
  margin-bottom: 24px;
}

.value-pillar-text {
  font-size: 14px;
  color: rgba(17,17,17,0.4);
  line-height: 1.8;
  max-width: 320px;
}

.value-more {
  display: flex;
  justify-content: center;
}

.value-more-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.value-more-link:hover .value-more-line {
  height: 128px;
}

.value-more-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.3);
  transition: color 0.3s;
}

.value-more-link:hover .value-more-label {
  color: var(--color-brand-primary);
}

.value-more-line {
  width: 1px;
  height: 80px;
  background: #f0f0f0;
  transition: height 0.7s;
}

/* =============================================
   CTA HOME SECTION
   ============================================= */
.home-cta-section {
  background: white;
}

.home-cta-box {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 128px;
  border-top: 1px solid rgba(17,17,17,0.06);
}

@media (min-width: 768px) {
  .home-cta-box {
    padding: 0 64px 240px;
  }
}

.home-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 96px;
}

@media (min-width: 1024px) {
  .home-cta-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 96px;
  }
}

.home-cta-send {
  background: var(--color-brand-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
  max-width: 320px;
  aspect-ratio: 1;
  width: 100%;
  transition: box-shadow 0.5s;
}

.home-cta-send:hover {
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.home-cta-send-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-irodori);
  opacity: 0;
  transition: opacity 0.5s;
}

.home-cta-send:hover .home-cta-send-overlay {
  opacity: 0.1;
}

.home-cta-send-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: white;
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.home-cta-send-line {
  width: 48px;
  height: 1px;
  background: white;
  transition: width 0.5s;
  position: relative;
  z-index: 1;
}

.home-cta-send:hover .home-cta-send-line {
  width: 96px;
}

.home-cta-mail-icon {
  position: relative;
  z-index: 1;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.2);
  transition: color 0.3s;
}

.home-cta-send:hover .home-cta-mail-icon {
  color: rgba(255,255,255,0.4);
}

/* =============================================
   SP (max-width: 767px) 最適化
   ============================================= */
@media (max-width: 767px) {

  .hero-container {
    padding: 0 var(--sp-container-x);
  }
  .hero-label {
    gap: 16px;
    margin-bottom: 24px;
  }
  .hero-label-line {
    width: 48px;
  }
  .hero-title {
    margin-bottom: 32px;
  }
  .hero-word-wrap {
    padding: 4px 2px;
  }
  .hero-bottom {
    gap: 24px;
  }
  .hero-ctas {
    gap: 20px;
  }

  .works-header {
    gap: 24px;
    margin-bottom: 64px;
  }
  .service-item-inner {
    padding: 28px 12px;
    gap: 12px;
  }
  .service-name {
    font-size: 1.25rem;
  }
  .service-num {
    font-size: 1.25rem;
  }

  .industries-section {
    padding: 32px var(--sp-container-x);
  }
  .industries-label {
    margin-bottom: 32px;
  }
  .industries-grid {
    gap: 32px 20px;
  }
  .industry-item {
    gap: 12px;
  }

  .lab-detail-card {
    padding: 24px 28px;
    top: -24px;
    right: -12px;
    max-width: 220px;
  }
  .lab-detail-line {
    width: 32px;
    margin-bottom: 16px;
  }
  .lab-detail-title {
    margin-bottom: 20px;
  }
  .lab-content-title {
    margin-bottom: 24px;
  }
  .lab-bg-text span {
    font-size: clamp(48px, 12vw, 80px);
  }

  .value-header {
    gap: 24px;
    margin-bottom: 64px;
  }
  .value-main-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }
  .value-pillar {
    gap: 48px;
  }
  .value-pillar-head {
    margin-bottom: 20px;
  }
  .value-pillar-title {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }
  .value-more-line {
    height: 56px;
  }

  .home-cta-box {
    padding: 0 var(--sp-container-x) 72px;
  }
  .home-cta-inner {
    gap: 32px;
    padding-top: 48px;
  }
  .home-cta-send {
    padding: 32px;
    max-width: 280px;
  }
  .home-cta-mail-icon {
    margin-bottom: 20px;
  }
}
