/* -------------------------------------------------------------
   Minimalist Editorial Styling
   Preserves the pure HTML simplicity while creating a refined,
   high-end typographic showcase.
   ------------------------------------------------------------- */
:root {
  --bg-color: #faf9f6;
  --text-primary: #0d0d11;
  --text-muted: #5e5e68;
  --ink-color: #0a0a0f;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@supports (min-height: 100dvh) {
  html, body {
    min-height: 100dvh;
  }
}

body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(2.5rem, 10vh, 5.5rem) 1.5rem 3rem 1.5rem;
  min-height: 100vh;
}

@media (min-width: 768px) {
  body {
    justify-content: center;
    padding: 3rem 2.5rem;
  }
}

.editorial-wrapper {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

/* Subhead */
h2.subhead {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
  line-height: 1.3;
}

/* Main Headline Container */
h1.headline-container {
  position: relative;
  margin: 0.25rem 0 1.25rem 0;
  line-height: 1;
}

/* Accessible Static Fallback (Shown by default / No-JS / Errors) */
.headline-fallback {
  display: block;
  font-size: clamp(3rem, 11vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--text-primary);
}

/* Progressive Liquid SVG Headline (Activated once initialized) */
.headline-svg {
  display: none;
  width: 100%;
  height: auto;
  max-width: 620px;
  overflow: visible;
  user-select: none;
  vertical-align: middle;
}

.js-active .headline-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.js-active .headline-svg {
  display: block;
}

/* SVG typography text styling */
.ink-text,
.glyph-text,
.glyph-item {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 94px;
  letter-spacing: -0.035em;
  fill: var(--ink-color);
}

.headline-svg path:not(.material-path) {
  fill: var(--ink-color);
}

/* Layered Liquid Obsidian Material System */
.material-layer {
  pointer-events: none;
}

.material-path {
  pointer-events: none;
}

/* Layer 3: Contact Shading (Dark necking & junction occlusion) */
.ink-shading-path {
  fill: none;
  stroke: #020204;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Layer 4: Restrained 3D Volume Reflections (Subtle soft gray) */
.ink-reflection-path {
  fill: none;
  stroke: #8e8e9e;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Layer 5: Narrow Curved Specular Highlights (Liquid obsidian gleams) */
.ink-highlight-path {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Specular Glint Arcs / Droplet Beads */
.ink-glint-path {
  fill: #ffffff;
  stroke: none;
}

/* Caption / Body text */
p.caption {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  margin-top: 1.75rem;
  line-height: 1.4;
}

/* Accessibility: Respect Reduced-Motion Preference */
@media (prefers-reduced-motion: reduce) {
  .headline-svg path {
    display: none !important;
  }
  .headline-svg .material-layer {
    display: none !important;
  }
  .headline-svg #ink-canvas {
    filter: none !important;
  }
}
