/* PhysioCode — 회사 사이트. 모바일 기준으로 쓰고 넓은 화면에서 덧붙인다.
   이 파일을 고친 뒤에는 `node scripts/build.mjs` — HTML 의 ?v= 해시가 바뀌어야 캐시가 풀린다. */

:root {
  --white: #ffffff;
  --mist: #f5f8ff;
  --line: #e3e9f5;
  --navy: #0a1330;
  --ink: #0a1330;
  --body: #3d4763;
  --muted: #5d6885;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --sky: #38bdf8;
  --on-navy: #f3f6ff;
  --on-navy-muted: #a8b4d6;
  /* 글자 크기는 이 네 가지뿐이다. 다른 곳에 font-size 를 쓰지 말 것. */
  --fs-xl: clamp(2rem, calc(1.35rem + 2.667vw), 3.75rem); /* 히어로·비전 헤드라인 */
  --fs-lg: clamp(1.5rem, calc(1.21875rem + 1.14vw), 2.25rem); /* 섹션 헤드라인 */
  --fs-md: 1rem; /* 본문·버튼·내비 — 사용자의 글자 크기 설정을 따른다 */
  --fs-sm: 0.875rem; /* 라벨·푸터·고지 */
  --gutter: clamp(16px, 5vw, 20px);
  --header: 3.75rem;
  --wrap: 1160px;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--sans);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  color: var(--ink);
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 20;
  background: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
  max-width: calc(100% - 32px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--blue);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-deep), var(--sky));
}

/* ── 타입 스케일 — 크기는 네 가지(--fs-xl · lg · md · sm) ─────────────── */

body,
.pillars h3 {
  font-size: var(--fs-md);
}
.hero h1,
.vision h2 {
  font-size: var(--fs-xl);
}
.statement,
.product-copy h2,
.notfound h1 {
  font-size: var(--fs-lg);
}
.eyebrow,
.pill,
.pill b,
.nav .lang,
.nav .cta,
.pillars .k,
.product-visual figcaption,
.fine,
.site-footer,
.footer-links h3 {
  font-size: var(--fs-sm);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid rgba(10, 19, 48, 0.06);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  flex-wrap: wrap;
  min-height: var(--header);
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-width: 44px;
  min-height: 44px;
}
.brand .symbol {
  width: 30px;
  height: 30px;
}
.brand .wordmark {
  height: 18px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  font-weight: 500;
  white-space: nowrap;
  max-width: 100%;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--body);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav .link {
  display: none; /* 좁은 화면에서는 언어 전환과 CTA 만 */
}
.nav .lang {
  min-width: 44px;
  justify-content: center;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.nav .cta {
  margin-left: 4px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 3.375rem;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn .arrow {
  flex: none;
  transition: transform 0.18s ease;
}
.btn > span:not(.arrow) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue) 55%, #3b82f6);
  color: var(--white);
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.65);
}
.btn-light {
  background: var(--white);
  color: var(--navy);
}
.btn:active {
  transform: scale(0.98);
}

/* ── 히어로 ───────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 60% at 100% 0%, #eef4ff 0%, rgba(238, 244, 255, 0) 60%), var(--white);
}
.hero-copy {
  padding-top: 44px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 20px -12px rgba(10, 19, 48, 0.35);
  color: var(--ink);
  font-weight: 500;
  white-space: normal;
}
.pill-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pill b {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pill .arrow {
  flex: none;
  color: var(--muted);
}
.hero h1 {
  margin-top: 24px;
  letter-spacing: -0.05em;
  line-height: 1.04;
}
.hero h1 span {
  display: block;
  padding-bottom: 0.08em; /* 그라데이션 클립이 한글 받침 아래를 자르지 않게 */
  background: linear-gradient(100deg, var(--blue-deep) 10%, var(--blue) 45%, var(--sky) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin-top: 18px;
  max-width: 24em;
  line-height: 1.55;
}
/* 좁은 화면: 아트를 글 아래에 따로 깐다 — 글자·버튼과 겹치지 않는다. */
.hero-art {
  width: 100%;
  aspect-ratio: 5 / 4;
  margin-top: 8px;
  object-fit: cover;
  object-position: 74% 50%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 80%, transparent 100%);
}

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

section {
  padding: 72px 0;
  scroll-margin-top: calc(var(--header) + 1px);
}

/* ── 회사 ─────────────────────────────────────────────────────────── */

#company {
  padding-top: 40px;
}
.statement {
  margin-top: 22px;
  letter-spacing: -0.04em;
  line-height: 1.18;
}
.statement em {
  font-style: normal;
  color: #8792b0;
}

.pillars {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  gap: 12px;
}
.pillars li {
  position: relative;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--mist), var(--white));
  box-shadow: inset 0 0 0 1px var(--line);
}
.pillars .k {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  flex-wrap: wrap;
  gap: 8px;
}
.pillars .k i {
  font-style: normal;
  letter-spacing: 0.04em;
  color: #a4aecb;
  font-variant-numeric: tabular-nums;
}
.pillars h3 {
  margin: 18px 0 6px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.pillars p {
  color: var(--muted);
}

/* ── 제품 ─────────────────────────────────────────────────────────── */

.product-section {
  background: var(--mist);
}
.product {
  margin-top: 24px;
  display: grid;
  background: var(--navy);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(10, 19, 48, 0.55);
}
.product-visual {
  order: -1;
  min-width: 0;
  margin: 0;
  display: grid;
  align-content: center;
}
.product-art {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}
.product-art,
.vision-art {
  /* 생성 이미지의 배경 가장자리만 녹이고 얼굴·전신의 실루엣은 보존한다. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(180deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(180deg, transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect;
}
.product-visual figcaption {
  padding: 0 20px 24px;
  color: var(--on-navy-muted);
  text-align: center;
  text-wrap: balance;
}
.product-copy {
  padding: 4px 24px 28px;
  color: var(--on-navy-muted);
}
.product-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--on-navy);
}
.product-name img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #fff;
}
.product-copy h2 {
  margin-top: 20px;
  color: var(--white);
  line-height: 1.15;
}
.product-copy p {
  margin-top: 14px;
}
.product-copy .btn {
  margin-top: 26px;
  width: 100%;
}
.fine {
  margin-top: 18px;
  line-height: 1.6;
  color: var(--muted);
}

/* ── 비전 밴드 ─────────────────────────────────────────────────────── */

.vision {
  background: var(--navy);
  color: var(--on-navy-muted);
  padding: 40px 0 64px;
}
.vision-layout {
  display: grid;
  align-items: center;
  gap: 24px;
}
.vision-visual {
  order: -1;
  margin: 0;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
}
.vision-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 왼쪽 여백만 덜어내는 정사각 크롭: 머리·손·발은 모두 보존한다. */
  object-position: 100% 50%;
}
.vision .eyebrow {
  color: var(--sky);
}
.vision h2 {
  margin-top: 20px;
  color: var(--white);
  letter-spacing: -0.045em;
}
.vision p {
  margin-top: 16px;
  max-width: 24em;
}

/* ── 푸터 ─────────────────────────────────────────────────────────── */

.site-footer {
  padding: 48px 0 calc(36px + env(safe-area-inset-bottom));
  color: var(--muted);
}
.footer-top {
  display: grid;
  gap: 28px;
  padding-bottom: 28px;
}
.footer-brand p {
  margin-top: 12px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
}
.footer-links h3 {
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer-links a {
  display: block;
  min-height: 44px;
  padding: 10px 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.legal {
  line-height: 1.9;
}
.legal span {
  display: inline-block; /* 항목 중간에서 줄이 끊기지 않게 */
  margin-right: 14px;
  max-width: 100%;
}
.legal a {
  color: inherit;
  white-space: nowrap;
}
.legal {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ── 404 ──────────────────────────────────────────────────────────── */

.notfound {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
}
.notfound .symbol {
  width: 56px;
  margin: 0 auto 24px;
}
.notfound p {
  margin: 14px 0 32px;
  color: var(--muted);
}

/* ── 480px 이상: 버튼을 가로로 ─────────────────────────────────────── */

@media (max-width: 359px) {
  .brand { gap: 4px; }
  .brand .symbol { width: 26px; height: 26px; }
  .brand .wordmark { height: 16px; }
  .nav .cta { margin-left: 0; padding: 0 12px; }
}

/* 짧은 가로 화면에서는 장식 이미지가 여러 화면을 차지하지 않게 한다. */
@media (max-width: 1023px) and (max-height: 500px) and (orientation: landscape) {
  .hero-copy { padding-top: 28px; }
  .hero-art {
    height: clamp(140px, 45svh, 220px);
    aspect-ratio: auto;
  }
}

@media (min-width: 480px) {
  .product-copy .btn {
    width: auto;
    padding: 0 26px;
  }
  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── 태블릿 이상 ───────────────────────────────────────────────────── */

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --header: 4.25rem;
  }
  .brand {
    gap: 8px;
  }
  .brand .symbol {
    width: 34px;
    height: 34px;
  }
  .brand .wordmark {
    height: 21px;
  }
  .nav .link {
    display: inline-flex;
  }
  .nav .cta {
    margin-left: 8px;
    padding: 0 18px;
  }

  section {
    padding: 112px 0;
  }
  #company {
    padding-top: 112px;
  }
  .statement {
    max-width: 17em;
    line-height: 1.14;
  }
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 64px;
  }
  .pillars li {
    padding: 30px;
  }
  .pillars h3 {
    margin-top: 44px;
  }

  .hero-copy {
    padding-top: 72px;
  }
  .hero-art {
    aspect-ratio: 16 / 9;
  }

  .product {
    margin-top: 36px;
    border-radius: 32px;
  }
  .product-copy {
    padding: 8px 44px 48px;
  }
  .product-copy p {
    max-width: 26em;
  }
  .product-art {
    aspect-ratio: 2 / 1;
    object-fit: contain;
  }

  .vision {
    padding: 64px 0;
  }
  .vision-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 24px;
  }
  .vision-visual {
    order: 0;
  }


  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    padding-bottom: 40px;
  }
}

/* ── 데스크톱: 히어로·제품을 좌우로 ─────────────────────────────────── */

@media (min-width: 1024px) {
  .hero {
    background: var(--white);
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: min(820px, calc(100vh - var(--header)));
    padding-top: 96px;
    padding-bottom: 120px;
  }
  .hero h1 {
    max-width: 11em;
    line-height: 1.02;
  }
  .lede {
    margin-top: 26px;
  }
  .hero-art {
    position: absolute;
    inset: 0;
    z-index: -1;
    height: 100%;
    margin: 0;
    aspect-ratio: auto;
    object-position: 78% 50%;
    -webkit-mask-image: none;
    mask-image: none;
  }
  /* 글자 자리를 흰색으로 지켜 준다 — 아트의 리본이 왼쪽까지 번지는 화면 폭이 있다. */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.92) 34%, rgba(255, 255, 255, 0) 62%),
      linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0) 16%);
  }

  section {
    padding: 136px 0;
  }
  #company {
    padding-top: 136px;
  }

  .product {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
  .product-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 64px 56px;
  }
  .product-copy h2 {
    line-height: 1.12;
  }
  .product-visual {
    order: 0;
    padding: 24px 12px 12px 0;
    min-height: 480px;
  }
  .product-art {
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
  .vision h2 {
    max-width: 13em;
  }

}

/* ── 마우스가 있는 기기에서만 hover ─────────────────────────────────── */

@media (hover: hover) {
  .nav a:hover {
    color: var(--ink);
    background: var(--mist);
  }
  .nav .cta:hover {
    background: var(--blue-deep);
    color: var(--white);
  }
  .btn:hover {
    transform: translateY(-1px);
  }
  .btn:hover .arrow {
    transform: translateX(3px);
  }
  .btn-primary:hover {
    box-shadow: 0 14px 36px -10px rgba(37, 99, 235, 0.8);
  }
  .footer-links a:hover,
  .legal a:hover {
    color: var(--ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .btn .arrow,
  .nav a {
    transition: none;
  }
}
