/* ============================================
   Nihon-bashi International Accounting Firm
   Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --primary-color: #1a365d;
  --primary-light: #2c5282;
  --primary-dark: #0d1f3c;
  --accent-color: #d69e2e;
  --accent-light: #ecc94b;
  --accent-dark: #b7791f;
  --text-dark: #1a202c;
  --text-medium: #4a5568;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --background: #ffffff;
  --background-alt: #f7fafc;
  --background-dark: #edf2f7;
  --border-color: #e2e8f0;
  --success-color: #38a169;
  --error-color: #e53e3e;
  --warning-color: #dd6b20;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  --font-sans: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif;
  --font-serif: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  --container-max: 1200px;
  --header-height: 80px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--background);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: background-color var(--transition-normal);
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-dark);
  transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../assets/financial-services.jpg') center/cover no-repeat;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  color: var(--background);
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--background);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-title span {
  color: var(--accent-light);
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background-color: var(--accent-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--background);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--background);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--background);
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--background-alt);
}

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

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.section-description {
  color: var(--text-medium);
  font-size: 1.1rem;
}

/* ============================================
   Services Grid
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background-color: var(--background);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-color);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-medium);
  font-size: 0.95rem;
}

.service-card .btn {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ============================================
   Features / Why Choose Us
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
}

.feature-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.feature-label {
  font-size: 1rem;
  color: var(--text-medium);
}

/* ============================================
   About Section
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

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

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
}

.about-list {
  margin: 1.5rem 0;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.about-list li::before {
  content: '✓';
  color: var(--accent-color);
  font-weight: 700;
}

/* ============================================
   Lead Form / Contact Form
   ============================================ */
.form-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: var(--background);
}

.form-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.form-content h2 {
  color: var(--background);
  margin-bottom: 1rem;
}

.form-content p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.form-box {
  background-color: var(--background);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: border-color var(--transition-fast);
  background-color: var(--background);
}

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

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary-color);
}

.form-checkbox label {
  font-size: 0.85rem;
  color: var(--text-medium);
  line-height: 1.5;
}

.form-checkbox a {
  color: var(--primary-color);
  text-decoration: underline;
}

.form-submit {
  width: 100%;
  margin-top: 1rem;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.show {
  display: block;
}

.form-success-icon {
  width: 60px;
  height: 60px;
  background-color: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--primary-dark);
  color: var(--background);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 1.5rem;
}

.footer-brand .logo-name {
  color: var(--background);
}

.footer-brand p {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.7;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--accent-light);
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact-icon {
  color: var(--accent-color);
  font-size: 1.1rem;
}

.footer-bottom {
  padding: 1.5rem 0;
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--primary-dark);
  color: var(--background);
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.cookie-banner.show {
  transform: translateY(0);
}

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

.cookie-text {
  flex: 1;
}

.cookie-text h3 {
  color: var(--background);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cookie-text p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
}

.cookie-text a {
  color: var(--accent-light);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-buttons .btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

/* Cookie Settings Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal.show {
  display: flex;
}

.cookie-modal-content {
  background-color: var(--background);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cookie-modal-header h2 {
  font-size: 1.5rem;
}

.cookie-modal-body {
  padding: 1.5rem;
}

.cookie-category {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cookie-category-header h4 {
  font-size: 1rem;
}

.cookie-toggle {
  position: relative;
  width: 50px;
  height: 26px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  border-radius: 26px;
  transition: var(--transition-fast);
}

.cookie-toggle-slider::before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: var(--primary-color);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-category p {
  font-size: 0.9rem;
  color: var(--text-medium);
  margin: 0;
}

.cookie-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ============================================
   Page Header (Internal Pages)
   ============================================ */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: var(--background);
  padding: 8rem 0 4rem;
  text-align: center;
}

.page-header h1 {
  color: var(--background);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-current {
  color: var(--accent-light);
}

/* ============================================
   Contact Page
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info-card {
  background-color: var(--background-alt);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.contact-info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--background);
  flex-shrink: 0;
}

.contact-info-content h4 {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.contact-info-content p {
  font-size: 1rem;
  color: var(--text-dark);
  margin: 0;
}

.contact-info-content a {
  color: var(--text-dark);
}

.contact-map {
  border-radius: 16px;
  overflow: hidden;
  height: 300px;
  box-shadow: var(--shadow-md);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   Services Page
   ============================================ */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-detail-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.service-detail-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.service-detail-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.service-detail-content p {
  color: var(--text-medium);
  margin-bottom: 1rem;
}

.service-detail-list {
  margin: 1rem 0;
}

.service-detail-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-medium);
}

.service-detail-list li::before {
  content: '→';
  color: var(--accent-color);
  font-weight: 700;
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 0;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.legal-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

.legal-content p {
  color: var(--text-medium);
  margin-bottom: 1rem;
}

.legal-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-content ul li {
  list-style-type: disc;
  margin-bottom: 0.5rem;
  color: var(--text-medium);
}

.legal-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.legal-update {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-accent {
  color: var(--accent-color);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
