/* ========================================
   TSUJITAX - Main Stylesheet
   Japanese Tax Accountant Office Website
   ======================================== */

/* CSS Variables */
:root {
  --primary-color: #1a365d;
  --secondary-color: #2c5282;
  --accent-color: #3182ce;
  --light-blue: #ebf8ff;
  --light-gray: #f7fafc;
  --medium-gray: #e2e8f0;
  --dark-gray: #4a5568;
  --text-color: #2d3748;
  --white: #ffffff;
  --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;
  --border-radius: 8px;
  --max-width: 1200px;
}

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

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

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  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(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

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

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;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

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

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

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

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

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

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

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

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

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

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--dark-gray);
  display: block;
}

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

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

.nav-link {
  font-weight: 500;
  color: var(--text-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 */
.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(--primary-color);
  transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.9) 0%, rgba(44, 82, 130, 0.85) 100%),
              url('../assets/financial-services.jpg') center/cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  color: var(--white);
}

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

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

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

.hero-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

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

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

.hero .btn-primary:hover {
  background-color: var(--light-gray);
}

.hero .btn-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

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

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

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

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

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

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

.section-header p {
  color: var(--dark-gray);
}

/* ========================================
   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: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.service-card-image {
  height: 200px;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-card-image img {
  transform: scale(1.05);
}

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

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

.service-card p {
  color: var(--dark-gray);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.service-card .btn {
  margin-top: 0.5rem;
}

/* ========================================
   Features / Why 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-color: var(--light-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

.feature-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

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

/* ========================================
   Target Audience
   ======================================== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.audience-item {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.audience-item h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.audience-item p {
  color: var(--dark-gray);
  font-size: 0.9rem;
  margin-bottom: 0;
}

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

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

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

.form-label .required {
  color: #e53e3e;
  margin-left: 0.25rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  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.2);
}

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

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

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
  cursor: pointer;
}

.form-checkbox label {
  font-size: 0.9rem;
  color: var(--dark-gray);
  cursor: pointer;
}

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

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

.form-note {
  font-size: 0.85rem;
  color: var(--dark-gray);
  margin-top: 1rem;
  text-align: center;
}

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

.contact-info {
  padding: 2rem;
}

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

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

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

.contact-details h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-details p,
.contact-details a {
  color: var(--dark-gray);
  margin-bottom: 0;
}

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

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

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

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

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

.about-text p {
  color: var(--dark-gray);
}

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

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

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

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

.value-item p {
  font-size: 0.95rem;
  margin-bottom: 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: var(--border-radius);
  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 p {
  color: var(--dark-gray);
}

.service-list {
  margin-top: 1rem;
}

.service-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dark-gray);
}

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

/* ========================================
   Legal Pages (Privacy, Terms, etc.)
   ======================================== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.legal-content h1 {
  margin-bottom: 2rem;
}

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

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

.legal-content p,
.legal-content ul,
.legal-content ol {
  color: var(--dark-gray);
  margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.5rem;
}

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

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

.legal-content li {
  margin-bottom: 0.5rem;
}

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

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

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

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

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

.cookie-text {
  margin-bottom: 1rem;
}

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

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

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

.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

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

.cookie-settings {
  background-color: transparent;
  border: 1px solid var(--white);
  color: var(--white);
}

.cookie-settings:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

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

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

.cookie-modal-content {
  background-color: var(--white);
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
}

.cookie-modal-content h3 {
  margin-bottom: 1.5rem;
}

.cookie-category {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--medium-gray);
}

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

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

.cookie-category-header h4 {
  margin-bottom: 0;
}

.cookie-category p {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin-bottom: 0;
}

.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(--medium-gray);
  transition: var(--transition);
  border-radius: 26px;
}

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

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

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

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

.cookie-modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

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

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

.footer-brand {
  margin-bottom: 1rem;
}

.footer-brand .logo-text {
  color: var(--white);
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

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

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

.footer-links a {
  color: var(--white);
  opacity: 0.8;
  font-size: 0.9rem;
}

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

.footer-contact p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

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

.footer-contact a:hover {
  opacity: 1;
}

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

.footer-disclaimer {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.footer-copyright {
  font-size: 0.85rem;
  opacity: 0.8;
  text-align: center;
}

/* ========================================
   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-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.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; }

.hidden { display: none !important; }
.visible { display: block !important; }

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

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .header .container {
    padding: 0.75rem 1rem;
  }
  
  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem;
    display: none;
  }
  
  .nav.active {
    display: block;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 0;
  }
  
  .nav-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--medium-gray);
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    align-items: center;
  }
  
  .form-container {
    padding: 1.5rem;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .audience-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .cookie-modal {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: none;
    color: var(--text-color);
  }
  
  .hero h1,
  .hero-subtitle,
  .hero-description {
    color: var(--primary-color);
  }
  
  .section {
    padding: 1rem 0;
  }
  
  a {
    text-decoration: underline;
  }
}
