/* Style B: image-first editorial layout inspired by the reference site's spacing system. */

body.home {
  --apt-black: #13130a;
  --apt-paper: #fff;
  --apt-line: #deded9;
  --apt-gutter: 20px;
  overflow-x: hidden;
}

body.home .hwajin-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  border: 0;
  background: transparent;
  color: var(--apt-black);
  backdrop-filter: none;
  transition: color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

body.home .hwajin-header a,
body.home .hwajin-header .wp-block-navigation__responsive-container-open {
  color: inherit;
}

body.home .hwajin-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  color: var(--apt-black);
  backdrop-filter: blur(14px);
}

.apt-home {
  color: var(--apt-black);
}

.apt-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100svh;
  background: #d8d8d4;
  overflow: hidden;
}

.apt-hero figure,
.apt-hero img {
  width: 100%;
  height: 100%;
  margin: 0;
}

.apt-hero img {
  display: block;
  object-fit: cover;
  object-position: center center;
  transform: none;
}

.apt-hero__index {
  position: absolute;
  right: var(--apt-gutter);
  bottom: 22px;
  color: var(--apt-black);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.apt-section {
  padding-block: 100px;
}

.apt-inner {
  width: calc(100% - (var(--apt-gutter) * 2));
  max-width: 1360px;
  margin-inline: auto;
}

.apt-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 46px;
}

.apt-intro__media {
  width: 54%;
  min-width: 193px;
  aspect-ratio: 193 / 264;
  margin: 0;
  background: #ececea;
  overflow: hidden;
}

.apt-intro__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.apt-intro__copy {
  max-width: 560px;
}

.apt-kicker {
  margin: 0 0 18px;
  color: var(--hwajin-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.apt-display,
.apt-section-title {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.5;
  text-wrap: balance;
}

.apt-display {
  font-size: 2rem;
}

.apt-section-title {
  font-size: 1.5rem;
}

.apt-lead {
  max-width: 420px;
  margin: 18px 0 0;
  color: #55554f;
  font-size: 0.9rem;
  line-height: 1.75;
}

.apt-button {
  min-width: 155px;
  min-height: 50px;
  margin-top: 34px;
  padding: 0 22px;
  border: 1px solid var(--apt-black);
  border-radius: 0;
  background: var(--apt-black);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: 180ms ease;
}

.apt-button:hover,
.apt-button:focus-visible {
  background: var(--hwajin-red);
  border-color: var(--hwajin-red);
  color: #fff;
}

.apt-heading-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 42px;
}

.apt-heading-row .apt-button {
  margin-top: 0;
}

.apt-process-track {
  display: flex;
  gap: 14px;
  margin-right: calc(var(--apt-gutter) * -1);
  padding-right: var(--apt-gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.apt-process-track::-webkit-scrollbar,
.apt-home .hwajin-project-grid::-webkit-scrollbar {
  display: none;
}

.apt-process-card {
  flex: 0 0 78vw;
  scroll-snap-align: start;
}

.apt-process-card figure {
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  background: #ececea;
}

.apt-process-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
}

.apt-process-card:hover img {
  transform: scale(1.025);
}

.apt-process-card__meta {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  padding-top: 18px;
}

.apt-process-card__number {
  color: var(--hwajin-red);
  font-size: 0.72rem;
  font-weight: 800;
}

.apt-process-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.apt-process-card p {
  grid-column: 2;
  margin: 8px 0 0;
  color: #696963;
  font-size: 0.82rem;
  line-height: 1.65;
}

.apt-projects {
  background: #f5f5f2;
}

.apt-home .hwajin-project-tabs {
  margin-bottom: 26px;
}

.apt-home .hwajin-project-tab {
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  padding-inline: 0;
  margin-right: 24px;
  background: transparent;
  color: #777770;
}

.apt-home .hwajin-project-tab.is-active,
.apt-home .hwajin-project-tab:hover,
.apt-home .hwajin-project-tab:focus-visible {
  border-bottom-color: var(--apt-black);
  background: transparent;
  color: var(--apt-black);
}

.apt-home .hwajin-project-grid {
  display: flex;
  gap: 14px;
  margin-right: calc(var(--apt-gutter) * -1);
  padding-right: var(--apt-gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.apt-home .hwajin-project-card {
  flex: 0 0 82vw;
  scroll-snap-align: start;
}

.apt-home .hwajin-project-card__image {
  border-radius: 0;
  aspect-ratio: 1 / 1.08;
}

.apt-home .hwajin-project-card__body {
  padding-top: 18px;
}

.apt-home .hwajin-project-card__category {
  margin-bottom: 6px;
  color: #777770;
  font-size: 0.7rem;
}

.apt-home .hwajin-project-card h3 {
  font-size: 1.02rem;
}

.apt-strengths {
  counter-reset: strength;
  border-top: 1px solid var(--apt-black);
}

.apt-strength {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 26px 0 32px;
  border-bottom: 1px solid var(--apt-line);
}

.apt-strength__number {
  color: var(--hwajin-red);
  font-size: 0.75rem;
  font-weight: 800;
}

.apt-strength h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.apt-strength p {
  grid-column: 2;
  max-width: 570px;
  margin: 10px 0 0;
  color: #696963;
  line-height: 1.75;
}

.apt-steps {
  background: var(--apt-black);
  color: #fff;
}

.apt-step-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.apt-step {
  min-height: 180px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.apt-step__number {
  margin-bottom: 42px;
  color: var(--hwajin-red);
  font-size: 0.75rem;
  font-weight: 800;
}

.apt-step h3 {
  margin: 0;
  font-size: 1.15rem;
}

.apt-step p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

.apt-home .wp-block-rank-math-faq-block {
  margin-top: 42px;
}

.apt-home .rank-math-faq-item {
  padding-block: 22px;
}

.apt-contact {
  display: grid;
  gap: 36px;
}

.apt-contact__info {
  padding-top: 22px;
  border-top: 1px solid var(--apt-black);
}

.apt-contact__phone {
  margin: 6px 0 0;
  font-size: clamp(2rem, 10vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
}

.apt-contact__phone a {
  color: inherit;
  text-decoration: none;
}

.apt-contact__details {
  margin-top: 28px;
  color: #64645e;
  font-size: 0.86rem;
  line-height: 1.8;
}

.apt-home .hwajin-floating {
  right: 18px;
  bottom: 18px;
  gap: 7px;
}

.apt-home .hwajin-floating a {
  width: 54px;
  min-height: 54px;
  padding: 0 7px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.15;
}

.apt-home .hwajin-floating__contact {
  background: #fee98f;
}

.apt-home .hwajin-floating__phone {
  background: var(--apt-black);
}

.apt-hero-slider,
.apt-hero-slider__track,
.apt-hero-slider__slide,
.apt-hero-slider__slide img {
  width: 100%;
  height: 100%;
}

.apt-hero-slider {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.apt-hero-slider__track {
  display: flex;
  transition: transform 650ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.apt-hero-slider__slide {
  flex: 0 0 100%;
  min-width: 100%;
  margin: 0;
  overflow: hidden;
}

.apt-hero-slider__slide img {
  display: block;
  object-fit: cover;
  object-position: center center;
  transform: none;
}

.apt-slider-arrow,
.hwajin-project-arrow {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--apt-black);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.apt-slider-arrow:hover,
.apt-slider-arrow:focus-visible,
.hwajin-project-arrow:hover,
.hwajin-project-arrow:focus-visible {
  background: var(--apt-black);
  color: #fff;
}

.apt-slider-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
}

.apt-slider-arrow--prev {
  left: 18px;
}

.apt-slider-arrow--next {
  right: 18px;
}

.apt-hero-slider__status {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 24px;
  min-width: 92px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(19, 19, 10, 0.42);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  font-weight: 700;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.apt-hero-slider__line {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
}

.apt-slider-dots {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 26px;
  display: flex;
  gap: 6px;
}

.apt-slider-dots button {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(19, 19, 10, 0.35);
  cursor: pointer;
}

.apt-slider-dots button.is-active {
  width: 18px;
  border-radius: 999px;
  background: var(--apt-black);
}

.hwajin-project-carousel {
  position: relative;
}

.hwajin-project-arrow {
  position: absolute;
  z-index: 5;
  top: 37%;
  background: rgba(19, 19, 10, 0.12);
}

.hwajin-project-arrow--prev {
  left: 10px;
}

.hwajin-project-arrow--next {
  right: 10px;
}

.hwajin-project-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.hwajin-project-progress {
  position: relative;
  height: 2px;
  margin-top: 38px;
  background: #d6d6d0;
  overflow: hidden;
}

.hwajin-project-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 25%;
  background: var(--apt-black);
  transform-origin: left center;
  transition: transform 180ms ease, width 180ms ease;
}

.apt-footer {
  padding: 70px 0 34px;
  background: #000;
  color: #fff;
}

.apt-footer__inner {
  width: calc(100% - 40px);
  max-width: 1560px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
}

.apt-footer__mark {
  width: 88px;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 7rem;
  font-weight: 300;
  letter-spacing: -0.14em;
  line-height: 0.7;
}

.apt-footer__mark span {
  width: 72px;
  height: 12px;
  margin-top: 22px;
  background: var(--hwajin-red);
  display: block;
}

.apt-footer__column h2 {
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
}

.apt-footer__rule {
  height: 1px;
  margin: 20px 0 18px;
  background: rgba(255, 255, 255, 0.2);
}

.apt-footer__column a,
.apt-footer__column p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none;
}

.apt-footer__column span {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.apt-footer__legal {
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.76rem;
  line-height: 1.75;
}

.apt-footer__legal p {
  margin: 0 0 24px;
}

.apt-footer__legal strong,
.apt-footer__legal span {
  margin-right: 14px;
  color: #fff;
}

@media (min-width: 760px) {
  body.home {
    --apt-gutter: 40px;
  }

  .apt-hero {
    height: 100vh;
    height: 100svh;
  }

  .apt-section {
    padding-block: 150px;
  }

  .apt-intro {
    grid-template-columns: minmax(360px, 510px) minmax(430px, 1fr);
    gap: clamp(80px, 9vw, 160px);
    align-items: center;
    max-width: 992px;
    margin-inline: auto;
  }

  .apt-intro__media {
    width: 100%;
    aspect-ratio: 510 / 700;
  }

  .apt-display,
  .apt-section-title {
    font-size: 2.875rem;
    line-height: 1.48;
  }

  .apt-lead {
    font-size: 1rem;
  }

  .apt-button {
    min-width: 189px;
    min-height: 70px;
    font-size: 1rem;
  }

  .apt-heading-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 54px;
  }

  .apt-process-track {
    gap: 22px;
  }

  .apt-process-card {
    flex-basis: min(30vw, 413px);
  }

  .apt-home .hwajin-project-grid {
    gap: 50px;
  }

  .apt-home .hwajin-project-card {
    flex-basis: 413px;
  }

  .apt-strength {
    grid-template-columns: 90px minmax(280px, 0.8fr) 1fr;
    align-items: start;
    padding-block: 34px 42px;
  }

  .apt-strength p {
    grid-column: 3;
    margin-top: 0;
  }

  .apt-step-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .apt-step {
    min-height: 260px;
    padding: 34px 26px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }

  .apt-step:last-child {
    border-right: 0;
  }

  .apt-contact {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .apt-home .hwajin-floating {
    right: 38px;
    bottom: 28px;
  }

  .apt-home .hwajin-floating a {
    width: 58px;
    min-height: 58px;
    font-size: 0.72rem;
  }

  body.home .hwajin-header__inner {
    justify-content: flex-start !important;
  }

  body.home .hwajin-header .wp-block-navigation {
    margin-left: clamp(32px, 4vw, 68px);
  }

  .apt-slider-arrow,
  .hwajin-project-arrow {
    width: 46px;
    height: 46px;
  }

  .apt-slider-arrow--prev {
    left: 42px;
  }

  .apt-slider-arrow--next {
    right: 42px;
  }

  .hwajin-project-arrow {
    top: 35%;
  }

  .hwajin-project-arrow--prev {
    left: 16px;
  }

  .hwajin-project-arrow--next {
    right: 16px;
  }

  .apt-footer {
    min-height: 610px;
    padding: 92px 0 42px;
  }

  .apt-footer__inner {
    width: calc(100% - 120px);
    grid-template-columns: minmax(260px, 0.9fr) repeat(3, minmax(190px, 1fr));
    column-gap: clamp(54px, 6vw, 120px);
    row-gap: 104px;
  }

  .apt-footer__mark {
    font-size: 10.5rem;
  }

  .apt-footer__mark span {
    width: 104px;
    height: 15px;
  }

  .apt-footer__legal {
    grid-column: 2 / -1;
  }
}
