/* styles.css — HYPT Web Redesign Prototype v0.5 */

/* ── Page transitions ── */

/* Native: View Transitions API (Chrome 126+, Safari 18.2+) */
@view-transition { navigation: auto; }
::view-transition { background: #000; }
::view-transition-old(root) {
  animation: 650ms cubic-bezier(0.22, 1, 0.36, 1) both vt-exit;
}
::view-transition-new(root) {
  animation: 650ms cubic-bezier(0.22, 1, 0.36, 1) 650ms both vt-enter;
}

@keyframes vt-exit {
  from { clip-path: inset(0 0 0% 0); }
  to   { clip-path: inset(0 0 100% 0); }
}
@keyframes vt-enter {
  from { clip-path: inset(100% 0 0% 0); }
  to   { clip-path: inset(0% 0 0% 0); }
}

/* Exit fallback (non-VT browsers) */
.vt-curtain {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  transform: translateY(100%);
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.vt-curtain--up { transform: translateY(0); }

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

:root {
  --font-en: 'Space Mono';
  --font-ko: 'D2Coding';

  /* Base font size — browser default 1rem = 16px, do not override html font-size.
     --fs-base = target_px / 16. Examples:
     0.625rem = 10px · 0.65625rem = 10.5px · 0.6875rem = 11px */
  --fs-base: 0.65625rem; /* 10.5px */

  --gutter:    30px;
  --gutter-sm: calc(var(--gutter) * 0.5);  /* 15px */
  --gutter-lg: calc(var(--gutter) * 1.5);  /* 45px */
  --peek-h:    80px;

  /* Vertical spacing scale — lh unit scales with --fs-base automatically.
     xl : 5lh  lg : 3lh  md : 2lh  sm : 1lh */
  --gap-xl: 5lh;
  --gap-lg: 3lh;
  --gap-md: 2lh;
  --gap-sm: 1lh;

  /* Color tokens */
  --c-bg-dark:    #000;
  --c-bg-light:   #fff;
  --c-text-dark:  rgba(0, 0, 0, 0.95);
  --c-text-light: rgba(255, 255, 255, 0.95);
  --c-ph:         rgba(0, 0, 0, 0.25);
}

html, body, #root {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#root {
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
body.agent-open #root {
  transform: translateX(-20vw);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.55);
}

body {
  font-family: var(--font-en), var(--font-ko), monospace;
  font-size: var(--fs-base);
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  background: #000;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Button pattern: ( LABEL ) — hover underline on .btn-label only */
button:hover .btn-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ──────────────────────────────────────────
   Vertical guide lines (goyo fly-in)
   ────────────────────────────────────────── */
.guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.guide-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 0.5px;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  animation: guide-in var(--dur, 1400ms) cubic-bezier(0.22, 1.05, 0.36, 1) both;
  animation-delay: var(--delay, 0ms);
}
@keyframes guide-in {
  from { left: 0; opacity: 0; }
  to   { left: var(--to, 0); opacity: 0.12; }
}

/* ──────────────────────────────────────────
   Hero — full viewport
   ────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #111;
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Index-item hover thumbnail */
.hero__thumb {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  animation: thumb-in 250ms ease forwards;
}
@keyframes thumb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Gradient overlay — bottom-left 25% → top-right 10% (radial from corner) */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(53deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15));
  z-index: 2;
}

/* ──────────────────────────────────────────
   Top area: GNB row + subhead (5vh gap)
   ────────────────────────────────────────── */
.hero__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2001;
  pointer-events: none;
}
.hero__logo,
.hero__menu-wrap {
  pointer-events: auto;
}

/* GNB row: logo centered, menu right */
.hero__gnb {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--gap-md) var(--gutter) var(--gap-sm);
}

.hero__logo {
  display: block;
  height: 18px;
  width: auto;
  cursor: pointer;
}

.hero__menu-wrap {
  position: absolute;
  right: var(--gutter);
  top: var(--gap-md);
}
.hero__menu-btn {
  white-space: nowrap;
}

/* Subhead row — top gap accounts for GNB internal padding */
.hero__subhead-row {
  display: flex;
  justify-content: center;
  padding-top: var(--gap-lg);
}

.hero__subhead {
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.hero__colon--off {
  opacity: 0;
}

/* ──────────────────────────────────────────
   Index panel
   Peek (default): ctrl button + 1 full row + partial 2nd row
   Open: full 50vh, list scrollable
   ────────────────────────────────────────── */
.index-panel {
  position: absolute;
  bottom: 0; left: 0;
  width: 50vw;
  height: 50vh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 0;
  transform: translateY(calc(100% - var(--peek-h)));
  transition: transform 500ms cubic-bezier(0.22, 1.05, 0.36, 1);
}
.index-panel--open {
  transform: translateY(0);
}

/* OPEN / HIDE toggle button */
.index-panel__ctrl {
  flex: 0 0 auto;
  padding: var(--gap-sm) var(--gutter);
  white-space: nowrap;
}

/* Scrollable list */
.index-panel__list {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.index-panel__footer {
  padding: var(--gap-md) var(--gutter);
}
.index-panel__list::-webkit-scrollbar { width: 3px; }
.index-panel__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.index-panel__list::-webkit-scrollbar-track { background: transparent; }

/* ──────────────────────────────────────────
   Index row — outer 2-col grid: band | cta
   min-height keeps rows adjacent (no outer gap = no flicker)
   ────────────────────────────────────────── */
.index-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--gutter-lg);
  padding: 0 24px var(--gap-sm) var(--gutter);
  cursor: pointer;
}

/* Band — 3-col sub-grid (name | desc | num)
   Background layer is a separate absolutely-positioned child
   so it can be clipped independently of the text. */
.index-row__band {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 120px 1fr 52px;
  align-items: center;
  gap: var(--gutter-lg);
}

/* Background layer — behind text (z-index: -1 within isolated context).
   clip-path is set inline via JS, synced with typewriter progress. */
.index-row__band-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.index-row__name {
  white-space: nowrap;
  letter-spacing: 0.1em;
}
.index-row__desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.index-row__num {
  text-align: right;
  white-space: nowrap;
}

/* CTA: clip-path reveals left→right, no overflow trick needed */
.index-row__cta {
  white-space: nowrap;
  text-align: right;
}
.index-row__cta-inner {
  display: inline-block;
  clip-path: inset(0 100% 0 0); /* fully hidden by default */
}
.index-row__cta-inner--visible {
  animation: cta-slide-in 300ms cubic-bezier(0.22, 1.05, 0.36, 1) forwards;
}
@keyframes cta-slide-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

/* ══════════════════════════════════════════
   WHITE SCROLLABLE PAGES
   Studio · Work · Contact · Work Detail · Privacy · Feed · Feed Detail
   ══════════════════════════════════════════ */

html:has(body:is(.studio-root, .work-root, .contact-root, .wd-root-body, .privacy-root, .feed-root, .feed-detail-root)),
html:has(body:is(.studio-root, .work-root, .contact-root, .wd-root-body, .privacy-root, .feed-root, .feed-detail-root)) body,
html:has(body:is(.studio-root, .work-root, .contact-root, .wd-root-body, .privacy-root, .feed-root, .feed-detail-root)) #root {
  height: auto;
  overflow: visible;
}
html:has(body:is(.studio-root, .work-root, .contact-root, .wd-root-body, .privacy-root, .feed-root, .feed-detail-root)) body {
  overflow-x: hidden;
  background: #fff;
  color: rgba(0, 0, 0, 0.95);
}

/* ══════════════════════════════════════════
   STUDIO PAGE
   Single center column. Text: 34vw. Image: 64vw. Ticker: within col.
   ══════════════════════════════════════════ */

/* Guide lines: fixed so they persist through scroll; black on white bg */
.s-guides-fixed {
  position: fixed !important;
  z-index: 3;
}
.s-guide-line {
  background: rgba(0, 0, 0, 0.9);
}

/* ── Root ── */
.s-root {
  min-height: 100vh;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

/* ── GNB ── */
.s-gnb {
  position: sticky;
  top: 0;
  z-index: 2001;
  pointer-events: none;
}
.s-gnb__logo-link,
.s-gnb__left,
.s-gnb__right {
  pointer-events: auto;
}
.s-gnb__inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--gap-md) var(--gutter) var(--gap-sm);
}
.s-gnb__logo-link {
  display: block;
  line-height: 0;
}
.s-gnb__logo {
  height: 18px;
  width: auto;
  filter: invert(1);
}
.s-gnb__left {
  position: absolute;
  left: var(--gutter);
  top: var(--gap-md);
}
.s-gnb__right {
  position: absolute;
  right: var(--gutter);
  top: var(--gap-md);
}
.s-gnb__menu-wrap {
  position: relative;
}
.s-gnb__menu-btn {
  white-space: nowrap;
}
.s-gnb--agent-open .s-gnb__right {
  color: #fff;
}

/* Dropdown — inherits black from body */
.s-dropdown {
  position: absolute;
  top: calc(100% + 1lh);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5lh;
  animation: s-dropdown-in 180ms ease forwards;
}
@keyframes s-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.s-dropdown__item {
  display: block;
  color: inherit;
  text-decoration: none;
  text-align: right;
  white-space: nowrap;
}
.s-dropdown__item:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.s-dropdown__item--active {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.s-dropdown__item--ext {
  margin-top: 4px;
}
.s-dropdown__item--ext:hover {
  text-decoration: none;
}
.s-dropdown__sep {
  display: block;
  text-align: right;
}
.s-dropdown__item--agent {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: right;
  white-space: nowrap;
}
.s-dropdown__item--agent:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.s-dropdown__ext-link {
  color: inherit;
  text-decoration: none;
}
.s-dropdown__ext-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Subhead row — 5vh below GNB + 5vh above hero video ── */
.s-subhead-row {
  display: flex;
  justify-content: center;
  padding: var(--gap-lg) var(--gutter) var(--gap-xl);
}
.s-subhead {
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* ── Column system ── */

/* Wide column: image / hero video (64vw centered) — above guide lines */
.s-wide {
  position: relative;
  z-index: 10;
  width: 64vw;
  margin: 0 auto;
  margin-bottom: var(--gap-xl);
}
.s-wide--img {
  margin-top: var(--gap-xl);
}

/* Narrow column: text / capabilities / service (33vw centered) — above guide lines */
.s-col {
  position: relative;
  z-index: 4;
  width: 30vw;
  margin: 0 auto;
  margin-bottom: var(--gap-xl);
}
.s-col--body {
  margin-bottom: var(--gap-xl);
}

/* ── Hero video ── */
.s-hero-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ── Body text ── */
.s-body {
  line-height: 1.9;
  letter-spacing: 0.04em;
  margin-bottom: var(--gap-md);
}
.s-body:last-child { margin-bottom: 0; }

/* ── Client ticker (within s-col width) ── */
.s-ticker {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
}
.s-ticker__track {
  display: inline-flex;
  animation: s-ticker-scroll 28s linear infinite;
}
.s-ticker:hover .s-ticker__track {
  animation-play-state: paused;
}
@keyframes s-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.s-ticker__item {
  flex-shrink: 0;
  padding: 0 30px;
  cursor: pointer;
}
.s-ticker__item:hover .btn-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Section heading (**CAPABILITIES, **SERVICE, **START YOURS) ── */
.s-section-head {
  margin-bottom: var(--gap-md);
}
.s-section-head--contact {
  margin-top: var(--gap-xl);
}
.s-contact-desc {
  line-height: 1.8;
  margin-top: var(--gap-sm);
}

/* ── Table rows: label (left) | items (right-aligned) ── */
.s-table-row {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 0 16px;
  margin-bottom: var(--gap-md);
  align-items: start;
}
.s-table-label {
  padding-top: 1px;
}
.s-table-items {
  list-style: none;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ── Insert image ── */
.s-insert-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* (s-contact-row — border/padding moved to shared .form-row--line) */

/* ── Footer — same height as GNB ── */
.s-footer {
  margin-top: auto;
  padding: var(--gap-xl) var(--gutter) var(--gap-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.s-footer__right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.s-footer__sep {
  opacity: 0.3;
}
.s-footer__link {
  color: inherit;
  text-decoration: none;
}
.s-footer__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.s-footer__link--active {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ══════════════════════════════════════════
   SHARED FORM ROW
   label | input | ( btn ) — used in Studio contact + Work search
   ══════════════════════════════════════════ */
.form-row {
  display: flex;
  align-items: center;
  gap: calc(var(--gap-sm) / 2);
}
.form-row__label {
  white-space: nowrap;
  flex-shrink: 0;
}
.form-row__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 4px 0;
  outline: none;
}
.form-row__input::placeholder {
  font-style: italic;
}
.form-row__btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Underline variant — bottom border, top padding only (no bottom gap before line) */
.form-row--line {
  border-bottom: 1px solid rgba(0, 0, 0, 0.95);
  padding: 4px 0 0;
}
.form-row--line .form-row__input::placeholder {
  color: rgba(0, 0, 0, 0.25);
}

/* ══════════════════════════════════════════
   WORK PAGE
   White bg, scrollable. 4-col masonry grid.
   ══════════════════════════════════════════ */

.w-root {
  min-height: 100vh;
  padding-bottom: 0;
}

/* Controls: sticky below GNB (GNB = 2lh top + 1calc(var(--gap-sm) / 2) logo + 1lh bottom) */
.w-controls {
  display: flex;
  justify-content: center;
  padding: var(--gap-lg) var(--gutter) var(--gap-xl);
}

/* Search: 1 column width */
.w-search {
  width: calc((100vw - 2 * var(--gutter) - 3 * var(--gutter-sm)) / 4);
}

/* Input + rolling hint overlay */
.w-search__input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}
.w-search__input-wrap > .form-row__input {
  width: 100%;
}
.w-search__hint {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  white-space: nowrap;
  font-style: italic;
  color: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 350ms ease;
}
.w-search__hint--on {
  opacity: 1;
}

.w-view-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Project View — 2-column fixed-ratio grid */
.w-project-grid {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--gutter-sm);
  row-gap: var(--gap-md);
  padding: 0 var(--gutter) var(--gap-xl);
}
.w-project-grid .w-card {
  margin-bottom: 0;
}
.w-project-grid .w-card__img-wrap {
  aspect-ratio: 3/2;
}
.w-project-grid .w-card__img {
  height: 100%;
  object-fit: cover;
}

/* Asset View — 4-column masonry */
.w-masonry {
  position: relative;
  z-index: 4;
  column-count: 4;
  column-gap: var(--gutter-sm);
  padding: 0 var(--gutter) var(--gap-xl);
}

/* Card — break-inside prevents splits across columns */
.w-card {
  break-inside: avoid;
  margin-bottom: var(--gap-sm);
}

/* Image + overlay container */
.w-card__img-wrap {
  position: relative;
  overflow: hidden;
}
.w-card__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Hover overlay */
.w-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.w-card__overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  display: block;
}
.w-card__overlay-btns {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.w-card__overlay-btn {
  display: block;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.w-card__overlay-btn:hover .btn-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Empty state — no search results */
.w-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 0 var(--gutter);
}

/* Load more — centered below masonry */
.w-load-more {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter) var(--gap-xl);
}

/* Project card link reset */
.w-card--project {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Caption — project view only */
.w-card__caption {
  padding: var(--gap-sm) 0 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--gap-sm) / 2);
}
.w-card__name {
  letter-spacing: 0.1em;
}
.w-card__desc {
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}

/* ══════════════════════════════════════════
   CONTACT PAGE
   White bg, scrollable. Single center column — mirrors Studio.
   ══════════════════════════════════════════ */

.c-root {
  min-height: 100vh;
}

/* ── Inquiry form ── */
.c-form {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

/* Field row: label | control — bottom-border line, same as form-row--line */
.c-field {
  display: flex;
  align-items: center;
  gap: calc(var(--gap-sm) / 2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.95);
  padding: 4px 0 0;
}
.c-field--top {
  align-items: flex-start;
}
.c-field--top .c-field__label {
  padding-top: 4px;
}
.c-field__label {
  white-space: nowrap;
  flex-shrink: 0;
}
.c-field__control {
  flex: 1;
  min-width: 0;
}

/* Text / email input */
.c-field__input {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 4px 0;
  outline: none;
}
.c-field__input::placeholder {
  font-style: italic;
  color: rgba(0, 0, 0, 0.25);
}

/* Textarea */
.c-field__textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 4px 0;
  outline: none;
  resize: none;
  line-height: 1.8;
}
.c-field__textarea::placeholder {
  font-style: italic;
  color: rgba(0, 0, 0, 0.25);
}

/* Select — native arrow hidden, ↓ embedded in placeholder option text */
.c-field__select {
  width: auto;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 4px 0;
  outline: none;
  cursor: pointer;
}

/* Submit + consent grouped — outer gap from .c-form, inner gap 1lh */
.c-form__footer {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}
.c-form__submit {
  display: flex;
  justify-content: flex-start;
}
.c-form__consent {
  line-height: 1.8;
  letter-spacing: 0.04em;
}
.c-form__consent-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Business info ── */
.c-info {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}
.c-info .s-table-row {
  margin-bottom: 0;
}
.c-info__items {
  gap: 10px;
}
.c-info__link {
  color: inherit;
  text-decoration: none;
}
.c-info__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── FAQ accordion ── */
.c-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}
.c-faq-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.c-faq-q__text {
  flex: 1;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}
.c-faq-q__toggle {
  flex-shrink: 0;
  white-space: nowrap;
}
.c-faq-a {
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   WORK DETAIL PAGE
   Dark hero (full viewport) → white scrollable content.
   Reuses: s-col, s-section-head, s-table-row, s-body, FormRow, SiteFooter
   ══════════════════════════════════════════ */

.wd-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Fixed GNB — dark on hero, light after scroll ── */
.wd-gnb {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2001;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--gap-md) var(--gutter) var(--gap-sm);
  color: rgba(255, 255, 255, 0.95);
  transition: color 300ms ease;
  pointer-events: none;
}
.wd-gnb > * {
  pointer-events: auto;
}
.wd-gnb--light {
  color: rgba(0, 0, 0, 0.95);
}
.wd-gnb__logo-link {
  display: block;
  line-height: 0;
}
.wd-gnb__logo {
  display: block;
  height: 18px;
  width: auto;
  transition: filter 300ms ease;
}
.wd-gnb--light .wd-gnb__logo {
  filter: invert(1);
}
.wd-gnb__right {
  position: absolute;
  right: var(--gutter);
  top: var(--gap-md);
}
.wd-gnb__menu-wrap {
  position: relative;
}
.wd-gnb__btn {
  white-space: nowrap;
}

/* ── Hero — sits above fixed guides (z-index: 3) ── */
.wd-hero {
  position: relative;
  z-index: 4;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #111;
  color: rgba(255, 255, 255, 0.95);
}
.wd-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(53deg, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.05));
  z-index: 2;
}
.wd-hero__info {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 10;
  padding: var(--gap-md) var(--gutter);
  display: flex;
  flex-direction: column;
}
.wd-hero__counter {
  margin-bottom: var(--gap-sm);
}
.wd-hero__tagline {
  margin-bottom: var(--gap-sm);
}
.wd-hero__title {
  letter-spacing: 0.12em;
}

/* ── Hero image slider ── */
.wd-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.wd-slider__slide {
  position: absolute;
  inset: 0;
  background: #111 no-repeat center / cover;
  opacity: 0;
  transition: opacity 800ms ease;
}
.wd-slider__slide--active {
  opacity: 1;
}

/* ── Content area (white) ── */
.wd-content {
  background: #fff;
  color: rgba(0, 0, 0, 0.95);
  padding-top: var(--gap-xl);
}

/* ── Read more toggle ── */
.wd-readmore {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}
.wd-readmore .s-body {
  margin-bottom: 0;
}
.wd-readmore__btn {
  align-self: flex-start;
}

/* ── Image gallery: orientation-aware row layout, 64vw centered ── */
.wd-gallery {
  position: relative;
  z-index: 4;
  width: 64vw;
  margin: 0 auto var(--gap-xl);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wd-gallery__row--full {
  display: block;
}
.wd-gallery__row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  align-items: start;
}
.wd-gallery__img-wrap {
  position: relative;
  overflow: hidden;
}
/* All gallery images: full width, natural height, no cropping */
.wd-gallery__img {
  display: block;
  width: 100%;
  height: auto;
}
.wd-gallery__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gutter);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transition: opacity 200ms ease;
}
.wd-gallery__img-wrap:hover .wd-gallery__overlay {
  opacity: 1;
}
.wd-gallery__overlay-btn {
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
}

/* ── Prev / Next navigation — 64vw centered, matches gallery width ── */
.wd-prevnext {
  position: relative;
  z-index: 4;
  width: 64vw;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: var(--gap-xl) 0 var(--gap-xl);
}
.wd-prevnext__prev {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-sm);
}
.wd-prevnext__next {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--gap-sm);
}

/* ══════════════════════════════════════════
   PRIVACY PAGE
   Single center column, white bg. Reuses s-* layout classes.
   ══════════════════════════════════════════ */

/* ── Effective date ── */
.p-meta {
  margin-bottom: var(--gap-sm);
}

/* ── Preamble ── */
.p-preamble {
  line-height: 1.9;
  letter-spacing: 0.04em;
  margin-bottom: var(--gap-xl);
}

/* ── Article block ── */
.p-article {
  margin-bottom: var(--gap-xl);
}
.p-article__head {
  margin-bottom: var(--gap-lg);
}

/* ── Body paragraph ── */
.p-body {
  line-height: 1.9;
  letter-spacing: 0.04em;
  margin-bottom: var(--gap-sm);
}

/* ── List ── */
.p-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-sm);
}
.p-list li::before {
  content: '— ';
}
.p-list--sub {
  margin-top: 6px;
  padding-left: 20px;
  gap: 4px;
}
.p-list--sub li::before {
  content: '— ';
}

/* ─────────────────────────────────────────
   LIGHTBOX
   ───────────────────────────────────────── */


.lb {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: var(--gap-sm) 0;
}

.lb__close {
  position: absolute;
  top: var(--gap-md);
  right: var(--gutter);
  color: rgba(255,255,255,0.7);
  transition: color 0.15s;
  z-index: 1;
}
.lb__close:hover { color: #fff; }

/* Stage: image */
.lb__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 var(--gutter-lg);
  min-height: 0;
}

.lb__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Thumbnail nav strip */
.lb__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gutter-sm);
  width: 100%;
  padding: 0 var(--gutter);
}

.lb__nav-arrow {
  flex-shrink: 0;
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}
.lb__nav-arrow:hover { color: #fff; }

.lb__thumbs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lb__thumbs::-webkit-scrollbar { display: none; }

.lb__thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  overflow: hidden;
  opacity: 0.45;
  transition: opacity 0.15s;
  border: 1px solid transparent;
}
.lb__thumb:hover { opacity: 0.75; }
.lb__thumb--active {
  opacity: 1;
  border-color: rgba(255,255,255,0.7);
}
.lb__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ══════════════════════════════════════════
   FEED PAGE
   White bg, scrollable. 4-col masonry grid.
   Card types: image | images (carousel) | video
   ══════════════════════════════════════════ */

.f-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Category filter bar ── */
.f-filter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--gutter-sm);
  padding: var(--gap-lg) var(--gutter) var(--gap-xl);
}

.f-filter__btn {
  white-space: nowrap;
}
.f-filter__btn--active .btn-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── 4-col masonry grid ── */
.f-masonry {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: var(--gutter-sm);
  padding: 0 var(--gutter) var(--gap-xl);
}
.f-masonry__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

/* ── Card ── */
.f-card {
  cursor: pointer;
}

/* ── Media container: natural height, no fixed ratio ── */
.f-card__media {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
}

/* Single image */
.f-single-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Carousel — natural height from source images (caller ensures same ratio per carousel) ── */
.f-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.f-carousel__track {
  display: flex;
  align-items: flex-start;
  width: 100%;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.f-carousel__slide {
  flex-shrink: 0;
  width: 100%;
}

.f-carousel__slide img {
  display: block;
  width: 100%;
  height: auto;
}

.f-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.85);
  transition: color 150ms ease;
  line-height: 1;
}
.f-carousel__arrow:hover { color: #fff; }
.f-carousel__arrow--prev { left: 6px; }
.f-carousel__arrow--next { right: 6px; }
.f-carousel__arrow .material-symbols-rounded {
  font-size: 24px;
}

.f-carousel__dots {
  position: absolute;
  bottom: calc(var(--gap-sm) / 2);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}

.f-carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 150ms ease;
}
.f-carousel__dot--active {
  background: rgba(255, 255, 255, 0.95);
}

/* ── YouTube embed — 16:9, iframe fills container ── */
.f-youtube {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.f-youtube__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Video — natural 16/9 height ── */
.f-video {
  position: relative;
  width: 100%;
  cursor: pointer;
}

.f-video__el {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.f-video__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  transition: background 150ms ease;
}
.f-video:hover .f-video__overlay {
  background: rgba(0, 0, 0, 0.28);
}
.f-video__overlay .material-symbols-rounded {
  font-size: 56px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

/* ── Caption: max 2 lines, ellipsis ── */
.f-caption {
  padding-top: calc(var(--gap-sm) / 2);
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Meta row: author | date (below caption) ── */
.f-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--gap-sm) 0 0;
}

/* ══════════════════════════════════════════
   FEED DETAIL PAGE
   Layout: GNB → subhead → media (64vw) → [gap] → body (35vw) → [gap] → CTA (35vw)
   ══════════════════════════════════════════ */
.fd-root { min-height: 100vh; }

/* ── Subhead: ( CATEGORY ) · author · date ── */
.fd-subhead-row {
  display: flex;
  justify-content: center;
  padding: var(--gap-lg) var(--gutter) var(--gap-xl);
}
.fd-subhead {
  display: flex;
  align-items: center;
  gap: calc(var(--gap-sm) / 2);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.fd-subhead-sep {
  opacity: 0.35;
}
.fd-cat-btn:hover .btn-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Media container: 33vw default (portrait/square), 65vw wide variant ── */
.fd-media-wrap {
  position: relative;
  z-index: 10;
  width: 30vw;
  margin: 0 auto var(--gap-lg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.fd-media-wrap--wide {
  width: 65vw;
}

/* Single image — fill container width, natural ratio */
.fd-media-wrap .f-single-img {
  width: 100%;
  height: auto;
}

/* Carousel in detail context — natural width centered, dark arrows for white bg */
.fd-media-wrap .f-carousel {
  width: 100%;
}
.fd-media-wrap .f-carousel__slide {
  display: flex;
  justify-content: center;
}
.fd-media-wrap .f-carousel__slide img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
}
.fd-media-wrap .f-carousel__arrow {
  color: rgba(255, 255, 255, 0.7);
}
.fd-media-wrap .f-carousel__arrow:hover {
  color: #fff;
}

/* Video and YouTube fill 64vw at 16:9 — well under 95vh on standard screens */
.fd-media-wrap .f-video,
.fd-media-wrap .f-youtube {
  width: 100%;
}

/* ── Body section: caption + paragraphs (33vw) ── */
.fd-col {
  position: relative;
  z-index: 4;
  width: 30vw;
  margin: 0 auto var(--gap-xl);
}

/* Caption — full text, no clamp */
.fd-caption {
  margin-bottom: var(--gap-sm);
}

/* Body paragraphs — pre-line preserves newlines within each paragraph */
.fd-body {
  white-space: pre-line;
}

/* Tighter paragraph spacing in detail body (overrides s-body gap-md) */
.fd-col .s-body {
  margin-bottom: var(--gap-sm);
}

/* ── CTA section: link button or job form (33vw) ── */
.fd-cta-col {
  position: relative;
  z-index: 4;
  width: 30vw;
  margin: 0 auto var(--gap-xl);
}

/* External link button row */
.fd-cta-link {
  display: flex;
  justify-content: center;
  margin-bottom: var(--gap-md);
}

/* ── Job application form ── */
.fd-job-form {
  /* no extra top margin — fd-cta-col gap handles spacing */
}

/* Hidden file input + styled label acting as click trigger */
.fd-file-input {
  display: none;
}
.fd-file-label {
  display: block;
  padding: 4px 0;
  font-style: italic;
  color: rgba(0,0,0,0.25);
  cursor: pointer;
  transition: color 120ms ease;
}
.fd-file-label:hover {
  color: rgba(0,0,0,0.6);
}
.fd-file-label--set {
  font-style: normal;
  color: rgba(0,0,0,0.95);
}

/* ──────────────────────────────────────────
   Agent Overlay — right-side panel (PDF design)
   ────────────────────────────────────────── */

.ag-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 20vw;
  background: #0a0a0a;
  z-index: 2000;
  pointer-events: none;
  animation: ag-panel-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Content wrapper — full panel width, fully clickable */
.ag-body {
  position: absolute;
  inset: 0;
  padding: var(--gap-md) var(--gutter) var(--gap-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  color: rgba(255, 255, 255, 0.95);
  pointer-events: auto;
}

@keyframes ag-panel-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Header row: HYPT AGENT ←→ ( X ) */
.ag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ag-title {
  color: rgba(255,255,255,0.95);
}

/* Input row */
.ag-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--gutter-sm);
  border-bottom: 0.5px solid currentColor;
  padding-bottom: 6px;
}
.ag-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font: inherit;
  color: inherit;
  caret-color: currentColor;
  padding: 0;
}
.ag-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.ag-submit-btn {
  flex-shrink: 0;
}

/* Single-turn result */
.ag-result {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  animation: ag-fade-in 200ms ease both;
}
@keyframes ag-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ag-section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}
.ag-section-label {
  color: rgba(255, 255, 255, 0.45);
}
.ag-answer {
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.9;
}
.ag-thinking {
  color: rgba(255, 255, 255, 0.95);
  font-style: italic;
  animation: ag-pulse 1.2s ease-in-out infinite;
}
@keyframes ag-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* Source cards — PAGE label + name (no thumbnail in mock) */
.ag-source {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 52px;
  gap: var(--gutter-sm);
  margin-bottom: var(--gap-sm);
  text-decoration: none;
}
.ag-source:last-of-type {
  margin-bottom: 0;
}
.ag-source__left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
}
.ag-source__meta {
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
}
.ag-source__thumb {
  width: var(--gap-lg);
  height: var(--gap-lg);
  object-fit: cover;
  flex-shrink: 0;
}
.ag-source__desc {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ag-source:hover .ag-source__desc {
  text-decoration: underline;
  text-underline-offset: 2px;
}
