/* 첫 화면은 숯색 판 위의 로고 심볼(아래 꺾쇠가 스크롤 안내), 그 뒤는 Anthropic 회사 페이지처럼 글로 회사를 설명한다.
   순서: 첫 화면 → 사명(종이 위에 써지는 문장) → 우리의 목적 → 만든 것(FableX 영상) → 지키는 것 → 함께하기.
   제목은 고딕(Pretendard), 설명 글은 명조(Noto Serif KR). 색은 아로스튜디오 로고의 숯색과 산호색 둘. */
:root {
  --paper: #ffffff;
  --ink: #202020;
  --body: #4f5258;
  --muted: #8e9299;
  --line: #e6e5e1;
  --panel: #f4f4f2;
  --faint-ink: #dcd9d3;
  --coral: #c4684a;
  --coral-text: #ad5639;
  --btn: #202020;
  --on-btn: #ffffff;
  --btn-hover: #3a3a3a;
  --btn2: #f1f1ef;
  --btn2-hover: #e6e6e3;
  --rail: #cfcfcc;
  --rail-now: #202020;
  --header-bg: rgba(255, 255, 255, 0.9);
  --logo-filter: none;
  --focus: #c4684a;
  /* 숯색 판(첫 화면, 제품 판)은 로고 색 그대로라 두 화면에서 같다. */
  --brand-ink: #202020;
  --brand-coral: #c4684a;
  --on-dark: #f5f5f3;
  --on-dark-muted: rgba(245, 245, 243, 0.62);
  --on-dark-line: rgba(245, 245, 243, 0.14);
  --glow: rgba(196, 104, 72, 0.3);
  --frame: #0f0f0f;

  /* Pretendard는 jsDelivr의 가변 글꼴(이름 "Pretendard Variable")로 불러온다. */
  --sans: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --serif: "Noto Serif KR", "AppleMyungjo", "Batang", serif;
  --latin: "Jost", "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --header-h: 64px;
  --wrap: 1160px;
  --gutter: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141414;
    --ink: #f2f2f0;
    --body: #bfc1c5;
    --muted: #85888d;
    --line: #2b2b2b;
    --panel: #1d1d1d;
    --faint-ink: #343434;
    --coral: #e08a6a;
    --coral-text: #e8957a;
    --btn: #f2f2f0;
    --on-btn: #161616;
    --btn-hover: #d9d9d6;
    --btn2: #242424;
    --btn2-hover: #2e2e2e;
    --rail: #444444;
    --rail-now: #f2f2f0;
    --header-bg: rgba(20, 20, 20, 0.88);
    --logo-filter: invert(1) hue-rotate(180deg);
    --focus: #e08a6a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* 메뉴나 꺾쇠를 눌러 이동하면 머리 줄 높이만큼 띄워 멈춘다. */
section[id] { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 30;
  height: env(safe-area-inset-top, 0px); background: var(--header-bg);
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* 머리 줄 */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand img { filter: var(--logo-filter); }
.brand .symbol { width: 24px; height: 24px; }
.brand .wordmark { height: 17px; width: auto; }
.nav { display: flex; gap: 32px; font-size: 15px; font-weight: 500; color: var(--body); }
.nav a { padding-block: 8px; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.menu-btn { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 8px; cursor: pointer; color: var(--ink); border-radius: 10px; }
.menu-btn svg { width: 24px; height: 24px; }
.menu-panel { display: none; }

/* 지금 위치 눈금 */
.rail {
  position: fixed; left: calc(28px + env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%);
  z-index: 15; display: flex; flex-direction: column; gap: 10px;
  list-style: none; margin: 0; padding: 0;
}
.rail button {
  display: block; width: 12px; height: 2px; padding: 0; border: 0;
  background: var(--rail); border-radius: 1px; cursor: pointer;
  transition: width .3s, background .3s;
}
.rail button[aria-current="true"] { width: 22px; background: var(--rail-now); }
.rail.on-dark button { background: var(--on-dark-line); }
.rail.on-dark button[aria-current="true"] { background: var(--brand-coral); }

/* 1. 첫 화면: 숯색 판 위에 로고의 Λ와 산호색 꺾쇠. Λ는 처음 열릴 때 그려지고, 꺾쇠는 그 곁에 내려와 머문다. */
.hero {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: 16px;
}
.hero-frame {
  position: relative; overflow: hidden;
  height: clamp(500px, calc(88svh - var(--header-h)), 860px);
  border-radius: 28px;
  background:
    radial-gradient(60% 50% at 50% 58%, var(--glow), transparent 70%),
    var(--brand-ink);
  color: var(--on-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(28px, 4vw, 48px);
  padding: 48px 24px;
  text-align: center;
}
.hero-mark { width: clamp(132px, 17vw, 220px); }
.hero-mark svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-mark .peak {
  fill: none; stroke: var(--on-dark); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 260; stroke-dashoffset: 0;
  animation: draw 1.4s .1s cubic-bezier(.6, 0, .2, 1) both;
}
/* 아래 꺾쇠는 스크롤 안내다. 제자리에서 위아래로 오르내리고, 누르면 다음 장면으로 내려간다.
   움직임을 줄인 컴퓨터에서는 제자리에 멈춰 있다. */
.hero-mark .beside {
  fill: none; stroke: var(--brand-coral); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round;
  animation: arrive .9s 1.1s cubic-bezier(.2, .7, .2, 1) both, bob 1.6s 2s ease-in-out infinite;
}
.hero-mark .cue { cursor: pointer; }
.hero-mark .cue rect { fill: transparent; }
/* 제목과 영어 한 줄은 스크롤 장면이 투명도를 바꾸므로, 들어오는 움직임이 끝나면 손을 뗀다(backwards). */
.hero h1 {
  margin: 0; font-size: clamp(34px, 5.2vw, 72px); font-weight: 700;
  line-height: 1.26; letter-spacing: -0.03em;
  animation: rise 1s .5s cubic-bezier(.2, .7, .2, 1) backwards;
}
.hero .tagline {
  margin: 0; font-family: var(--latin); font-size: clamp(15px, 1.4vw, 19px); font-weight: 400;
  letter-spacing: 0.06em; color: var(--on-dark-muted);
  animation: rise 1s .7s cubic-bezier(.2, .7, .2, 1) backwards;
}
@keyframes draw { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* 글 칸 공통: 위에 가는 줄과 작은 이름표, 그 아래 큰 제목과 명조 설명. */
.label {
  margin: 0 0 40px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--muted);
}
.title {
  margin: 0; font-size: clamp(30px, 3.6vw, 46px); font-weight: 700;
  line-height: 1.3; letter-spacing: -0.03em; color: var(--ink);
}
.prose p { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.9; color: var(--body); }
.prose p + p { margin-top: 18px; }

/* 2. 사명: 왼쪽 큰 문장은 앞에서부터 먹색으로 번지듯 써지고, 오른쪽에 짧은 설명과 단추. */
.mission { padding-block: 168px 40px; }
.mission .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.mission-text {
  margin: 0; font-size: clamp(30px, 4.2vw, 56px); font-weight: 700;
  line-height: 1.36; letter-spacing: -0.03em; color: var(--ink);
}
.mission-text .ch { transition: color .3s ease; }
.mission-text .ch.faint { color: var(--faint-ink); }
.mission-text .ch.tip { color: var(--coral); }
.mission-side .btn { margin-top: 32px; }

/* 3. 우리의 목적: 두 줄 두 칸에 제목과 짧은 글. */
.purpose { padding-block: 168px 40px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px clamp(32px, 6vw, 96px); }
.grid2 h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.grid2 p { margin: 12px 0 0; font-family: var(--serif); font-size: 17px; line-height: 1.85; color: var(--body); }

/* 4. 만든 것 */
.product { padding-block: 184px 0; }
.product .label { margin-bottom: 32px; }
.product-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 48px; }
.product-head .prose { margin-top: 24px; max-width: 34em; }
.product-name { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.product-name img { height: 30px; width: auto; filter: var(--logo-filter); }
.product-name span { font-size: 14px; font-weight: 600; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--panel); font-size: 14px; font-weight: 600; color: var(--body); }
.showcase {
  margin-top: 56px; padding: clamp(16px, 4vw, 56px) clamp(16px, 4vw, 56px) 0;
  border-radius: 28px; background: var(--brand-ink); overflow: hidden;
}
.showcase .clip {
  aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden;
  border-radius: 16px 16px 0 0; background: var(--frame);
}
.showcase video { width: 100%; height: 100%; object-fit: cover; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 54px; padding-inline: 26px; border-radius: 14px;
  font-size: 16px; font-weight: 600; transition: background .2s;
}
.btn.primary { background: var(--btn); color: var(--on-btn); }
.btn.primary:hover { background: var(--btn-hover); }
.btn.secondary { background: var(--btn2); color: var(--ink); }
.btn.secondary:hover { background: var(--btn2-hover); }

/* 5. 지키는 것: 왼쪽 제목과 오른쪽 설명, 그 아래 문장으로 쓴 원칙 여섯. */
.values { padding-block: 168px 40px; }
.values-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); margin-bottom: 72px; }
.values .grid2 h3 { font-size: 20px; }

/* 6. 함께하기 */
.contact { padding-block: 176px 184px; }
.contact-panel {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end;
  padding: clamp(32px, 5vw, 64px); border-radius: 28px; background: var(--panel);
}
.contact-panel .prose { margin-top: 20px; }
.mailbox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.mailbox span { font-family: var(--latin); font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; letter-spacing: 0.01em; color: var(--ink); user-select: all; }
.copy-btn {
  height: 44px; padding-inline: 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--btn); color: var(--on-btn); font: inherit; font-size: 15px; font-weight: 600;
}
.copy-btn:hover { background: var(--btn-hover); }

/* 바닥글 */
.site-footer { padding-block: 72px 56px; border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; }
.footer-slogan { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.5; letter-spacing: -0.02em; color: var(--ink); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-cols h4 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--ink); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-cols a { font-size: 14px; color: var(--body); }
.footer-cols a:hover { color: var(--ink); }
.signoff {
  margin: 64px 0 0; font-family: var(--latin); font-weight: 500;
  font-size: clamp(56px, 13vw, 184px); line-height: .9; letter-spacing: -0.04em; color: var(--ink);
  display: flex; align-items: flex-end; gap: .08em;
}
.signoff svg { width: .36em; height: .2em; margin-bottom: .1em; }
.signoff path { fill: none; stroke: var(--coral); stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.copyright { margin: 20px 0 0; font-size: 13px; color: var(--muted); }

/* 화면 아래에서 들어오는 글만 올라온다. */
.reveal.play { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.reveal.play.d1 { animation-delay: .12s; }
.reveal.play.d2 { animation-delay: .24s; }

/* 스크롤로 이어지는 장면. 스크립트가 html에 motion을 달 때만 켜진다.
   움직임을 줄인 컴퓨터나 스크립트가 없을 때는 위의 보통 배치가 그대로 다 보인다.
   종이 위에 사명이 써지고 → (목적은 보통 스크롤) → FableX 영상을 담은 판이 화면 가득 커진다. */
.motion .mission, .motion .product { position: relative; padding: 0; }
.motion .mission { height: 260vh; }
.motion .product { height: 240vh; margin-top: 168px; }
.motion .stage {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  height: calc(100svh - var(--header-h) - env(safe-area-inset-top, 0px));
  overflow: hidden;
}
.motion .mission .stage { display: grid; align-items: center; background: var(--paper); }
.motion .mission .wrap { width: 100%; }
.motion .product-head { position: relative; z-index: 1; padding-top: clamp(28px, 6vh, 64px); }
.motion .showcase {
  position: absolute; inset: 0; z-index: 2; margin: 0; padding: 0; border-radius: 0;
  clip-path: inset(100% 0 0 0);
}
.motion .showcase .clip { position: absolute; aspect-ratio: auto; border-radius: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mark .peak, .hero-mark .beside, .hero h1, .hero .tagline, .reveal.play { animation: none; }
}

@media (max-width: 960px) {
  .rail { display: none; }
  .mission .wrap, .values-intro, .contact-panel { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --header-h: 56px; --gutter: 16px; }
  .nav { display: none; }
  .menu-btn { display: block; }
  .menu-panel[data-open="true"] {
    display: grid; position: absolute; top: var(--header-h); left: 0; right: 0;
    padding-block: 8px 20px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .menu-panel a { padding: 14px 4px; font-size: 17px; font-weight: 600; color: var(--ink); }
  .hero { padding-bottom: 12px; }
  .hero-frame { height: clamp(460px, calc(80svh - var(--header-h)), 640px); border-radius: 22px; }
  .hero h1 { font-size: clamp(25px, 7.2vw, 34px); }
  .hero .tagline { font-size: 13px; letter-spacing: 0.03em; }
  .label { margin-bottom: 28px; }
  .prose p { font-size: 16px; }
  .mission { padding-top: 112px; }
  .mission .wrap { gap: 28px; }
  .mission-text { font-size: 26px; }
  .mission-side .btn { margin-top: 24px; }
  .purpose, .values { padding-top: 120px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .grid2 p { font-size: 16px; }
  .values-intro { margin-bottom: 48px; gap: 20px; }
  .product { padding-top: 120px; }
  .motion .product { margin-top: 120px; }
  .showcase { margin-top: 40px; border-radius: 20px; }
  .contact { padding-block: 120px 128px; }
  .contact-panel { padding: 28px 22px; border-radius: 22px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
}
