/* ---------------------------------------------------------------------------
 * Editorial parallax design system — global stylesheet.
 * Import this once at the root of an app:  import 'pascal-editorial-ds/styles.css'
 *
 * Contents: font → tokens → reset → base type → utility classes → motion classes
 * ------------------------------------------------------------------------ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

/* ---------------------------------------------------------------------------
 * Design tokens — editorial parallax design system
 * Every value here is the source of truth. Components read these vars.
 * ------------------------------------------------------------------------ */

:root {
  /* --- Colour: two inks, two grounds, zero accent ------------------------
   * The accent colour of a page is always the project imagery, never the UI.
   */
  --ed-canvas: #f5f5f5;
  --ed-surface: #ffffff;
  --ed-ink: #0a0a0a;
  --ed-ink-pure: #000000;

  --ed-text-primary: #0a0a0a;
  --ed-text-secondary: rgba(10, 10, 10, 0.6);
  --ed-text-muted: rgba(10, 10, 10, 0.3);
  --ed-text-ghost: rgba(10, 10, 10, 0.08);

  --ed-text-primary-inv: #ffffff;
  --ed-text-secondary-inv: rgba(255, 255, 255, 0.6);
  --ed-text-muted-inv: rgba(255, 255, 255, 0.3);
  --ed-text-ghost-inv: rgba(255, 255, 255, 0.06);

  --ed-hairline: rgba(10, 10, 10, 0.08);
  --ed-hairline-inv: rgba(255, 255, 255, 0.12);

  /* --- Typography -------------------------------------------------------
   * One family. Two weights. Negative tracking everywhere — the signature.
   */
  --ed-font-family: Inter, "Inter Fallback", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ed-weight-medium: 500;
  --ed-weight-semibold: 600;

  --ed-size-display: clamp(64px, 8.8vw, 148px);
  --ed-size-h1: clamp(48px, 6vw, 100px);
  --ed-size-h2: clamp(22px, 2vw, 30px);
  --ed-size-h3: 24px;
  --ed-size-lead: 22px;
  --ed-size-body: 16px;
  --ed-size-caption: 12px;

  --ed-tracking-display: -0.05em;
  --ed-tracking-text: -0.04em;
  --ed-tracking-tight: -0.02em;

  --ed-leading-display: 1.1;
  --ed-leading-h1: 1.05;
  --ed-leading-h2: 1.2;
  --ed-leading-body: 1.4;

  /* --- Radius -----------------------------------------------------------
   * 25px is THE radius of this system: every media frame and major card.
   */
  --ed-radius-media: 25px;
  --ed-radius-card: 18px;
  --ed-radius-chip: 16px;
  --ed-radius-pill: 100px;

  /* --- Space ------------------------------------------------------------ */
  --ed-space-xs: 8px;
  --ed-space-sm: 16px;
  --ed-space-md: 24px;
  --ed-space-lg: 40px;
  --ed-space-xl: 64px;
  --ed-space-2xl: 96px;
  --ed-space-3xl: 160px;
  --ed-space-4xl: 240px;

  /* --- Layout ------------------------------------------------------------ */
  --ed-max-width: 1512px;
  --ed-gutter: clamp(20px, 5.5vw, 94px);
  --ed-grid-gap: 24px;

  /* --- Motion -----------------------------------------------------------
   * Slow and heavy, never springy. No overshoot anywhere in this system.
   */
  --ed-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ed-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ed-duration-fast: 220ms;
  --ed-duration-base: 480ms;
  --ed-duration-slow: 900ms;
  --ed-duration-reveal: 1200ms;

  /* --- Elevation --------------------------------------------------------- */
  --ed-shadow-float: 0 24px 60px -20px rgba(10, 10, 10, 0.18);
  --ed-shadow-nav: 0 8px 32px -8px rgba(10, 10, 10, 0.12);
}

/* --- Reset (minimal, opinionated) --------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--ed-canvas);
  color: var(--ed-text-secondary);
  font-family: var(--ed-font-family);
  font-size: var(--ed-size-body);
  font-weight: var(--ed-weight-medium);
  line-height: var(--ed-leading-body);
  letter-spacing: var(--ed-tracking-text);
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

::selection {
  background: var(--ed-ink);
  color: var(--ed-surface);
}

/* --- Layout utilities ---------------------------------------------------- */

/* Page-width container with the system's gutters. */
.ed-container {
  width: 100%;
  max-width: var(--ed-max-width);
  margin: 0 auto;
  padding-left: var(--ed-gutter);
  padding-right: var(--ed-gutter);
}

/* Vertical rhythm between sections. Generous by design — the whitespace IS the luxury. */
.ed-section {
  position: relative;
  padding-top: var(--ed-space-3xl);
  padding-bottom: var(--ed-space-3xl);
}

.ed-section--tight {
  padding-top: var(--ed-space-2xl);
  padding-bottom: var(--ed-space-2xl);
}

.ed-section--tall {
  padding-top: var(--ed-space-4xl);
  padding-bottom: var(--ed-space-4xl);
}

/* Inverted section: the black bands that punctuate a page. */
.ed-section--dark {
  background: var(--ed-ink);
  color: var(--ed-text-secondary-inv);
}

/* The system's canonical text layout: small label left, content right.
   Never a full-width paragraph. */
.ed-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--ed-space-2xl);
  align-items: start;
}

.ed-stack {
  display: grid;
  gap: var(--ed-space-md);
}

@media (max-width: 900px) {
  .ed-split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ed-space-md);
  }
}

/* --- Type utilities ------------------------------------------------------ */

.ed-display {
  font-size: var(--ed-size-display);
  font-weight: var(--ed-weight-semibold);
  line-height: var(--ed-leading-display);
  letter-spacing: var(--ed-tracking-display);
  color: var(--ed-text-primary);
}

.ed-h1 {
  font-size: var(--ed-size-h1);
  font-weight: var(--ed-weight-semibold);
  line-height: var(--ed-leading-h1);
  letter-spacing: var(--ed-tracking-display);
  color: var(--ed-text-primary);
}

.ed-h2 {
  font-size: var(--ed-size-h2);
  font-weight: var(--ed-weight-medium);
  line-height: var(--ed-leading-h2);
  letter-spacing: var(--ed-tracking-text);
  color: var(--ed-text-primary);
}

.ed-h3 {
  font-size: var(--ed-size-h3);
  font-weight: var(--ed-weight-semibold);
  line-height: 1.15;
  letter-spacing: var(--ed-tracking-tight);
  color: var(--ed-text-primary);
}

.ed-lead {
  font-size: var(--ed-size-lead);
  font-weight: var(--ed-weight-semibold);
  line-height: 1.2;
  letter-spacing: var(--ed-tracking-display);
}

.ed-body {
  font-size: var(--ed-size-body);
  font-weight: var(--ed-weight-medium);
  line-height: var(--ed-leading-body);
  letter-spacing: var(--ed-tracking-text);
}

.ed-caption {
  font-size: var(--ed-size-caption);
  font-weight: var(--ed-weight-medium);
  line-height: 1.3;
  letter-spacing: var(--ed-tracking-text);
  color: var(--ed-text-muted);
}

/* Oversized, very low contrast heading sitting behind a section. */
.ed-ghost {
  color: var(--ed-text-ghost);
}

.ed-on-dark .ed-display,
.ed-on-dark .ed-h1,
.ed-on-dark .ed-h2,
.ed-on-dark .ed-h3,
.ed-section--dark .ed-display,
.ed-section--dark .ed-h1,
.ed-section--dark .ed-h2,
.ed-section--dark .ed-h3 {
  color: var(--ed-text-primary-inv);
}

.ed-section--dark .ed-caption {
  color: var(--ed-text-muted-inv);
}

.ed-section--dark .ed-ghost {
  color: var(--ed-text-ghost-inv);
}

/* --- Surface utilities --------------------------------------------------- */

/* Any media or major card. 25px is not negotiable. */
.ed-media {
  border-radius: var(--ed-radius-media);
  overflow: hidden;
  background: var(--ed-ink);
}

.ed-card {
  border-radius: var(--ed-radius-card);
  background: var(--ed-surface);
}

.ed-pill {
  border-radius: var(--ed-radius-pill);
}

.ed-rule {
  border: 0;
  border-top: 1px solid var(--ed-hairline);
}

.ed-section--dark .ed-rule {
  border-top-color: var(--ed-hairline-inv);
}

/* --- Motion classes ------------------------------------------------------
 * Driven by the hooks (useReveal / useParallax). Entrances are opacity +
 * translate only — never scale, never rotation, never a bounce.
 * ---------------------------------------------------------------------- */

.ed-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--ed-duration-reveal) var(--ed-ease-out),
    transform var(--ed-duration-reveal) var(--ed-ease-out);
  transition-delay: var(--ed-delay, 0ms);
  will-change: opacity, transform;
}

.ed-reveal[data-visible="true"] {
  opacity: 1;
  transform: none;
}

/* Per-character entrance used by the oversized headings. */
.ed-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity var(--ed-duration-slow) var(--ed-ease-out),
    transform var(--ed-duration-slow) var(--ed-ease-out);
  transition-delay: var(--ed-delay, 0ms);
}

.ed-char[data-visible="true"] {
  opacity: 1;
  transform: none;
}

/* Escape hatch: put `ed-static` on <html> to freeze every entrance in its
   final state. Used by screenshot tooling and static exports. */
.ed-static .ed-reveal,
.ed-static .ed-char {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ed-reveal,
  .ed-char {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  [data-ed-parallax] {
    transform: none !important;
  }
}
