@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Noto+Sans+JP:wght@300;400;700&family=Zen+Old+Mincho:wght@400;700&display=swap');

:root {
  --primary-color: #FFC107;
  /* Amber 500 */
  --primary-dark: #FFCA28;
  --secondary-color: #1a1a1a;
  --text-color: #333333;
  --bg-color: #ffffff;
  --light-gray: #f8f9fa;
  --white: #ffffff;
  --font-main: 'Noto Sans JP', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --font-serif: 'Zen Old Mincho', serif;
  /* For Japanese refinement */
  --max-width: 1200px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  /* Smooth easing */
}

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

body {
  font-family: var(--font-main);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 2;
  letter-spacing: 0.05em;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.4;
}

/* Utilities for Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

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

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s, padding 0.3s;
  padding: 1.5rem 0;
}

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

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  /* Default white for transparent header */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1001;
  transition: color 0.3s;
}

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

.logo span {
  color: var(--primary-color);
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
}

nav a {
  font-weight: 500;
  color: var(--white);
  position: relative;
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

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

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

.lang-switch {
  cursor: pointer;
  border: 1px solid var(--white);
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  font-weight: 400;
  background: transparent;
  color: var(--white);
  transition: all 0.3s;
}

header.scrolled .lang-switch {
  border-color: var(--text-color);
  color: var(--text-color);
}

.lang-switch:hover {
  background: var(--white);
  color: var(--text-color);
}

header.scrolled .lang-switch:hover {
  background: var(--text-color);
  color: var(--white);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 2rem;
}

.slide-content h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  /* Larger for impression */
  margin-bottom: 2rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.slide-content p {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 1rem 3rem;
  background-color: var(--primary-color);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  text-transform: uppercase;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Sections General */
section {
  padding: 8rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--primary-color);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Why Us Section */
.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
}

.why-card {
  padding: 2rem;
  text-align: center;
  /* Centered for classic look */
}

.why-number {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: #eee;
  font-weight: 700;
  line-height: 1;
  margin-bottom: -2rem;
  position: relative;
  z-index: 0;
}

.why-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.why-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 2.2;
}

/* Craftsmen Section */
.craftsmen-section {
  background-color: var(--light-gray);
  position: relative;
}

.craftsman-card {
  display: flex;
  gap: 0;
  /* No gap for magazine style */
  background: var(--white);
  margin-bottom: 4rem;
  box-shadow: var(--shadow);
  align-items: stretch;
}

.craftsman-card:nth-child(even) {
  flex-direction: row-reverse;
}

.craftsman-img {
  flex: 1;
  min-height: 400px;
}

.craftsman-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.craftsman-info {
  flex: 1;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.craftsman-role {
  color: var(--primary-color);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.craftsman-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 2rem;
}

.craftsman-desc {
  color: #555;
  margin-bottom: 2rem;
}

/* Global Section (Parallax) */
.global-section {
  position: relative;
  background-image: url('../assets/images/slider_global_network.png');
  /* Fallback */
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  color: var(--white);
  padding: 10rem 2rem;
  text-align: center;
}

.global-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.global-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.global-content h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  margin-bottom: 2rem;
}

/* Products Preview (Grid) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.product-item {
  position: relative;
  overflow: hidden;
}

.product-item img {
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-item:hover img {
  transform: scale(1.05);
}

.product-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--white);
}

/* Company & Contact (Refined) */
.company-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow);
}

.profile-table th {
  font-family: var(--font-serif);
}

/* Subpage Header */
body.subpage header {
  background-color: var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.subpage .logo {
  color: var(--white);
}

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

/* Contact Form Refined */
section h2 {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-info {
  max-width: 800px;
  margin: 0 auto 3rem auto;
}

.contact-form {
  background: var(--white);
  padding: 4rem;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 1rem;
  background-color: #f9f9f9;
  transition: border-color 0.3s, background-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--white);
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

/* Mobile Menu Fixes */
.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--white);
  /* White for transparent header */
  z-index: 1002;
}

header.scrolled .hamburger {
  color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .slide-content h1 {
    font-size: 2rem;
  }

  .why-number {
    font-size: 3rem;
  }

  .craftsman-card {
    flex-direction: column !important;
  }

  .craftsman-img {
    height: 300px;
  }

  .company-profile {
    grid-template-columns: 1fr;
  }

  .hamburger {
    display: block;
    color: var(--white);
    /* Ensure visible on transparent/dark header */
    padding: 10px;
    position: relative;
    z-index: 1002;
  }

  /* Ensure hamburger is visible on subpages too */
  body.subpage .hamburger {
    color: var(--white);
  }

  header.scrolled .hamburger {
    color: var(--text-color);
  }

  nav {
    position: fixed;
    background: rgba(26, 26, 26, 0.98);
    /* Dark background */
    height: 100vh;
    width: 100%;
    top: 0;
    left: 0;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
  }

  nav.active {
    transform: translateX(0);
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  nav a {
    font-size: 1.5rem;
    color: #ffffff !important;
    /* Force white text */
  }

  .mt-hide {
    display: none;
  }
}

/* Footer Styles */
footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-weight: 400;
}

.footer-section p {
  font-size: 0.9rem;
  line-height: 1.8;
  opacity: 0.9;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--white);
  opacity: 0.8;
  transition: opacity 0.3s, color 0.3s;
  font-size: 0.95rem;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-color);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  padding-top: 2rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  footer {
    padding: 3rem 1.5rem 1.5rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}