/* YHA shared offline typography system. Source Sans 3 is the primary family. */
@font-face {
  font-family: "YHA Source Sans 3";
  src: url("/assets/fonts/source-sans-3-variable.woff2") format("woff2"), url("/assets/fonts/source-sans-3-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "YHA Source Sans 3";
  src: url("/assets/fonts/source-sans-3-variable-italic.woff2") format("woff2"), url("/assets/fonts/source-sans-3-variable-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "YHA Lora";
  src: url("/assets/fonts/lora-700.woff2") format("woff2"), url("/assets/fonts/lora-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --font-primary: "YHA Source Sans 3", "Source Sans 3", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  --font-body: var(--font-primary);
  --font-display: var(--font-primary);
  --font-editorial: "YHA Lora", Georgia, "Times New Roman", serif;
  --type-page-title: clamp(3rem, 6vw, 4.5rem);
  --type-long-title: clamp(2.25rem, 4.2vw, 3.5rem);
  --type-section-title: clamp(2.125rem, 4vw, 3rem);
  --type-subsection-title: 1.375rem;
  --type-card-title: clamp(1.25rem, 1.8vw, 1.375rem);
  --type-intro: 1.125rem;
  --type-body: 1.0625rem;
  --type-compact: .9375rem;
  --type-meta: .75rem;
  --leading-display: 1.05;
  --leading-title: 1.15;
  --leading-body: 1.65;
  --leading-compact: 1.6;
}

html,
body,
button,
input,
select,
textarea { font-family: var(--font-body); }

body { font-size: var(--type-body); line-height: var(--leading-body); }

h1,
h2,
h3,
h4,
h5,
h6 { font-family: var(--font-display); font-weight: 600; }

h1 { font-size: var(--type-page-title); font-weight: 500; line-height: var(--leading-display); letter-spacing: -.035em; }
h2 { font-size: var(--type-section-title); font-weight: 500; line-height: var(--leading-title); letter-spacing: -.025em; }
h3 { font-size: var(--type-subsection-title); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 600; line-height: 1.4; }

/* Shared header and utility text */
.site-header,
.primary-navigation,
.nav-submenu,
.mega-menu,
.tools-menu,
.language-selector,
.contact-button { font-family: var(--font-body); }

.site-header .primary-navigation a,
.site-header .primary-navigation button,
.site-header .nav-parent-row > a { font-size: .875rem; font-weight: 600; line-height: 1.25; letter-spacing: .01em; }

.eyebrow,
.section-kicker,
.shared-nav-kicker,
.practice-title-kicker,
.practice-card-number,
.team-profile-role,
.update-card time { font-family: var(--font-body); font-size: var(--type-meta); font-weight: 600; line-height: 1.4; }

/* Homepage */
.introduction-copy h2,
.section-heading h2,
.testimonials-intro h2,
.updates-heading h2 { font-family: var(--font-display); font-size: var(--type-section-title); font-weight: 500; line-height: var(--leading-title); letter-spacing: -.025em; }

.maritime-copy h1,
.practice-showcase-intro h2 { font-family: var(--font-display); font-weight: 500; }

.introduction-copy p { font-size: var(--type-body); line-height: 1.75; }
.introduction-quote strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.introduction-quote p { font-size: var(--type-compact); line-height: 1.6; }
.statement-band p,
.trust-statement p { font-family: var(--font-display); font-weight: 500; }

.practice-grid strong,
.practice-specialty strong,
.section-title-band h2,
.engagement-grid h3,
.person-card h3 { font-family: var(--font-display); font-weight: 600; }

.practice-grid strong { font-size: 1.25rem; line-height: 1.25; }
.engagement-grid h3 { font-size: 1.25rem; line-height: 1.3; }
.engagement-grid p { font-size: var(--type-compact); line-height: 1.65; }
.person-card h3 { font-size: var(--type-card-title); }
.person-card span { font-family: var(--font-body); font-size: var(--type-compact); font-style: normal; }

.testimonial-grid p { font-size: var(--type-body); line-height: 1.7; }
.testimonial-grid blockquote > span { font-family: var(--font-display); }
.testimonial-grid footer { font-family: var(--font-body); font-size: var(--type-compact); }
.update-card h3 { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.update-card p { font-size: var(--type-compact); line-height: 1.65; }
.update-card > div > a,
.updates-heading > a { font-size: .875rem; font-weight: 600; }

/* Shared footer */
.site-footer,
.footer-grid,
.footer-bottom { font-family: var(--font-body); }

.footer-brand p,
.footer-grid a,
.footer-office p { font-size: .875rem; line-height: 1.6; }
.footer-grid h2 { font-family: var(--font-body); font-size: var(--type-meta); font-weight: 600; line-height: 1.4; }
.footer-bottom { font-size: .8125rem; line-height: 1.55; }

/* Generic content and Legal Updates */
.entry-content { font-family: var(--font-body); font-size: var(--type-body); line-height: var(--leading-body); }
.entry-content p,
.entry-content li { line-height: var(--leading-body); }
.entry-date,
.form-note { font-size: var(--type-meta); line-height: 1.5; }
.post-card h2 { font-family: var(--font-display); font-size: var(--type-card-title); font-weight: 600; line-height: 1.3; }
.read-more,
.entry-content .content-button,
.entry-content button,
.entry-content input[type="submit"] { font-size: .875rem; font-weight: 600; letter-spacing: .01em; }

/* Practice overview and individual practice pages */
.practice-overview-intro h2,
.practice-card strong,
.practice-navigation-title,
.entry-practice-pilot .practice-navigation-title { font-family: var(--font-display); font-weight: 600; }

.practice-overview-intro p { font-size: var(--type-intro); line-height: 1.7; }
.practice-card strong { font-size: var(--type-card-title); line-height: 1.25; }

.entry-practice-pilot .practice-article .practice-title-block h3 {
  font-family: var(--font-display);
  font-size: var(--type-long-title);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.entry-practice-pilot .practice-content-section h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
}

.entry-practice-pilot .practice-content-section .practice-section-body li,
.entry-practice-pilot .practice-content-section .practice-section-body li::before,
.entry-practice-pilot .practice-article p,
.entry-practice-pilot .success-story-copy p {
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.7;
}

.entry-practice-pilot .practice-article .success-story-country {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

.entry-practice-pilot .practice-navigation-title { font-size: 1.5rem; line-height: 1.2; }
.entry-practice-pilot .practice-navigation a {
  font-family: var(--font-body);
  font-size: var(--type-compact);
  font-weight: 400;
  line-height: var(--leading-compact);
}
.entry-practice-pilot .practice-navigation a[aria-current="page"] { font-weight: 500; }

/* Team index and partner profiles */
.team-profile-card h2,
.profile-identity h1,
.profile-role,
.profile-expertise h2,
.profile-group-heading,
.profile-detail-section h2 { font-family: var(--font-display); font-weight: 600; }

.profile-identity h1 { font-size: var(--type-page-title); line-height: var(--leading-display); }
.profile-role { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.4; }
.profile-full-name,
.profile-qualifications,
.profile-expertise,
.profile-biography,
.profile-detail-section { font-family: var(--font-body); }
.profile-expertise li { font-size: var(--type-compact); line-height: var(--leading-compact); }
.profile-biography p { font-size: var(--type-intro); line-height: 1.75; }
.profile-biography .profile-lead { font-family: var(--font-display); font-size: clamp(1.375rem, 2vw, 1.625rem); font-weight: 500; line-height: 1.55; }
.profile-detail-section li { font-size: var(--type-compact); line-height: 1.65; }

/* Use predictable system CJK fallbacks while retaining the same semantic scale. */
html[lang="zh-TW"] {
  --font-display: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

@media (max-width: 820px) {
  :root {
    --type-page-title: clamp(2.5rem, 12vw, 3.5rem);
    --type-long-title: clamp(2.125rem, 9vw, 2.75rem);
    --type-section-title: clamp(2rem, 9vw, 2.75rem);
    --type-subsection-title: 1.375rem;
  }

  .practice-grid strong { font-size: 1.0625rem; }
  .profile-biography p { font-size: 1rem; line-height: 1.75; }
  .profile-biography .profile-lead { font-size: 1.375rem; line-height: 1.55; }
}
