/* HAEBOZ 기업 홈 — Open · Accessible · Practical
 *
 * 색은 일곱 개뿐이다. 화면 대부분은 흰색과 오프화이트이고, 중요도는 색이 아니라
 * 글자 크기와 여백으로 가른다. 블루그레이는 심볼과 작은 표식에만 쓴다 — 흰 바탕에서
 * 대비가 3.4:1 이라 본문 글자색으로는 쓰지 않는다.
 *
 * 한 번 첫 화면을 차콜로, 버튼을 글자 링크로 바꿔 RAPOEN 홈과 갈라 보려 했다가
 * 되돌렸다. 밝고 열린 인상이 이 회사가 하려는 말과 맞고, 같은 회사의 두 홈이 닮은
 * 것은 흠이 아니다. 둘의 차이는 꾸밈이 아니라 내용에 둔다 — 여기는 회사의 생각과
 * 제품 목록, 그쪽은 기능과 체험. */

:root {
  --primary: #1f2328;
  --secondary: #3b4046;
  --accent: #6e90ac;
  --light-gray: #d8dde3;
  --border: #e5e7eb;
  --bg: #f7f7f4;
  --white: #ffffff;

  --gutter: 22px;
  --section: 80px;
  --header: 60px;
  /* 모듈의 모서리. 심볼의 둥근 사각형과 같은 비례(변의 1/4)를 큰 면에 옮긴 값이다. */
  --module: 22px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --section: 128px;
    --header: 72px;
    --module: 36px;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--secondary);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  /* 한글은 어절 단위로 끊는다. 기본값이면 조사만 다음 줄로 떨어진다. */
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 900px) {
  body {
    font-size: 17px;
  }
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

h1 {
  font-size: clamp(36px, 5.3vw, 64px);
  font-weight: 700;
  line-height: 1.18;
}

h2 {
  font-size: clamp(27px, 3.5vw, 42px);
  font-weight: 700;
}

h3 {
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.contact :focus-visible {
  outline-color: var(--white);
}

.container {
  width: 100%;
  max-width: calc(1200px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--white);
  font-size: 14px;
}

.skip:focus {
  top: 10px;
}

/* 영문 아이브로. 앞의 작은 사각형은 모듈 하나다. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
  background: var(--accent);
}

@media (min-width: 900px) {
  .eyebrow {
    margin-bottom: 24px;
    font-size: 13px;
  }
}

/* ── 버튼 ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding-inline: 20px;
  border: 1px solid var(--primary);
  border-radius: 9px;
  background: var(--primary);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
}

.btn--line {
  background: transparent;
  border-color: var(--light-gray);
  color: var(--primary);
}

.btn--line:hover {
  background: transparent;
  border-color: var(--primary);
}

.btn--light {
  background: var(--white);
  border-color: var(--white);
  color: var(--primary);
}

.btn--light:hover {
  background: var(--light-gray);
  border-color: var(--light-gray);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── 헤더 ─────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

/* 스크립트가 없으면 스크롤 여부를 알 수 없다. 그때는 선을 늘 보인다. */
html:not(.js) .header,
html.scrolled .header {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 워드마크. 별도 원본이 생기기 전까지는 글자로 둔다 — 심볼은 이것 없이도 선다. */
.wordmark {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.nav {
  display: none;
  align-items: center;
  gap: 36px;
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
}

.nav a:hover {
  color: var(--primary);
}

.nav .nav-contact {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-inline: 16px;
  border: 1px solid var(--light-gray);
  border-radius: 9px;
  color: var(--primary);
  font-weight: 600;
  transition: border-color 0.15s;
}

.nav .nav-contact:hover {
  border-color: var(--primary);
}

.menu summary {
  display: grid;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  cursor: pointer;
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--primary);
  transition: transform 0.2s var(--ease);
}

.menu[open] summary span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu[open] summary span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.menu nav {
  position: absolute;
  inset: var(--header) 0 auto 0;
  display: grid;
  padding: 8px var(--gutter) 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.menu nav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  font-size: 17px;
  font-weight: 600;
}

.menu nav a:last-child {
  border-bottom: 0;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .menu {
    display: none;
  }

  .wordmark {
    font-size: 21px;
  }
}

/* ── 01 Hero ──────────────────────────────────────────── */

.hero {
  padding-block: 48px 72px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 48px;
}

.hero-lead {
  margin-top: 22px;
  max-width: 30em;
  font-size: 16.5px;
}

.hero .actions {
  margin-top: 30px;
}

.hero-visual {
  width: min(78%, 320px);
  margin-inline: auto;
}

.hero-visual .module--back {
  fill: var(--accent);
}

.hero-visual .module--front {
  fill: var(--primary);
}

.hero-visual .slot {
  stroke: var(--light-gray);
  stroke-width: 1.5;
}

@media (min-width: 900px) {
  .hero {
    padding-block: 96px 136px;
  }

  .hero-inner {
    grid-template-columns: 55fr 45fr;
    align-items: center;
    gap: 40px;
  }

  .hero-lead {
    margin-top: 28px;
    font-size: 19px;
  }

  .hero .actions {
    margin-top: 40px;
  }

  .hero-visual {
    width: min(100%, 460px);
    margin-inline: auto 0;
  }
}

/* 좁은 화면에서는 설명의 줄바꿈을 화면에 맡긴다 — 세 줄 안에 든다. */
@media (max-width: 480px) {
  .hero-lead br {
    display: none;
  }
}

/* 첫 화면 연출은 한 번뿐이다. 글이 먼저 올라오고, 두 모듈이 맞물리고, 빈 자리가 나타난다. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: rise 0.4s var(--ease) both;
  }

  .hero-visual .module--back {
    animation: join-back 0.8s 0.15s var(--ease) both;
  }

  .hero-visual .module--front {
    animation: join-front 0.8s 0.15s var(--ease) both;
  }

  .hero-visual .slot {
    animation: appear 0.6s 0.85s ease-out both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes join-back {
  from {
    opacity: 0;
    transform: translate(-16px, 16px);
  }
}

@keyframes join-front {
  from {
    opacity: 0;
    transform: translate(16px, -16px);
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

/* ── 섹션 공통 ────────────────────────────────────────── */

.section {
  padding-block: var(--section);
}

.section--tint {
  background: var(--bg);
}

.section-head {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-lead {
  margin-top: 20px;
  max-width: 34em;
}

@media (min-width: 900px) {
  .section-head {
    margin-bottom: 72px;
  }

  .section-lead {
    margin-top: 24px;
    font-size: 18px;
  }
}

/* ── 02 About ─────────────────────────────────────────── */

.split {
  display: grid;
  gap: 36px;
}

.prose p + p {
  margin-top: 1em;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 5fr 6fr;
    gap: 80px;
  }

  .prose {
    font-size: 18px;
  }
}

/* ── 03 Products ──────────────────────────────────────────
 * 제품 하나가 모듈 하나다. 운영 중이면 채워진 면, 준비 중이면 선만 있는 빈 틀. */

.products {
  display: grid;
  gap: 20px;
}

.product {
  display: grid;
  gap: 24px;
  padding: 22px;
  border-radius: var(--module);
}

.product--live {
  background: var(--bg);
}

.product--upcoming {
  border: 1.5px solid var(--light-gray);
}

.product-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 14px;
}

.product-num {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.product--live h3 {
  font-size: clamp(32px, 4.6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.product--upcoming h3 {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
}

.reading {
  margin-left: 6px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.status {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  border: 1.5px solid var(--secondary);
}

.status--live {
  color: var(--primary);
}

.status--live::before {
  border-color: var(--accent);
  background: var(--accent);
}

.product-field {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-desc {
  margin-top: 10px;
  max-width: 32em;
}

.product-body .btn {
  margin-top: 24px;
}

.product-shot a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--module) - 10px);
  background: var(--white);
}

.product-shot img {
  width: 100%;
  transition: transform 0.5s var(--ease);
}

.product-shot a:hover img {
  transform: scale(1.02);
}

.product-shot figcaption {
  margin-top: 12px;
  font-size: 12.5px;
}

/* 휴대폰 화면은 세로로 길다. 위쪽 — 오늘 일정이 보이는 부분 — 만 내보인다. */
@media (max-width: 720px) {
  .product-shot img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top;
  }
}

@media (min-width: 900px) {
  .products {
    gap: 28px;
  }

  .product {
    gap: 40px;
    padding: 48px;
  }

  .product-head {
    grid-template-columns: auto 1fr auto;
    gap: 20px;
  }

  .product-num {
    font-size: 15px;
  }

  .status {
    grid-column: auto;
    font-size: 14px;
  }

  .product-body {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 8px 48px;
  }

  .product-body .product-field,
  .product-body .product-desc {
    grid-column: 1;
  }

  .product-body .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .product-shot figcaption {
    font-size: 13px;
  }
}

/* ── 04 Approach ──────────────────────────────────────── */

.principles {
  display: grid;
}

.principles li {
  padding: 28px 0;
  border-top: 1px solid var(--light-gray);
}

.principles li:first-child {
  padding-top: 0;
  border-top: 0;
}

.principle-mark {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.num {
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* 모듈이 하나, 둘, 셋으로 이어진다. 마지막에 붙은 것만 채운다. */
.glyph {
  width: 46px;
  height: 46px;
  overflow: visible;
}

.glyph rect {
  fill: var(--bg);
  stroke: var(--primary);
  stroke-width: 1.5;
}

.glyph rect:last-child {
  fill: var(--primary);
}

.principles p {
  margin-top: 10px;
}

@media (min-width: 900px) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
  }

  .principles li,
  .principles li:first-child {
    padding: 0;
    border-top: 0;
  }

  .principle-mark {
    margin-bottom: 64px;
  }

  .glyph {
    width: 64px;
    height: 64px;
  }

  .principles p {
    margin-top: 14px;
  }
}

/* ── 05 Contact ───────────────────────────────────────── */

.contact {
  padding-block: var(--section);
  background: var(--primary);
  color: var(--light-gray);
}

.contact h2 {
  color: var(--white);
}

.contact .eyebrow {
  color: var(--light-gray);
}

.contact-inner {
  display: grid;
  gap: 28px;
}

.contact-side p {
  max-width: 26em;
}

.contact-side .btn {
  margin-top: 28px;
}

.contact-mail {
  display: block;
  margin-top: 16px;
  font-size: 14px;
}

.contact-mail a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 900px) {
  .contact-inner {
    grid-template-columns: 6fr 5fr;
    gap: 80px;
    align-items: end;
  }

  .contact-side p {
    font-size: 18px;
  }
}

/* ── Footer ───────────────────────────────────────────── */

.footer {
  padding-block: 56px 40px;
  font-size: 14px;
}

.footer-top {
  display: grid;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.footer .wordmark {
  font-size: 18px;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 24px;
}

.footer-nav h2 {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.footer-nav a,
.footer-nav span {
  display: block;
  padding: 4px 0;
}

.footer-nav a:hover,
.biz a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-note {
  margin-top: 28px;
  color: var(--primary);
}

.biz {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin-top: 12px;
  font-size: 13px;
}

.copyright {
  margin-top: 20px;
  font-size: 13px;
}

@media (min-width: 900px) {
  .footer {
    padding-block: 72px 48px;
  }

  .footer-top {
    grid-template-columns: 1fr auto;
    align-items: start;
    padding-bottom: 48px;
  }

  .footer-nav {
    grid-template-columns: repeat(3, auto);
    gap: 72px;
  }
}

/* ── 모듈이 맞물리는 연출 ─────────────────────────────────
 * 세 원칙이 화면에 들어오면 그림의 모듈이 제자리로 와서 붙는다. 글은 움직이지 않는다.
 * 스크립트가 켜졌을 때만 떼어 놓는다 (html.js) — 꺼져 있으면 처음부터 붙어 있다. */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal .glyph rect:not(:first-child) {
    opacity: 0;
    transform: translate(-7px, 7px);
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  }

  html.js .reveal.in .glyph rect:not(:first-child) {
    opacity: 1;
    transform: none;
  }

  html.js .reveal .glyph rect:nth-child(2) {
    transition-delay: 0.15s;
  }

  html.js .reveal .glyph rect:nth-child(3) {
    transition-delay: 0.3s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ── 개인정보처리방침 ─────────────────────────────────────
 * 꾸미지 않는다 — 읽으라고 있는 페이지다. */

.doc-back {
  font-size: 15px;
  font-weight: 500;
}

.doc-back:hover {
  color: var(--primary);
}

.doc {
  max-width: calc(760px + var(--gutter) * 2);
  padding-block: 56px 96px;
  font-size: 16px;
}

.doc h1 {
  font-size: clamp(28px, 3.4vw, 38px);
}

.doc-meta {
  margin-top: 12px;
  font-size: 14px;
}

.doc-lead {
  margin-top: 40px;
}

.doc h2 {
  margin: 48px 0 14px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.doc p + p,
.doc ul + p,
.doc .doc-table + p,
.doc .doc-list + p {
  margin-top: 12px;
}

.doc a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc .logo,
.doc-back {
  text-decoration: none;
}

.doc ul {
  margin-top: 10px;
  padding-left: 1.2em;
  list-style: disc;
}

.doc li + li {
  margin-top: 4px;
}

/* 표는 좁은 화면에서 표 안에서만 옆으로 민다. 페이지가 밀리면 안 된다. */
.doc-table {
  margin-top: 14px;
  overflow-x: auto;
}

.doc table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

.doc th,
.doc td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc th {
  border-bottom-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.doc td:first-child {
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
}

.doc-list {
  margin: 14px 0 0;
  border-top: 1px solid var(--border);
}

.doc-list div {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.doc-list dt {
  color: var(--primary);
  font-weight: 500;
}

.doc-list dd {
  margin: 0;
}

@media (min-width: 720px) {
  .doc-list div {
    grid-template-columns: 180px 1fr;
    gap: 24px;
  }
}
