/* ===== Infrastructure - Portal Style ===== */

:root {
  --color-primary: #067dd4;
  --color-primary-dark: #0562a8;
  --color-primary-light: #e8f4fd;
  --color-accent: #1a1a1a;
  --color-bg: #faf8f6;
  --color-bg-alt: #f0edea;
  --radius: 20px;
  --radius-sm: 12px;
}

body {
  background: var(--color-bg);
}

/* ===== Header ===== */
.header {
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.header .header-logo-text,
.header .header-nav a:not(.btn) {
  color: #fff;
}

.header .header-logo-text span {
  color: #fff;
}

.header.scrolled {
  background: rgba(250, 248, 246, 0.95);
  backdrop-filter: blur(12px);
}

.header.scrolled .header-logo-text,
.header.scrolled .header-nav a:not(.btn) {
  color: var(--color-text, #1a1a1a);
}

.header.scrolled .header-logo-text span {
  color: var(--color-primary);
}

/* ===== Hero ===== */
.portal-hero {
  padding: 160px 0 80px;
  background: url("../../public/hero-career-bg.png") center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.portal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 246, 0.9);
  z-index: 1;
}

.portal-hero--dark::before {
  background: rgba(0, 0, 0, 0.55);
}

.portal-hero::after {
  content: "";
  position: absolute;
  inset: -20px;
  background: inherit;
  background-size: cover;
  animation: heroZoom 20s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.portal-hero .container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: end;
  position: relative;
  z-index: 2;
}

.hero-main h1 {
  font-size: 4.4rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-main h1 .thin {
  font-weight: 400;
  display: block;
  font-size: 2.0rem;
  letter-spacing: 0;
  margin-bottom: 8px;
  font-family: "Noto Sans JP", sans-serif;
}

/* Dark hero text */
.portal-hero--dark .hero-main h1 {
  color: #fff;
}

.portal-hero--dark .hero-main h1 .thin {
  color: rgba(255, 255, 255, 0.7);
}

.hero-aside {
  font-size: 1.5rem;
  line-height: 2.0;
  border-left: 2px solid var(--color-primary);
  padding: 24px 24px 24px 20px;
  border-radius: var(--radius);
}

.portal-hero--dark .hero-aside {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

/* Hero animations */
.hero-main h1 .thin {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.8s ease 0.2s forwards;
}

.hero-main h1 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.8s ease 0.5s forwards;
}

.hero-aside {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeSlideLeft 0.8s ease 0.9s forwards;
}

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

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

/* ===== Section shared ===== */
.portal-section {
  padding: 80px 0 96px;
  background: var(--color-bg);
}

.portal-section.alt {
  background: var(--color-bg-alt);
}

.section-label {
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-label.revealed {
  opacity: 1;
  transform: translateX(0);
}

.section-lead {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.section-lead.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-desc {
  font-size: 1.5rem;
  line-height: 1.9;
  color: var(--color-text-light);
  max-width: 640px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.section-desc.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Why Luxy ===== */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--color-border);
}

.why-item {
  padding: 40px 32px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.why-item:nth-child(odd) {
  border-right: 1px solid var(--color-border);
}

.why-item .num {
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.why-item h3 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  line-height: 1.45;
}

.why-item p {
  font-size: 1.4rem;
  line-height: 1.85;
  color: var(--color-text-light);
}

/* Why grid stagger */
.why-item.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.why-item.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.why-item.reveal:nth-child(1) { transition-delay: 0s; }
.why-item.reveal:nth-child(2) { transition-delay: 0.15s; }
.why-item.reveal:nth-child(3) { transition-delay: 0.3s; }
.why-item.reveal:nth-child(4) { transition-delay: 0.45s; }

/* ===== Numbers ===== */
.numbers-row {
  display: flex;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.number-item {
  flex: 1;
  padding: 40px 24px;
  text-align: center;
  border-right: 1px solid var(--color-border);
}

.number-item:last-child {
  border-right: none;
}

.number-item .value {
  font-family: "Poppins", sans-serif;
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
}

.number-item .label {
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin-top: 8px;
}

.number-item.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.number-item.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.number-item.reveal:nth-child(1) { transition-delay: 0s; }
.number-item.reveal:nth-child(2) { transition-delay: 0.1s; }
.number-item.reveal:nth-child(3) { transition-delay: 0.2s; }
.number-item.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ===== CEO ===== */
.ceo-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  margin-top: 48px;
  align-items: start;
}

.ceo-photo {
  width: 200px;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
  animation: ceoFloat 4s ease-in-out infinite alternate;
}

.ceo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes ceoFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.ceo-text blockquote {
  font-size: 1.6rem;
  line-height: 2.0;
  margin-bottom: 20px;
  padding: 0;
  border: none;
  color: var(--color-text);
}

.ceo-text .ceo-name {
  font-size: 1.4rem;
  font-weight: 700;
}

.ceo-text .ceo-role {
  font-size: 1.3rem;
  color: var(--color-text-light);
}

/* ===== Positions / Case Studies ===== */
.positions-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 48px;
}

.positions-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.position-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  background: var(--color-white, #fff);
  color: var(--color-text);
}

.position-tag {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.position-tag.employee {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.position-tag.partner {
  background: #ecf0f3;
  color: #2c3e50;
}

.position-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.position-desc {
  font-size: 1.3rem;
  color: var(--color-text-light);
  text-align: right;
  white-space: nowrap;
}

/* ===== Video Embed ===== */
.media-video {
  margin-top: 48px;
  margin-bottom: 48px;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.video-channel:hover {
  text-decoration: underline;
}

/* ===== Note Embeds ===== */
.note-embed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.note-embed-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.note-embed-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.note-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.note-more:hover {
  text-decoration: underline;
}

/* ===== Media Blog Card ===== */
.media-blog {
  display: block;
  margin-top: 48px;
  padding: 32px;
  background: var(--color-white, #fff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.media-blog:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.media-blog-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.media-blog-img {
  width: 280px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.media-blog-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.media-blog-desc {
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.media-blog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
}

.media-blog:hover .media-blog-link {
  text-decoration: underline;
}

/* ===== Flow ===== */
.flow-list {
  display: flex;
  gap: 0;
  margin-top: 48px;
  counter-reset: flow;
}

.flow-item {
  flex: 1;
  text-align: center;
  padding: 32px 20px;
  position: relative;
  counter-increment: flow;
}

.flow-item::before {
  content: counter(flow);
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.08);
  line-height: 1;
  margin-bottom: 12px;
}

.flow-item h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.flow-item p {
  font-size: 1.3rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.flow-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: var(--color-border);
}

.flow-item.reveal {
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.flow-item.reveal.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.flow-item.reveal:nth-child(1) { transition-delay: 0s; }
.flow-item.reveal:nth-child(2) { transition-delay: 0.15s; }
.flow-item.reveal:nth-child(3) { transition-delay: 0.3s; }
.flow-item.reveal:nth-child(4) { transition-delay: 0.45s; }

/* ===== CTA ===== */
.portal-cta {
  padding: 80px 0;
  text-align: center;
  background: var(--color-bg);
}

.portal-cta .section-lead {
  margin-bottom: 12px;
}

.portal-cta .section-desc {
  margin: 0 auto 32px;
  text-align: center;
}

.portal-cta .btn {
  animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 125, 212, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(6, 125, 212, 0); }
}

/* ===== Portal Form ===== */
.portal-form {
  max-width: 480px;
  margin: 32px auto 0;
  text-align: left;
}

.portal-form .form-row {
  margin-bottom: 20px;
}

.portal-form label {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.portal-form .required {
  color: var(--color-primary);
}

.portal-form input,
.portal-form textarea,
.portal-form select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.5rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white, #fff);
  transition: border-color 0.2s ease;
}

.portal-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b6b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.portal-form input:focus,
.portal-form textarea:focus,
.portal-form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.portal-form textarea {
  resize: vertical;
}

.portal-form .btn {
  width: 100%;
  text-align: center;
}

.portal-form .form-note {
  text-align: center;
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin-top: 12px;
}

/* ===== Footer ===== */
.portal-footer {
  background: var(--color-accent);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
  text-align: center;
  font-size: 1.3rem;
}

.portal-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin: 0 16px;
}

.portal-footer a:hover {
  color: #fff;
}

.footer-nav {
  margin-bottom: 16px;
}

/* ===== Fixed CTA (SP) ===== */
.fixed-cta {
  display: none;
}

/* ===== Wave SVG ===== */
.section-wave,
.section-wave-bottom {
  display: block;
  width: 100%;
  height: auto;
  animation: waveSway 6s ease-in-out infinite alternate;
}

.section-wave-bottom {
  animation: waveSwayFlip 6s ease-in-out infinite alternate;
}

@keyframes waveSway {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(1.15); }
}

@keyframes waveSwayFlip {
  0% { transform: rotate(180deg) scaleY(1); }
  100% { transform: rotate(180deg) scaleY(1.15); }
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1099px) {
  .portal-hero .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-main h1 {
    font-size: 3.2rem;
  }

  .hero-aside {
    max-width: 480px;
  }

  .position-row {
    grid-template-columns: auto 1fr;
  }

  .position-desc {
    grid-column: 2;
    text-align: left;
    white-space: normal;
  }

  .note-embed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 767px) {
  .portal-hero {
    padding: 120px 0 80px;
  }

  .hero-main h1 {
    font-size: 2.6rem;
  }

  .hero-main h1 .thin {
    font-size: 1.6rem;
  }

  .section-lead {
    font-size: 2.2rem;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-item:nth-child(odd) {
    border-right: none;
  }

  .numbers-row {
    flex-wrap: wrap;
  }

  .number-item {
    flex: 0 0 50%;
    border-right: none;
  }

  .number-item:nth-child(odd) {
    border-right: 1px solid var(--color-border);
  }

  .ceo-block {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ceo-photo {
    width: 140px;
    height: 170px;
  }

  .positions-intro {
    flex-direction: column;
    align-items: start;
  }

  .position-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px;
  }

  .note-embed-grid,
  .note-embed-grid--2col {
    grid-template-columns: 1fr;
  }

  .flow-list {
    flex-direction: column;
    gap: 0;
  }

  .flow-item:not(:last-child)::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    width: 60%;
    height: 1px;
    transform: translateX(-50%);
  }

  .media-blog-inner {
    flex-direction: column;
    gap: 20px;
  }

  .media-blog-img {
    width: 100%;
    max-width: 280px;
  }

  .br-pc {
    display: none;
  }

  .fixed-cta {
    display: block;
  }

  .portal-footer {
    padding-bottom: 80px;
  }
}

/* ===== JS-off fallback ===== */
.no-js .section-label,
.no-js .section-lead,
.no-js .section-desc,
.no-js .position-row,
.no-js .reveal,
.no-js .hero-main h1,
.no-js .hero-main h1 .thin,
.no-js .hero-aside {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
