/*
Theme Name: Sentient Spaces Builder
Theme URI: https://sentientspaces.design
Author: Orion Hansen
Description: Minimal classic shell for Sentient Spaces. Elementor owns page content, Xpro Theme Builder owns the header and footer. Carries the Kiln Dark base tokens, Google fonts, and the press-and-hold morphogen entry gate.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sentient-spaces-builder
Tags: elementor, one-column, custom-colors
*/

:root {
  --ss-page: #07080a;
  --ss-surface: #0e1116;
  --ss-ink: #e8e4dc;
  --ss-accent: #9fd8c3;
  --ss-clay: #e0b3a4;
  --ss-muted: #8b919b;
  --ss-line: #262c34;
  --ss-fade-delay: 1.5s;
  --ss-fade: 5s;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ss-page);
  color: var(--ss-ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

a { color: var(--ss-accent); text-decoration: none; }
a:hover, a:focus { color: var(--ss-clay); }

img { max-width: 100%; height: auto; }

/* ---------- entry gate ---------- */

html.ss-gate-locked, html.ss-gate-locked body { overflow: hidden; }

.ss-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--ss-page);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 1;
  transition: opacity var(--ss-fade) ease var(--ss-fade-delay);
  -webkit-tap-highlight-color: transparent;
}

.ss-gate.is-open { opacity: 0; pointer-events: none; }

.ss-gate canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.ss-gate__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  pointer-events: none;
}

.ss-gate__mark {
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ss-ink);
}

.ss-gate__meta,
.ss-gate__prompt,
.ss-gate__hint {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ss-gate__meta { font-size: 11px; color: var(--ss-muted); }
.ss-gate__spacer { height: 22vh; min-height: 90px; }
.ss-gate__prompt { font-size: 12px; color: var(--ss-accent); }

.ss-gate__hint {
  font-family: 'Newsreader', Georgia, serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  line-height: 1.5;
  max-width: 34ch;
  color: var(--ss-muted);
}

/* Opening the gate: the instruction goes at once, the wordmark a beat later. */
.ss-gate.is-open .ss-gate__prompt,
.ss-gate.is-open .ss-gate__hint { opacity: 0; transition: none; }
.ss-gate__mark,
.ss-gate__meta { transition: opacity 0.4s ease; }
.ss-gate.is-open .ss-gate__mark,
.ss-gate.is-open .ss-gate__meta { opacity: 0; }

/* Everything but the gate waits for the colony to close. */
body.ssb-gated > *:not(.ss-gate) {
  opacity: 0;
  transition: opacity 1.4s ease 0.2s;
}

body.ssb-gated.ss-entered > *:not(.ss-gate) { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ss-gate { transition-duration: 0.3s; transition-delay: 0s; }
  body.ssb-gated > *:not(.ss-gate) { transition-duration: 0.3s; }
}

/* ---------- fallback content shell (Elementor normally replaces this) ---------- */

.ssb-shell { max-width: 76ch; margin: 0 auto; padding: 96px 24px; }
.ssb-shell__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ss-muted);
  display: block;
  margin-bottom: 14px;
}
.ssb-shell h1 { font-size: clamp(38px, 6vw, 62px); margin-bottom: 24px; }
.ssb-shell h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 18px; }
.ssb-shell article + article { margin-top: 48px; border-top: 1px solid var(--ss-line); padding-top: 48px; }
/* ---------- contact form (WPForms, modern markup) ---------- */
.wpforms-container,
.wpforms-container.wpforms-container-full,
div[id^="wpforms-"].wpforms-container {
  --wpforms-field-background-color: #0c0f14;
  --wpforms-field-border-color: #39424f;
  --wpforms-field-size-input-height: 48px;
  --wpforms-field-size-padding-h: 16px;
  --wpforms-field-border-color-spare: #303845;
  --wpforms-field-text-color: #e8e4dc;
  --wpforms-field-menu-color: #0b0d11;
  --wpforms-field-border-radius: 2px;
  --wpforms-label-color: #8b919b;
  --wpforms-label-sublabel-color: #6c727c;
  --wpforms-label-error-color: #d98b7a;
  --wpforms-button-background-color: rgba(0, 0, 0, 0);
  --wpforms-button-border-color: #39424f;
  --wpforms-button-text-color: #e8e4dc;
  --wpforms-button-border-style: solid;
  --wpforms-button-border-radius: 2px;
  --wpforms-page-break-color: #9fd8c3;
}
.wpforms-container .wpforms-field-label,
.wpforms-container .wpforms-field-sublabel {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
div.wpforms-container .wpforms-required-label,
.wpforms-container legend .wpforms-required-label { color: #9fd8c3 !important; }
.wpforms-container .wpforms-field-label { margin-bottom: 8px; }
.wpforms-container .wpforms-field-sublabel {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #5d636d !important;
}
.wpforms-container input,
.wpforms-container textarea,
.wpforms-container select {
  font-family: 'Newsreader', Georgia, serif !important;
  font-size: 16px !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
  border-color: #9fd8c3 !important;
  background-color: #0e1116 !important;
  outline: none;
}
.wpforms-container input::placeholder,
.wpforms-container textarea::placeholder { color: #5d636d; }
.wpforms-container button[type="submit"] {
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 11px !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  min-height: 48px !important;
  padding: 0 30px !important;
  min-width: 132px;
  transition: background-color 0.2s ease;
}
.wpforms-container button[type="submit"] {
  background-color: rgba(0, 0, 0, 0) !important;
  border: 1px solid #39424f !important;
  color: #e8e4dc !important;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.wpforms-container button[type="submit"]:hover,
.wpforms-container button[type="submit"]:focus {
  border-color: #9fd8c3 !important;
  color: #9fd8c3 !important;
}
/* ---------- about ---------- */
.ss-about-portrait .elementor-widget-container {
  position: relative;
  background: #0c0f14;
  border: 1px solid #262c34;
}
.ss-about-portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
/* Until a portrait is uploaded the widget shows Elementor's grey placeholder;
   dim it and label the slot so the section reads as reserved, not broken. */
.ss-about-portrait img[src*="elementor/assets/images/placeholder"] {
  opacity: 0.06;
  filter: grayscale(1);
}
.ss-about-portrait:has(img[src*="elementor/assets/images/placeholder"]) .elementor-widget-container::after {
  content: 'Portrait';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5d636d;
}
.ss-statement { max-width: 34ch; margin-inline: auto; }

/* ---------- cart trigger + window ---------- */
.ss-cart-mount { display: flex; align-items: center; }
.ss-cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  min-height: 40px;
  background: none;
  border: 1px solid #39424f;
  border-radius: 2px;
  color: #e8e4dc;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.ss-cart-trigger:hover,
.ss-cart-trigger:focus-visible { border-color: #9fd8c3; color: #9fd8c3; outline: none; }
.ss-cart-count { font-size: 11px; letter-spacing: 0.08em; }

.ss-cart-window { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ss-cart-window[hidden] { display: none; }
.ss-cart-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 7, 0.82); }
.ss-cart-window-inner {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #0b0d11;
  border: 1px solid #262c34;
  padding: 30px 32px 32px;
  font-family: 'Newsreader', Georgia, serif;
}
.ss-cart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #262c34;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8b919b;
}
.ss-cart-head button {
  background: none;
  border: 0;
  padding: 0;
  color: #8b919b;
  font: inherit;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.ss-cart-head button:hover { color: #9fd8c3; }

.ss-cart-items { list-style: none; margin: 0; padding: 0; }
.ss-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid #1b2027;
}
.ss-cart-thumb {
  width: 62px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  flex: none;
  background: #0c0f14;
  border: 1px solid #262c34;
}
.ss-cart-item-body { flex: 1; min-width: 0; }
.ss-cart-item-title { font-size: 18px; line-height: 1.3; color: #e8e4dc; }
.ss-cart-item-meta,
.ss-cart-item-meta p {
  margin: 6px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8b919b;
}
.ss-cart-item-line { margin-top: 10px; font-size: 15px; color: #b6bcc6; }
.ss-cart-item-line .amount { color: #b6bcc6; }
.ss-cart-remove {
  flex: none;
  width: 30px;
  height: 30px;
  background: none;
  border: 1px solid #262c34;
  border-radius: 2px;
  color: #8b919b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.ss-cart-remove:hover { border-color: #9fd8c3; color: #9fd8c3; }
.ss-cart-remove[disabled] { opacity: 0.4; cursor: default; }

.ss-cart-foot { padding-top: 22px; }
.ss-cart-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b919b;
}
.ss-cart-total span:last-child { font-size: 20px; letter-spacing: 0.04em; color: #e8e4dc; }
.ss-cart-note { margin: 16px 0 0; font-size: 14px; line-height: 1.6; color: #8b919b; }
.ss-cart-checkout {
  display: block;
  margin-top: 24px;
  padding: 15px 24px;
  border: 1px solid #9fd8c3;
  border-radius: 2px;
  color: #9fd8c3;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.ss-cart-checkout:hover { background: #9fd8c3; color: #07080a; }
.ss-cart-keep {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: none;
  border: 0;
  color: #8b919b;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.ss-cart-keep:hover { color: #9fd8c3; }
.ss-cart-empty { margin: 26px 0 0; font-size: 17px; color: #8b919b; }

.ss-shop-empty {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b919b;
}