/* ==========================================================================
   Bridgecode M&A Center - shared chrome styles (fonts, header, footer, CTA)
   ========================================================================== */

@font-face {
  font-family: 'Pretendard';
  src: url('/assets/fonts/Pretendard-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('/assets/fonts/Pretendard-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('/assets/fonts/Pretendard-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSerifCJKkr';
  src: url('/assets/fonts/NotoSerifCJKkr-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSerifCJKkr';
  src: url('/assets/fonts/NotoSerifCJKkr-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSerifCJKkr';
  src: url('/assets/fonts/NotoSerifCJKkr-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #f2542d;
  --dark: #151515;
  --dark-95: rgba(21, 21, 21, 0.95);
  --body-color: #323232;
  --muted: #6f6f6f;
  --muted-light: rgba(255, 255, 255, 0.68);
  --line-light: rgba(21, 21, 21, 0.12);
  --line-dark: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  --footer-bg: #ececec;
  --font-sans:
    'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', Arial, sans-serif;
  --font-serif: 'NotoSerifCJKkr', 'Noto Serif KR', Georgia, serif;
  --header-height: 70px;

  /* Fluid type scale — headings shrink smoothly between mobile and desktop, so
     no per-breakpoint font-size overrides are needed. max = desktop size. */
  --fs-hero: clamp(32px, 4vw + 12px, 64px); /* hero headlines */
  --fs-heading-lg: clamp(28px, 3.4vw + 12px, 56px); /* large section headings (home) */
  --fs-heading: clamp(28px, 2.3vw + 16px, 44px); /* section headings */
  --fs-subheading: clamp(20px, 1.4vw + 13px, 30px); /* card titles / sub-heads */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  color: var(--body-color);
  background-color: var(--white);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button {
  font-family: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--dark);
  color: var(--white);
  font-size: 14px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 60px;
  padding-right: 60px;
  position: relative;
}

.container-narrow {
  max-width: 920px;
}

/* Buttons ---------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 32px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.button-primary {
  background-color: var(--primary);
  color: var(--white);
}

.button-primary:hover {
  background-color: #d84523;
}

.button-dark {
  background-color: var(--dark);
  color: var(--white);
}

.button-dark:hover {
  background-color: #333333;
}

.button-outline {
  background-color: transparent;
  color: var(--dark);
  border-color: rgba(21, 21, 21, 0.35);
}

.button-outline:hover {
  border-color: var(--dark);
  background-color: var(--dark);
  color: var(--white);
}

.button-outline-light {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.button-outline-light:hover {
  border-color: var(--white);
  background-color: var(--white);
  color: var(--dark);
}

/* Typography helpers ------------------------------------------------------ */

.eyebrow {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-light {
  color: var(--muted-light);
}

.section-heading {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-heading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--dark-95);
}

.section-heading-serif {
  font-family: var(--font-serif);
  font-weight: 300;
}

.section-heading-line {
  display: block;
}

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

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  height: var(--header-height);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(21, 21, 21, 0.08);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  width: 150px;
  height: auto;
}

.site-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.site-nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav-item {
  position: relative;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: none;
  border: 0;
  font-size: 17px;
  font-weight: 500;
  color: #161616;
  cursor: pointer;
  transition: color 0.2s ease;
}

.site-nav-link:hover {
  color: var(--primary);
}

.dropdown-chevron {
  transition: transform 0.25s ease;
}

.has-dropdown.is-open > .dropdown-toggle .dropdown-chevron {
  transform: rotate(180deg);
}

.site-nav-cta {
  display: inline-block;
  margin-left: 8px;
  padding: 15px 24px;
  background-color: #161616;
  color: #fafafa;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.25s ease;
}

.site-nav-cta:hover {
  background-color: var(--primary);
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 110;
  min-width: 200px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background-color: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  box-shadow: 0 16px 32px rgba(21, 21, 21, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

.has-dropdown.is-open > .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-flag {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: -4px;
  border-radius: 100px;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
}

.mega-menu-link {
  display: block;
  padding: 11px 20px;
  font-size: 16px;
  color: #161616;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.mega-menu-link:hover {
  background-color: rgba(21, 21, 21, 0.04);
  color: var(--primary);
}

.mega-menu-link.is-active {
  color: var(--primary);
  font-weight: 600;
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.language-menu {
  position: relative;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: none;
  border: 0;
  font-size: 16px;
  font-weight: 500;
  color: #161616;
  cursor: pointer;
}

.language-menu .mega-menu {
  left: auto;
  right: 0;
  min-width: 140px;
}

.menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-button-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #161616;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.menu-button[aria-expanded='true'] .menu-button-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-button[aria-expanded='true'] .menu-button-bar:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded='true'] .menu-button-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background-color: var(--white);
  overflow-y: auto;
  padding: 8px 20px 40px;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu-list > li {
  border-bottom: 1px solid var(--line-light);
}

.mobile-menu-list > li:last-child {
  border-bottom: 0;
}

.mobile-menu-link,
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 12px;
  background: none;
  border: 0;
  font-size: 18px;
  font-weight: 500;
  color: #161616;
  text-align: left;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.mobile-menu-toggle .dropdown-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.mobile-menu-toggle[aria-expanded='true'] .dropdown-chevron {
  transform: rotate(180deg);
}

.mobile-submenu {
  margin: 0;
  padding: 0 4px 12px;
  list-style: none;
}

.mobile-submenu .mobile-menu-link {
  padding: 12px 16px;
  font-size: 16px;
  color: var(--muted);
}

/* Hover interactions inside the hamburger menu (pointer-capable devices). */
@media (hover: hover) {
  .mobile-menu-link:hover,
  .mobile-menu-toggle:hover {
    color: var(--primary);
    background-color: rgba(21, 21, 21, 0.04);
  }

  /* Open the submenu while its group is hovered. */
  .mobile-menu-group:hover .mobile-submenu {
    display: block;
  }

  .mobile-menu-group:hover > .mobile-menu-toggle {
    color: var(--primary);
  }

  .mobile-menu-group:hover > .mobile-menu-toggle .dropdown-chevron {
    transform: rotate(180deg);
  }
}

.mobile-menu-contact {
  justify-content: center;
  margin-top: 16px;
  padding: 17px 24px;
  background-color: #161616;
  color: #fafafa;
  font-weight: 600;
  transition: background-color 0.25s ease;
}

@media (hover: hover) {
  .mobile-menu-contact:hover {
    background-color: var(--primary);
    color: #fafafa;
  }
}

body.menu-open {
  overflow: hidden;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  background-color: var(--footer-bg);
  color: var(--body-color);
  padding: 48px 0 140px;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

.site-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid #bbbbb6;
  margin-bottom: 30px;
}

.site-footer-logo img {
  width: 230px;
  height: auto;
}

.site-footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(21, 21, 21, 0.1);
}

.site-footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.site-footer-column-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: #161616;
}

.site-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer-link {
  display: inline-block;
  padding: 5px 0;
  font-size: 16px;
  font-weight: 400;
  color: #1f1f20;
  transition: color 0.2s ease;
}

.site-footer-link:hover {
  color: var(--primary);
}

.site-footer-info {
  font-size: 14px;
  color: #7e8181;
}

.site-footer-company-name {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  color: #161616;
}

.site-footer-company-info,
.site-footer-certifications {
  margin: 0 0 10px;
  line-height: 1.7;
}

.site-footer-privacy {
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--dark);
  text-decoration: underline;
}

.site-footer-privacy:hover {
  color: var(--primary);
}

.site-footer-social {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer-social-link {
  display: inline-flex;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.site-footer-social-link:hover {
  opacity: 1;
}

.site-footer-office {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 32px 0 20px;
}

.site-footer-office-image {
  width: 72px;
  height: 108px;
  object-fit: cover;
  flex-shrink: 0;
}

.site-footer-office-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
  color: #161616;
}

.site-footer-office-address {
  margin: 0;
  font-size: 14px;
  color: #7e8181;
}

.site-footer-copyright {
  margin: 16px 0 0;
  font-size: 14px;
  color: #7e8181;
}

/* Contact CTA banner (shared: 404, advisor pages) ----------------------- */

.cta-banner {
  background-color: #161616;
  background-image: linear-gradient(#000, rgba(22, 22, 22, 0.6)), url('/assets/images/cta-banner-bg.avif');
  background-size: auto, cover;
  background-position:
    0 0,
    center;
  padding: 30px 0;
  text-align: center;
}

.cta-banner-heading {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 44px;
  color: var(--white);
}

.cta-banner-subtitle {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 767px) {
  .cta-banner-heading {
    font-size: 24px;
  }

  .cta-banner-subtitle {
    font-size: 16px;
  }
}

/* Sticky bottom CTA ------------------------------------------------------- */

.sticky-cta {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 16px;
  width: auto;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 24px;
  background-color: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  color: var(--white);
  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.5s;
}

/* Fades out when the final contact CTA / footer scrolls into view. */
.sticky-cta.is-hidden {
  opacity: 0;
  transform: translateY(24px);
  visibility: hidden;
  pointer-events: none;
}

.sticky-cta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.sticky-cta-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.sticky-cta-subtitle {
  font-size: 16px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}

.sticky-cta-button {
  flex-shrink: 0;
  padding: 12px 24px;
  font-size: 18px;
  font-weight: 600;
}

/* Responsive chrome ------------------------------------------------------- */

@media (max-width: 991px) {
  .container {
    padding-left: 40px;
    padding-right: 40px;
  }

  .site-header-inner {
    padding: 0 20px;
  }

  .site-footer-main {
    grid-template-columns: 1fr;
  }

  .site-footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
}

/* Tablet: keep the horizontal nav (hover dropdowns + button CTA), shrunk to fit. */
@media (min-width: 768px) and (max-width: 991px) {
  .site-header-inner {
    gap: 12px;
  }

  .site-logo img {
    width: 128px;
  }

  .site-nav-list {
    gap: 0;
  }

  .site-nav-link {
    gap: 4px;
    padding: 12px 10px;
    font-size: 15px;
  }

  .site-nav-cta {
    margin-left: 6px;
    padding: 12px 16px;
    font-size: 15px;
  }

  .language-toggle {
    padding: 12px 4px;
    font-size: 15px;
  }
}

@media (max-width: 767px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-nav {
    display: none;
  }

  .menu-button {
    display: flex;
  }

  body {
    font-size: 16px;
  }

  .site-footer {
    padding: 48px 0 150px;
  }

  .site-footer-inner {
    padding: 0 20px;
  }

  .site-footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-top .button-dark {
    display: none;
  }

  .site-footer-office {
    gap: 12px;
  }

  .sticky-cta {
    left: 50vw;
    right: auto;
    bottom: 24px;
    width: calc(100vw - 32px);
    max-width: none;
    margin: 0;
    gap: 12px;
    padding: 12px 12px 12px 16px;
    overflow: hidden;
    transform: translateX(-50%);
  }

  .sticky-cta.is-hidden {
    transform: translate(-50%, 24px);
  }

  .sticky-cta-title {
    font-size: 16px;
  }

  .sticky-cta-subtitle {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sticky-cta-button {
    padding: 12px 18px;
    font-size: 14px;
  }
}
