:root {
  --font-family: 'Shippori Mincho', 'Tenor Sans', serif;
  /* Changed to Outfit for modernization if available, fallback to others */
  --color-primary: #007bff;
  --color-secondary: #00c6ff;
  --color-text: #1a202c;
  --color-text-light: #4a5568;
  --glass-bg: rgba(255, 255, 255, 0.65);
  /* More opaque for better readability */
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --glass-highlight: rgba(255, 255, 255, 0.5);
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: none;
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.base-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), url('./assets/bg-wood.png') repeat center center;
  background-size: auto;
  z-index: -2;
  pointer-events: none;
}

#molecule-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Changed from -1 to 0 to sit on top of body (or essentially be the background) */
  pointer-events: none;
}

#app {
  position: relative;
  z-index: 1;
  /* Ensure content is above canvas */
}

/* Background Wetting Overlays */
.wetting-overlays {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.wetting-layer {
  position: absolute;
  left: 0;
  width: 100%;
  height: 33.34%;
  background: url('./assets/bg-wood.png') repeat center center;
  background-size: auto;
  /* "Wet" Look */
  filter: brightness(0.85) saturate(1.4) contrast(1.1);
  clip-path: inset(0 100% 0 0);
  opacity: 1;
  animation: wetting-sweep 3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.wetting-layer.top {
  top: 0;
  animation-delay: 0.5s;
}

.wetting-layer.middle {
  top: 33.33%;
  animation-delay: 3.5s;
  /* Starts after top finishes (0.5 + 3.0) */
}

.wetting-layer.bottom {
  top: 66.66%;
  animation-delay: 6.5s;
  /* Starts after middle finishes (3.5 + 3.0) */
}

@keyframes wetting-sweep {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(20px, 40px);
  }

  100% {
    transform: translate(0, 0);
  }
}

/* Glassmorphism Utilities */
.glass-panel,
.glass-header,
.glass-footer {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-top: 1px solid var(--glass-highlight);
  /* Highlight for 3D effect */
  border-left: 1px solid var(--glass-highlight);
}

/* Glass Header Adjustment */
.glass-header {
  background: rgba(255, 255, 255, 0.2);
  /* Significantly more transparent */
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Softer border to match transparency */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  /* Soft drop shadow */
}

.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  /* Almost clear */
  backdrop-filter: blur(8px);
  /* Low blur to see texture clearly */
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.glass-footer {
  border-radius: 16px 16px 0 0;
}

/* Layout & Typography */
header {
  position: fixed;
  top: 1.5rem;
  /* Float off the top */
  left: 50%;
  transform: translateX(-50%);
  /* Center horizontally */
  width: 90%;
  max-width: 1000px;
  /* Limit width */
  padding: 0.8rem 2.5rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  border-radius: 50px;
  /* Pill shape (Reason: user requested rounded corners) */
}

.logo {
  font-weight: 700;
  font-size: 1.8rem;
  color: #1a202c;
  /* Solid dark color for better legibility and quality */
  letter-spacing: 0.05rem;
  /* Slight spacing for elegance */
  text-transform: uppercase;
  /* More formal */
  font-family: 'Tenor Sans', sans-serif;
  /* Match hero styling */
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

/* Hamburger Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  position: absolute;
  transition: all 0.3s ease-in-out;
}

.menu-toggle span::before {
  content: "";
  top: -8px;
}

.menu-toggle span::after {
  content: "";
  top: 8px;
}

/* Hamburger Transform to X */
.nav-active .menu-toggle span {
  background-color: transparent;
}

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

.nav-active .menu-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--color-primary);
  transition: width 0.3s;
}

nav a:hover::after {
  width: 100%;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  /* Removed top padding to rely on flex centering */
  position: relative;
  padding-top: 80px;
  /* Slight offset for header */
}

.hero-content {
  padding: 6rem 4rem;
  /* Balanced padding */
  max-width: 900px;
  width: 90%;
  animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

h1 {
  font-size: 2.5rem;
  /* Reduced from 4rem */
  margin-bottom: 1.5rem;
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: -0.02em;
  font-weight: 500;
  /* Reduced from 700 */
}

.molecule-visual {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.sio2-model {
  max-width: 300px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.sio2-model:hover {
  transform: scale(1.05) rotate(2deg);
}

.subtitle {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  color: var(--color-text-light);
  font-weight: 300;
}

.cta-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #0061ff 0%, #00c6ff 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
  border: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-primary);
  border: 1px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* Response */
@media (max-width: 768px) {
  h1 {
    font-size: 2.22rem;
  }

  .hero-content {
    padding: 4rem 1.5rem;
  }

  header {
    width: 92%;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
  }

  .logo {
    font-size: 1.5rem;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 24px 24px;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-active nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    margin-top: 10px;
    /* Gap from the pill header */
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  nav a {
    font-size: 1.1rem;
    color: var(--color-primary);
  }
}

/* ... (Existing styles remain) */

.section {
  padding: 6rem 1rem;
  margin: 2rem auto;
  max-width: 1000px;
  scroll-margin-top: 100px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--color-text);
  font-weight: 700;
}

.section-desc {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  color: var(--color-text-light);
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  text-align: left;
}

.about-card {
  padding: 1.5rem;
  border-left: 4px solid var(--color-secondary);
}

.about-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #0056b3;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.feature-item {
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.feature-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--color-text);
}

.feature-item p {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* Response for new sections */
@media (max-width: 768px) {
  .section {
    padding: 4rem 1rem;
  }

  .about-grid {
    text-align: center;
  }

  .about-card {
    border-left: none;
    border-top: 4px solid var(--color-secondary);
    padding-top: 2rem;
  }
}

/* Use Cases Grid */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.case-card {
  padding: 2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.4);
  /* Slightly different from standard glass */
  transition: transform 0.3s;
}

.case-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.6);
}

.case-card h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

/* Contact Section */
#contact {
  text-align: center;
  border-radius: 24px;
  margin-bottom: 4rem;
}

.contact-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* FAQ Section */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 3rem auto 0;
  text-align: left;
}

.faq-item {
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item summary {
  padding: 1.5rem 2rem;
  color: var(--color-primary);
  font-size: 1.1rem;
  font-family: 'Shippori Mincho', serif;
  cursor: pointer;
  list-style: none;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-family: 'Outfit', sans-serif;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 2rem 1.5rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.8;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.docs-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.docs-links a {
  color: var(--color-text-light);
  text-decoration: underline;
  transition: color 0.2s;
}

.docs-links a:hover {
  color: var(--color-primary);
}

/* Refined Typography */
h1 {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 3.5rem;
  letter-spacing: 0.05em;
  font-weight: 400;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: #1a202c;
  line-height: 1.1;
}

.hero-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-jp-msg {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.5rem;
  line-height: 2;
  font-weight: 400;
  color: #4a5568;
  margin-bottom: 3rem;
  letter-spacing: 0.1em;
}

/* Refined Headings for Japanese Modern look */
h2 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.nav a {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.05em;
}

/* Scroll Indicator */
.scroll-indicator {
  margin-top: 4rem;
  /* Add breathing room from text */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  /* More gap between text and line */
  color: var(--color-primary);
  opacity: 0.8;
}

.scroll-indicator span {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-indicator .line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  animation: scrollLine 2s infinite ease-in-out;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* Adjust padding for Hero content since buttons are gone */
.hero-content {
  padding-bottom: 2rem;
}