/* ==========================================================================
   Intelli Living — Atelier layer (v3)
   assets/css/atelier.css

   Loaded last, after styles.css and flagship.css. It refines the surface to
   the standard of a top-tier agency site: an editorial type scale, a hero
   composition built around the 3D prism, a spec strip instead of cards,
   hairline section grammar, magnetic micro-interaction states, and a
   contrast pass on every small label. Nothing here removes content, links,
   legal copy or the existing behaviours.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Quality floor — contrast, focus, selection, tap targets
   -------------------------------------------------------------------------- */
html {
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: rgba(140, 170, 210, 0.34) transparent;
  scrollbar-width: thin;
}

body {
  font-feature-settings: "ss01" 1;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(108, 233, 255, 0.26); color: #ffffff; }

/* Small mono labels were sitting under 4.5:1 on the ink surface. */
.mono,
.sec-label .idx,
.card__idx,
.crumbs,
.step__num,
.doc-toc h2,
.hero__meta dt,
.page-hero__aside dt,
.chapters__caption,
.channel__handle,
.quote figcaption,
.film-open,
.fl-modal__bar {
  color: #8694aa;
}
.hero__meta dt,
.page-hero__aside dt,
.chapters__caption,
.channel__handle { color: #8b99ae; }

.card__text,
.step__text,
.showcase__panel p { color: #a5b2c4; }

/* Keyboard focus: a visible ring that survives the glass surfaces. */
:focus-visible {
  outline: 2px solid #8ef0ff;
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible,
.showcase__tab:focus-visible,
.lang-toggle button:focus-visible,
.film-open:focus-visible {
  outline: 2px solid #8ef0ff;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(108, 233, 255, 0.16);
}
.skip-link:focus-visible { outline-offset: 4px; }

/* --------------------------------------------------------------------------
   2. Editorial type scale
   -------------------------------------------------------------------------- */
.hero h1 {
  font-size: clamp(52px, 7.7vw, 122px);
  line-height: 0.9;
  letter-spacing: -0.052em;
  font-weight: 500;
  text-wrap: balance;
}
.hero h1 .line { will-change: transform; }

.section-title {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.page-title {
  font-size: clamp(40px, 5.6vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.045em;
}
.lead {
  color: #b6c3d4;
  line-height: 1.8;
  letter-spacing: -0.005em;
}
.hero__lead {
  color: #c2cedd;
  max-width: 48ch;
}
.eyebrow { letter-spacing: 0.24em; }
.sec-label .idx { letter-spacing: 0.26em; }
.sec-label { margin-bottom: 14px; }

/* Optical correction for the widest Korean display lines */
@media (min-width: 1240px) {
  .hero h1 { letter-spacing: -0.055em; }
  .page-title { letter-spacing: -0.048em; }
}

/* --------------------------------------------------------------------------
   3. Hero composition v3
   -------------------------------------------------------------------------- */
.hero {
  align-items: flex-end;
  padding-top: clamp(116px, 15vh, 172px);
  padding-bottom: clamp(84px, 10vh, 118px);
  min-height: 100svh;
}

.hero__inner { display: block; }

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: min(640px, 52vw);
}

/* Poster is the LCP element: a ~26KB WebP, painted before anything else. */
.hero__film { background: #02040a; }
.hero__poster {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  transform-origin: 52% 50%;
  will-change: transform;
}
.hero__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  display: block;
}
.hero__video { will-change: opacity; }

/* The footprint of the gem: a soft halo plus the WebGL canvas. */
.hero__crystal {
  position: absolute;
  z-index: 0;
  top: 49%;
  right: max(2.5vw, calc((100vw - 1240px) / 2 - 96px));
  width: min(46vw, 660px);
  aspect-ratio: 1 / 1;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.8s var(--fl-ease);
}
.hero__crystal.is-live { opacity: 1; }
.hero__crystal::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(88, 190, 255, 0.19), transparent 56%),
    radial-gradient(circle at 62% 62%, rgba(138, 108, 255, 0.16), transparent 58%);
  filter: blur(26px);
}
.hero__crystal canvas {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
.hero__crystal.is-flat::before { opacity: 0.5; }

/* Spec strip — replaces the boxed hero meta cards */
.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: start;
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(34px, 4vw, 52px);
  padding: 0 0 0 0;
  border: 0;
  border-top: 1px solid rgba(160, 195, 235, 0.16);
  padding-top: 20px;
  min-width: 0;
}
.hero__meta div {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  position: relative;
}
.hero__meta div + div { padding-left: clamp(20px, 3vw, 44px); }
.hero__meta div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(160, 195, 235, 0.16);
}
.hero__meta dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.hero__meta dd {
  font-size: 13px;
  color: #d3dbe6;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.hero__badge { margin-bottom: clamp(22px, 2.6vw, 32px); }

/* The home hero carries the 3D prism; the shader stage stays on subpages. */
.hero .fl-stage { display: none; }

/* The spec strip owns the bottom edge; the scroll cue would collide with it. */
.hero .hero__scroll { display: none; }

/* Film controls sit on the same baseline as the spec strip */
.hero__film-ui { bottom: clamp(26px, 4vh, 40px); }
.hero__scroll { bottom: clamp(26px, 4vh, 40px); }

/* Intro: the copy rises once, in reading order. */
@keyframes atRise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes atLine {
  from { opacity: 0; transform: translate3d(0, 0.42em, 0); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: none; clip-path: inset(-20% -10% -20% -10%); }
}
.hero__badge { animation: atRise 0.9s var(--fl-ease) both; }
.hero h1 .line { animation: atLine 1.15s var(--fl-ease) both; }
.hero h1 .line:nth-child(2) { animation-delay: 0.1s; }
.hero__lead { animation: atRise 1s var(--fl-ease) 0.22s both; }
.hero__cta { animation: atRise 1s var(--fl-ease) 0.34s both; }
.hero__meta { animation: atRise 1s var(--fl-ease) 0.46s both; }
.hero__film-ui, .hero__scroll { animation: atRise 1.1s var(--fl-ease) 0.6s both; }

.page-hero .crumbs,
.page-hero .eyebrow,
.page-hero .page-title,
.page-hero .lead,
.page-hero__aside {
  animation: atRise 1s var(--fl-ease) both;
}
.page-hero .eyebrow { animation-delay: 0.06s; }
.page-hero .page-title { animation-delay: 0.12s; }
.page-hero .lead { animation-delay: 0.2s; }
.page-hero__aside { animation-delay: 0.26s; }

/* English sets longer words: give the copy column a little more room and a
   slightly tighter display size so the hero keeps its three-line shape.
   (Wide screens only — phones keep the full column width.) */
@media (min-width: 901px) {
  html[lang="en"] .hero__copy { max-width: min(720px, 57vw); }
  html[lang="en"] .hero h1 {
    font-size: clamp(42px, 5.1vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.042em;
  }
  html[lang="en"] .hero h1 .line--indent { padding-left: 0; }
}
html[lang="en"] .page-title { font-size: clamp(38px, 4.6vw, 66px); letter-spacing: -0.04em; }

/* --------------------------------------------------------------------------
   4. Page hero v3 — hairline aside, tighter rhythm
   -------------------------------------------------------------------------- */
.page-hero {
  padding-top: clamp(118px, 13vw, 168px);
  padding-bottom: clamp(36px, 4.6vw, 64px);
}
.page-hero__grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: end;
}
.page-hero .lead { margin-top: 20px; max-width: 54ch; }
.page-hero__aside {
  display: grid;
  gap: 0;
  padding-left: 0;
  border-left: 0;
  border-top: 1px solid rgba(160, 195, 235, 0.18);
}
.page-hero__aside > div {
  display: grid;
  gap: 5px;
  padding: 14px 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(160, 195, 235, 0.12);
  border-radius: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.page-hero__aside dt { font-size: 9px; letter-spacing: 0.22em; }
.page-hero__aside dd { font-size: 12.5px; color: #d3dbe6; }

.page-hero .fl-stage { opacity: 0; }
.page-hero .fl-stage.is-live { opacity: 0.8; }

/* --------------------------------------------------------------------------
   5. Section grammar — hairlines, cards, stats, steps
   -------------------------------------------------------------------------- */
.at-rule {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.3s var(--fl-ease);
}
.at-rule.is-drawn { transform: scaleX(1); }

.section-title { text-wrap: balance; }
.sec-head { margin-bottom: clamp(34px, 4vw, 56px); }

.card {
  border-radius: 20px;
  padding: clamp(24px, 2.4vw, 30px);
  gap: 12px;
  isolation: isolate;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(240px 180px at var(--mx) var(--my), rgba(126, 240, 255, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.card:hover::after { opacity: 1; }
.card__idx {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.card__title {
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.3;
}
.card__text { font-size: 13.5px; line-height: 1.82; }
.card__foot {
  padding-top: 16px;
  font-size: 10px;
  letter-spacing: 0.16em;
  border-top: 1px solid rgba(160, 195, 235, 0.14);
}

.stat { gap: 10px; }
.stat__num {
  font-size: clamp(44px, 4.6vw, 66px);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}
.stat__num span {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 8%, #a9dcff 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a5b2c4;
}
.stat__note { font-size: 12.5px; line-height: 1.7; color: #93a0b4; }

.step__num { letter-spacing: 0.2em; }
.step__title { font-weight: 600; letter-spacing: -0.032em; }
.step:hover { background: rgba(126, 240, 255, 0.035); }

/* Chapters: quieter caption, stronger figure */
.chapters__figure { border-radius: 22px; }
.chapters__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 46%, transparent 46%, rgba(2, 5, 10, 0.55) 100%);
}
.chapter__title { font-weight: 600; }
.chapter__text { font-size: 14px; color: #a5b2c4; }

/* Showcase panels read as product surface, not a dark box */
.showcase__panels { border-radius: 20px; }
.showcase__panel h3 { font-weight: 600; letter-spacing: -0.032em; }
.showcase__tab { font-weight: 500; }

/* Channels */
.channel { border-radius: 14px; }
.channel__name { letter-spacing: -0.012em; }
.channel__handle { letter-spacing: 0.06em; }

/* Quote + CTA */
.quote blockquote { font-weight: 500; letter-spacing: -0.045em; }
.quote { border-radius: 24px; }
.cta-band { border-radius: 26px; }
.cta-band h2 { font-weight: 600; letter-spacing: -0.045em; }

/* Footer */
.footer__col h3 {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8694aa;
}
.footer__col a { transition: color 0.2s ease; }
.footer__col a:hover { color: #8ef0ff; }
.footer__legal { color: #8b99ae; }

/* --------------------------------------------------------------------------
   6. Motion furniture
   -------------------------------------------------------------------------- */
.at-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 340;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: rgba(140, 175, 215, 0.08);
}
.at-progress.is-on { opacity: 1; }
.at-progress i {
  display: block;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #6ce9ff, #4f8bff 62%, #b79bff);
  box-shadow: 0 0 14px rgba(108, 233, 255, 0.5);
}

/* Magnetic buttons keep their own hover shadow but not the CSS lift */
.btn.is-magnetic { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }
[data-magnet] { will-change: transform; }

/* Nav: the language switch is in the markup, so nothing shifts on load */
.nav__right .lang-toggle { margin-inline-end: 2px; }

/* --------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero__copy { max-width: min(600px, 62vw); }
  .hero__crystal { width: min(52vw, 520px); right: -4vw; opacity: 0.85; }
}

@media (max-width: 900px) {
  .hero {
    align-items: center;
    padding-top: clamp(112px, 18vh, 150px);
    padding-bottom: clamp(56px, 9vh, 84px);
  }
  .hero__copy { max-width: 100%; }
  .hero__crystal {
    top: 26%;
    right: 50%;
    width: min(84vw, 460px);
    transform: translate(50%, -50%);
    opacity: 0.30;
  }
  .hero__crystal::before { filter: blur(20px); }
  .hero__meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 32px;
    padding-top: 16px;
  }
  .hero__meta div + div { padding-left: 12px; }
  .hero__meta dd { font-size: 12px; }
  .hero__meta dt { font-size: 8.5px; letter-spacing: 0.18em; }
  .page-hero__grid { grid-template-columns: 1fr; align-items: start; }
  .page-hero__aside { margin-top: 8px; }
  .hero h1 { font-size: clamp(42px, 11.5vw, 68px); }
  .section-title { letter-spacing: -0.04em; }
}

@media (max-width: 520px) {
  .hero { min-height: 92svh; }
  .hero h1 { font-size: clamp(38px, 11.2vw, 52px); line-height: 0.94; }
  .hero h1 .line--indent { padding-left: 0.06em; }
  .hero__lead { font-size: 14.5px; line-height: 1.78; }
  .hero__cta { gap: 8px; }
  .hero__cta .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 13px 10px;
    font-size: 12.5px;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }
  .hero__cta .btn .arw { font-size: 11px; }
  .hero__badge { font-size: 9px; letter-spacing: 0.13em; padding: 6px 12px 6px 9px; }
  .hero__meta dt { font-size: 7.5px; letter-spacing: 0.12em; }
  .hero__meta dd { font-size: 10.5px; line-height: 1.45; }
  .hero__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .hero__meta div + div { padding-left: 10px; }
  .hero__crystal { top: 22%; right: 46%; width: 84vw; opacity: 0.40; }
  .hero__scroll { display: none; }
  .hero__film-ui { bottom: 16px; right: var(--gutter); }
  .film-open span:last-child { display: none; }
  .film-open { padding: 9px 11px; }
  .hero__rail { display: none; }
  .stat__note { font-size: 12px; }
  .card { border-radius: 16px; }
}

/* Narrow phones: the spec strip becomes two tidy rows */
@media (max-width: 380px) {
  .hero__meta dd { font-size: 11.5px; }
}

/* Stats: a 2×2 ledger reads better than a tall single column on phones */
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat {
    padding: 22px 16px 20px;
    border-right: 1px solid rgba(160, 195, 235, 0.14);
    border-bottom: 1px solid rgba(160, 195, 235, 0.14);
    gap: 8px;
  }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(n + 3) { border-bottom: 0; }
  .stat__num { font-size: clamp(34px, 10vw, 44px); }
  .stat__label { font-size: 9.5px; letter-spacing: 0.14em; }
  .stat__note { font-size: 11.5px; line-height: 1.65; }
}

/* Legal documents: the long table of contents becomes one swipeable row. */
@media (max-width: 860px) {
  .doc-toc {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(160, 195, 235, 0.14);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .doc-toc::-webkit-scrollbar { display: none; }
  .doc-toc h2 { display: none; }
  .doc-toc a {
    flex: none;
    padding: 8px 13px;
    border: 1px solid rgba(160, 195, 235, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    color: #b6c3d4;
    scroll-snap-align: start;
  }
  .doc-toc a:active { background: rgba(126, 240, 255, 0.12); }
  .doc-body { gap: 28px; }
  .doc-body p, .doc-body li { font-size: 14px; line-height: 1.88; }
}

/* --------------------------------------------------------------------------
   8. Motion safety
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero__badge,
  .hero h1 .line,
  .hero__lead,
  .hero__cta,
  .hero__meta,
  .hero__film-ui,
  .hero__scroll,
  .page-hero .crumbs,
  .page-hero .eyebrow,
  .page-hero .page-title,
  .page-hero .lead,
  .page-hero__aside {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .hero__crystal { opacity: 0.7; }
  .at-rule { transform: none; }
  .at-progress i { transition: none; }
  .card::after { display: none; }
  .card:hover { transform: none; }
}

/* Print */
@media print {
  .at-progress, .hero__crystal { display: none !important; }
}

/* --------------------------------------------------------------------------
   Home · next product pipeline (Flagship 02 / 03 preview)
   -------------------------------------------------------------------------- */
.pipeline-card { gap: 12px; }
.pipeline-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.pipeline-card__state {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 3px 9px;
  border: 1px dashed rgba(160, 195, 235, 0.3);
  border-radius: 999px;
}
.pipeline-card .card__title { font-size: clamp(18px, 1.7vw, 23px); }
.pipeline-note {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--dim);
  max-width: 62ch;
}
