@import url('./tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--color-text); background: var(--color-white); font-family: var(--font-sans); line-height: 1.5; word-break: keep-all; overflow-wrap: break-word; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
button { color: inherit; }
button, .button, .primary-nav > a { transition: translate .18s ease; }
@media (hover: hover) {
  button:not(:disabled):hover, .button:hover, .primary-nav > a:hover { translate: 0 -3px; }
}
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 5px; }
site-header, site-footer { display: block; }
.container { width: min(var(--content-width), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 16px; background: white; color: black; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 52px; padding: 12px 26px; border: 2px solid transparent; border-radius: var(--radius-pill); background: var(--color-primary); color: white; font-size: 18px; font-weight: 700; line-height: 1.3; box-shadow: var(--shadow-button); }
.button--outline { background: transparent; border-color: var(--color-primary); color: var(--color-accent); }
.button--small { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.button--square { border-radius: var(--radius-control); }
.button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.button img { flex: none; object-fit: contain; }
.site-header { height: 130px; background: white; }
.site-header--overlay { position: absolute; inset: 0 0 auto; z-index: 10; color: white; background: transparent; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: 159px; height: 54px; object-fit: contain; filter: brightness(.18); }
.site-header--overlay .brand img { filter: none; }
.site-header--dark { background: var(--color-text); color: var(--color-white); }
.site-header--dark .brand img { filter: none; }
.primary-nav { display: flex; gap: 30px; align-items: center; position: relative; top: -3px; }
.primary-nav > a:not(.button), .primary-nav > button { position: relative; padding: 10px 0; border: 0; background: none; font-size: 20px; line-height: 24px; white-space: nowrap; }
.primary-nav [aria-current="page"]:not(.button) { font-weight: 700; }
.primary-nav [aria-current="page"]:not(.button)::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 5px; background: var(--color-primary); }
.menu-toggle { display: none; }
.back-to-top { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 30; display: grid; place-items: center; width: 64px; height: 64px; padding: 10px; border: 0; border-radius: 50%; background: rgb(0 0 0 / 15%); }
.back-to-top[hidden] { display: none; }
.back-to-top img { width: 44px; height: 44px; transform: rotate(90deg); }
.site-footer { border-top: 1px solid #ededed; padding: 28px 0 45px; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 32px; font-size: 18px; color: #000; }
.footer-links > span { font-weight: 700; }
.footer-links button { border: 0; background: transparent; padding: 0; }
.footer-information address { margin-top: 30px; color: var(--color-muted); font-size: 15px; font-style: normal; line-height: 1.6; }
.footer-information address span { display: inline-block; margin-right: 16px; }
.footer-chat { flex: none; min-width: 170px; min-height: 77px; }
.field { display: grid; gap: 8px; }
.field-label { font-weight: 700; }
.input, .select, .textarea { width: 100%; min-height: 54px; padding: 14px 18px; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: white; color: var(--color-text); }
.input::placeholder, .textarea::placeholder { color: var(--color-placeholder); }
.input:disabled, .select:disabled, .textarea:disabled { background: #f0f0f0; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #bb3030; }
.textarea { min-height: 180px; resize: vertical; }
.checkbox { width: 18px; height: 18px; accent-color: var(--color-accent); }
.notice-dialog { width: min(480px, calc(100% - 32px)); padding: 36px; border: 1px solid var(--color-border); border-radius: 16px; color: var(--color-text); box-shadow: 0 12px 60px #0003; }
.notice-dialog::backdrop { background: rgb(0 0 0 / 50%); }
.legal-dialog { width: min(753px, calc(100% - 32px)); height: min(849px, calc(100dvh - 48px)); max-height: none; padding: 52px 40px 46px 64px; border: 0; border-radius: 30px; background: white; color: #000; box-shadow: 0 4px 4px #0004; overflow: hidden; }
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.legal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: none; margin-bottom: 48px; }
.legal-header h2 { font-size: 30px; line-height: 1.2; font-weight: 700; }
.legal-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 8px; border: 0; background: transparent; }
.legal-close img { width: 24px; height: 24px; }
.legal-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 16px; white-space: pre-wrap; font-size: 16px; line-height: 1.5; word-break: normal; }
.legal-actions { flex: none; display: flex; justify-content: center; margin-top: 32px; }
.legal-actions .button { width: 150px; min-height: 64px; background: var(--color-accent); font-size: 20px; font-weight: 400; box-shadow: none; }
@media (max-width: 600px) {
  .legal-dialog { padding: 24px; border-radius: 20px; height: calc(100dvh - 32px); }
  .legal-header { margin-bottom: 24px; }
  .legal-header h2 { font-size: 24px; }
  .legal-body { font-size: 15px; }
  .legal-actions { margin-top: 20px; }
  .legal-actions .button { min-height: 52px; }
}
.notice-dialog h2 { font-size: 24px; }
.notice-dialog p { margin-top: 20px; line-height: 1.7; }
.dialog-actions { margin-top: 28px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.dialog-actions form { margin: 0; }
.page-stub { min-height: 55vh; padding-block: 64px; }
.page-stub h1 { font-size: 28px; }
.page-stub p { margin-top: 16px; color: var(--color-muted); }
.page-stub a { display: inline-block; margin-top: 24px; text-decoration: underline; }
@media (max-width: 1100px) {
  .footer-inner { flex-wrap: wrap; }
  .footer-links { font-size: 15px; }
}
@media (max-width: 800px) {
  .container { width: calc(100% - 40px); }
  .site-header { height: 88px; }
  .brand img { width: 124px; height: 46px; }
  .menu-toggle { display: grid; align-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; }
  .menu-toggle span { display: block; height: 2px; background: currentColor; }
  .primary-nav { display: none; position: absolute; top: 78px; left: 20px; right: 20px; padding: 24px; background: white; color: var(--color-text); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 12px 32px #0002; z-index: 20; }
  .primary-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .primary-nav > button { text-align: left; }
  .primary-nav [aria-current="page"]:not(.button)::after { top: auto; bottom: 1px; width: 28px; height: 3px; }
  .site-footer { padding-block: 30px; }
  .footer-links { column-gap: 16px; row-gap: 14px; }
  .footer-links > span { flex-basis: 100%; font-weight: 700; }
  .footer-information address { font-size: 13px; }
  .footer-chat { min-height: 52px; min-width: 150px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  button, .button, .primary-nav > a { translate: none !important; }
}
