/* 지씨웍스 회사 사이트 */

:root {
  --cobalt: #2238d8;
  --cobalt-deep: #1a2bb0;
  --ink: #0f1a3c;
  --paper: #f5f7fb;
  --white: #ffffff;
  --rule: #d5dbe8;
  --slate: #566081;
  --sun: #ffd23f;
  --on-cobalt-soft: #dde3ff;

  --font: "Wanted Sans Variable", "Wanted Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --base-weight: 560;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --focus: var(--cobalt);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-weight: 760;
  letter-spacing: -0.02em;
}

p,
ul,
ol,
dl {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* 헤더 */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem;
}

.brand {
  font-size: 1.125rem;
  font-weight: 820;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 560;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

.page-sub .site-header {
  border-bottom: 1px solid var(--rule);
}

/* 히어로 */

.hero {
  --focus: var(--sun);
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--cobalt);
  color: var(--white);
}

.hero main {
  display: flex;
  flex: 1;
}

.hero-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: clamp(3rem, 10vh, 8rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.hero-title {
  font-size: clamp(2.375rem, 6.6vw, 6.5rem);
  font-weight: var(--base-weight);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-line {
  display: block;
  width: fit-content;
  text-decoration: none;
  text-wrap: balance;
}

.hero-line:hover {
  text-decoration: none;
}

.word {
  white-space: nowrap;
}

.ch {
  display: inline-block;
}

/* 처음 열 때 굵기가 왼쪽 위에서부터 물결처럼 지나간다 */
@keyframes weight-wave {
  0% {
    font-weight: 300;
    opacity: 0;
    transform: translateY(0.12em);
  }
  35% {
    opacity: 1;
    transform: none;
  }
  45% {
    font-weight: 1000;
  }
  100% {
    font-weight: var(--base-weight);
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .is-waving .ch {
    animation: weight-wave 1.5s var(--ease-out) backwards;
    animation-delay: calc(120ms + var(--i) * 26ms);
  }

  .is-interactive .ch {
    transition: font-weight 0.45s var(--ease-out);
  }
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
}

.hero-lede {
  max-width: 34rem;
  color: var(--on-cobalt-soft);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

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

.button-light:hover {
  background: var(--sun);
  color: var(--ink);
}

.link-light {
  font-weight: 600;
}

/* 섹션 공통 */

.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.section-intro {
  max-width: 36rem;
  color: var(--slate);
}

/* 하는 일 */

.service {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem 2rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1.5rem;
}

.section-title + .service {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.service-name {
  grid-column: 1 / span 5;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  letter-spacing: -0.035em;
  transition: color 0.3s var(--ease-out);
}

.service:target .service-name {
  color: var(--cobalt);
}

.service-desc {
  grid-column: 6 / span 4;
  max-width: 32rem;
}

.service-list {
  grid-column: 10 / span 3;
  padding: 0;
  list-style: none;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.service-list li + li {
  margin-top: 0.4rem;
}

/* 프로젝트 유형 */

.section-projects {
  background: var(--white);
}

.kinds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.kinds div {
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--rule);
}

.kinds dt {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 720;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.kinds dd {
  margin: 0;
  max-width: 26rem;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* 진행 순서 */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 1.25rem;
  color: var(--cobalt);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.steps p {
  color: var(--slate);
  font-size: 0.9375rem;
}

/* 문의 */

.contact {
  --focus: var(--sun);
  padding-block: clamp(4.5rem, 10vw, 8rem);
  background: var(--cobalt);
  color: var(--white);
}

.contact-intro {
  color: var(--on-cobalt-soft);
}

.contact-mail {
  display: inline-block;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-size: clamp(1.75rem, 6.4vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

.contact-mail:hover {
  color: var(--sun);
}

/* 문서 페이지 */

.doc {
  max-width: 48rem;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.doc-title {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.doc-lede {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.doc-meta {
  color: var(--slate);
  font-size: 0.9375rem;
  margin-bottom: 2.5rem;
}

.doc h2 {
  font-size: 1.375rem;
  margin: 2.75rem 0 0.75rem;
}

.doc h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.25rem;
}

.doc p + p {
  margin-top: 0.75rem;
}

.doc-mail {
  font-size: 1.25rem;
  font-weight: 700;
}

.doc-alt {
  margin-top: 3.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}

/* 푸터 */

.site-footer {
  --focus: var(--sun);
  padding-block: 1.75rem;
  background: var(--ink);
  color: #aeb6cf;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.footer-brand {
  color: var(--white);
  font-weight: 700;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0;
  list-style: none;
}

/* 반응형 */

@media (max-width: 60rem) {
  .service-name {
    grid-column: 1 / -1;
  }

  .service-desc {
    grid-column: 1 / span 7;
  }

  .service-list {
    grid-column: 8 / span 5;
  }

  .kinds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 3rem;
  }
}

@media (max-width: 40rem) {
  .hero {
    min-height: auto;
  }

  .hero-body {
    padding-top: 5rem;
  }

  .service-desc,
  .service-list {
    grid-column: 1 / -1;
  }

  .kinds,
  .steps {
    grid-template-columns: 1fr;
  }

  .footer-info {
    flex-direction: column;
  }
}
