/* Shared styling for the Flap-rendered public subpages. */
:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: #17202a;
  background: #f7fafc;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: #f7fafc; font-weight: 300; }
img { max-width: 100%; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid #e7edf1;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.site-header .brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #17202a;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  object-fit: contain;
}

.site-header nav,
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2.4vw, 30px);
  font-size: .9rem;
  line-height: 1.3;
}

.site-header nav a,
.site-nav a {
  color: #596273;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav a:hover,
.site-nav a:hover { color: #2d7f9c; }

.site-header .header-button,
.site-nav .header-button {
  padding: 11px 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #329fba, #4c73d8);
  font-weight: 500;
}

main { min-height: calc(100vh - 78px); }
main > .section,
.company-page > .section,
.contact-page > .section {
  width: min(100% - 40px, 1160px);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 108px) 0;
}

.section-heading { margin-bottom: clamp(36px, 5vw, 56px); text-align: center; }
.eyebrow {
  margin: 0 0 12px;
  color: #318eaa;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.4;
}

h1, h2, h3, h4 { color: #17202a; font-weight: 500; }
h1, h2, h3 { letter-spacing: .015em; }
h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.28; }
.company-page .section-heading h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: .02em; }
h2 { margin: 0 0 24px; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.4; }
h3 { margin: 34px 0 16px; font-size: 1.25rem; line-height: 1.5; }
h1 span, h2 span, h3 span { color: #64748b; font-weight: 300; }
p, li, dd { letter-spacing: .018em; }
p { margin: 0 0 1.15em; }
.lead { color: #52677f; font-size: 1.08rem; line-height: 1.95; }
.muted { color: #64748b; }

.legal.panel,
.company-block,
.contact-card,
main > .panel {
  width: min(100% - 40px, 920px);
  margin: clamp(36px, 7vw, 76px) auto;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid #edf1f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 32, 42, .025);
}

.legal.panel { max-width: 920px; }
.legal h1 { margin-bottom: 20px; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.4; }
.legal h1 span { display: block; margin-top: 6px; font-size: .58em; letter-spacing: .04em; }
.legal h2 { margin-top: 40px; padding-top: 18px; border-top: 1px solid #edf1f4; font-size: 1.15rem; line-height: 1.5; }
.legal h2 span { margin-left: .6em; font-size: .8em; }
.legal h2:first-of-type { margin-top: 32px; }
.legal .lead { font-size: .95rem; }
.legal p, .legal li { color: #40516a; font-size: .95rem; line-height: 1.9; }
.legal ul { margin: 0 0 1.25em; padding-left: 1.35em; }
.legal a { color: #277f9e; text-underline-offset: 3px; }

.company-page,
.contact-page { background: #f7fafc; }
.company-intro,
.contact-intro { max-width: 820px; margin: 0 auto 42px; text-align: center; color: #64748b; }
.company-intro p, .contact-intro p { margin: 0; }
.company-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.company-block { width: auto; margin: 0; padding: clamp(24px, 4vw, 38px); }
.company-block[aria-labelledby="business"], .company-cta { grid-column: auto; }
.company-block h2 { margin-bottom: 18px; }
.company-list { margin: 0; }
.company-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid #e7edf1;
}
.company-list > div:last-child { border-bottom: 0; }
.company-list dt { color: #64748b; font-size: .92rem; line-height: 1.6; }
.company-list dd { margin: 0; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.company-list dd span { display: block; margin-top: 5px; color: #64748b; font-size: .93rem; font-weight: 300; line-height: 1.65; }
.company-image {
  display: flex;
  width: min(100%, 760px);
  height: clamp(320px, 35vw, 420px);
  grid-column: 1 / -1;
  flex-direction: column;
  margin: 0 auto;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}
.company-image img {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  height: auto;
  object-fit: contain;
}
.company-image figcaption { padding: 12px 16px; color: #64748b; font-size: .88rem; line-height: 1.6; }
.company-copy { color: #52677f; line-height: 1.95; }
.company-services { margin: 0; padding-left: 1.25rem; color: #52677f; line-height: 1.95; }
.company-services span { display: block; color: #7c8da0; font-size: .93rem; font-weight: 300; }
.company-record-lead { margin: 0 0 8px; color: #318eaa; font-size: 1.08rem; font-weight: 500; line-height: 1.8; }
.company-record-lead-en { color: #64748b; font-size: .94rem; font-weight: 300; }
.company-record-note { margin: 20px 0 0; color: #52677f; font-size: .95rem; line-height: 1.9; }
.company-record-note-en { margin-top: 5px; color: #7c8da0; font-size: .9rem; font-weight: 300; }
.company-record-section { margin-top: 38px; padding-top: 2px; border-top: 1px solid #e7edf1; }
.company-record-section h3 { margin-top: 28px; }
.company-record-copy { margin-bottom: 5px; color: #52677f; line-height: 1.9; }
.company-record-copy-en { color: #7c8da0; font-size: .9rem; font-weight: 300; }
.company-record-list { margin: 20px 0 0; padding: 0; list-style: none; }
.company-record-list li { padding: 17px 0; border-bottom: 1px solid #e7edf1; color: #40516a; line-height: 1.75; }
.company-record-name, .company-record-en, .company-record-detail { display: block; }
.company-record-name { font-weight: 500; }
.company-record-en { color: #7c8da0; font-size: .9rem; font-weight: 300; }
.company-record-detail { margin-top: 4px; color: #52677f; font-size: .92rem; }
.company-record-detail-en { display: block; margin-top: 2px; color: #7c8da0; font-weight: 300; }
.company-record-flapbase { margin: 22px 0 0; color: #40516a; font-weight: 500; line-height: 1.8; }
.company-record-flapbase span { display: block; color: #7c8da0; font-size: .9rem; font-weight: 300; }
.company-record-quote { margin: 18px 0 0; padding: 0 0 18px 18px; border-left: 2px solid #b9dce6; color: #40516a; }
.company-record-quote p { margin-bottom: 8px; line-height: 1.9; }
.company-record-quote footer { padding: 0; border: 0; background: transparent; color: #64748b; font-size: .9rem; line-height: 1.7; text-align: left; }
.company-record-quote footer span { display: block; color: #7c8da0; font-size: .94em; font-weight: 300; }
.company-cta { grid-column: auto; text-align: center; }
.company-cta p { color: #64748b; }

.contact-card { max-width: 760px; margin: 0 auto; }
.contact-form { display: grid; gap: 22px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.contact-field { display: grid; gap: 8px; }
.contact-field label { font-size: .94rem; font-weight: 500; }
.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid #d5e0e6;
  border-radius: 10px;
  padding: 12px 14px;
  color: #17202a;
  background: #fbfdfe;
  font: inherit;
  line-height: 1.6;
}
.contact-field input:focus,
.contact-field textarea:focus { outline: none; box-shadow: none; border-color: #2d7f9c; }
.contact-field textarea { min-height: 170px; resize: vertical; }
.contact-hint { color: #64748b; font-size: .9rem; line-height: 1.8; }
.contact-submit,
.primary-button,
.button,
button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  color: #fff;
  background: linear-gradient(135deg, #329fba, #4c73d8);
  font: inherit;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
.contact-submit { justify-self: start; }
.contact-submit:disabled { opacity: .65; cursor: wait; }
.contact-status { min-height: 1.6em; margin: 0; color: #348eae; }
.contact-success {
  display: grid;
  gap: 12px;
  min-height: 250px;
  place-content: center;
  padding: 34px;
  border: 1px solid #b8dce5;
  border-radius: 16px;
  background: #f2fbfd;
  color: #1c6577;
  text-align: center;
}
.contact-success p { margin: 0; }
.contact-success p:first-child { color: #17202a; font-size: 1.2rem; font-weight: 500; letter-spacing: .04em; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

main > .hero {
  width: min(100% - 40px, 920px);
  min-height: 0;
  margin: clamp(36px, 7vw, 76px) auto;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid #dce5eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(23, 32, 42, .06);
  text-align: left;
}
main > .hero h1 { margin-bottom: 20px; }
main > .hero .lead { max-width: 720px; }
main > .panel { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { display: grid; gap: 12px; padding: 22px; border: 1px solid #edf1f3; border-radius: 8px; background: #fbfdfe; }
.plan strong { font-weight: 500; }
.plan .secondary { color: #2d7f9c; background: #eaf5f8; }
.status { white-space: pre-line; color: #64748b; }

footer {
  padding: 64px 20px;
  border-top: 1px solid #e2eaf0;
  background: #fff;
  text-align: center;
}
footer h2 { margin: 0 0 12px; font-size: 2rem; }
footer p { color: #64748b; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 24px; margin: 30px 0; color: #64748b; font-size: .9rem; }
.footer-links a { text-underline-offset: 3px; }
footer small { color: #94a3b8; font-size: .86rem; }

@media (max-width: 800px) {
  .site-header { min-height: 64px; padding-inline: 18px; }
  .site-header nav a:not(.header-button), .site-nav a:not(.header-button) { display: none; }
  .site-header .header-button, .site-nav .header-button { padding: 9px 14px; font-size: .85rem; }
  main { min-height: calc(100vh - 64px); }
  main > .section, .company-page > .section, .contact-page > .section { width: min(100% - 28px, 640px); padding-block: 56px; }
  .legal.panel, .company-block, .contact-card, main > .panel, main > .hero { width: min(100% - 28px, 640px); padding: 26px 20px; }
  .company-grid, .grid, .contact-grid { grid-template-columns: 1fr; }
  .company-cta { grid-column: auto; }
  .company-list > div { grid-template-columns: 1fr; gap: 5px; padding-block: 14px; }
  .company-image { width: 100%; height: clamp(280px, 78vw, 360px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
