/* ==========================================================================
   TrustedCloudShop — Base layer
   Element defaults and layout primitives for the Cloud Command Center
   direction. Components live in components.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: #06070F;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: #06070F !important;
  color: var(--tcs-ink-body);
  font-family: var(--tcs-font-sans);
  font-size: var(--tcs-fs-base);
  line-height: var(--tcs-lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A single fixed halo behind everything, so the page has depth without each
   section carrying its own gradient. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 120vh;
  background: var(--tcs-grad-halo);
  pointer-events: none;
  z-index: 0;
}
#page, .site { position: relative; z-index: 1; }

#page, #content, .site-content, .ast-container, .entry-content, .ast-article-single,
.site, .ast-plain-container, .ast-separate-container { background: transparent !important; }

/* --- Headings -------------------------------------------------------------
   Display face, tight tracking, and a deliberate step between levels. */
h1, h2, h3, h4, h5, h6, .entry-title {
  margin: 0 0 var(--tcs-4);
  color: var(--tcs-ink);
  font-family: var(--tcs-font-display);
  font-weight: 700;
  line-height: var(--tcs-lh-tight);
  letter-spacing: var(--tcs-track-tight);
  text-wrap: balance;
}
h1 { font-size: var(--tcs-fs-3xl); }
h2 { font-size: var(--tcs-fs-2xl); }
h3 { font-size: var(--tcs-fs-xl); line-height: var(--tcs-lh-snug); }
h4 { font-size: var(--tcs-fs-lg); line-height: var(--tcs-lh-snug); }

p { margin: 0 0 var(--tcs-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--tcs-violet-bright); text-decoration-color: rgba(159, 134, 255, .38); text-underline-offset: .2em; }
a:hover { color: var(--tcs-ink); text-decoration-color: currentColor; }

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 var(--tcs-4); padding-left: 1.25rem; }
li { margin-bottom: var(--tcs-2); }
li:last-child { margin-bottom: 0; }

strong, b { color: var(--tcs-ink); font-weight: 600; }
hr { border: 0; height: 1px; background: var(--tcs-grad-edge); margin: var(--tcs-8) 0; }

code, kbd, pre { font-family: var(--tcs-font-mono); font-size: .9em; }
code {
  background: var(--tcs-surface-2);
  padding: .12em .4em;
  border-radius: var(--tcs-r-xs);
  color: var(--tcs-violet-bright);
}

/* --- Forms ---------------------------------------------------------------- */
input, select, textarea, button { font: inherit; color: inherit; }

input[type="text"], input[type="search"], input[type="email"], input[type="url"],
input[type="tel"], input[type="number"], input[type="password"], textarea, select {
  width: 100%;
  padding: .8rem 1rem;
  background: var(--tcs-navy);
  border: 1px solid var(--tcs-line);
  border-radius: var(--tcs-r-sm);
  color: var(--tcs-ink);
  transition: border-color var(--tcs-dur-fast) var(--tcs-ease),
              box-shadow var(--tcs-dur-fast) var(--tcs-ease);
}
input::placeholder, textarea::placeholder { color: var(--tcs-ink-faint); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--tcs-violet);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .22);
}

/* --- Focus ---------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--tcs-violet-bright);
  outline-offset: 2px;
  border-radius: var(--tcs-r-xs);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: rgba(124, 92, 255, .38); color: var(--tcs-ink); }

* { scrollbar-width: thin; scrollbar-color: var(--tcs-line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--tcs-line-strong); border-radius: 999px; }
*::-webkit-scrollbar-track { background: transparent; }

/* --- Layout primitives ----------------------------------------------------- */
/* Astra wraps the content area in a flex .ast-container. Without this the
   main element is a shrink-to-fit flex item that sizes to .tcs-wrap's
   max-width and then sits at flex-start, pushing the whole page left of
   centre on viewports wider than the container. It must fill the row and
   let .tcs-wrap do the centring. */
.tcs-main {
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
  min-width: 0;
}
.ast-container { justify-content: center; }

.tcs-wrap {
  width: 100%;
  max-width: var(--tcs-container);
  margin-inline: auto;
  padding-inline: var(--tcs-gutter);
}
.tcs-wrap--narrow { max-width: 780px; }
.tcs-wrap--mid    { max-width: 1040px; }

.tcs-section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.tcs-section--tight { padding-block: clamp(2.25rem, 5vw, 4rem); }

/* A slab is a full-bleed change of surface, used to segment the page. */
.tcs-slab { position: relative; background: var(--tcs-navy); }
.tcs-slab::before, .tcs-slab::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: var(--tcs-grad-edge); opacity: .55;
}
.tcs-slab::before { top: 0; }
.tcs-slab::after { bottom: 0; }

.tcs-grid { display: grid; gap: var(--tcs-4); }
@media (min-width: 640px)  { .tcs-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .tcs-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .tcs-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tcs-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* --- Utilities ------------------------------------------------------------- */
.tcs-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.tcs-skip {
  position: absolute; left: var(--tcs-4); top: -100px; z-index: 999;
  padding: var(--tcs-3) var(--tcs-5);
  background: var(--tcs-violet); color: #fff;
  font-weight: 600; border-radius: var(--tcs-r-sm); text-decoration: none;
  transition: top var(--tcs-dur) var(--tcs-ease);
}
.tcs-skip:focus { top: var(--tcs-4); color: #fff; }

/* The mono label is the signature small-text treatment of this design. */
.tcs-label {
  display: inline-flex; align-items: center; gap: var(--tcs-2);
  font-family: var(--tcs-font-mono);
  font-size: var(--tcs-fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tcs-track-label);
  text-transform: uppercase;
  color: var(--tcs-violet-bright);
}
.tcs-label::before {
  content: ""; width: 6px; height: 6px; flex: none;
  background: var(--tcs-violet); transform: rotate(45deg);
}
.tcs-label--muted { color: var(--tcs-ink-muted); }
.tcs-label--muted::before { background: var(--tcs-ink-faint); }
.tcs-label--plain::before { display: none; }

.tcs-lede { font-size: var(--tcs-fs-lg); color: var(--tcs-ink-body); max-width: 62ch; }
.tcs-muted { color: var(--tcs-ink-muted); }
.tcs-center { text-align: center; }
.tcs-center .tcs-lede { margin-inline: auto; }
.tcs-center .tcs-label { justify-content: center; }

/* Section head: label, rule, heading. Used across every listing view. */
.tcs-shead { margin-bottom: var(--tcs-7); max-width: 66ch; }
.tcs-shead__rule { height: 1px; background: var(--tcs-grad-edge); margin: var(--tcs-4) 0; opacity: .7; }
.tcs-shead--center { margin-inline: auto; text-align: center; }
.tcs-shead h2 { margin-bottom: var(--tcs-3); }

.tcs-tablescroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Keep the admin bar clear of the sticky header. */
body.admin-bar .tcs-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tcs-header { top: 46px; } }
