/* ========================================
   Otani Accounting Office - Main Styles
   ======================================== */

/* CSS Variables */
:root {
  --primary-dark: #1a365d;
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --success: #10b981;
  --error: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition: all 0.3s ease;
  --font-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

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

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

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

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

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

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Header */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

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

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

.nav-link {
  color: var(--gray-700);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

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

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

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

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

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

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

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

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

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-audience {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

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

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

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

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

.service-card {
  background-color: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-content {
  padding: 1.5rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

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

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

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

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 2rem;
}

.feature-item h3 {
  margin-bottom: 1rem;
}

.feature-item p {
  color: var(--gray-600);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-label.required::after {
  content: ' *';
  color: var(--error);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  background-color: var(--white);
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

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

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

.form-checkbox label {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

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

/* Lead Form Section */
.lead-form-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 4rem 0;
}

.lead-form-container {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 2.5rem;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
}

.lead-form-container h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.lead-form-container > p {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

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

.contact-info h3 {
  margin-bottom: 1.5rem;
}

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

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

.contact-item h4 {
  margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
  color: var(--gray-600);
}

.map-container {
  border-radius: 1rem;
  overflow: hidden;
  height: 300px;
  margin-top: 2rem;
}

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

/* About Page */
.about-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.about-hero h1 {
  color: var(--white);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-card {
  background-color: var(--gray-50);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
}

.value-card h4 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

/* Services Page */
.services-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.services-hero h1 {
  color: var(--white);
}

.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--gray-200);
}

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

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

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

.service-detail img {
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
}

.service-detail h3 {
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

.service-detail p {
  color: var(--gray-600);
}

.service-detail ul {
  margin-top: 1rem;
}

.service-detail li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray-700);
}

.service-detail li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

/* Business Model Page */
.business-model-content {
  max-width: 800px;
  margin: 0 auto;
}

.business-model-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

.business-model-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.business-model-content li {
  list-style: disc;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

/* Policy Pages */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0;
}

.policy-content h1 {
  margin-bottom: 2rem;
  color: var(--primary-dark);
}

.policy-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.policy-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.policy-content p,
.policy-content li {
  color: var(--gray-700);
  line-height: 1.8;
}

.policy-content ul,
.policy-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-content ul li {
  list-style: disc;
  margin-bottom: 0.5rem;
}

.policy-content ol li {
  list-style: decimal;
  margin-bottom: 0.5rem;
}

.policy-content a {
  color: var(--primary);
}

.last-updated {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  background-color: var(--gray-900);
  color: var(--gray-300);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-links h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1rem;
}

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

.footer-links a {
  color: var(--gray-400);
  font-size: 0.875rem;
}

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

.footer-contact p {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: var(--gray-400);
}

.footer-contact a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--white);
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
  z-index: 9999;
  padding: 1.5rem;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.cookie-content p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

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

.cookie-settings {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.cookie-settings.show {
  display: block;
}

.cookie-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.cookie-setting-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.cookie-setting-item p {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin: 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
}

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

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

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

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

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

.toggle-switch input:disabled + .toggle-slider {
  background-color: var(--gray-400);
  cursor: not-allowed;
}

/* Success/Error Messages */
.form-message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.form-message.success {
  background-color: #d1fae5;
  color: #065f46;
}

.form-message.error {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  background-color: var(--gray-50);
}

.breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  color: var(--gray-400);
}

.breadcrumb a {
  color: var(--gray-600);
}

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

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

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .service-detail {
    grid-template-columns: 1fr;
  }
  
  .service-detail:nth-child(even) {
    direction: ltr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    gap: 0;
  }
  
  .nav.show {
    display: flex;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-buttons .btn {
    width: 100%;
  }
  
  .lead-form-container {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: #000;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}
