/* ========================================
   Minato CPA & Tax Accountant Office
   Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
  --primary-color: #1a365d;
  --secondary-color: #2d3748;
  --accent-color: #3182ce;
  --accent-hover: #2c5282;
  --background-color: #f7fafc;
  --white: #ffffff;
  --text-color: #1a202c;
  --text-light: #4a5568;
  --border-color: #e2e8f0;
  --success-color: #38a169;
  --error-color: #e53e3e;
  --shadow: 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);
  --transition: all 0.3s ease;
  --max-width: 1200px;
  --header-height: 80px;
}

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

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

body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

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

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

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

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;
  color: var(--text-light);
}

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

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

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

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

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

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-light);
}

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

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-color);
  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: var(--transition);
}

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

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

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

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

.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(7px, -6px);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-hover) 100%);
  color: var(--white);
  padding: 8rem 0 5rem;
  margin-top: var(--header-height);
  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: 2.75rem;
  margin-bottom: 1.5rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.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: 0.5rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

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

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

.btn-secondary:hover {
  background-color: var(--background-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

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

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

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

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

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

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

.section-header p {
  font-size: 1.1rem;
}

/* ========================================
   Services Cards
   ======================================== */
.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 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.service-card .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
}

/* ========================================
   Features / Why Choose Us
   ======================================== */
.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(--accent-color) 0%, var(--primary-color) 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 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-item p {
  font-size: 0.95rem;
}

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

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

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

.form-label .required {
  color: var(--error-color);
  margin-left: 0.25rem;
}

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

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

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

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

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

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

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

.form-disclaimer {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

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

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

.contact-info {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

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

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--background-color);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 1.25rem;
  flex-shrink: 0;
}

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

.contact-details p,
.contact-details a {
  font-size: 1rem;
  color: var(--secondary-color);
  margin: 0;
}

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

/* Google Maps */
.map-container {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 300px;
  margin-top: 2rem;
}

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

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

.about-image {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

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

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

.about-text p {
  margin-bottom: 1rem;
}

.values-list {
  margin-top: 2rem;
}

.value-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.value-content h4 {
  margin-bottom: 0.25rem;
}

.value-content p {
  font-size: 0.95rem;
  margin: 0;
}

/* ========================================
   Services Page
   ======================================== */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

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

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

.service-detail-image {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

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

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

.service-detail-content li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

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

/* ========================================
   Legal Pages (Privacy, Terms, etc.)
   ======================================== */
.legal-content {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 3rem;
  box-shadow: var(--shadow);
}

.legal-content h1 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

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

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

.legal-content ul {
  list-style: disc;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.legal-content p {
  margin-bottom: 1rem;
}

.last-updated {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

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

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

.cookie-banner-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.cookie-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.cookie-banner-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.cookie-banner-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  line-height: 1;
}

.cookie-banner-close:hover {
  color: var(--secondary-color);
}

.cookie-banner p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.cookie-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cookie-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
}

.cookie-option label {
  font-size: 0.9rem;
  color: var(--secondary-color);
}

.cookie-option.disabled {
  opacity: 0.6;
}

.cookie-option.disabled input[type="checkbox"] {
  cursor: not-allowed;
}

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

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

/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  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);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

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

.footer-contact p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.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.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* ========================================
   Page Header (for inner pages)
   ======================================== */
.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-hover) 100%);
  color: var(--white);
  padding: 6rem 0 3rem;
  margin-top: var(--header-height);
  text-align: center;
}

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

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

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

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

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

/* ========================================
   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; }

.hidden { display: none !important; }

/* ========================================
   Responsive Design
   ======================================== */

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

/* Mobile */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .header {
    height: 70px;
  }
  
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .nav-list {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  
  .nav-list.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-link {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .form-container {
    padding: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    align-items: center;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .cookie-banner {
    padding: 1rem;
  }
  
  .cookie-options {
    flex-direction: column;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-buttons .btn {
    width: 100%;
  }
  
  .legal-content {
    padding: 1.5rem;
  }
  
  .page-header {
    padding: 5rem 0 2rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .btn {
    display: none !important;
  }
  
  .hero {
    margin-top: 0;
    padding: 2rem 0;
    background: none;
    color: var(--text-color);
  }
  
  .hero h1,
  .hero p {
    color: var(--text-color);
  }
  
  body {
    font-size: 12pt;
  }
}
