/* ============================================
   TAKUBOX LLC コーポレートサイト
   BALMUDA-inspired dark minimal design
   ============================================ */

:root {
  --black: #000000;
  --dark: #111111;
  --dark-surface: #1a1a1a;
  --dark-card: #222222;
  --text: #e0e0e0;
  --text-light: #999999;
  --text-muted: #666666;
  --white: #ffffff;
  --border: #333333;
  --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', -apple-system, sans-serif;
  color: var(--text);
  background: var(--black);
  line-height: 2;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ======== Header ======== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 64px;
  width: auto;
  display: block;
  filter: invert(1);
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav a {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav a:hover { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--white);
  transition: background 0.3s ease;
}

/* ======== Hero ======== */
.hero {
  margin-top: 80px;
  position: relative;
  background: var(--dark);
  overflow: hidden;
}

.hero-link {
  display: block;
  transition: opacity var(--transition);
}

.hero-link:hover {
  opacity: 0.85;
}

.hero-bg {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  animation: heroFade 1.2s ease forwards;
}

@keyframes heroFade {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* Handwrite overlay */
.hero-bg {
  position: relative;
}

.hero-handwrite {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.handwrite-line {
  font-family: 'Zen Kurenaido', sans-serif;
  color: #111111;
  white-space: nowrap;
  -webkit-text-stroke: 0.5px #111111;
  paint-order: stroke fill;
}

.handwrite-line span {
  display: inline-block;
  opacity: 0;
}

.handwrite-line--sub {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.handwrite-line--main {
  font-size: 80px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

@keyframes penReveal {
  0% {
    opacity: 0;
    transform: translateY(4px) rotate(-2deg);
  }
  40% {
    opacity: 0.6;
    transform: translateY(1px) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

/* Glitter / lame effect */
.glitter-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
  animation: glitterFloat 0.8s ease-out forwards;
}

@keyframes glitterFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0);
  }
}

.hero-caption {
  text-align: center;
  padding: 32px 40px 64px;
}

.hero-title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--white);
  margin-bottom: 8px;
}

.hero-sub {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--text-muted);
}

/* ======== Section Common ======== */
.section {
  padding: 100px 0;
  background: var(--black);
}

.section-dark {
  background: var(--dark-surface);
}

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

.section-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 64px;
  text-align: center;
}

/* ======== White Area ======== */
.white-area {
  --black: #ffffff;
  --dark: #ffffff;
  --dark-surface: #f5f5f5;
  --dark-card: #f0f0f0;
  --text: #333333;
  --text-light: #555555;
  --text-muted: #999999;
  --white: #222222;
  --border: #e5e5e5;
  background: #ffffff;
}

.section-about {
  background: #f5f5f5;
}

/* ======== Pain Points ======== */
.pain-section {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.pain-lead {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.1em;
  margin-bottom: 48px;
}

.pain-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 56px;
}

.pain-item {
  padding: 0;
}

.pain-quote {
  font-size: 24px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.pain-body {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-light);
  line-height: 2.6;
  margin-bottom: 40px;
}

.pain-conclusion {
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.1em;
  line-height: 2;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

/* ======== Product ======== */
.product-hero {
  display: flex;
  align-items: center;
  gap: 64px;
  margin-bottom: 80px;
}

.product-text {
  flex: 1;
}

.product-name {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 4px;
  margin-bottom: 24px;
  color: var(--white);
}

.product-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 2.4;
  margin-bottom: 32px;
}

.product-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--white);
  border-bottom: 1px solid var(--white);
  padding-bottom: 4px;
  transition: opacity var(--transition);
}

.product-link:hover { opacity: 0.5; }

.product-image {
  flex: 1;
  text-align: center;
}

.product-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.product-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.feature {
  text-align: left;
}

.feature-num {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.feature h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--white);
  letter-spacing: 0.05em;
}

.feature p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 2.2;
}

/* ======== About ======== */
.about-image {
  margin-bottom: 64px;
  overflow: hidden;
  border-radius: 4px;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-block {
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.about-vision {
  flex: 1;
  font-size: 26px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.08em;
  color: var(--white);
}

.about-body {
  flex: 1;
  padding-top: 8px;
}

.about-body p {
  font-size: 15px;
  font-weight: 400;
  line-height: 2.4;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* ======== Topics ======== */
.topics-list {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.topic-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.topic-date {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  white-space: nowrap;
}

.topic-tag {
  font-size: 12px;
  color: var(--text-light);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 2px;
  white-space: nowrap;
}

.topic-text {
  color: var(--text);
  flex: 1;
}

a.topic-link {
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a.topic-link:hover {
  opacity: 0.6;
}

/* ======== Company ======== */
.company-table-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

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

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

.company-table tr:last-child { border-bottom: none; }

.company-table th,
.company-table td {
  padding: 20px 0;
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

.company-table th {
  width: 100px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 1px;
  font-size: 13px;
}

.company-table td {
  color: var(--text);
}

.company-table td a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.company-table td a:hover { border-color: var(--white); }

/* ======== Contact ======== */
.contact-block {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.contact-block p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 2.2;
}

.contact-mail {
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--white);
  border-bottom: 1px solid var(--white);
  padding-bottom: 4px;
  transition: opacity var(--transition);
}

.contact-mail:hover { opacity: 0.5; }

/* ======== Footer ======== */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
  background: var(--dark);
}

.footer-top {
  display: flex;
  gap: 80px;
  margin-bottom: 64px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-light);
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-logo-img {
  height: 14px;
  width: auto;
  opacity: 0.3;
  filter: invert(1);
}

.footer-bottom p {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

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

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

/* ======== Responsive ======== */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .header-inner { padding: 0 24px; height: 56px; }

  .nav {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 1001;
  }

  .header.nav-open {
    background: #ffffff;
  }

  .header.nav-open .logo-img {
    filter: none;
  }

  .header.nav-open .nav-toggle span {
    background: #222222;
  }

  .nav.active { display: flex; }
  .nav.active a {
    font-size: 20px;
    color: #222222;
    letter-spacing: 2px;
    font-weight: 500;
    padding: 10px 24px;
  }
  .nav-toggle { display: flex; }

  .hero { margin-top: 56px; }
  .hero-bg { padding: 0; }
  .hero-title { font-size: 16px; }
  .hero-caption { padding: 24px 24px 48px; }

  .hero-handwrite {
    top: 22%;
  }

  .handwrite-line {
    -webkit-text-stroke: 0;
  }

  .handwrite-line--sub {
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 2px;
  }

  .handwrite-line--main {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.08em;
    position: relative;
    top: -14px;
  }

  .section { padding: 64px 0; }
  .section-label { margin-bottom: 40px; }

  .pain-quote { font-size: 18px; }
  .pain-body { line-height: 2.4; }

  .product-hero {
    flex-direction: column-reverse;
    gap: 32px;
  }

  .product-name { font-size: 22px; }
  .product-features { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }

  .about-block { flex-direction: column; gap: 32px; }
  .about-vision { font-size: 20px; }

  .topic-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .topic-text { width: 100%; }

  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    padding: 0;
  }
  .company-table th { padding-top: 16px; padding-bottom: 2px; font-size: 10px; }
  .company-table td { padding-bottom: 16px; }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .footer { padding-bottom: 80px; }

  .cta-pc { display: none !important; }
  .cta-sp { display: inline !important; }

  .site-fixed-cta-link {
    font-size: 13px;
    padding: 12px 16px;
    letter-spacing: 0.5px;
  }
}

/* ======== Fixed CTA (top / product) ======== */
.cta-sp { display: none; }

.site-fixed-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #000;
  border-top: none;
  padding: 12px 24px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.site-fixed-cta.visible {
  transform: translateY(0);
}

.site-fixed-cta-link {
  display: block;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 12px 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.5px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-fixed-cta-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
}
