@import url("fonts.css");

/*
  Shared styles for every page.
  Load this file after each page-specific CSS file.

  Breakpoints:
  - 1180px: tablet layout. Header/nav and main columns stack vertically.
  - 760px: small tablet / large phone adjustments.
  - 560px: smartphone-only manual line breaks with .sp-only.
  - 420px: narrow smartphone adjustments.
*/

:root {
  --cpa-navy: #00193b;
  --cpa-text: #00193b;
  --cpa-muted: #557095;
  --cpa-light: #b9c8dd;
}

body {
  font-family: "NotoSansJP-VariableFont_wght", "ZenKakuGothicNew-Regular", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

main {
  min-width: 0;
}

.sp-only {
  display: none;
}

/* Common fixed header and global navigation. */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 96px;
  min-height: 96px;
  max-height: 96px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background-color: rgba(0, 25, 59, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
  max-width: calc(100% - 80px);
}

.logo span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.logo img {
  width: auto;
  height: 46px;
}

.nav {
  margin-left: auto;
  grid-column: auto;
  justify-self: auto;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a,
.more-info,
.contact-button,
.read-more,
.pagination {
  font-family: "Montserrat", "Oswald-VariableFont_wght", sans-serif;
}

.nav a {
  display: block;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity 0.3s;
}

.nav a:hover {
  opacity: 0.72;
}

/* Shared hero/heading/text/button rules used by multiple pages. */
.hero,
.about-hero,
.service-hero,
.news-hero,
.article-hero,
.contact-hero,
.privacy-hero {
  background-attachment: fixed;
}

.section-title p,
.section-heading p,
.service-label,
.news-list-heading p {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.section-title h2,
.section-heading h2,
.contact-section h2,
.news-list-heading h2 {
  font-size: 2rem;
  letter-spacing: 0.06em;
}

.section-body p,
.section-body li,
.service-content p,
.service-content li,
.consulting-list p,
.office-list dd,
.contact-section p,
.policy-block p,
.policy-block li,
.article-body p {
  font-size: 1rem;
  line-height: 1.9;
}

.more-info,
.contact-button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: opacity 0.3s, transform 0.3s;
}

.more-info:hover,
.contact-button:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

.contact-button {
  margin-top: 28px;
  background-color: var(--cpa-navy);
  color: #ffffff;
}

/* Common footer. Address and copyright are repeated in every HTML file. */
.site-footer {
  background-color: var(--cpa-navy);
  color: #ffffff;
  padding: 58px 40px 30px;
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 40px 34px;
  align-items: start;
}

.footer-brand {
  justify-self: start;
  padding-left: 150px;
}

.footer-brand img {
  width: auto;
  height: 52px;
  margin-bottom: 12px;
}

.footer-name {
  margin: 0;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

.footer-address {
  justify-self: end;
  margin: 0;
  color: #ffffff;
  font-style: normal;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.footer-address p {
  margin: 0;
}

.footer-address-line {
  white-space: nowrap;
}

.footer-nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 34px;
  padding-top: 15px;
}

.footer-nav a {
  color: #ffffff;
  font-family: "Montserrat", "Oswald-VariableFont_wght", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-nav a:hover {
  opacity: 0.72;
}

.footer-copyright {
  color: #6b7b8f;
  font-size: 0.86rem;
  text-align: center;
}

/* Tablet: prevent logo/nav overlap and switch shared layouts to stacked. */
@media (max-width: 1180px) {
  .header {
    position: static;
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
    gap: 16px;
    padding: 22px 20px;
  }

  .logo {
    position: static;
    transform: none;
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }

  .nav {
    margin-left: 0;
    width: 100%;
  }

  .nav ul {
    justify-content: center;
    gap: 12px 18px;
  }

  .hero,
  .about-hero,
  .service-hero,
  .news-hero,
  .article-hero,
  .contact-hero,
  .privacy-hero {
    margin-top: 0;
    background-attachment: scroll;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .footer-brand,
  .footer-address {
    justify-self: center;
  }

  .footer-brand {
    padding-left: 0;
  }

  .footer-address-line {
    white-space: normal;
  }
}

/* Small tablet / large phone. */
@media (max-width: 760px) {
  .header {
    gap: 14px;
    padding: 18px 16px;
  }

  .logo {
    font-size: 1.04rem;
  }

  .logo img {
    height: 40px;
    flex: 0 0 auto;
  }

  .nav ul {
    gap: 8px 14px;
  }

  .nav a {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    padding: 2px 0;
  }

  .section-title h2,
  .section-heading h2,
  .contact-section h2,
  .news-list-heading h2 {
    font-size: 1.72rem;
    line-height: 1.35;
  }

  .section-body p,
  .section-body li,
  .service-content p,
  .service-content li,
  .consulting-list p,
  .office-list dd,
  .contact-section p,
  .policy-block p,
  .policy-block li,
  .article-body p {
    font-size: 0.96rem;
    line-height: 1.85;
  }

  .more-info,
  .contact-button {
    max-width: 100%;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 46px 22px 26px;
  }

  .footer-nav {
    gap: 12px 18px;
  }
}

/* Smartphone-only line breaks. Use <br class="sp-only"> in HTML. */
@media (max-width: 560px) {
  .sp-only {
    display: inline;
  }
}

/* Narrow smartphone. */
@media (max-width: 420px) {
  .header {
    padding: 16px 14px;
  }

  .logo {
    font-size: 0.92rem;
    gap: 7px;
  }

  .logo img {
    height: 36px;
  }

  .nav ul {
    gap: 7px 11px;
  }

  .nav a {
    font-size: 0.72rem;
  }

  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
