/* ==========================================================================
   Site chrome: header / GNB / hero / page header / footer
   ========================================================================== */

/* --- Utility bar --------------------------------------------------------- */

.utilbar {
  background: var(--ink-900);
  color: var(--text-on-dark-muted);
  font-size: var(--step--1);
}

.utilbar__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--sp-5);
  min-height: 36px;
}

.utilbar a {
  color: var(--text-on-dark-muted);
  text-decoration: none;
  font-weight: 500;
}

.utilbar a:hover {
  color: var(--cyan-400);
}

.utilbar__sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 900px) {
  .utilbar {
    display: none;
  }
}

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

/* The blur lives on a pseudo-element: a backdrop-filter on .header itself
   would make it the containing block for the position:fixed mobile drawer. */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--ink-800);
  line-height: 1;
}

.brand__mark em {
  font-style: normal;
  color: var(--cyan-600);
}

.brand__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-400);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .brand__tag {
    display: none;
  }
}

/* --- Primary navigation -------------------------------------------------- */

.gnb {
  margin-left: auto;
}

.gnb__list {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.gnb__list > li {
  margin: 0;
  position: relative;
}

.gnb__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--ink-800);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}

.gnb__link:hover,
.gnb__list > li:focus-within > .gnb__link {
  color: var(--cyan-700);
  background: var(--slate-50);
}

.gnb__link.is-active {
  color: var(--cyan-700);
}

.gnb__link.is-active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: -1px;
  height: 2px;
  background: var(--cyan-600);
}

.gnb__caret {
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.55;
}

/* Second depth */

.gnb__sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 15rem;
  padding: var(--sp-2);
  margin: 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease),
    visibility 0.16s;
}

.gnb__list > li:hover > .gnb__sub,
.gnb__list > li:focus-within > .gnb__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.gnb__sub li {
  margin: 0;
}

.gnb__sub a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.gnb__sub a:hover {
  background: var(--slate-50);
  color: var(--cyan-700);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* --- Mobile drawer ------------------------------------------------------- */

.navtoggle {
  display: none;
  appearance: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  position: relative;
  margin-left: auto;
}

.navtoggle span,
.navtoggle span::before,
.navtoggle span::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--ink-800);
  border-radius: 2px;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.navtoggle span {
  top: 50%;
  transform: translate(-50%, -50%);
}

.navtoggle span::before,
.navtoggle span::after {
  content: "";
  left: 0;
}

.navtoggle span::before {
  transform: translateY(-6px);
}

.navtoggle span::after {
  transform: translateY(6px);
}

.navtoggle[aria-expanded="true"] span {
  background: transparent;
}

.navtoggle[aria-expanded="true"] span::before {
  transform: rotate(45deg);
}

.navtoggle[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .navtoggle {
    display: block;
  }

  .header__actions {
    display: none;
  }

  .gnb {
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    width: min(88vw, 24rem);
    margin: 0;
    padding: var(--sp-5) var(--sp-5) var(--sp-8);
    background: var(--paper);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.26s var(--ease);
  }

  .gnb.is-open {
    transform: none;
  }

  .gnb__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .gnb__link {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 0.85rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .gnb__link:hover {
    background: transparent;
  }

  .gnb__link.is-active::after {
    display: none;
  }

  .gnb__caret {
    transform: rotate(45deg);
    transition: transform 0.2s var(--ease);
  }

  .gnb__link[aria-expanded="true"] .gnb__caret {
    transform: rotate(-135deg);
  }

  .gnb__sub {
    position: static;
    display: none;
    min-width: 0;
    padding: var(--sp-2) 0 var(--sp-3) var(--sp-4);
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .gnb__sub.is-open {
    display: block;
  }

  .gnb__mobile-extra {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
  }
}

@media (min-width: 901px) {
  .gnb__mobile-extra {
    display: none;
  }
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(16, 19, 31, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s var(--ease), visibility 0.26s;
}

.nav-scrim.is-open {
  opacity: 1;
  visibility: visible;
}

/* --- Home hero ----------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(84vh, 46rem);
  display: grid;
  background: var(--ink-900);
  overflow: hidden;
}

.hero__slide {
  grid-area: 1 / 1;
  display: grid;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 8s linear;
}

.hero__slide.is-active .hero__bg {
  transform: scale(1);
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      rgba(16, 19, 31, 0.92) 0%,
      rgba(16, 19, 31, 0.72) 45%,
      rgba(16, 19, 31, 0.4) 100%
    ),
    linear-gradient(to top, rgba(16, 19, 31, 0.7), transparent 45%);
}

.hero__content {
  position: relative;
  padding-block: clamp(4rem, 10vw, 7rem);
  max-width: 46rem;
  color: #fff;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: var(--sp-4);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.hero__eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--cyan-400);
}

.hero h2 {
  font-size: var(--step-5);
  color: #fff;
  margin-bottom: var(--sp-5);
  letter-spacing: -0.035em;
}

.hero p {
  font-size: var(--step-1);
  color: rgba(255, 255, 255, 0.8);
  max-width: 40rem;
  margin-bottom: var(--sp-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.hero__nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1.25rem, 3vw, 2.5rem);
  z-index: 2;
}

.hero__dots {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero__dots li {
  margin: 0;
}

.hero__dot {
  appearance: none;
  width: 2.75rem;
  height: 3px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.hero__dot[aria-selected="true"] {
  background: var(--cyan-400);
}

.hero__playpause {
  appearance: none;
  margin-left: var(--sp-4);
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
}

.hero__playpause:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}

/* --- Page header (sub pages) --------------------------------------------- */

.pagehead {
  position: relative;
  background: var(--ink-800);
  color: #fff;
  overflow: hidden;
}

.pagehead__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.pagehead__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(31, 35, 57, 0.95) 10%,
    rgba(31, 35, 57, 0.55) 100%
  );
}

.pagehead__inner {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.pagehead h1 {
  color: #fff;
  margin-bottom: var(--sp-3);
}

.pagehead p {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--step-1);
  max-width: 52rem;
  margin-bottom: 0;
}

/* --- Breadcrumb ---------------------------------------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.6);
}

.crumbs li {
  margin: 0;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  opacity: 0.5;
}

.crumbs a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--cyan-400);
}

/* --- Local (in-page) nav ------------------------------------------------- */

.localnav {
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.localnav ul {
  display: flex;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  /* Scrolls when the items overflow, but without a permanent scrollbar rule
     sitting under the tabs on wide screens. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.localnav ul::-webkit-scrollbar {
  display: none;
}

.localnav li {
  margin: 0;
}

.localnav a {
  display: block;
  padding: 1rem 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.localnav a:hover {
  color: var(--ink-800);
}

.localnav a[aria-current="page"] {
  color: var(--ink-800);
  border-bottom-color: var(--cyan-600);
}

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

.footer {
  background: var(--ink-900);
  color: var(--text-on-dark-muted);
  font-size: var(--step--1);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 2.2fr;
  gap: var(--sp-7);
  padding-block: var(--sp-8) var(--sp-7);
}

@media (max-width: 900px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
}

.footer__brand .brand__mark {
  color: #fff;
  font-size: 1.5rem;
}

.footer__brand p {
  margin-top: var(--sp-3);
  max-width: 22rem;
  color: var(--text-on-dark-muted);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: var(--sp-5);
}

.footer__links h3 {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--sp-3);
}

.footer__links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links li {
  margin-bottom: var(--sp-2);
}

.footer__links a {
  color: var(--text-on-dark-muted);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--cyan-400);
}

.footer__offices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--sp-5);
  padding-block: var(--sp-6);
  border-top: 1px solid var(--border-dark);
}

.office__name {
  display: block;
  color: #fff;
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.office address {
  font-style: normal;
  line-height: 1.6;
}

.office__ko {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.9em;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--border-dark);
  font-size: 0.8125rem;
}

.footer__marks {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.footer__marks img {
  height: 28px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(1) brightness(1.6);
}

.footer__marks a:hover img {
  opacity: 1;
}

/* --- Back to top --------------------------------------------------------- */

.totop {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-800);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s;
}

.totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.totop:hover {
  border-color: var(--ink-800);
}

/* Ghost buttons sitting on the dark hero / page header need light chrome. */
.hero .btn--ghost,
.pagehead .btn--ghost {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.hero .btn--ghost:hover,
.pagehead .btn--ghost:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}
