/* ==========================================================================
   AI Works · HUGHCHARON (chartercharon.com family style)
   Pure Black #000 · Impact / Helvetica Neue · Pale Lavender Active Highlight
   Direct Single-Column Native <video> Presentation · Zero Dependencies
   ========================================================================== */

:root {
  --bg: #000000;
  --ink: #ffffff;
  --ink-secondary: #c9c2cd;
  --ink-muted: #bbbbbb;
  --line: #444444;

  /* Exact chartercharon.com pale lavender active highlight & hover sage */
  --lavender: #e6c7eb;
  --lavender-hover: #f0daf4;
  --lavender-ink: #000000;
  --nav-hover: rgba(127, 181, 135, 0.79);

  /* Inherit site fonts first, fall back to crisp system Impact & Helvetica Neue */
  --font-display: Impact, "OriginalImpact", "OriginalAnton", "Arial Narrow",
    "PingFang SC", "Hiragino Sans GB", "Heiti SC", sans-serif;
  --font-body: "OriginalHelvetica", "Helvetica Neue", Helvetica, Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --stage-max: 980px;
  --featured-max: 1080px;
  --gutter: clamp(1rem, 3.6vw, 2.5rem);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

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

video,
img {
  display: block;
  max-width: 100%;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

/* Accessibility & Keyboard Focus */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.55rem 0.95rem;
  background: var(--lavender);
  color: var(--lavender-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 4px;
}

/* ==========================================================================
   Site Navigation (Centered Horizontal, 15px / 400, Lavender Active Block)
   ========================================================================== */
.site-header {
  width: 100%;
  padding: clamp(1.6rem, 4.5vw, 4.5rem) var(--gutter) 0.5rem;
  background-color: var(--bg);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 16px;
  color: var(--lavender);
  background-color: transparent;
  border-radius: 0;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background-color: var(--nav-hover);
  color: var(--ink);
}

.site-nav a.is-active {
  background-color: var(--lavender);
  color: var(--ink);
}

.site-nav a.is-active:hover,
.site-nav a.is-active:focus-visible {
  background-color: var(--lavender);
  color: var(--ink);
}

/* ==========================================================================
   Main Container & Intro
   ========================================================================== */
.page-main {
  width: 100%;
  padding-inline: var(--gutter);
}

.page-intro {
  max-width: var(--stage-max);
  margin: clamp(3rem, 6.5vw, 5.5rem) auto clamp(3.5rem, 7vw, 5.5rem);
  text-align: center;
}

.page-eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

/* Editing / AI Works H1: 56px–67px desktop, Impact 400 */
.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.625rem, 5vw, 4.1875rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--ink);
  overflow-wrap: break-word;
}

.page-subtitle {
  margin: 1.15rem auto 0;
  max-width: 44ch;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-secondary);
}

.section-jumps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.75rem;
  margin-top: 2rem;
}

.section-jumps a {
  font-size: 0.9375rem;
  color: var(--ink-secondary);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-jumps a:hover,
.section-jumps a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--lavender);
}

/* ==========================================================================
   Featured Opening Reel
   ========================================================================== */
.featured-section {
  max-width: var(--featured-max);
  margin: 0 auto clamp(5rem, 10vw, 8.5rem);
}

.featured-kicker {
  margin: 0 0 0.75rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
}

/* ==========================================================================
   Category Sections (H2 ~81px Desktop)
   ========================================================================== */
.category-section {
  max-width: var(--stage-max);
  margin: 0 auto clamp(5.5rem, 11vw, 9.5rem);
  scroll-margin-top: 2rem;
}

.category-heading-wrap {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  text-align: center;
}

/* Category H2: ~81px on desktop, Impact 400, responsive clamp without mobile overflow */
.category-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.375rem, 7vw, 5.0625rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--ink);
  overflow-wrap: break-word;
}

.category-sub {
  margin: 0.65rem 0 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.video-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(4.2rem, 8.5vw, 7.5rem);
}

/* ==========================================================================
   Direct Video Entry (Editing-Page Style: Big Title Above, Pure Video, Clean Link Below)
   ========================================================================== */
.video-entry {
  width: 100%;
  margin: 0 auto;
}

.video-header {
  margin-bottom: 1.2rem;
  text-align: center;
}

/* Work Title H3: ~38px on desktop, Impact 400 */
.video-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.3vw, 2.375rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: normal;
  color: var(--ink);
  overflow-wrap: break-word;
}

.video-desc {
  margin: 0.6rem auto 0;
  max-width: 58ch;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

/* Media Stage — zero card border, zero overlay, true native proportion */
.video-stage {
  width: 100%;
  margin: 0 auto;
  background-color: #000000;
  display: flex;
  justify-content: center;
}

.video-stage.is-portrait {
  max-width: min(100%, 480px);
}

.video-player {
  width: 100%;
  height: auto;
  max-height: 85vh;
  background-color: #000000;
  object-fit: contain;
}

.video-stage.is-portrait .video-player {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
}

/* Clean minimal footer row below each video */
.video-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.95rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.video-open-link {
  color: var(--ink-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 0.1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.video-open-link:hover,
.video-open-link:focus-visible {
  color: var(--lavender);
  border-bottom-color: var(--lavender);
}

/* ==========================================================================
   Claude 8bit External Feature (Clean, Direct, No Spec Plate / Fake Frame)
   ========================================================================== */
.external-feature {
  max-width: var(--stage-max);
  margin: 0 auto clamp(5.5rem, 10vw, 8.5rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
  text-align: center;
  scroll-margin-top: 2rem;
}

.external-feature-inner {
  max-width: 680px;
  margin: 0 auto;
}

.external-feature-kicker {
  margin: 0 0 0.7rem;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
}

.external-feature-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: break-word;
}

.external-feature-desc {
  margin: 1rem auto 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.external-feature-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.btn-external {
  display: inline-block;
  padding: 0.78rem 1.75rem;
  background-color: var(--lavender);
  color: var(--lavender-ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-external:hover:not([aria-disabled="true"]) {
  background-color: var(--lavender-hover);
}

.btn-external[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.external-feature-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Empty State & Footer
   ========================================================================== */
.empty-state {
  max-width: var(--stage-max);
  margin: 4rem auto 6rem;
  text-align: center;
  color: var(--ink-secondary);
  font-size: 1rem;
}

.site-footer {
  width: 100%;
  padding: 58px var(--gutter) 48px;
  min-height: 225px;
  text-align: center;
  background-color: var(--bg);
}

.footer-inner {
  max-width: var(--stage-max);
  margin: 0 auto;
}

.home-email {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.home-email:hover,
.home-email:focus-visible {
  color: var(--lavender);
}

.home-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 22px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: #dfd7e3;
}

.home-social a:hover,
.home-social a:focus-visible {
  color: var(--lavender);
}

.home-copyright {
  margin: 23px 0 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
}

.original-service-link {
  display: inline-block;
  margin-top: 20px;
  font-family: Arial, var(--font-body);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.original-service-link:hover,
.original-service-link:focus-visible {
  color: var(--lavender);
}

/* ==========================================================================
   Mobile Responsive Refinements
   ========================================================================== */
@media (max-width: 640px) {
  .site-nav a {
    min-height: 44px;
    padding: 0 11px;
    font-size: 14px;
  }

  .video-stage.is-portrait {
    max-width: 100%;
  }

  .video-player {
    max-height: 78vh;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Bilingual navigation */
.language-switch {display:flex; justify-content:center; gap:12px; padding:14px 20px 0; font:12px/1.5 Arial,sans-serif; letter-spacing:.06em; color:#777;}
.language-switch a {color:#aaa; text-decoration:none; padding:5px;}
.language-switch a[aria-current="true"] {color:#d6c5f0;}
.language-switch a:hover,.language-switch a:focus-visible {color:#fff;}

/* Published performance: text and source links only. */
.work-performance { margin: 1rem auto 0; font-family: var(--font-body); }
.performance-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .35rem 1rem; margin: .45rem 0; color: var(--ink-secondary); font-size: .88rem; line-height: 1.6; }
.performance-platform { color: var(--ink); font-weight: 600; }
.performance-row strong { color: var(--ink); font-size: 1rem; font-weight: 600; }
.performance-row a { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.performance-note { margin: .55rem 0 0; color: var(--ink-secondary); font-size: .72rem; line-height: 1.5; }

.work-variants { margin: 1.5rem auto 0; text-align: center; }
.work-variants summary { display: list-item; width: fit-content; margin: auto; cursor: pointer; padding: .6rem; color: var(--ink-secondary); font-size: .9rem; }
.work-variants[open] > .video-entry { margin-top: 2rem; }
.interactive-section { margin-top: clamp(4rem, 8vw, 7rem); text-align: center; }
.interactive-entry { border-top: 1px solid #ffffff28; padding: 3rem 0; }
.interactive-entry:first-of-type { margin-top: 2rem; }
.interactive-open { display: inline-block; margin-top: 1.2rem; color: var(--ink); text-decoration: underline; text-underline-offset: .35em; font-size: 1rem; }

/* Project authorship, screenshots and a concise making-of. */
.work-role { max-width: 76ch; margin: 1rem auto 0; font-size: .84rem; line-height: 1.75; color: var(--ink-secondary); }
.work-role > span { display: block; margin-bottom: .15rem; font-size: .66rem; letter-spacing: .12em; color: var(--lavender); }
.interactive-cover-link { display: block; margin: 1.8rem auto 0; }
.interactive-cover { width: 100%; height: auto; }
.work-process { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; margin-top: 3.5rem; text-align: left; }
.work-process figure { margin: 0; }
.process-character { width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.work-process figcaption { text-align: center; font-size: .72rem; color: var(--ink-secondary); margin-top: .75rem; }
.work-process h4 { margin: 0 0 1.6rem; font-size: 1.35rem; font-weight: 500; }
.work-process h5 { margin: 1.3rem 0 .45rem; color: var(--lavender); font-size: .85rem; font-weight: 500; }
.work-process p { margin: 0; color: var(--ink-secondary); font-size: .9rem; line-height: 1.8; }
@media(max-width:640px) { .work-process { grid-template-columns: 1fr; } .process-character { max-height: 400px; } }
