/* ========================================
   Top Page Styles
   ======================================== */

/* Header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(61, 79, 95, 0.95);
  backdrop-filter: blur(8px);
  height: 56px;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.top-header.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.top-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.top-header-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: 0.04em;
}

.top-nav {
  display: flex;
  gap: 28px;
}

.top-nav a {
  color: var(--color-white);
  font-size: 13px;
  font-weight: 700;
  opacity: 0.8;
  transition: opacity 0.2s;
  position: relative;
}

.top-nav a:hover {
  opacity: 1;
}

.top-nav a.is-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-terracotta);
  border-radius: 1px;
}

/* Mobile hamburger */
.top-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.top-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-white);
  transition: transform 0.3s, opacity 0.3s;
}

.top-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.top-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.top-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.top-mobile-nav {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background-color: rgba(61, 79, 95, 0.98);
  padding: 16px 24px;
  flex-direction: column;
  gap: 16px;
}

.top-mobile-nav.active {
  display: flex;
}

.top-mobile-nav a {
  color: var(--color-white);
  font-size: 15px;
  font-weight: 700;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Hero */
.hero {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 48px 0;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--color-terracotta) 0%, #c4896a 100%);
  border-radius: 16px;
  padding: 48px;
  position: relative;
}

.hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero-heading {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-sub {
  font-size: 13px;
  opacity: 0;
  margin-bottom: 20px;
  transform: translateY(16px);
  animation: hero-fade-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.hero-app-name {
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
  margin-bottom: 20px;
  transform: translateY(16px);
  animation: hero-fade-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.hero-badges {
  display: flex;
  gap: 12px;
  align-items: center;
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fade-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

.hero-text .btn-white {
  margin-top: 16px;
  padding: 10px 28px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fade-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.95s forwards;
}

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badges img,
.hero-badges .placeholder-img {
  width: auto;
  height: 40px;
  object-fit: contain;
  font-size: 11px;
}

.hero-badges .placeholder-img {
  background-color: rgba(0,0,0,0.3);
}

.hero-image {
  flex: 1;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}

.hero-image img.tablet {
  width: 220px;
  height: auto;
  border: 6px solid var(--color-navy-dark);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(30px) rotate(-1deg);
  animation: hero-device-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.hero-image img.phone {
  width: 120px;
  height: auto;
  border: 5px solid var(--color-navy-dark);
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.25);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(40px) rotate(1deg);
  animation: hero-device-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

@keyframes hero-device-in {
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

/* Company Intro */
.intro-section {
  background-color: var(--color-white);
}

.intro-section .section-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.intro-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.intro-card {
  padding: 32px 24px;
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}

.intro-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.intro-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-navy-dark);
  position: relative;
  padding-bottom: 12px;
}

.intro-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--color-terracotta);
}

.intro-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-gray);
}

/* Products */
.products-section {
  background: linear-gradient(135deg, var(--color-navy) 0%, #4a6070 100%);
  color: var(--color-white);
}

.products-section .section-title {
  color: var(--color-white);
}

.products-desc {
  text-align: center;
  margin-bottom: 48px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.product-card {
  background-color: var(--color-white);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.product-card .placeholder-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 0 auto 16px;
  font-size: 10px;
}

.product-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-card p {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--color-dark);
}

.product-card .product-link {
  color: var(--color-terracotta);
  font-weight: 700;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.product-card .product-link:hover {
  opacity: 0.7;
}

.product-badges {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.product-badges img,
.product-badges .placeholder-img {
  width: auto;
  height: 30px;
  border-radius: 4px;
  object-fit: contain;
  display: block;
  font-size: 9px;
}

.product-badges img[alt="App Store"] {
  height: 30px;
}

.product-badge-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  background-color: #888;
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Technology */
.tech-section {
  background-color: var(--color-white);
}

.tech-section .section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-terracotta);
  margin: 16px auto 0;
}

.tech-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--color-gray);
  margin-bottom: 48px;
}

.tech-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.tech-item h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-navy-dark);
}

.tech-item p {
  font-size: 14px;
  line-height: 2;
  color: var(--color-gray);
}

/* Partners */
.partners-section {
  background-color: var(--color-pink-beige);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.partner-item {
  text-align: center;
  background-color: var(--color-white);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.partner-item img,
.partner-item .placeholder-img {
  width: 100%;
  height: 120px;
  margin: 0 auto 12px;
  object-fit: contain;
}

.partner-item .placeholder-img {
  background-color: var(--color-white);
}

.partner-item img[alt*="Pilina"],
.partner-item img[alt*="ウカルン"],
.partner-item img[alt*="kana"],
.partner-item img[alt*="若葉台"],
.partner-item img[alt*="SKY"] {
  height: 180px;
}

.partner-item p {
  font-size: 13px;
  color: var(--color-gray);
}

/* Contact */
.contact-section {
  background-color: var(--color-light-gray);
}

.contact-section .section-title {
  margin-bottom: 16px;
}

.contact-desc {
  text-align: center;
  font-size: 14px;
  color: var(--color-gray);
  margin-bottom: 40px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form .form-group.full {
  grid-column: 1 / -1;
}

.contact-form .btn {
  grid-column: 1 / -1;
  justify-self: end;
}

/* Company Info */
.company-section {
  background-color: var(--color-white);
  padding: 80px 0;
}

.company-table {
  max-width: 640px;
  margin: 0 auto;
}

.company-row {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

.company-row:first-child {
  border-top: 1px solid var(--color-border);
}

.company-row dt {
  width: 140px;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy-dark);
}

.company-row dd {
  font-size: 14px;
  color: var(--color-gray);
  line-height: 1.8;
}

/* Background parallax section */
.bg-parallax-section {
  height: 360px;
  position: relative;
  background: url('/images/common/bg-1500x500.webp') center center / cover no-repeat fixed;
}

.bg-parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.55) 0%, rgba(61, 79, 95, 0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-parallax-text {
  color: var(--color-white);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .top-nav {
    display: none;
  }

  .top-hamburger {
    display: flex;
  }

  .bg-parallax-section {
    background-attachment: scroll;
    height: 240px;
  }

  .bg-parallax-text {
    font-size: 22px;
  }

  .hero-inner {
    flex-direction: column;
    padding: 32px 24px;
  }

  .hero-image {
    justify-content: center;
  }

  .hero-image img.phone {
    width: 100px;
  }

  .hero-image img.tablet {
    width: 160px;
  }

  .intro-cards {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .tech-items {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }
}
