/* K-GIANT homepage renewal. Scoped to the homepage to preserve subpages. */
.kg-home {
  --kg-navy: #001f3f;
  --kg-ink: #0f253f;
  --kg-panel: #0b2e4f;
  --kg-line: #2b4964;
  --kg-chip: #163b59;
  --kg-green: #a0c948;
  --kg-green-dark: #527800;
  --kg-white: #fff;
  --kg-muted: #bac8d5;
  --kg-body: #536475;
  background: var(--kg-navy);
}
.kg-home .kg-skip-link {
  position: fixed;
  z-index: 100001;
  top: -80px;
  left: 16px;
  padding: 12px 20px;
  border: 2px solid var(--kg-green);
  border-radius: 8px;
  background: var(--kg-white);
  color: var(--kg-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}
.kg-home .kg-skip-link:focus {
  top: 16px;
  outline: 2px solid var(--kg-ink);
  outline-offset: 2px;
}

/* Existing header and navigation remain functional, with the light design state. */
.kg-home .no-header {
  height: 90px;
  background: var(--kg-white);
  border-bottom: 1px solid #ebebeb;
}
.kg-home .no-header-container {
  max-width: 1440px;
}
.kg-home .no-header .white_logo {
  display: none !important;
}
.kg-home .no-header .color_logo {
  display: block;
}
.kg-home .no-header__logo a {
  width: 143px;
  height: 35.25px;
}
.kg-home .no-header__logo img {
  object-fit: contain;
}
.kg-home .no-header__menu--gnb > li,
.kg-home .no-header__menu--gnb > li.active {
  width: 120px;
}
.kg-home .no-header__menu--gnb > li > a span {
  color: var(--kg-ink);
  font-size: 16px;
}
.kg-home .no-header__btn span {
  background-color: var(--kg-ink);
}
.kg-home .no-header .btn-6 {
  width: 146px;
  height: 48px;
  border-color: var(--kg-line);
  border-radius: 999px;
  color: var(--kg-ink);
  font-size: 16px;
  line-height: 46px;
}
.kg-home .no-header .btn-6:hover {
  color: var(--kg-white);
}
.kg-home .no-header__bg {
  top: 90px;
}

.kg-main {
  padding: 90px 24px 0;
  background: var(--kg-navy, #001f3f);
  color: var(--kg-white, #fff);
  font-family: 'Pretendard', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.kg-main *,
.kg-main *::before,
.kg-main *::after {
  box-sizing: border-box;
}
.kg-main a {
  color: inherit;
  text-decoration: none;
}
.kg-main a:focus-visible {
  outline: 3px solid var(--kg-green);
  outline-offset: 5px;
}
.kg-main a:focus:not(:focus-visible) {
  outline: none;
}
.kg-main h1,
.kg-main h2,
.kg-main h3,
.kg-main p,
.kg-main ul {
  margin: 0;
}
.kg-main ul {
  padding: 0;
  list-style: none;
}
.kg-main .kg-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}
.kg-main .kg-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.kg-main .kg-hero {
  display: grid;
  grid-template-columns: minmax(0, 880fr) minmax(0, 512fr);
  align-items: center;
  gap: 48px;
  min-height: 400px;
}
.kg-main .kg-intro {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.kg-main .kg-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--kg-green);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}
.kg-main .kg-proof li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kg-main .kg-proof .kg-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
.kg-main .kg-intro h1 {
  max-width: 100%;
  color: var(--kg-white);
  font-size: clamp(40px, 3.23vw, 62px);
  font-weight: 800;
  line-height: 1.2581;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.kg-main .kg-intro h1 em {
  color: var(--kg-green);
  font-style: normal;
}
.kg-main .kg-promise {
  color: var(--kg-white);
  font-size: clamp(20px, 1.31vw, 25px);
  font-weight: 500;
  line-height: 1.52;
  word-break: keep-all;
}

/* Editorial news intentionally has no white card background. */
.kg-main .kg-news {
  min-width: 0;
  min-height: 400px;
  padding: 8px 0 8px 28px;
  border-left: 1px solid var(--kg-line);
}
.kg-main .kg-news-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 30px;
}
.kg-main .kg-news-heading h2 {
  color: var(--kg-white);
  font-family: 'Raleway', 'Pretendard', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
}
.kg-main .kg-news-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--kg-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}
.kg-main .kg-news-intro {
  margin-top: 8px;
  color: var(--kg-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}
.kg-main .kg-news-lead {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  margin-top: 12px;
  border-radius: 8px;
}
.kg-main .kg-news-photo {
  display: block;
  width: 120px;
  height: 76px;
  flex: 0 0 120px;
  border-radius: 8px;
  object-fit: cover;
}
.kg-main .kg-news-lead-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.kg-main .kg-news-kicker {
  color: var(--kg-green);
  font-size: 12px;
  line-height: 18px;
}
.kg-main .kg-news-lead h3 {
  color: var(--kg-white);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.kg-main .kg-news time {
  display: block;
  color: var(--kg-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}
.kg-main .kg-news-list {
  margin-top: 12px;
}
.kg-main .kg-news-list li {
  border-top: 1px solid var(--kg-line);
}
.kg-main .kg-news-list li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 8px 0;
}
.kg-main .kg-news-list li > a > div {
  flex: 1;
  min-width: 0;
}
.kg-main .kg-news-list h3 {
  color: var(--kg-white);
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.kg-main .kg-news-list time {
  margin-top: 4px;
}
.kg-main .kg-news-more,
.kg-main .kg-news-lead h3,
.kg-main .kg-news-list h3,
.kg-main .kg-news a > .kg-icon {
  transition: color 0.2s ease, transform 0.2s ease;
}
.kg-main .kg-news-more:hover,
.kg-main .kg-news a:hover h3,
.kg-main .kg-news a:focus-visible h3 {
  color: var(--kg-green);
}
.kg-main .kg-news a:hover > .kg-icon {
  transform: translateX(3px);
}
.kg-main .kg-news-empty {
  margin-top: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--kg-line);
  color: var(--kg-muted);
  font-size: 15px;
}

.kg-main .kg-solutions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kg-main .kg-solution {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 180px;
  padding: 24px;
  border-radius: 12px;
  background: var(--kg-white);
  color: var(--kg-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kg-main .kg-solution:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgb(0 0 0 / 15%);
}
.kg-main .kg-solution-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 31px;
}
.kg-main .kg-solution-title h2 {
  min-width: 0;
  color: var(--kg-ink);
  font-size: 23px;
  font-weight: 700;
  line-height: 31px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.kg-main .kg-solution-subtitle {
  color: var(--kg-green-dark);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.kg-main .kg-solution-description {
  color: var(--kg-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.kg-main .kg-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.kg-main .kg-feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 168px;
  padding: 16px 20px;
  border: 1px solid var(--kg-line);
  border-radius: 12px;
  background: var(--kg-panel);
}
.kg-main .kg-feature h2 {
  display: block;
  color: var(--kg-white);
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}
.kg-main .kg-feature h2 > span {
  display: none;
}
.kg-main .kg-feature-items {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.kg-main .kg-feature-items li {
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--kg-line);
  border-radius: 999px;
  background: var(--kg-chip);
  color: var(--kg-white);
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  text-align: center;
  white-space: nowrap;
}

.kg-main .kg-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  min-height: 64px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--kg-green);
  color: var(--kg-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  transition: background-color 0.2s ease;
}
.kg-main .kg-contact > span {
  font-weight: 500;
}
.kg-main .kg-contact strong {
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
}
.kg-main .kg-contact:hover {
  background: #b4d769;
}
.kg-main .kg-contact:focus-visible {
  outline-color: var(--kg-white);
}

/* Footer remains the original template, using normal document flow on this page. */
.kg-home .no-footer {
  position: relative;
  bottom: auto;
  padding: 80px 24px;
  background: var(--kg-navy);
}
.kg-home .no-footer .no-container {
  width: 100%;
  max-width: 1440px;
  padding: 0;
}
.kg-home .quick_menu .top_btn {
  width: 48px;
  height: 48px;
}
.kg-home .quick_menu .top_btn i,
.kg-home .quick_menu .top_btn:hover i {
  width: 20px;
  height: 20px;
  bottom: 0;
  background: url('/resource/images/main-renewal/arrow-up.svg') center / 20px 20px no-repeat;
}
.kg-home .quick_menu .top_btn i::after {
  display: none;
}

@media (min-width: 1281px) {
  /* This zero-height flex item preserves the two desktop rows without extra markup. */
  .kg-main .kg-feature-items {
    gap: 4px 8px;
  }
  .kg-main .kg-feature-items::after {
    content: '';
    order: 1;
    flex-basis: 100%;
    height: 0;
  }
  .kg-main .kg-feature-items .kg-row-start,
  .kg-main .kg-feature-items .kg-row-start ~ li {
    order: 2;
  }
}

@media (max-width: 1280px) {
  .kg-home .no-header__menu--gnb > li,
  .kg-home .no-header__menu--gnb > li.active {
    width: 100px;
  }
  .kg-main .kg-hero {
    gap: 32px;
  }
  .kg-main .kg-proof {
    gap: 8px 16px;
    font-size: 14px;
  }
  .kg-main .kg-news {
    padding-left: 24px;
  }
  .kg-main .kg-news-heading {
    gap: 10px;
  }
  .kg-main .kg-news-heading h2 {
    font-size: 22px;
  }
  .kg-main .kg-news-more {
    gap: 4px;
    font-size: 12px;
  }
  .kg-main .kg-news-photo {
    width: 100px;
    height: 70px;
    flex-basis: 100px;
  }
  .kg-main .kg-news-lead {
    gap: 12px;
  }
  .kg-main .kg-news-lead h3 {
    font-size: 18px;
    line-height: 25px;
  }
  .kg-main .kg-solution {
    padding: 20px;
  }
  .kg-main .kg-solution-title h2 {
    font-size: 20px;
    line-height: 28px;
  }
  .kg-main .kg-solution-subtitle {
    font-size: 15px;
    line-height: 22px;
  }
  .kg-main .kg-feature-items li {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 14px;
    line-height: 20px;
  }
}

@media (max-width: 1100px) {
  .kg-main .kg-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    min-height: 0;
  }
  .kg-main .kg-intro {
    align-items: center;
    padding: 20px 0 8px;
    text-align: center;
  }
  .kg-main .kg-proof {
    justify-content: center;
  }
  .kg-main .kg-intro h1 {
    font-size: 52px;
  }
  .kg-main .kg-promise {
    font-size: 23px;
  }
  .kg-main .kg-news {
    min-height: 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--kg-line);
    border-left: 0;
  }
  .kg-main .kg-news-photo {
    width: 120px;
    height: 76px;
    flex-basis: 120px;
  }
  .kg-main .kg-news-heading h2 {
    font-size: 24px;
  }
  .kg-main .kg-news-more {
    gap: 8px;
    font-size: 14px;
  }
  .kg-main .kg-news-lead h3 {
    font-size: 20px;
    line-height: 28px;
  }
  .kg-main .kg-solutions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kg-main .kg-solution {
    padding: 24px;
  }
  .kg-main .kg-solution-title h2 {
    font-size: 23px;
    line-height: 31px;
  }
  .kg-main .kg-solution-subtitle {
    font-size: 16px;
    line-height: 24px;
  }
}

@media (max-width: 768px) {
  .kg-main {
    padding-right: 20px;
    padding-left: 20px;
  }
  .kg-main .kg-container {
    padding-top: 28px;
    padding-bottom: 28px;
    gap: 20px;
  }
  .kg-main .kg-intro {
    gap: 20px;
    padding-top: 8px;
  }
  .kg-main .kg-proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    line-height: 22px;
  }
  .kg-main .kg-intro h1 {
    font-size: clamp(30px, 6.1vw, 44px);
    line-height: 1.3;
  }
  .kg-main .kg-promise {
    font-size: clamp(16px, 2.7vw, 21px);
    line-height: 1.6;
  }
  .kg-main .kg-news-lead {
    gap: 12px;
  }
  .kg-main .kg-news-lead h3 {
    font-size: 18px;
    line-height: 25px;
  }
  .kg-main .kg-news-list li > a {
    min-height: 64px;
    padding: 10px 0;
  }
  .kg-main .kg-solutions {
    gap: 12px;
  }
  .kg-main .kg-solution {
    min-height: 180px;
    padding: 18px;
  }
  .kg-main .kg-solution-title h2 {
    font-size: 20px;
    line-height: 27px;
  }
  .kg-main .kg-solution-subtitle {
    font-size: 14px;
    line-height: 21px;
  }
  .kg-main .kg-solution-description {
    font-size: 13px;
    line-height: 20px;
  }
  /* Source order is row-major: production, logistics, costs, then AI. */
  .kg-main .kg-features {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .kg-main .kg-feature {
    min-height: 0;
    padding: 20px 16px;
    gap: 16px;
  }
  .kg-main .kg-feature h2 {
    justify-content: center;
    font-size: 20px;
    line-height: 27px;
    text-align: center;
  }
  .kg-main .kg-feature-items {
    gap: 8px;
  }
  .kg-main .kg-feature-items li {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 20px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .kg-main .kg-contact {
    gap: 12px;
    padding: 16px;
    font-size: 18px;
    line-height: 25px;
  }
  .kg-main .kg-contact strong {
    font-size: 24px;
    line-height: 30px;
  }
  .kg-home .no-footer {
    padding: 56px 20px;
  }
}

@media (max-width: 400px) {
  .kg-main {
    padding-right: 16px;
    padding-left: 16px;
  }
  .kg-main .kg-news-heading {
    gap: 8px;
  }
  .kg-main .kg-news-heading h2 {
    font-size: 21px;
    line-height: 28px;
  }
  .kg-main .kg-news-more {
    gap: 4px;
    font-size: 12px;
  }
  .kg-main .kg-news-intro {
    font-size: 12px;
  }
  .kg-main .kg-news-photo {
    width: 88px;
    height: 68px;
    flex-basis: 88px;
  }
  .kg-main .kg-news-lead h3 {
    font-size: 16px;
    line-height: 23px;
  }
  .kg-main .kg-news-list h3 {
    font-size: 15px;
    line-height: 22px;
  }
  .kg-main .kg-solutions {
    gap: 10px;
  }
  .kg-main .kg-solution {
    padding: 14px;
  }
  .kg-main .kg-solution-title {
    align-items: flex-start;
    gap: 4px;
  }
  .kg-main .kg-solution-title h2 {
    font-size: 17px;
    line-height: 24px;
  }
  .kg-main .kg-solution-title .kg-icon {
    margin-top: 2px;
  }
  .kg-main .kg-solution-subtitle {
    font-size: 13px;
    line-height: 20px;
  }
  .kg-main .kg-solution-description {
    font-size: 12px;
    line-height: 19px;
  }
  .kg-main .kg-contact {
    gap: 8px;
    padding: 14px 10px;
    font-size: 16px;
  }
  .kg-main .kg-contact strong {
    font-size: 21px;
  }
}

/* One subtle entrance per page load; no scroll observers or extra dependencies. */
@keyframes kg-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .kg-main .kg-intro,
  .kg-main .kg-news,
  .kg-main .kg-solutions,
  .kg-main .kg-features,
  .kg-main .kg-contact {
    animation: kg-enter 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .kg-main .kg-news {
    animation-delay: 60ms;
  }
  .kg-main .kg-solutions {
    animation-delay: 120ms;
  }
  .kg-main .kg-features {
    animation-delay: 180ms;
  }
  .kg-main .kg-contact {
    animation-delay: 240ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kg-main a,
  .kg-main a *,
  .kg-home .no-header {
    transition: none !important;
  }
  .kg-main .kg-solution:hover,
  .kg-main .kg-news a:hover > .kg-icon {
    transform: none;
  }
}
