/* ========================================
   青山パートナーズ税理士法人 - Responsive Styles
   ======================================== */

/* ========================================
   Large Desktop (1400px+)
   ======================================== */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero__title {
    font-size: var(--text-6xl);
  }
}

/* ========================================
   Desktop (1200px - 1399px)
   ======================================== */
@media (max-width: 1399px) {
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* ========================================
   Tablet Landscape (992px - 1199px)
   ======================================== */
@media (max-width: 1199px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
  }
  
  .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid--5 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }
  
  .footer__brand {
    max-width: none;
    grid-column: span 2;
  }
  
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   Tablet Portrait (768px - 991px)
   ======================================== */
@media (max-width: 991px) {
  :root {
    --header-height: 70px;
    --spacing-4xl: 4rem;
    --spacing-3xl: 3rem;
  }
  
  /* Navigation */
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--spacing-xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
  }
  
  .nav.open {
    transform: translateX(0);
  }
  
  .nav__list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .nav__link {
    display: block;
    padding: var(--spacing-md);
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--color-gray-200);
  }
  
  .nav__link::after {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  /* Grid */
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Hero */
  .hero {
    min-height: 500px;
  }
  
  .hero__title {
    font-size: var(--text-4xl);
  }
  
  .hero__subtitle {
    font-size: var(--text-lg);
  }
  
  /* About */
  .about-intro {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .about-intro__image {
    order: -1;
  }
  
  .about-intro__image img {
    height: 300px;
  }
  
  /* Services */
  .service-detail {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .service-detail:nth-child(even) {
    direction: ltr;
  }
  
  .service-detail__image img {
    height: 250px;
  }
  
  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  /* Cookie Banner */
  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-banner__buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ========================================
   Mobile Large (576px - 767px)
   ======================================== */
@media (max-width: 767px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
    --spacing-4xl: 3rem;
    --spacing-3xl: 2rem;
    --container-padding: 1rem;
  }
  
  /* Grid */
  .grid--2,
  .grid--3,
  .grid--4,
  .grid--5 {
    grid-template-columns: 1fr;
  }
  
  /* Hero */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--spacing-2xl));
    padding-bottom: var(--spacing-2xl);
  }
  
  .hero__title {
    font-size: var(--text-3xl);
  }
  
  .hero__subtitle {
    font-size: var(--text-base);
  }
  
  .hero__description {
    font-size: var(--text-sm);
  }
  
  .hero__buttons {
    flex-direction: column;
  }
  
  .hero__buttons .btn {
    width: 100%;
  }
  
  /* Buttons */
  .btn--large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--text-base);
  }
  
  /* Cards */
  .card__image {
    height: 180px;
  }
  
  /* Values */
  .values-grid {
    grid-template-columns: 1fr;
  }
  
  .value-card {
    padding: var(--spacing-lg);
  }
  
  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .footer__brand {
    grid-column: span 1;
  }
  
  /* Page Header */
  .page-header {
    padding-top: calc(var(--header-height) + var(--spacing-xl));
    padding-bottom: var(--spacing-xl);
  }
  
  .page-header__title {
    font-size: var(--text-2xl);
  }
  
  .page-header__subtitle {
    font-size: var(--text-base);
  }
  
  /* Lead Form */
  .lead-form {
    padding: var(--spacing-lg);
  }
  
  /* Contact */
  .contact-info,
  .contact-form {
    padding: var(--spacing-lg);
  }
  
  /* Cookie Modal */
  .cookie-modal__content {
    padding: var(--spacing-lg);
    width: 95%;
  }
  
  .cookie-modal__buttons {
    flex-direction: column;
  }
  
  .cookie-modal__buttons .btn {
    width: 100%;
  }
  
  /* Legal Content */
  .legal-content {
    padding: var(--spacing-xl) var(--container-padding);
  }
  
  .legal-content h1 {
    font-size: var(--text-2xl);
  }
  
  .legal-content h2 {
    font-size: var(--text-lg);
  }
}

/* ========================================
   Mobile Small (< 576px)
   ======================================== */
@media (max-width: 575px) {
  :root {
    --text-4xl: 1.5rem;
    --text-3xl: 1.25rem;
    --text-2xl: 1.125rem;
  }
  
  .header__logo-text {
    display: none;
  }
  
  .header__logo {
    font-size: var(--text-base);
  }
  
  /* Section */
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  .section__title {
    font-size: var(--text-2xl);
  }
  
  .section__subtitle {
    font-size: var(--text-sm);
  }
  
  /* Cookie Banner */
  .cookie-banner__buttons {
    flex-direction: column;
  }
  
  .cookie-banner__buttons .btn {
    width: 100%;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .cookie-modal,
  .btn,
  .hero__buttons {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .hero {
    background: none;
    color: #000;
    padding: 20pt 0;
    min-height: auto;
  }
  
  .hero__title,
  .hero__subtitle,
  .hero__description {
    color: #000;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #000080;
    --color-secondary: #000066;
    --color-gray-300: #666;
    --color-gray-400: #555;
    --color-gray-500: #444;
  }
  
  .btn {
    border-width: 3px;
  }
  
  .form__input,
  .form__textarea,
  .form__select {
    border-width: 2px;
  }
}

/* ========================================
   Dark Mode (optional - for future use)
   ======================================== */
@media (prefers-color-scheme: dark) {
  /* Can be enabled if dark mode is needed */
}
