/* ========================================
   税理士法人赤坂税務総合事務所
   Responsive Stylesheet
   ======================================== */

/* ========================================
   Tablet (768px - 1024px)
   ======================================== */

@media screen and (max-width: 1024px) {
  :root {
    --font-size-5xl: 40px;
    --font-size-4xl: 32px;
    --font-size-3xl: 26px;
    --font-size-2xl: 22px;
  }

  /* Header */
  .header__inner {
    padding: var(--spacing-md) var(--spacing-lg);
  }

  /* Navigation */
  .nav__list {
    gap: var(--spacing-md);
  }

  /* Hero */
  .hero {
    min-height: 80vh;
  }

  .hero__title {
    font-size: var(--font-size-4xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-lg);
  }

  /* Grid */
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Features */
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About Grid */
  .about-grid {
    gap: var(--spacing-xl);
  }

  /* Contact Grid */
  .contact-grid {
    gap: var(--spacing-xl);
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
    max-width: none;
    margin-bottom: var(--spacing-md);
  }

  /* Cookie Banner */
  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner__buttons {
    justify-content: center;
  }

  /* Service Detail */
  .service-detail__grid {
    gap: var(--spacing-xl);
  }
}

/* ========================================
   Mobile (< 768px)
   ======================================== */

@media screen and (max-width: 767px) {
  :root {
    --font-size-5xl: 32px;
    --font-size-4xl: 28px;
    --font-size-3xl: 24px;
    --font-size-2xl: 20px;
    --font-size-xl: 18px;
    --spacing-3xl: 48px;
    --spacing-2xl: 32px;
    --container-padding: 16px;
  }

  /* Header */
  .header__inner {
    padding: var(--spacing-sm) var(--container-padding);
  }

  .header__logo-text {
    font-size: var(--font-size-base);
  }

  .header__logo-text span {
    display: none;
  }

  /* Navigation */
  .nav__toggle {
    display: flex;
  }

  .nav__list {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav__list--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .nav__item:last-child {
    border-bottom: none;
  }

  .nav__link {
    display: block;
    padding: var(--spacing-md) 0;
  }

  .nav__link::after {
    display: none;
  }

  /* Hero */
  .hero {
    min-height: 100vh;
    padding-top: 70px;
    padding-bottom: var(--spacing-2xl);
  }

  .hero__content {
    text-align: center;
  }

  .hero__title {
    font-size: var(--font-size-3xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-base);
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero__buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Grid */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  /* Features */
  .features {
    grid-template-columns: 1fr;
  }

  .feature {
    padding: var(--spacing-lg);
  }

  /* About Grid */
  .about-grid,
  .about-grid--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .about__image {
    order: -1;
  }

  /* Contact Grid */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-map {
    height: 250px;
  }

  /* Lead Form */
  .lead-form {
    padding: var(--spacing-lg);
  }

  /* Service Card */
  .service-card__image {
    height: 180px;
  }

  /* Service Detail */
  .service-detail__grid,
  .service-detail__grid--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .service-detail__image {
    order: -1;
  }

  /* Footer */
  .footer {
    padding: var(--spacing-2xl) 0 var(--spacing-md);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .footer__brand {
    text-align: center;
  }

  .footer__logo {
    justify-content: center;
  }

  .footer__description {
    text-align: center;
  }

  .footer__title {
    margin-top: var(--spacing-md);
  }

  .footer__bottom {
    text-align: center;
  }

  /* Cookie Banner */
  .cookie-banner {
    padding: var(--spacing-md);
  }

  .cookie-banner__title {
    font-size: var(--font-size-base);
  }

  .cookie-banner__buttons {
    flex-direction: column;
    width: 100%;
  }

  .cookie-banner__buttons .btn {
    width: 100%;
  }

  /* Cookie Modal */
  .cookie-modal__content {
    padding: var(--spacing-lg);
    margin: var(--spacing-md);
  }

  .cookie-modal__title {
    font-size: var(--font-size-xl);
  }

  /* Page Header */
  .page-header {
    padding: 100px 0 40px;
  }

  .page-header__title {
    font-size: var(--font-size-2xl);
  }

  .page-header__subtitle {
    font-size: var(--font-size-base);
  }

  .breadcrumb {
    flex-wrap: wrap;
  }

  /* Legal Content */
  .legal-content {
    padding: var(--spacing-xl) var(--container-padding);
  }

  .legal-content h2 {
    font-size: var(--font-size-xl);
  }

  .legal-content h3 {
    font-size: var(--font-size-lg);
  }

  /* CTA Section */
  .cta-section {
    padding: var(--spacing-2xl) 0;
  }

  .cta-section__title {
    font-size: var(--font-size-2xl);
  }

  .cta-section__text {
    font-size: var(--font-size-base);
  }

  /* Business Hours */
  .business-hours {
    padding: var(--spacing-md);
  }

  /* Section */
  .section {
    padding: var(--spacing-2xl) 0;
  }

  .section__header {
    margin-bottom: var(--spacing-xl);
  }

  /* Buttons */
  .btn--large {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-base);
  }
}

/* ========================================
   Small Mobile (< 480px)
   ======================================== */

@media screen and (max-width: 479px) {
  :root {
    --font-size-5xl: 28px;
    --font-size-4xl: 24px;
    --font-size-3xl: 20px;
    --font-size-2xl: 18px;
  }

  /* Header */
  .header__logo-image {
    height: 40px;
  }

  .header__logo-text {
    font-size: var(--font-size-sm);
  }

  /* Hero */
  .hero__title {
    font-size: var(--font-size-2xl);
  }

  /* Cards */
  .card__content {
    padding: var(--spacing-md);
  }

  .card__title {
    font-size: var(--font-size-lg);
  }

  /* Service Card */
  .service-card__content {
    padding: var(--spacing-md);
  }

  .service-card__title {
    font-size: var(--font-size-lg);
  }

  /* Feature */
  .feature__icon {
    width: 48px;
    height: 48px;
  }

  .feature__icon svg {
    width: 24px;
    height: 24px;
  }

  /* Contact Info */
  .contact-info__icon {
    width: 40px;
    height: 40px;
  }

  /* Value Item */
  .value-item__icon {
    width: 40px;
    height: 40px;
  }

  /* Form */
  .form-input,
  .form-textarea,
  .form-select {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  /* Page Header */
  .page-header__title {
    font-size: var(--font-size-xl);
  }
}

/* ========================================
   Landscape Mobile
   ======================================== */

@media screen and (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 0 var(--spacing-xl);
  }

  .cookie-banner {
    position: relative;
    transform: none;
  }

  .cookie-modal {
    align-items: flex-start;
    padding-top: var(--spacing-lg);
  }

  .cookie-modal__content {
    max-height: 90vh;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .header,
  .footer,
  .cookie-banner,
  .cookie-modal,
  .nav__toggle {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .hero {
    min-height: auto;
    padding: 20pt 0;
    background: #fff !important;
    color: #000;
  }

  .hero__title,
  .hero__subtitle {
    color: #000;
  }

  .section {
    padding: 20pt 0;
  }

  .card,
  .service-card,
  .feature {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .btn {
    display: none;
  }
}

/* ========================================
   Accessibility
   ======================================== */

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

@media (prefers-color-scheme: dark) {
  /* Note: This site is designed for light mode, but we respect user preferences */
  /* Add dark mode styles here if needed in the future */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000;
  }

  .btn {
    border: 2px solid currentColor;
  }

  .form-input,
  .form-textarea,
  .form-select {
    border-width: 2px;
  }

  a {
    text-decoration: underline;
  }
}

/* Focus Visible */
:focus-visible {
  outline: 3px solid var(--color-primary-accent);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-sm) var(--spacing-md);
  z-index: 10000;
  transition: top var(--transition-fast);
}

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