/* ========================================
   BESTAND Inc. — Minimal Corporate Site
   ======================================== */

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

:root {
  --color-bg: #ffffff;
  --color-bg-gray: #f7f7f7;
  --color-dark: #111111;
  --color-text: #333333;
  --color-text-light: #777777;
  --color-accent: #294b63;
  --color-accent-light: #3a6d8e;
  --color-border: #e0e0e0;
  --font-en: 'Montserrat', sans-serif;
  --font-ja: 'Noto Sans JP', sans-serif;
  --transition: 0.3s ease;
  --max-width: 1080px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ja);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 640px;
  text-align: center;
}

.section {
  padding: 120px 0;
}

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

.section-dark {
  background: var(--color-dark);
  color: #ffffff;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 24px;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header-logo {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  transition: color var(--transition);
}

.header.scrolled .header-logo {
  color: var(--color-dark);
}

.header-nav {
  display: flex;
  gap: 36px;
}

.nav-link {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition);
}

.nav-link:hover {
  color: #ffffff;
}

.header.scrolled .nav-link {
  color: var(--color-text-light);
}

.header.scrolled .nav-link:hover {
  color: var(--color-dark);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.header.scrolled .hamburger span {
  background: var(--color-dark);
}

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

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    #111111 0%,
    #1a3347 40%,
    #294b63 70%,
    #1a3347 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}

.hero-title {
  font-family: var(--font-en);
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 300;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.hero-accent {
  font-weight: 700;
}

.hero-subtitle {
  margin-top: 24px;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.2em;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-indicator span {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
  0% { top: -100%; }
  50% { top: 0; }
  100% { top: 100%; }
}

/* ---------- Section Headings ---------- */
.section-label {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.section-label-light {
  color: rgba(255, 255, 255, 0.5);
}

.section-title {
  font-family: var(--font-en);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-dark);
  margin-bottom: 64px;
}

.section-title-light {
  color: #ffffff;
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}

.service-card {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.service-number {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.service-name {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.service-desc {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.service-detail {
  font-size: 14px;
  line-height: 2;
  color: var(--color-text);
}

/* ---------- Company ---------- */
.company-mission {
  text-align: center;
  margin-bottom: 80px;
}

.mission-text {
  font-family: var(--font-en);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.company-info {
  margin-bottom: 80px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--color-border);
}

.info-table th,
.info-table td {
  padding: 20px 0;
  font-size: 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}

.info-table th {
  width: 240px;
  font-weight: 500;
  color: var(--color-text-light);
  white-space: nowrap;
  padding-right: 40px;
}

/* CEO */
.ceo-section {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.ceo-image {
  flex: 0 0 280px;
  overflow: hidden;
}

.ceo-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: grayscale(20%);
}

.ceo-text {
  flex: 1;
}

.ceo-title {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.ceo-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.ceo-name-en {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.ceo-bio p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ---------- Contact ---------- */
.contact-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  line-height: 2;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-en);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #ffffff;
  padding: 16px 48px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color var(--transition), background var(--transition);
}

.contact-email:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Footer ---------- */
.footer {
  padding: 60px 0 40px;
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}

.footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 16px;
  opacity: 0.7;
}

.footer-address {
  font-size: 12px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-copy {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
}

/* ---------- Scroll Animation ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Hero elements visible immediately (no wait for JS) */
.hero .fade-up {
  opacity: 1;
  transform: translateY(0);
}

.hero .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 840px) {
  .section {
    padding: 80px 0;
  }

  .section-title {
    margin-bottom: 48px;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .service-card {
    padding: 32px 0;
  }

  .info-table th {
    width: 160px;
  }

  .ceo-section {
    flex-direction: column;
    gap: 40px;
  }

  .ceo-image {
    flex: none;
    width: 200px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 40px;
  }
}

@media (max-width: 540px) {
  .header-inner {
    height: 60px;
  }

  .header-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(17, 17, 17, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav.open .nav-link {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
  }

  .header-nav.open .nav-link:hover {
    color: #ffffff;
  }

  .hamburger {
    display: flex;
    z-index: 10;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    margin-bottom: 36px;
  }

  .info-table th {
    display: block;
    width: 100%;
    padding-bottom: 4px;
    padding-right: 0;
  }

  .info-table td {
    display: block;
    padding-top: 0;
    padding-bottom: 20px;
  }

  .info-table tr {
    display: block;
    padding: 16px 0;
  }

  .contact-email {
    padding: 12px 32px;
  }
}

/* ========================================
   Legal Pages
   ======================================== */

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.legal-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.legal-header-logo {
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-dark);
}

.legal-header-back {
  font-size: 13px;
  color: var(--color-text-light);
  transition: color var(--transition);
}

.legal-header-back:hover {
  color: var(--color-dark);
}

.legal-content {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  width: 100%;
}

.legal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-dark);
}

.legal-body h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-dark);
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-body p {
  font-size: 14px;
  line-height: 2;
  margin-bottom: 16px;
  color: var(--color-text);
}

.legal-body ol,
.legal-body ul {
  font-size: 14px;
  line-height: 2;
  margin-bottom: 16px;
  padding-left: 1.5em;
  color: var(--color-text);
}

.legal-body li {
  margin-bottom: 4px;
}

.legal-date {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.legal-footer {
  background: var(--color-dark);
  padding: 32px 0;
  text-align: center;
}

.legal-footer-copy {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
}

/* 404 Page */
.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 24px;
}

.page-404-code {
  font-family: var(--font-en);
  font-size: clamp(64px, 15vw, 120px);
  font-weight: 700;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 16px;
}

.page-404-text {
  font-size: 15px;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.page-404-link {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  padding: 12px 32px;
  border: 1px solid var(--color-accent);
  transition: background var(--transition), color var(--transition);
}

.page-404-link:hover {
  background: var(--color-accent);
  color: #ffffff;
}

@media (max-width: 540px) {
  .legal-content {
    padding: 40px 20px 60px;
  }

  .legal-title {
    font-size: 18px;
    margin-bottom: 32px;
  }
}
