/* Typography Styles for 中田税理士事務所 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700;800&display=swap');

/* Base Typography */
body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-gray-800);
  background-color: var(--color-white);
}

/* Headings */
h1,
.h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-primary);
  margin-bottom: var(--spacing-4);
}

h2,
.h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-primary);
  margin-bottom: var(--spacing-4);
}

h3,
.h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--color-secondary);
  margin-bottom: var(--spacing-3);
}

h4,
.h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--color-secondary);
  margin-bottom: var(--spacing-3);
}

h5,
.h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  color: var(--color-secondary);
  margin-bottom: var(--spacing-2);
}

h6,
.h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  color: var(--color-gray-600);
  margin-bottom: var(--spacing-2);
}

/* Paragraphs */
p {
  margin-bottom: var(--spacing-4);
  color: var(--color-gray-700);
}

p:last-child {
  margin-bottom: 0;
}

/* Lead paragraph */
.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-600);
}

/* Small text */
small,
.text-small {
  font-size: var(--font-size-sm);
}

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

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Link styles */
.link-underline {
  text-decoration: underline;
}

.link-no-underline {
  text-decoration: none;
}

.link-no-underline:hover {
  text-decoration: none;
}

/* Text colors */
.text-primary {
  color: var(--color-primary);
}

.text-secondary {
  color: var(--color-secondary);
}

.text-accent {
  color: var(--color-accent);
}

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

.text-gray-500 {
  color: var(--color-gray-500);
}

.text-gray-600 {
  color: var(--color-gray-600);
}

.text-gray-700 {
  color: var(--color-gray-700);
}

.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

.text-error {
  color: var(--color-error);
}

/* Text alignment */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

/* Font weights */
.font-light {
  font-weight: var(--font-weight-light);
}

.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.font-extrabold {
  font-weight: var(--font-weight-extrabold);
}

/* Text transform */
.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.normal-case {
  text-transform: none;
}

/* Letter spacing */
.tracking-tight {
  letter-spacing: -0.025em;
}

.tracking-normal {
  letter-spacing: 0;
}

.tracking-wide {
  letter-spacing: 0.025em;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

/* Line height */
.leading-tight {
  line-height: var(--line-height-tight);
}

.leading-snug {
  line-height: var(--line-height-snug);
}

.leading-normal {
  line-height: var(--line-height-normal);
}

.leading-relaxed {
  line-height: var(--line-height-relaxed);
}

.leading-loose {
  line-height: var(--line-height-loose);
}

/* Lists */
ul,
ol {
  margin-bottom: var(--spacing-4);
  padding-left: var(--spacing-6);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: var(--spacing-2);
  color: var(--color-gray-700);
}

li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
ul ul,
ol ul {
  margin-top: var(--spacing-2);
  margin-bottom: var(--spacing-2);
}

ol ol,
ul ol {
  margin-top: var(--spacing-2);
  margin-bottom: var(--spacing-2);
}

/* List styles */
.list-none {
  list-style: none;
  padding-left: 0;
}

.list-disc {
  list-style: disc;
}

.list-decimal {
  list-style: decimal;
}

/* Description lists */
dl {
  margin-bottom: var(--spacing-4);
}

dt {
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-800);
  margin-bottom: var(--spacing-1);
}

dd {
  margin-bottom: var(--spacing-2);
  margin-left: var(--spacing-6);
  color: var(--color-gray-600);
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: var(--spacing-4);
  margin: var(--spacing-6) 0;
  font-style: italic;
  color: var(--color-gray-600);
}

blockquote p {
  font-size: var(--font-size-lg);
}

blockquote cite {
  display: block;
  margin-top: var(--spacing-2);
  font-size: var(--font-size-sm);
  font-style: normal;
  color: var(--color-gray-500);
}

/* Code */
code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875em;
  background-color: var(--color-gray-100);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
  color: var(--color-error);
}

pre {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: var(--font-size-sm);
  background-color: var(--color-gray-800);
  color: var(--color-gray-100);
  padding: var(--spacing-4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: var(--spacing-4);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Keyboard */
kbd {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: var(--font-size-sm);
  background-color: var(--color-gray-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  padding: 0.125em 0.375em;
  box-shadow: 0 1px 0 var(--color-gray-400);
}

/* Mark/Highlight */
mark {
  background-color: var(--color-warning-light);
  color: var(--color-gray-900);
  padding: 0.125em 0.25em;
  border-radius: var(--radius-sm);
}

/* Abbreviation */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* Subscript and Superscript */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Horizontal rule */
hr {
  border: none;
  height: 1px;
  background-color: var(--color-gray-200);
  margin: var(--spacing-8) 0;
}

/* Japanese specific typography */
/* Add appropriate spacing for Japanese text */
.japanese-text {
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1,
  .h1 {
    font-size: var(--font-size-3xl);
  }

  h2,
  .h2 {
    font-size: var(--font-size-2xl);
  }

  h3,
  .h3 {
    font-size: var(--font-size-xl);
  }

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

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

@media (max-width: 480px) {
  h1,
  .h1 {
    font-size: var(--font-size-2xl);
  }

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

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

/* Print typography */
@media print {
  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  h1 {
    font-size: 24pt;
    page-break-after: avoid;
  }

  h2 {
    font-size: 20pt;
    page-break-after: avoid;
  }

  h3 {
    font-size: 16pt;
    page-break-after: avoid;
  }

  h4 {
    font-size: 14pt;
    page-break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }
}
