:root {
  --orange-active: #f68538;
  --orange-soft: #e7a35f;
  --blue: #5b6fb3;
  --red: #db454e;
  --green: #00be84;
  --white: #ffffff;
  --black: #000000;
  --text-dark: #545454;
  --bg-light: #f3f3f3;
  --border-gray: #d9dade;
  --text-mid: #707070;
  --shadow: #00000029;
  --nav-inactive: #dfdfdf;
  --nav-dim: #8c8c8c;
  --font:
    'Noto Sans KR', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  --header-h: 90px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
img[hidden] {
  display: none;
}
a {
  text-decoration: none;
  color: inherit;
}
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-title {
  font-size: 2.375rem;
  line-height: 1.4474;
  font-weight: 700;
  color: var(--black);
}
.section-title.center {
  text-align: center;
}
.section-subtitle {
  margin-top: 0.75rem;
  color: var(--black);
  font-size: 1.25rem;
  line-height: 1.45;
  font-weight: 500;
}
.section-subtitle.center {
  text-align: center;
}

main > section[id] {
  scroll-margin-top: var(--header-h);
}

/* HEADER */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease;
}
/* "top" (hero) is the only dark section - header stays transparent with
   light/grayish nav text. Every other section has a light background, so
   the header switches to a translucent white bar with dark text/logo. */
.site-header:not([data-section='top']) {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 var(--border-gray);
}
.site-header:not([data-section='top']) .nav-link {
  color: var(--black);
}
.site-header:not([data-section='top']) .nav-link.active {
  color: var(--orange-active);
}
.site-header:not([data-section='top']) .menu-toggle-icon {
  color: var(--black);
}
.header-inner {
  max-width: 1920px;
  margin: 0 auto;
  height: 100%;
  padding: 0 7.8vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img {
  height: 19px;
  width: auto;
  transition: filter 0.35s ease;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.mobile-nav {
  display: none;
}
.nav-link {
  position: relative;
  display: inline-block;
  color: var(--nav-inactive);
  font-size: 0.9375rem;
  font-weight: 400;
  padding: 6px 2px;
  border-bottom: 3px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    font-size 0.2s ease;
}
/* Invisible ghost at the largest/boldest size this link can hit (active or
   hover) so the box is pre-sized for it - growing/bolding on hover never
   reflows neighboring nav items. */
.nav-link[data-label]::before {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
  font-size: 1rem;
}
.nav-link.active {
  color: var(--orange-active);
  border-color: var(--orange-active);
  font-weight: 700;
  font-size: 1rem;
}
.site-header[data-section='top']
  .nav-link:not(.active):not(.nav-link--logo):hover {
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
}
.site-header:not([data-section='top'])
  .nav-link:not(.active):not(.nav-link--logo):hover {
  color: var(--black);
  font-weight: 700;
  font-size: 1rem;
}
@media (max-width: 1100px) {
  body.nav-open .mobile-nav .nav-link:not(.active):not(.nav-link--logo):hover {
    color: var(--black);
    font-weight: 600;
    font-size: 0.9375rem;
  }
}
.nav-link--external {
  color: var(--nav-dim);
}
.nav-link--logo {
  display: flex;
  align-items: center;
  padding: 4px 0;
}
.nav-link--logo img {
  height: 1.3125rem;
  width: auto;
}

.menu-toggle {
  display: none;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--white);
}
.menu-toggle-icon {
  width: 24px;
  height: 24px;
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--black);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
}
.hero-content {
  position: absolute;
  top: 26%;
  left: 7.8%;
  max-width: 1100px;
  color: var(--white);
  z-index: 1;
}
.hero-title {
  margin: 0 0 24px;
  font: 700 clamp(64px, 0.7vw + 59px, 72px) / 1.1 'Noto Sans KR', var(--font);
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  margin-left: 2px;
  background: var(--white);
  align-self: baseline;
  height: 0.85em;
  vertical-align: -0.1em;
  animation: cursor-blink 0.8s step-end infinite;
}
.typewriter-cursor.done {
  animation: none;
  opacity: 0;
}
@keyframes cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}
.hero-subtitle {
  margin: 0;
  font: 500 clamp(18px, 2.2vw, 28px) / 1.5 'Noto Sans KR', var(--font);
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-subtitle.is-visible {
  opacity: 1;
}
.hero-scroll {
  position: absolute;
  left: 7.8%;
  bottom: 40px;
  z-index: 1;
  display: block;
  line-height: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-scroll.is-visible {
  opacity: 1;
}
.hero-scroll img {
  width: 96px;
  height: auto;
}

@media (max-width: 1100px) {
  .hero-content {
    top: 22%;
    left: 8%;
    right: 8%;
    max-width: none;
  }
  .hero-break {
    display: none;
  }
  .hero-title {
    font: 700 clamp(46px, 2.5vw + 37px, 64px) / 1.15 'Noto Sans KR', var(--font);
  }
  .hero-subtitle {
    font: 500 clamp(14px, 2.8vw, 17px) / 1.5 'Noto Sans KR', var(--font);
  }
  .hero-scroll {
    left: 8%;
    bottom: 32px;
  }
  .hero-scroll img {
    width: 72px;
  }
}

/* STACK STRIP */
.stack-strip {
  background: var(--white);
  max-width: none;
  padding: 96px 7.8vw;
}
.stack-strip > * {
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}
.stack-flow {
  position: relative;
  margin-top: 64px;
}
.stack-flow .splide__track {
  overflow: visible;
}
.stack-step {
  position: relative;
  width: 100%;
  text-align: center;
}
/* Decorative flow arrow between steps - sized down at the tablet/mobile
   breakpoints to fit the tighter carousel gap. */
.splide__slide:not(:last-child) .stack-step::after {
  content: '';
  position: absolute;
  top: 22px;
  right: -44px;
  width: 24px;
  height: 24px;
  background: url('../images/ui/Arrow@2x.png') center / contain no-repeat;
  background-image: image-set(
    url('../images/ui/Arrow.png') 1x,
    url('../images/ui/Arrow@2x.png') 2x
  );
  pointer-events: none;
}
.stack-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  object-fit: contain;
}
.stack-step h3 {
  text-align: center;
  font:
    normal 700 20px/29px 'Noto Sans KR',
    sans-serif;
  letter-spacing: 0px;
  color: #000000;
  opacity: 1;
  margin-bottom: 8px;
}
.stack-step p {
  text-align: center;
  font:
    normal 500 15px/21px 'Noto Sans KR',
    sans-serif;
  letter-spacing: 0px;
  color: #000000;
  opacity: 1;
}

/* CORE TECHNOLOGIES */
.core-tech {
  background: var(--bg-light);
  padding: 96px 0;
}
.core-tech-inner {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 7.8vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: 'text media' 'nav media';
  gap: 80px;
  align-items: center;
}
.core-tech-text {
  grid-area: text;
}
.core-tech-media {
  grid-area: media;
}
.core-tech-nav {
  grid-area: nav;
}
.core-tech-name {
  font-size: 1.875rem;
  line-height: 1.4667;
  font-weight: 700;
  margin-top: 2.25rem;
}
.core-tech-desc {
  margin-top: 0.6rem;
  color: var(--black);
  font-size: 1.25rem;
  line-height: 1.45;
  font-weight: 500;
}
.core-tech-slides {
  position: relative;
  min-height: 230px;
}
.core-tech-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    visibility 0s linear 0.4s;
}
.core-tech-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.4s ease;
}
.core-tech-list {
  margin-top: 1.5rem;
}
.core-tech-list li {
  position: relative;
  padding-left: 16px;
  color: var(--black);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.7;
}
.core-tech-list li::before {
  content: '\00B7';
  position: absolute;
  left: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.75rem;
  padding: 11px 24px;
  border: 1px solid var(--black);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--black);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    text-shadow 0.2s ease;
}
.btn--disabled {
  opacity: 0.7;
  cursor: default;
}
a.btn--outline:hover {
  box-shadow: inset 0 0 0 1px currentColor;
  text-shadow:
    0 0 0.4px currentColor,
    0 0 0.4px currentColor;
}
.btn-arrow {
  display: block;
}
.core-tech-nav {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.carousel-arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.carousel-arrow img {
  width: 18px;
  height: 18px;
}
.carousel-count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.03em;
}
.carousel-count #carousel-current {
  font-weight: 700;
}
.core-tech-media {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #d9d9d9;
}
.core-tech-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0s linear 0.4s;
}
.core-tech-img.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

/* APPLICATIONS */
.applications {
  background: var(--white);
  max-width: none;
  padding: 96px 7.8vw;
}
.applications > * {
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}
.app-grid {
  margin-top: 48px;
}
.app-grid .splide__track {
  overflow: visible;
}
.app-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: default;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
@media (hover: hover) and (pointer: fine) and (min-width: 1101px) {
  .app-grid .app-card:hover {
    transform: scale(1.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    z-index: 1;
  }
}
.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.8) 100%
  );
}
.app-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  color: var(--white);
  z-index: 1;
}
.app-card-content h3 {
  font-size: 1.0625rem;
  line-height: 1.45;
  font-weight: 700;
  transition: font-size 0.3s ease 0.05s;
}
@media (hover: hover) and (pointer: fine) and (min-width: 1101px) {
  .app-grid .app-card:hover .app-card-content h3 {
    font-size: 1.1875rem;
  }
}
.app-card-content p {
  font-size: 0.9375rem;
  line-height: 1.4;
  font-weight: 500;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.85);
  transition: font-size 0.3s ease 0.05s;
}
@media (hover: hover) and (pointer: fine) and (min-width: 1101px) {
  .app-grid .app-card:hover .app-card-content p {
    font-size: 1rem;
  }
}

/* LEADERSHIP */
.leadership {
  background: var(--bg-light);
  padding: 96px 0;
}
.leadership-inner {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 7.8vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.leadership blockquote {
  margin: 1.5rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.45;
  font-style: normal;
}
.leadership-role {
  margin-top: 2.5rem;
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.4667;
  letter-spacing: 0;
  color: var(--orange-soft);
}
.leadership-name {
  font-size: 1.875rem;
  line-height: 1.4667;
  font-weight: 500;
  margin-top: 0.35rem;
}
.leadership-credentials {
  margin-top: 1rem;
  border-top: 1px solid var(--border-gray);
  padding-top: 1rem;
}
.leadership-credentials li {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--black);
  line-height: 1.444;
  padding-left: 14px;
  position: relative;
}
.leadership-credentials li::before {
  content: '\00B7';
  position: absolute;
  left: 0;
}
.leadership-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 14px;
}
.leadership-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}
.leadership-links img {
  width: 18px;
  height: 18px;
}
.leadership-photo {
  position: relative;
}
.leadership-photo img {
  width: 100%;
}

/* CONTACT */
.contact {
  background: var(--white);
  max-width: none;
  padding: 96px 7.8vw;
}
.contact > * {
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}
.contact-map {
  margin-top: 40px;
  border-radius: 8px;
  overflow: hidden;
}
.contact-map img {
  width: 100%;
  display: block;
}
.contact-cards {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-light);
  border-radius: 8px;
  padding: 24px;
}
.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon img {
  width: 20px;
  height: 20px;
}
.contact-card p {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--black);
  line-height: 1.4;
}
.contact-card a {
  color: var(--black);
}

/* FOOTER */
.site-footer {
  background: var(--black);
}
.footer-inner {
  max-width: 1920px;
  margin: 0 auto;
  padding: 72px 7.8vw;
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-logo {
  height: 32px;
}
.footer-copyright {
  font-size: 0.9375rem;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-dark);
}
.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-image: url('../images/ui/Top@2x.png');
  background-image: image-set(
    url('../images/ui/Top.png') 1x,
    url('../images/ui/Top@2x.png') 2x
  );
  background-size: cover;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.contact-cards .reveal:nth-child(2) {
  transition-delay: 0.1s;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .header-inner {
    padding: 0 8vw;
  }
  .main-nav {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 55%);
    background: var(--white);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: calc(var(--header-h) + 24px) 32px 32px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 95;
  }
  .mobile-nav.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-nav .nav-link:not(.active) {
    color: var(--black);
    font-weight: 600;
  }
  /* Mobile panel is always white regardless of header state (e.g. still
     "top"/dark hero behind it) - override the desktop dark-header hover
     that would otherwise turn link text white-on-white here. */
  .site-header[data-section='top']
    .mobile-nav
    .nav-link:not(.active):not(.nav-link--logo):hover {
    color: var(--black);
  }
  .mobile-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: none;
  }
  .mobile-nav .nav-link--logo {
    margin-top: auto;
    padding-top: 40px;
  }
  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 101;
  }
  .menu-toggle-icon {
    transition: opacity 0.25s ease;
  }
  .menu-toggle.open .menu-toggle-icon {
    opacity: 0;
  }
  .menu-toggle::before,
  .menu-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background: var(--black);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .menu-toggle::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  .menu-toggle::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  .menu-toggle.open::before,
  .menu-toggle.open::after {
    opacity: 1;
  }
  body.nav-open main,
  body.nav-open .site-footer {
    pointer-events: none;
  }

  /* TECH STACK - 3 steps peeking, swipeable carousel (same treatment as
     Applications); flow arrows shrink to fit the tighter gap */
  .stack-strip {
    padding: 64px 8vw;
  }
  .stack-flow .splide__track {
    overflow: hidden;
  }
  .stack-icon {
    width: 90px;
    height: 90px;
  }
  .splide__slide:not(:last-child) .stack-step::after {
    top: 38px;
    right: -17px;
    width: 14px;
    height: 14px;
  }

  /* CORE TECHNOLOGIES - image first, then the pagination controls */
  .core-tech-inner {
    grid-template-columns: 1fr;
    grid-template-areas: 'text' 'media' 'nav';
    gap: 32px;
    padding: 0 8vw;
  }
  .core-tech-text {
    text-align: center;
  }
  .core-tech-nav {
    margin-top: 0;
    justify-content: center;
  }
  .core-tech-list {
    display: inline-block;
    text-align: left;
  }

  /* APPLICATIONS - clip peeking edge cards once the carousel scrolls */
  .app-grid .splide__track {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .stack-step h3 {
    font-size: 1.375rem;
    line-height: 1.4;
  }
  .stack-step p {
    font-size: 1.0625rem;
    line-height: 1.4;
  }
  .stack-icon {
    width: 110px;
    height: 110px;
  }
  .splide__slide:not(:last-child) .stack-step::after {
    top: 49px;
    right: -14px;
    width: 12px;
    height: 12px;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .section-subtitle {
    font-size: 0.9375rem;
  }

  .core-tech-name {
    font-size: 1.5rem;
  }
  .core-tech-desc {
    font-size: 0.9375rem;
  }

  /* APPLICATIONS - taller card at single-item breakpoint; bump the
     overlay text up since it was reading too small on narrow phones */
  .app-card {
    aspect-ratio: 3/5;
  }
  .app-card-content h3 {
    font-size: 1.375rem;
  }
  .app-card-content p {
    font-size: 1.0625rem;
  }

  /* LEADERSHIP - single column, aligned with header logo */
  .leadership {
    padding: 48px 0;
  }
  .leadership-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 8vw;
  }
  .leadership-text {
    text-align: left;
  }
  .leadership .section-title {
    text-align: center;
  }
  .leadership blockquote {
    text-align: center;
    font-size: 0.9375rem;
  }
  .leadership-role {
    margin-top: 1.5rem;
    font-size: 1.25rem;
  }
  .leadership-name {
    font-size: 1.25rem;
    margin-top: 0.15rem;
  }
  .leadership-credentials {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }
  .leadership-links {
    margin-top: 1rem;
  }
  .leadership-photo {
    max-width: 260px;
    margin: 24px auto 0;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
