/* ============================================
   Apple-like Corporate Design System
   ============================================ */

:root {
  --primary-bg: #ffffff;
  --secondary-bg: #f5f5f7;
  --tertiary-bg: #fbfbfd;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent-blue: #0071e3;
  --accent-blue-hover: #0077ed;
  --border-light: #d2d2d7;
  --border-subtle: #e5e5e7;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Typography - Apple Style */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 
               Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  border: 0;
  max-width: 100%;
  height: auto;
}

/* ============================================
   Hero Section - Apple-style Message
   ============================================ */
.company-message {
  background: linear-gradient(135deg, var(--tertiary-bg) 0%, var(--secondary-bg) 100%);
  padding: 40px 40px;
  margin: 40px 0 60px 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.company-message:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.company-message p {
  font-size: 1.25em;
  line-height: 1.7;
  margin: 0;
  color: var(--text-primary);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.message-word {
  display: inline;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.company-message a {
  color: var(--accent-blue);
  border-bottom: none;
  text-decoration: none;
  transition: var(--transition-smooth);
  font-weight: 500;
}

.company-message a:hover {
  color: var(--accent-blue-hover);
  text-decoration: none;
  background-color: transparent;
}

/* ============================================
   Section Headings - Apple Style
   ============================================ */
h2 {
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 80px 0 40px 0;
  color: var(--text-primary);
  line-height: 1.1;
}

h3 {
  font-size: 1.75em;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 50px 0 24px 0;
  color: var(--text-primary);
}

/* ============================================
   News/Topics/Blog Sections
   ============================================ */
.news.list {
  background-color: var(--primary-bg);
  padding: 30px 0;
  margin-bottom: 40px;
}

.list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background-color: var(--tertiary-bg);
  padding-left: 16px;
  margin-left: -16px;
  padding-right: 16px;
  margin-right: -16px;
  border-radius: var(--radius-sm);
}

.list-item .title {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.list-item time {
  font-size: 0.875em;
  color: var(--text-secondary);
  font-weight: 400;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}

.list-item a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: none;
  font-size: 1.05em;
  font-weight: 500;
  transition: var(--transition-smooth);
  letter-spacing: -0.01em;
}

.list-item a:hover {
  color: var(--accent-blue);
  background-color: transparent;
}

/* ============================================
   "More" Links
   ============================================ */
.more {
  text-align: right;
  margin-top: 30px;
  padding-top: 20px;
}

.more a {
  color: var(--accent-blue);
  font-size: 1em;
  font-weight: 500;
  text-decoration: none;
  border-bottom: none;
  transition: var(--transition-smooth);
  position: relative;
  display: inline-block;
  padding-right: 24px;
}

.more a::after {
  content: "→";
  position: absolute;
  right: 0;
  transition: var(--transition-smooth);
  opacity: 0.7;
}

.more a:hover {
  color: var(--accent-blue-hover);
  background-color: transparent;
}

.more a:hover::after {
  right: -4px;
  opacity: 1;
}

/* ============================================
   Service Cards
   ============================================ */
.followup-links {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-top: 24px;
  text-align: right;
}

.followup-links li {
  margin: 12px 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}

.followup-links li i {
  margin-right: 10px;
  color: var(--accent-blue);
  transition: var(--transition-smooth);
}

.followup-links li::before {
  content: none !important;
  display: none !important;
}

.followup-links li::marker {
  content: none !important;
}

.followup-links li a {
  color: var(--accent-blue);
  border-bottom: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Noto Sans JP", sans-serif;
  font-size: 1.05em;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.followup-links li a:hover {
  color: var(--accent-blue-hover);
  background-color: transparent;
}

.followup-links li:hover i {
  transform: translateX(4px);
}

/* ============================================
   Company Info Section
   ============================================ */
.company-info {
  background-color: var(--tertiary-bg);
  padding: 40px;
  border-radius: var(--radius-md);
  margin: 40px 0;
  border: 1px solid var(--border-subtle);
}

.company-info dt {
  margin-top: 28px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.company-info dt:first-child {
  margin-top: 0;
}

.company-info dd {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: var(--text-primary);
  font-size: 1.05em;
  line-height: 1.6;
}

.company-info a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: none;
  transition: var(--transition-smooth);
}

.company-info a:hover {
  color: var(--accent-blue-hover);
  background-color: transparent;
}

.company-info ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.company-info ul li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  line-height: 1.6;
}

.company-info ul li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--accent-blue);
  font-weight: bold;
}

/* ============================================
   Contact Section List
   ============================================ */
a[name="contacts"] ~ h2 ~ ul {
  list-style: none;
  padding-left: 40px;
  margin: 24px 0;
}

a[name="contacts"] ~ h2 ~ ul li {
  padding: 12px 0;
  padding-left: 32px;
  position: relative;
  line-height: 1.6;
  font-size: 1.05em;
}

a[name="contacts"] ~ h2 ~ ul li::before {
  content: "📞";
  position: absolute;
  left: 0;
  font-size: 1.2em;
}

a[name="contacts"] ~ h2 ~ ul li:nth-child(2)::before {
  content: "✉️";
}

a[name="contacts"] ~ h2 ~ ul li:nth-child(3)::before {
  content: "🤖";
}

/* ============================================
   Utility Classes
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.no-hover:hover,
.no-hover:hover a {
  text-decoration: none !important;
  color: inherit !important;
  background-color: transparent !important;
}

li p {
  display: inline;
}

a.no-border,
.no-border a {
  border-bottom: none;
}

.ruby {
  font-size: 80%;
}

#site-id {
  border: 0;
  text-decoration: none;
  transition: var(--transition-smooth);
}

a#site-id:hover {
  text-decoration: none;
  color: inherit;
  background-color: transparent;
  opacity: 0.7;
}

#site-id img {
  border: 0;
  padding: 0;
  vertical-align: middle;
}

/* ============================================
   Tags
   ============================================ */
.tags li {
  display: inline-block;
  margin-top: 60px;
  margin-right: 25px;
}

div.news .tag {
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  display: inline-block;
  width: 5em;
  height: 2.5em;
  padding: 0;
  margin: 2px;
  background-color: var(--secondary-bg);
  border-radius: 4px;
}

.tags a {
  border: none;
}

/* ============================================
   Links - General
   ============================================ */
a {
  color: var(--accent-blue);
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--accent-blue-hover);
  border-bottom-color: var(--accent-blue-hover);
}

/* ============================================
   Self-promotion Card
   ============================================ */
.self-ad {
  margin: 60px 0;
  padding: 32px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: var(--radius-md);
  border: 1px solid #bae6fd;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Footer Elements
   ============================================ */
footer {
  margin-top: 100px;
  padding-bottom: 40vh;
  border-top: 1px solid var(--border-subtle);
  padding-top: 60px;
}

.footer-info .last-modified {
  font-size: 0.75em;
  color: var(--text-secondary);
}

.footer-info .copyright {
  font-size: 0.875em;
  color: var(--text-secondary);
}

.signature-block {
  text-align: right;
  color: var(--text-secondary);
}

.conclusion {
  margin: 60px 0;
  font-size: 1.3em;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ============================================
   Store Buttons
   ============================================ */
.store-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 50px;
  flex-wrap: wrap;
}

.store-button a {
  padding: 0;
  margin: 0;
  border: none !important;
  transition: var(--transition-smooth);
}

.store-button a:hover {
  border: none !important;
  background-color: transparent !important;
  opacity: 0.8;
}

.store-button img {
  padding: 0;
  margin: 0;
  height: 50px;
  width: auto;
  border-bottom: none;
}

/* ============================================
   Breadcrumbs Navigation
   ============================================ */
.breadcrumbs-nav {
  margin: 20px 0 30px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9em;
  color: var(--text-secondary);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li::after {
  content: "›";
  margin: 0 8px;
  color: var(--text-secondary);
  opacity: 0.6;
}

.breadcrumbs li:last-child::after {
  content: "";
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: none;
  transition: var(--transition-smooth);
}

.breadcrumbs a:hover {
  color: var(--accent-blue);
  background-color: transparent;
}

.breadcrumbs [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   Backlinks
   ============================================ */
.backlinks {
  margin-top: 60px;
  padding: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--tertiary-bg);
  box-shadow: var(--shadow-sm);
}

.backlinks h2 {
  font-size: 1.3em;
  margin: 0 0 20px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.backlinks ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.backlinks li {
  margin: 12px 0;
  padding-left: 24px;
  position: relative;
}

.backlinks li::before {
  content: "←";
  position: absolute;
  left: 0;
  color: var(--text-secondary);
}

.backlinks a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-light);
  transition: var(--transition-smooth);
}

.backlinks a:hover {
  color: var(--accent-blue);
  border-bottom: 1px solid var(--accent-blue);
  background-color: transparent;
}

/* ============================================
   Social Icons
   ============================================ */
.social-icons {
  margin: 20px 0;
  display: flex;
  gap: 16px;
}

.social-icons a,
.social-icons a:link,
.social-icons a:visited {
  text-decoration: none !important;
  border-bottom: none !important;
  color: var(--text-secondary);
  font-size: 1.2em;
  transition: var(--transition-smooth);
}

.social-icons a:hover,
.social-icons a:active {
  text-decoration: none !important;
  border-bottom: none !important;
  color: var(--accent-blue);
  background-color: transparent;
  transform: translateY(-2px);
}

/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: var(--primary-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: var(--shadow-md);
}

#back-to-top:hover {
  background-color: var(--secondary-bg);
  transform: translateY(-50%) translateY(-4px);
  text-decoration: none !important;
  border-bottom: none !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-lg);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top::before {
  content: none !important;
  display: none !important;
}

#back-to-top i {
  font-size: 18px;
}

/* ============================================
   Fancy Text (Rainbow effect - Keep if needed)
   ============================================ */
.fancy-text {
  font-weight: bold;
  background: linear-gradient(45deg, #ff0000, #ff7f00, #cccc00, #00ff00, #0000ff, #4b0082, #8b00ff, #555555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  animation: rainbow 5s infinite;
}

@keyframes rainbow {
  0%, 100% {
    background-position: 0 0;
  }
  50% {
    background-position: 100% 100%;
  }
}

.fancy-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: black;
  z-index: -1;
  filter: blur(2px);
}

.fancy-text a {
  border: none;
  text-decoration: none;
}

.fancy-text a:hover {
  background-color: transparent;
}

/* ============================================
   Header & Navigation
   ============================================ */
header .main {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

header nav {
  margin-top: 20px;
  text-align: center;
}

header nav a {
  margin: 0 16px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.95em;
  font-weight: 500;
  text-decoration: none;
  border-bottom: none;
  transition: var(--transition-smooth);
  display: inline-block;
}

header nav a:hover {
  color: var(--accent-blue);
  background-color: var(--secondary-bg);
  border-radius: var(--radius-sm);
}

#tldr {
  background-color: var(--secondary-bg);
  padding: 4px 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.5em;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ============================================
   Mobile Menu (Hamburger)
   ============================================ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--primary-bg);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1002;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.mobile-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  border-bottom: none;
}

.mobile-logo:hover {
  background-color: transparent;
  opacity: 0.7;
}

.mobile-logo img {
  display: block;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1003;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-toggle .hamburger {
  position: relative;
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

.mobile-menu-toggle .hamburger::before,
.mobile-menu-toggle .hamburger::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
  left: 0;
}

.mobile-menu-toggle .hamburger::before {
  top: -8px;
}

.mobile-menu-toggle .hamburger::after {
  bottom: -8px;
}

.mobile-menu-toggle.active .hamburger {
  background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

body.menu-open {
  overflow: hidden;
}

/* Desktop: Hide mobile header and hamburger menu */
@media (min-width: 769px) {
  .mobile-header {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: none !important;
  }

  body {
    padding-top: 0;
  }

  header .main {
    display: flex !important;
  }
}



/* ============================================
   Animation Effects
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animations to sections */
h2 {
  animation: fadeInUp 0.6s ease-out;
}

h3 {
  animation: fadeInUp 0.6s ease-out;
}

.list-item {
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.list-item:nth-child(1) { animation-delay: 0.1s; }
.list-item:nth-child(2) { animation-delay: 0.2s; }
.list-item:nth-child(3) { animation-delay: 0.3s; }
.list-item:nth-child(4) { animation-delay: 0.4s; }
.list-item:nth-child(5) { animation-delay: 0.5s; }

.company-info {
  animation: fadeInUp 0.8s ease-out;
}

.followup-links li {
  animation: slideInLeft 0.5s ease-out;
  animation-fill-mode: both;
}

.followup-links li:nth-child(1) { animation-delay: 0.1s; }
.followup-links li:nth-child(2) { animation-delay: 0.2s; }
.followup-links li:nth-child(3) { animation-delay: 0.3s; }

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for list items */
.stagger-animation > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-animation > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-animation > *:nth-child(8) { animation-delay: 0.8s; }
.stagger-animation > *:nth-child(9) { animation-delay: 0.9s; }
.stagger-animation > *:nth-child(10) { animation-delay: 1.0s; }

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

/* ============================================
   Service Logo (WAKUMO.AI etc.)
   ============================================ */
.service-logo {
  border: none;
  max-width: 200px;
  margin: 0 25px 20px 0;
  float: left;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  h2 {
    font-size: 1.75em;
    margin: 40px 0 24px 0;
  }

  h3 {
    font-size: 1.4em;
    margin: 30px 0 16px 0;
  }

  .company-message {
    padding: 24px 20px;
    margin: 20px 0 30px 0;
  }

  .company-message p {
    font-size: 1em;
    line-height: 1.8;
  }

  .list-item .title {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .list-item time {
    min-width: auto;
    font-size: 0.8em;
  }

  .list-item a {
    font-size: 1em;
  }

  .company-info {
    padding: 20px;
  }

  .company-info dt {
    margin-top: 20px;
    font-size: 0.8em;
  }

  .company-info dd {
    padding-left: 12px;
    font-size: 1em;
  }

  #back-to-top {
    top: auto;
    bottom: 80px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  #back-to-top::before {
    content: none !important;
    display: none !important;
  }

  .backlinks {
    padding: 24px;
  }

  .breadcrumbs {
    font-size: 0.8em;
  }

  .breadcrumbs li::after {
    margin: 0 4px;
  }

  /* Service Logo - Mobile */
  .service-logo {
    float: none;
    display: block;
    margin: 0 auto 20px;
    max-width: 150px;
  }

  /* Contact Links - Larger Tap Area */
  a[name="contacts"] ~ h2 ~ ul li {
    padding: 16px 0;
  }

  a[name="contacts"] ~ h2 ~ ul li a {
    display: block;
    padding: 8px 0;
  }

  /* Mobile Navigation - Fixed Header */
  .mobile-header {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Hide desktop logo on mobile */
  header .main {
    display: none;
  }

  /* Add padding to body to account for fixed header */
  body {
    padding-top: 60px;
  }

  header nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: var(--primary-bg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin-top: 0;
  }

  header nav.active {
    opacity: 1;
    visibility: visible;
  }

  header nav a {
    margin: 16px 0;
    padding: 16px 24px;
    font-size: 1.2em;
    display: block;
    width: 80%;
    max-width: 300px;
    text-align: center;
    border-radius: var(--radius-md);
  }

  header nav a:hover {
    background-color: var(--secondary-bg);
  }

  /* Footer - Reduce excessive padding */
  footer {
    margin-top: 60px;
    padding-bottom: 20vh;
    padding-top: 40px;
  }

  /* Image Max Height */
  figure img {
    max-height: 300px;
  }
}