/* Point's night palette. The light palette and photographic assets stay intact.
   Loaded after the component styles; theme.js owns the resolved root attribute. */
html[data-point-theme="light"] { color-scheme: light; }

html[data-point-theme="dark"] {
  color-scheme: dark;
  --semantic-bg-page: #171615;
  --semantic-bg-card: #22211f;
  --semantic-text-primary: #f3f0eb;
  --semantic-text-secondary: #c0bbb4;
  --semantic-text-tertiary: #aaa49c;
  --semantic-text-contrast: #171615;
  --semantic-fill-primary: #292724;
  --semantic-fill-secondary: #38352f;
  --semantic-transparent-weak: rgb(243 240 235 / 6%);
  --semantic-transparent-core: rgb(243 240 235 / 15%);
  --semantic-transparent-strong: rgb(243 240 235 / 32%);
  --semantic-neutral-core: #e6e0d7;
  --semantic-neutral-strong: #f3f0eb;
  --semantic-neutral-weak: #292724;
  --color-border: var(--semantic-transparent-core);
  --tod-page: var(--semantic-bg-page);
  --tod-surface: var(--semantic-bg-page);
  --tod-wash: var(--semantic-bg-card);
  --tod-ink-1: var(--semantic-text-primary);
  --tod-ink-2: var(--semantic-text-primary);
  --tod-ink-3: var(--semantic-text-primary);
  --tod-ink-4: var(--semantic-text-primary);
  --tod-ink-5: var(--semantic-text-primary);
  --tod-ink-page: var(--semantic-text-primary);
  --point-menu-paper: #22211f;
  --point-menu-ink: #f3f0eb;
  --point-menu-accent: #f3f0eb;
  --point-client-logo-filter: grayscale(1) invert(1);
  color: var(--semantic-text-primary);
  background: var(--semantic-bg-page);
}

html[data-point-theme="dark"] body {
  color: var(--semantic-text-primary);
  background: var(--semantic-bg-page);
}

/* Keep navigation readable before deferred scroll handlers initialise. */
html[data-point-theme="dark"] .point-header {
  --semantic-text-contrast: #f3f0eb;
}

/* Match the entrance and navigation curtain before the destination is revealed. */
html[data-point-theme="dark"]::after,
html[data-point-theme="dark"] .point-intro {
  background: var(--semantic-bg-page);
  color: var(--semantic-text-primary);
}

/* Retain the changing skies with darker blue and warm charcoal stops. Inline
   gradients on the original pages require these explicit background overrides. */
html[data-point-theme="dark"] #home {
  --semantic-text-contrast: #f3f0eb;
  --sky-ink: #f3f0eb !important;
  background: linear-gradient(180deg in oklab, #24130f 0%, #19263d 16%, #2c4058 40%, #25313f 68%, #171615 100%) !important;
}

html[data-point-theme="dark"] :is(#services-intro, .core-work-hero, .core-case-hero, .blog-index-page .core-hero, .sd-hero) {
  background: linear-gradient(180deg in oklab, #283847 0%, #20282e 48%, var(--semantic-bg-page) 100%) !important;
}

html[data-point-theme="dark"] #contact-intro {
  background: linear-gradient(180deg in oklab, #493025 0%, #2b231e 52%, var(--semantic-bg-page) 100%) !important;
}

html[data-point-theme="dark"] #clients {
  background: var(--semantic-bg-page) !important;
}

html[data-point-theme="dark"] #approach:not(.point-ascii-cta) {
  --semantic-text-contrast: #f3f0eb;
  --sky-ink: #f3f0eb !important;
  background: linear-gradient(180deg in oklab, #171615 0%, #273747 35%, #18243b 72%, #151b28 100%) !important;
}

html[data-point-theme="dark"] #approach:not(.point-ascii-cta) a:first-child:is(:hover, :focus-visible) {
  color: #171615;
}

html[data-point-theme="dark"] :is(.core-cta, .sd-contact, .growth-page .gp-contact) {
  background: linear-gradient(180deg in oklab, var(--semantic-bg-page), #23303b);
}

/* These sections already have a dark art direction in the light version. */
html[data-point-theme="dark"] .point-footer {
  --semantic-text-contrast: #f3f0eb;
  color: #f3f0eb;
}

html[data-point-theme="dark"] .growth-page .gp-manifesto {
  background: #0c1018;
  color: #f3f0eb;
}

/* Monochrome assets only: photographs, video and case artwork are never inverted. */
html[data-point-theme="dark"] .client-tile img {
  /* The animated faces use this same inherited filter. Inversion preserves
     white cutouts inside detailed black marks instead of flattening them. */
  filter: var(--point-client-logo-filter);
}

html[data-point-theme="dark"] :is(.gp-partner-logos img, .partner-mark img) {
  filter: brightness(0) invert(1);
}

html[data-point-theme="dark"] :is(.point-ascii-cta__fallback, .sd-art__static, .error-brand img, .error-wordmark, .point-cookie__brand img) {
  filter: invert(1);
}

html[data-point-theme="dark"] :is(.point-ascii-cta, .point-ascii-cta__ascii, .point-intro .point-ascii-cta__ascii) {
  color: var(--semantic-text-primary);
}

html[data-point-theme="dark"] .point-ascii-cta {
  background: var(--semantic-bg-page);
}

html[data-point-theme="dark"] :is(.point-ascii-cta__link, .work-case-gate__contact) {
  background: #e6e0d7;
  color: #171615;
}

html[data-point-theme="dark"] :is(.point-ascii-cta__link, .work-case-gate__contact):hover {
  background: #f3f0eb;
}

html[data-point-theme="dark"] .point-offers-gallery {
  --color-alabaster-grey: var(--semantic-bg-page);
  --color-onyx: var(--semantic-text-primary);
  --color-strawberry: var(--semantic-text-primary);
}

html[data-point-theme="dark"] .point-offers-gallery [data-orbit-list-item][data-active="true"] {
  color: #171615;
}

html[data-point-theme="dark"] .offer-media {
  background: var(--semantic-bg-card);
}

html[data-point-theme="dark"] .point-testimonial__role {
  color: var(--semantic-text-secondary);
}

html[data-point-theme="dark"] .about-page .about-studio__stage::before {
  background: radial-gradient(ellipse at center, rgb(125 150 143 / 13%), transparent 68%);
}

html[data-point-theme="dark"] .about-page .about-studio__float {
  background: var(--semantic-bg-card);
}

html[data-point-theme="dark"] .about-page .about-quote {
  background: transparent;
  color: var(--semantic-text-primary);
}

html[data-point-theme="dark"] .about-quote__art {
  fill: currentColor;
  stroke: currentColor;
}

html[data-point-theme="dark"] .about-quote__mark {
  stroke: currentColor;
}

html[data-point-theme="dark"] .about-page .about-studio__pause {
  background: var(--semantic-bg-card);
  color: var(--semantic-text-primary);
}

html[data-point-theme="dark"] .about-page .about-studio__pause:hover {
  background: var(--semantic-fill-secondary);
}

/* Menu and search surfaces use the same paper/ink pair as the page. */
html[data-point-theme="dark"] .point-menu-link[aria-current="page"] {
  color: #171615;
}

html[data-point-theme="dark"] .point-menu-link:not([aria-current]):hover {
  background: var(--semantic-transparent-weak);
}

html[data-point-theme="dark"] .point-dock {
  --dock-fill: rgb(34 33 31 / 94%);
  --dock-text: #f3f0eb;
  --dock-wash: rgb(243 240 235 / 12%);
}

html[data-point-theme="dark"] .point-dock .point-dock-result > img {
  filter: invert(1);
}

html[data-point-theme="dark"] .point-dock-tabs > a:not([aria-current="true"]):not(:hover):not(:focus-visible),
html[data-point-theme="dark"] .point-dock-search > svg,
html[data-point-theme="dark"] .point-dock-search input::placeholder {
  opacity: .7;
}

/* Cookie choices and the standalone 404 also honour a saved appearance. */
html[data-point-theme="dark"] .point-cookie {
  border-color: var(--semantic-transparent-core);
  background: var(--semantic-bg-card);
  color: var(--semantic-text-primary);
}

html[data-point-theme="dark"] :is(.point-cookie__copy, .point-cookie__details p, .point-cookie__close, .error-eyebrow, .error-description, .error-footer p) {
  color: var(--semantic-text-secondary);
}

html[data-point-theme="dark"] :is(.point-cookie__details h3, .point-cookie__details a) {
  color: var(--semantic-text-primary);
}

html[data-point-theme="dark"] .point-cookie__details {
  border-color: var(--semantic-transparent-core);
}

html[data-point-theme="dark"] .point-cookie__button--secondary {
  border-color: var(--semantic-transparent-strong);
  background: transparent;
  color: var(--semantic-text-primary);
}

html[data-point-theme="dark"] :is(.point-cookie__button--primary, .point-cookie-policy-button, .error-skip) {
  border-color: #e6e0d7;
  background: #e6e0d7;
  color: #171615;
}

html[data-point-theme="dark"] :is(.point-cookie__button--primary, .point-cookie-policy-button):hover {
  border-color: #f3f0eb;
  background: #f3f0eb;
}

html[data-point-theme="dark"] :is(.point-cookie__close:hover, .point-cookie__button--secondary:hover, .error-languages a:hover, .error-languages a:focus-visible) {
  background: var(--semantic-transparent-weak);
  color: var(--semantic-text-primary);
}

html[data-point-theme="dark"] .point-cookie__button--secondary:hover {
  border-color: var(--semantic-transparent-strong);
}

html[data-point-theme="dark"] .error-number__point {
  background: var(--semantic-text-primary);
}

html[data-point-theme="dark"] :is(.error-shell a, .error-skip, .point-ascii-cta__link, .point-testimonials [data-slot="carousel-content"], .point-cookie, .point-cookie button, .point-cookie a):focus-visible {
  outline-color: #f3f0eb;
}
