/*
Theme Name: SPACE8 Production Editable
Theme URI: https://space8.pro/
Author: Barry Gavin / SPACE8
Description: Premium AI Production Ecosystem website for brands, creators, AI commercials, MV, content clips, and short-form advertising dramas.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: space8-production-editable
*/

:root {
  --s8p-bg: #f5f5f3;
  --s8p-paper: #ffffff;
  --s8p-ink: #080808;
  --s8p-soft-ink: #242424;
  --s8p-muted: #737373;
  --s8p-line: #dededb;
  --s8p-red: #d3121f;
  --s8p-red-dark: #8e0710;
  --s8p-smoke: #eeeeeb;
  --s8p-dark: #070707;
  --s8p-radius: 8px;
  --s8p-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--s8p-bg);
  color: var(--s8p-ink);
  font-family: "Noto Sans Thai", "IBM Plex Sans Thai", "Prompt", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.admin-bar .s8p-header {
  top: 32px;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.s8p-skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  padding: 10px 12px;
  border-radius: var(--s8p-radius);
  background: var(--s8p-ink);
  color: #fff;
}

.s8p-skip-link:focus {
  top: 16px;
}

.s8p-site {
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    var(--s8p-bg);
  background-size: 96px 96px;
}

.s8p-content > * {
  margin-top: 0;
  margin-bottom: 0;
}

.s8p-editor-note {
  padding: 12px clamp(18px, 4vw, 56px);
  background: #fff3f4;
  color: var(--s8p-red-dark);
  font-size: 13px;
  font-weight: 800;
}

.s8p-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(222, 222, 219, 0.76);
  background: rgba(245, 245, 243, 0.88);
  backdrop-filter: blur(18px);
}

.s8p-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.s8p-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.s8p-brand strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.28em;
}

.s8p-brand small {
  display: block;
  margin-top: 5px;
  color: var(--s8p-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.s8p-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--s8p-soft-ink);
  font-size: 13px;
  font-weight: 700;
}

.s8p-nav a {
  text-decoration: none;
}

.s8p-nav a:hover {
  color: var(--s8p-red);
}

.s8p-button,
.s8p-button-dark,
.s8p-ghost,
.s8p-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--s8p-radius);
  text-decoration: none;
  font-weight: 900;
}

.s8p-button {
  background: var(--s8p-red);
  color: #fff;
}

.s8p-button:hover {
  background: var(--s8p-red-dark);
}

.s8p-button-dark {
  background: var(--s8p-ink);
  color: #fff;
}

.s8p-ghost {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.s8p-hero {
  position: relative;
  min-height: 780px;
  display: grid;
  align-items: center;
  padding: 96px clamp(18px, 4vw, 56px) 48px;
  background: var(--s8p-dark);
  color: white;
}

.s8p-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 34%, rgba(0, 0, 0, 0.1) 68%, rgba(0, 0, 0, 0.28) 100%),
    var(--s8p-hero-image);
  background-position: center;
  background-size: cover;
  opacity: 0.98;
}

.s8p-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.s8p-hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.s8p-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}

.s8p-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--s8p-red);
}

.s8p-hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(50px, 9vw, 118px);
  line-height: 0.9;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.s8p-hero h1 span {
  color: var(--s8p-red);
}

.s8p-hero-lead {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.52;
}

.s8p-hero-sub {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.72;
}

.s8p-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.s8p-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.s8p-hero-tags span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.s8p-section {
  padding: clamp(68px, 9vw, 126px) clamp(18px, 4vw, 56px);
}

.s8p-section.is-dark {
  background: #070707;
  color: white;
}

.s8p-section.is-white {
  background: white;
}

.s8p-container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.s8p-section-head {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(280px, 1fr);
  gap: clamp(24px, 5vw, 82px);
  align-items: end;
  margin-bottom: 36px;
}

.s8p-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--s8p-red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}

.s8p-label::before {
  content: "";
  width: 8px;
  height: 8px;
  background: currentColor;
}

.s8p-section h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.s8p-section-head p {
  margin: 0;
  color: var(--s8p-muted);
  font-size: 18px;
  line-height: 1.8;
}

.is-dark .s8p-section-head p,
.is-dark .s8p-muted {
  color: rgba(255, 255, 255, 0.66);
}

.s8p-position-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.s8p-position-card,
.s8p-card,
.s8p-service,
.s8p-phase,
.s8p-system-item,
.s8p-price-card {
  border: 1px solid var(--s8p-line);
  border-radius: var(--s8p-radius);
  background: var(--s8p-paper);
}

.is-dark .s8p-card,
.is-dark .s8p-service,
.is-dark .s8p-phase,
.is-dark .s8p-system-item {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

.s8p-position-card {
  min-height: 210px;
  padding: 22px;
}

.s8p-position-card strong {
  display: block;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.s8p-position-card span {
  color: var(--s8p-red);
}

.s8p-position-card p {
  margin: 12px 0 0;
  color: var(--s8p-muted);
  font-size: 15px;
  line-height: 1.65;
}

.s8p-problem-grid,
.s8p-service-grid,
.s8p-revenue-grid,
.s8p-phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.s8p-service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.s8p-card,
.s8p-service,
.s8p-phase,
.s8p-price-card {
  padding: 24px;
}

.s8p-card em,
.s8p-service em,
.s8p-phase em {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--s8p-red);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.s8p-card h3,
.s8p-service h3,
.s8p-phase h3,
.s8p-price-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.24;
}

.s8p-card p,
.s8p-service p,
.s8p-phase p,
.s8p-price-card p {
  margin: 12px 0 0;
  color: var(--s8p-muted);
  line-height: 1.72;
}

.is-dark .s8p-card p,
.is-dark .s8p-service p,
.is-dark .s8p-phase p {
  color: rgba(255, 255, 255, 0.66);
}

.s8p-service ul,
.s8p-price-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.s8p-service li,
.s8p-price-card li {
  display: flex;
  gap: 9px;
  color: var(--s8p-soft-ink);
  font-size: 14px;
}

.is-dark .s8p-service li {
  color: rgba(255, 255, 255, 0.8);
}

.s8p-service li::before,
.s8p-price-card li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 8px;
  background: var(--s8p-red);
}

.s8p-showcase {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(320px, 1.18fr);
  gap: 28px;
  align-items: center;
}

.s8p-showcase-media {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: var(--s8p-radius);
  background: #111;
  box-shadow: var(--s8p-shadow);
}

.s8p-showcase-media img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.08);
}

.s8p-showcase-copy {
  display: grid;
  gap: 14px;
}

.s8p-system-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.s8p-system-item {
  min-height: 148px;
  padding: 18px;
}

.s8p-system-item strong {
  display: block;
  margin-bottom: 8px;
}

.s8p-system-item small {
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.55;
}

.s8p-youtube-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1.08fr);
  gap: 18px;
}

.s8p-youtube-panel {
  padding: 28px;
  border-radius: var(--s8p-radius);
  background: var(--s8p-ink);
  color: #fff;
}

.s8p-youtube-panel h3 {
  margin: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1;
}

.s8p-youtube-panel p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.75;
}

.s8p-pillar-list {
  display: grid;
  gap: 10px;
}

.s8p-pillar-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid var(--s8p-line);
  border-radius: var(--s8p-radius);
  background: white;
  font-weight: 800;
}

.s8p-pillar-list small {
  color: var(--s8p-red);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.s8p-revenue-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.s8p-price-card strong {
  display: block;
  margin-top: 16px;
  color: var(--s8p-red);
  font-size: 24px;
}

.s8p-cta {
  padding: clamp(76px, 10vw, 150px) clamp(18px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.34)),
    var(--s8p-cover-image);
  background-position: center;
  background-size: cover;
  color: white;
}

.s8p-cta-card {
  width: min(880px, 100%);
}

.s8p-cta h2 {
  margin: 0;
  font-size: clamp(42px, 8vw, 96px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.s8p-cta p {
  width: min(620px, 100%);
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.76;
}

.s8p-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--s8p-line);
  background: white;
  color: var(--s8p-muted);
  font-size: 13px;
}

.s8p-editable-fallback {
  padding: 80px clamp(18px, 4vw, 56px);
}

.s8p-footer strong {
  color: var(--s8p-ink);
  letter-spacing: 0.18em;
}

.s8p-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.66);
}

.s8p-modal-backdrop[hidden] {
  display: none;
}

.s8p-modal {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow-y: auto;
  border-radius: var(--s8p-radius);
  background: white;
  color: var(--s8p-ink);
  box-shadow: var(--s8p-shadow);
}

.s8p-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--s8p-line);
}

.s8p-modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.s8p-icon-button {
  min-width: 42px;
  min-height: 42px;
  padding: 10px;
  background: var(--s8p-smoke);
  color: var(--s8p-ink);
}

.s8p-modal-body {
  padding: 20px;
}

.s8p-modal-body ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.s8p-modal-body li {
  padding: 12px;
  border-radius: var(--s8p-radius);
  background: var(--s8p-smoke);
}

@media (max-width: 1080px) {
  .s8p-nav {
    display: none;
  }

  .s8p-section-head,
  .s8p-showcase,
  .s8p-youtube-layout {
    grid-template-columns: 1fr;
  }

  .s8p-position-grid,
  .s8p-problem-grid,
  .s8p-service-grid,
  .s8p-revenue-grid,
  .s8p-phase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .s8p-system-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.admin-bar .s8p-header {
    top: 46px;
  }

  .s8p-header {
    padding: 14px 16px;
  }

  .s8p-brand strong {
    font-size: 15px;
  }

  .s8p-button-dark {
    display: none;
  }

  .s8p-hero {
    min-height: 680px;
    padding: 84px 18px 34px;
  }

  .s8p-hero h1 {
    font-size: clamp(42px, 15vw, 72px);
    letter-spacing: 0.1em;
  }

  .s8p-position-grid,
  .s8p-problem-grid,
  .s8p-service-grid,
  .s8p-revenue-grid,
  .s8p-phase-grid,
  .s8p-system-grid {
    grid-template-columns: 1fr;
  }

  .s8p-showcase-media,
  .s8p-showcase-media img {
    min-height: 420px;
  }

  .s8p-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
