/**
 * base.css — Reset & Base Styles
 * Aoyama Law Office | Trust & Authority Design System
 */

/* ============================================================
   Modern CSS Reset
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%; /* 16px ベース */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base); /* 1.75 — 読みやすさ重視 */
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* モバイル横スクロール防止 */
}

/* ============================================================
   Typography Base
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

@media (min-width: 768px) {
  h1 { font-size: var(--font-size-5xl); }
  h2 { font-size: var(--font-size-4xl); }
  h3 { font-size: var(--font-size-3xl); }
}

p {
  line-height: var(--line-height-base);
  color: var(--color-text);
}

p + p {
  margin-top: var(--space-md);
}

/* ============================================================
   Links
   ============================================================ */

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-base);
  cursor: pointer;
}

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

a:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Lists
   ============================================================ */

ul, ol {
  padding-left: var(--space-lg);
}

li {
  line-height: var(--line-height-base);
}

/* ============================================================
   Media
   ============================================================ */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* ============================================================
   Form Elements
   ============================================================ */

input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   Tables
   ============================================================ */

table {
  border-collapse: collapse;
  width: 100%;
}

/* ============================================================
   Layout Utilities
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--space-2xl);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-3xl);
  }
}

/* ============================================================
   Screen Reader Only
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   WordPress 管理バー補正
   ============================================================ */

.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
