/* CSS Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography & Japanese Font Settings */
body {
  font-family: 
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    "BIZ UDPGothic",
    "Yu Gothic UI",
    "Meiryo",
    "Noto Sans JP",
    sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  color: #333333;
  background-color: #ffffff;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Color Variables */
:root {
  --primary-navy: #0F2A44;
  --accent-blue: #2C5282;
  --light-blue: #4A90B8;
  --text-primary: #333333;
  --text-secondary: #666666;
  --background-white: #ffffff;
  --background-light: #fafafa;
  --border-light: #e2e8f0;
  --shadow-light: rgba(15, 42, 68, 0.1);
}

/* Layout Containers */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--background-white);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.header-content {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  min-height: 72px;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-navy);
  transition: opacity 0.2s ease;
}

.logo-link:hover,
.logo-link:focus {
  opacity: 0.8;
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.logo {
  height: 40px;
  width: auto;
  margin-right: 0.75rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary-navy);
}

/* Navigation Styles */
.nav {
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  z-index: 1001;
}

.nav-toggle:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--primary-navy);
  transition: all 0.3s ease;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--primary-navy);
  transition: all 0.3s ease;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 400;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent-blue);
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.cta-nav {
  background-color: var(--accent-blue);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
}

.cta-nav:hover,
.cta-nav:focus {
  background-color: var(--primary-navy);
  color: white;
  box-shadow: 0 2px 8px var(--shadow-light);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(15, 42, 68, 0.7), rgba(15, 42, 68, 0.5)), url('../hero.jpg');
  background-size: contain;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: 182px 0 104px;
  text-align: center;
  color: white;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-blue);
  color: white;
  text-decoration: none;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px var(--shadow-light);
}

.cta-button:hover,
.cta-button:focus {
  background-color: var(--primary-navy);
  box-shadow: 0 4px 12px var(--shadow-light);
  transform: translateY(-1px);
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Content Sections */
.content-section {
  padding: 4rem 0;
}

.content-section:nth-of-type(even) {
  background-color: var(--background-light);
}

/* Stylish background for "Our Thoughts" section */
#thoughts {
  background: linear-gradient(135deg, 
    rgba(240, 248, 255, 1) 0%,
    rgba(225, 245, 254, 1) 25%,
    rgba(186, 230, 253, 0.8) 50%,
    rgba(147, 197, 253, 0.6) 75%,
    rgba(59, 130, 246, 0.1) 100%);
  position: relative;
  overflow: hidden;
}

#thoughts::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

#thoughts .container {
  position: relative;
  z-index: 2;
}

#thoughts h2 {
  color: var(--primary-navy);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

#thoughts .text-content {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#thoughts .text-content .highlight {
  font-weight: 600;
  color: var(--primary-navy);
  font-size: 1.25em;
  text-shadow: none;
}

/* Stylish background for "Our Initiatives" section */
#initiatives {
  background: linear-gradient(rgba(15, 42, 68, 0.85), rgba(44, 82, 130, 0.8)), url('../castle.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: white;
  position: relative;
  overflow: hidden;
}

#initiatives::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(186, 230, 253, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

#initiatives .container {
  position: relative;
  z-index: 2;
}

#initiatives h2 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#initiatives .text-content {
  background: none;
  color: white;
  padding: 0;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

#initiatives .text-content > p {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: 400;
  margin-bottom: 2.5rem;
  line-height: 2;
  font-size: 1.2rem;
}

#initiatives .initiative-item {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 42, 68, 0.1);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Prominent URL styling for initiative links */
.initiative-item a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
  display: inline-block;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.initiative-item a:hover,
.initiative-item a:focus {
  color: var(--primary-navy);
  border-bottom-color: var(--accent-blue);
  transform: translateY(-1px);
  outline: none;
}

/* Representative section with profile image */
.representative-info {
  background: rgba(248, 250, 252, 0.8);
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid rgba(15, 42, 68, 0.1);
  box-shadow: 
    0 8px 25px rgba(15, 42, 68, 0.1),
    0 3px 10px rgba(0, 0, 0, 0.05);
}

.representative-info h3 {
  color: var(--primary-navy);
  margin-bottom: 1.5rem;
  text-align: left;
}

.representative-content {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.representative-text {
  flex: 1;
}

.representative-text p {
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.8;
  margin: 0;
  font-size: 1.1rem;
}

.representative-image {
  flex: 0 0 200px;
  display: flex;
  justify-content: center;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 
    0 8px 20px rgba(15, 42, 68, 0.15),
    0 3px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Company name origin section */
.company-name-origin {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.05) 0%,
    rgba(147, 197, 253, 0.08) 50%,
    rgba(186, 230, 253, 0.05) 100%);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(59, 130, 246, 0.1);
  position: relative;
  overflow: hidden;
}

.company-name-origin::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.company-name-origin .text-content {
  position: relative;
  z-index: 2;
  background: none;
  max-width: none;
  margin: 0;
}

.company-name-origin .text-content p {
  color: var(--primary-navy);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.company-name-origin .text-content p:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 2.5rem;
  text-align: center;
  line-height: 1.4;
}

.content-section h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 1rem;
  margin-top: 2rem;
  line-height: 1.4;
}

.content-section h3:first-child {
  margin-top: 0;
}

.text-content {
  max-width: 720px;
  margin: 0 auto;
}

.text-content p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  line-height: 1.9;
}

.text-content p:last-child {
  margin-bottom: 0;
}

.text-content a {
  color: var(--accent-blue);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.text-content a:hover,
.text-content a:focus {
  color: var(--primary-navy);
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Initiative Items */
.initiative-item {
  background-color: var(--background-white);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px var(--shadow-light);
  border: 1px solid var(--border-light);
}

.initiative-item:last-child {
  margin-bottom: 0;
}

.initiative-item h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary-navy);
}

.initiative-item p {
  margin-bottom: 0;
  line-height: 1.8;
}

/* Company Information */
.company-info,
.representative-info {
  margin-bottom: 3rem;
}

.representative-info:last-child {
  margin-bottom: 0;
}

.info-table {
  background-color: var(--background-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-light);
  border: 1px solid var(--border-light);
}

.info-row {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  min-height: 60px;
  align-items: center;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row dt {
  flex: 0 0 140px;
  background-color: var(--background-light);
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--primary-navy);
  border-right: 1px solid var(--border-light);
}

.info-row dd {
  flex: 1;
  padding: 1rem 1.5rem;
  margin: 0;
}

.info-row dd a {
  color: var(--accent-blue);
  text-decoration: none;
}

.info-row dd a:hover,
.info-row dd a:focus {
  color: var(--primary-navy);
  text-decoration: underline;
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Footer */
.footer {
  background-color: var(--primary-navy);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-content p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-content p:last-child {
  margin-bottom: 0;
}

.copyright {
  font-weight: 500;
}

.disclaimer {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding-top: 72px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--background-white);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 4px 12px var(--shadow-light);
    border-top: 1px solid var(--border-light);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-menu.nav-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border-light);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    display: block;
  }

  .cta-nav {
    margin: 0.5rem 1.5rem;
    text-align: center;
    border-radius: 4px;
  }

  .hero {
    padding: 130px 0 78px;
    background-attachment: scroll;
  }

  .content-section {
    padding: 3rem 0;
  }
  
  #thoughts .text-content {
    padding: 2rem 1.5rem;
    border-radius: 12px;
  }
  
  #initiatives {
    background-attachment: scroll;
  }
  
  #initiatives .text-content {
    padding: 0;
  }

  .initiative-item {
    padding: 1.5rem;
  }
  
  .representative-info {
    padding: 2rem 1.5rem;
  }
  
  .representative-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .representative-image {
    flex: none;
  }
  
  .profile-photo {
    width: 150px;
    height: 150px;
  }
  
  .company-name-origin {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .info-row {
    flex-direction: column;
    min-height: auto;
  }

  .info-row dt {
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
  }

  .info-row dd {
    width: 100%;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .header-content {
    padding: 0.75rem 1rem;
    min-height: 64px;
  }

  .nav-menu {
    top: 64px;
  }

  .logo {
    height: 32px;
  }

  .site-title {
    font-size: 1rem;
  }

  .hero {
    padding: 104px 0 65px;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .content-section {
    padding: 2.5rem 0;
  }
  
  #thoughts .text-content {
    padding: 1.5rem 1rem;
    border-radius: 8px;
  }
  
  #initiatives .text-content {
    padding: 0;
  }

  .initiative-item {
    padding: 1.25rem;
  }
  
  .representative-info {
    padding: 1.5rem 1rem;
  }
  
  .representative-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .profile-photo {
    width: 120px;
    height: 120px;
  }
  
  .company-name-origin {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .nav-toggle,
  .cta-button {
    display: none;
  }

  .hero {
    padding: 2rem 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
  }

  a {
    text-decoration: none;
    color: black;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-navy: #000000;
    --accent-blue: #0000ff;
    --text-primary: #000000;
    --border-light: #000000;
  }

  .header {
    border-bottom-width: 2px;
  }

  .cta-button,
  .cta-nav {
    border: 2px solid currentColor;
  }
}