/* ==========================================================================
   TEN Digitals — Coming Soon
   Palette pulled from the logo: ember/amber gradient on true black,
   with warm (not blue) blacks so the accent never looks pasted on.
   ========================================================================== */

:root {
  --td-ink: #000000;
  --td-char: #120c07;          /* warm ember-black for fields + surfaces */
  --td-ember: #f86800;         /* deep end of the logo gradient */
  --td-amber: #f59313;         /* light end of the logo gradient */
  --td-rust: #8a3a02;          /* dimmed ember for rules */
  --td-bone: #f4ede4;          /* warm white, matches the wordmark */
  --td-ash: #9b9088;           /* secondary text */
  --td-line: rgba(248, 104, 0, 0.22);

  --td-display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --td-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --td-gutter: clamp(20px, 5vw, 76px);
  --td-block: clamp(20px, 3.4vw, 44px);
}

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

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

body.td-body {
  margin: 0;
  padding: 0;
  background: var(--td-ink);
  color: var(--td-bone);
  font-family: var(--td-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.td-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--td-amber);
  outline-offset: 3px;
}

/* --- Page shell ---------------------------------------------------------- */

.td-page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--td-block);
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--td-block) var(--td-gutter);
}

/* Diagonal lattice — an echo of the interlocking diamonds in the mark. */
.td-weave,
.td-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.td-weave {
  z-index: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(248, 104, 0, 0.07) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(-45deg, rgba(248, 104, 0, 0.07) 0 1px, transparent 1px 88px);
  -webkit-mask-image: radial-gradient(120% 90% at 72% 45%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 88%);
  mask-image: radial-gradient(120% 90% at 72% 45%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 88%);
}

.td-glow {
  z-index: 0;
  background:
    radial-gradient(46% 52% at 78% 44%, rgba(248, 104, 0, 0.20), transparent 70%),
    radial-gradient(38% 42% at 8% 96%, rgba(245, 147, 19, 0.10), transparent 72%);
}

/* --- Header -------------------------------------------------------------- */

.td-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.td-logo { display: inline-block; line-height: 0; }

.td-logo img {
  width: clamp(168px, 20vw, 250px);
  height: auto;
  display: block;
}

.td-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--td-ash);
}

.td-dot {
  width: 7px;
  height: 7px;
  background: var(--td-ember);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(248, 104, 0, 0.14);
  flex: none;
}

/* --- Main split ---------------------------------------------------------- */

.td-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.td-copy { max-width: 640px; }

.td-title {
  font-family: var(--td-display);
  font-weight: 500;
  font-size: clamp(38px, 5.4vw, 74px);
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0 0 clamp(16px, 2vw, 24px);
}

.td-title .td-line { display: block; }

.td-title .td-shade {
  background: linear-gradient(96deg, var(--td-amber), var(--td-ember) 68%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.td-lede {
  margin: 0 0 clamp(24px, 2.8vw, 34px);
  max-width: 54ch;
  font-size: clamp(15px, 1.15vw, 17px);
  color: var(--td-ash);
}

/* --- Countdown ----------------------------------------------------------- */

.td-countdown {
  display: flex;
  align-items: flex-start;
  gap: clamp(10px, 1.8vw, 22px);
  margin-bottom: clamp(20px, 2.4vw, 28px);
}

.td-unit { min-width: 0; }

.td-num {
  display: block;
  font-family: var(--td-display);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--td-bone);
}

.td-unit-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--td-ash);
}

/* Diamond separators instead of colons — same geometry as the mark. */
.td-sep {
  width: 8px;
  height: 8px;
  margin-top: clamp(16px, 2.4vw, 32px);
  flex: none;
  background: var(--td-rust);
  transform: rotate(45deg);
}

.td-launched {
  font-family: var(--td-display);
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.05;
  margin: 0 0 24px;
}

/* --- Build meter --------------------------------------------------------- */

.td-meter { margin-bottom: clamp(24px, 2.8vw, 34px); }

.td-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--td-ash);
  margin-bottom: 10px;
  max-width: 460px;
}

.td-meter-track {
  position: relative;
  height: 2px;
  max-width: 460px;
  background: rgba(244, 237, 228, 0.12);
  overflow: hidden;
}

.td-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--td-amber), var(--td-ember));
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Signup -------------------------------------------------------------- */

.td-form-label {
  display: block;
  font-size: 13.5px;
  color: var(--td-bone);
  margin-bottom: 12px;
}

.td-form {
  display: flex;
  gap: 12px;
  max-width: 470px;
  flex-wrap: wrap;
}

.td-field {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--td-line);
  color: var(--td-bone);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.25s ease;
}

.td-field::placeholder { color: #6d6058; }
.td-field:focus { outline: none; border-bottom-color: var(--td-ember); }
.td-field:focus-visible { outline: none; }

.td-submit {
  flex: none;
  padding: 14px 26px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(100deg, var(--td-amber), var(--td-ember));
  color: #150800;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  /* clipped corner: the same 45° cut the logo is built from */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.td-submit:hover { filter: brightness(1.1); }
.td-submit:active { transform: translateY(1px); }
.td-submit[disabled] { opacity: 0.55; cursor: progress; }

.td-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--td-ash);
  min-height: 20px;
}

.td-note a { color: var(--td-amber); text-decoration-color: var(--td-line); text-underline-offset: 3px; }
.td-note a:hover { text-decoration-color: var(--td-ember); }

.td-msg { font-size: 13.5px; margin: 14px 0 0; min-height: 20px; }
.td-msg:empty { margin: 0; min-height: 0; }
.td-msg[data-state="ok"] { color: var(--td-amber); }
.td-msg[data-state="error"] { color: #ff8b6b; }

/* --- Art column ---------------------------------------------------------- */

.td-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 460px;
}

.td-art img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 26px 80px rgba(248, 104, 0, 0.34));
  animation: td-drift 13s ease-in-out infinite;
  transform-origin: center;
}

@keyframes td-drift {
  0%, 100% { transform: translateY(-8px) rotate(-1.2deg); }
  50%      { transform: translateY(10px) rotate(1.2deg); }
}

/* --- Footer -------------------------------------------------------------- */

.td-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  flex-wrap: wrap;
  padding-top: clamp(16px, 2vw, 24px);
  border-top: 1px solid rgba(244, 237, 228, 0.09);
  font-size: 13px;
  color: var(--td-ash);
}

.td-list {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.td-services li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.td-services li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--td-rust);
  transform: rotate(45deg);
  flex: none;
}

.td-social a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.td-social a:hover {
  color: var(--td-bone);
  border-bottom-color: var(--td-ember);
}

.td-copyright { margin: 0; }

/* --- Load sequence: one orchestrated reveal, then the page holds still ---- */

.td-reveal > * {
  opacity: 0;
  transform: translateY(14px);
  animation: td-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.td-reveal > *:nth-child(1) { animation-delay: 0.05s; }
.td-reveal > *:nth-child(2) { animation-delay: 0.13s; }
.td-reveal > *:nth-child(3) { animation-delay: 0.21s; }
.td-reveal > *:nth-child(4) { animation-delay: 0.29s; }
.td-reveal > *:nth-child(5) { animation-delay: 0.37s; }
.td-reveal > *:nth-child(6) { animation-delay: 0.45s; }
.td-reveal > *:nth-child(7) { animation-delay: 0.53s; }

@keyframes td-in {
  to { opacity: 1; transform: none; }
}

/* --- Responsive ---------------------------------------------------------- */

/* Short laptop screens: keep the whole page on one screen. */
@media (min-width: 901px) and (max-height: 900px) {
  .td-title { font-size: clamp(34px, 4.4vw, 58px); }
  .td-num { font-size: clamp(30px, 3.6vw, 48px); }
  .td-lede { margin-bottom: 22px; font-size: 15px; }
  .td-countdown { margin-bottom: 18px; }
  .td-meter { margin-bottom: 22px; }
  .td-art { max-width: 380px; }
  .td-page { gap: 22px; }
}

@media (max-width: 900px) {
  .td-main {
    grid-template-columns: 1fr;
    align-content: center;
    gap: clamp(24px, 6vw, 40px);
  }
  .td-art {
    order: -1;
    justify-self: start;
    max-width: min(240px, 46vw);
  }
  .td-copy { max-width: 100%; }
  .td-weave {
    -webkit-mask-image: radial-gradient(140% 80% at 50% 30%, #000 0%, transparent 92%);
    mask-image: radial-gradient(140% 80% at 50% 30%, #000 0%, transparent 92%);
  }
  .td-glow { background: radial-gradient(60% 40% at 30% 22%, rgba(248, 104, 0, 0.22), transparent 72%); }
}

@media (max-width: 560px) {
  .td-page { gap: 26px; }
  .td-head { gap: 12px; }
  .td-countdown { gap: 10px; }
  .td-num { font-size: clamp(32px, 12vw, 48px); }
  .td-sep { margin-top: 14px; width: 6px; height: 6px; }
  .td-form { max-width: 100%; }
  .td-submit { flex: 1 1 100%; }
  .td-foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  .td-services { gap: 6px 18px; }
  .td-services li + li::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .td-art img { animation: none; }
  .td-reveal > * { opacity: 1; transform: none; animation: none; }
  .td-meter-fill { transition: none; }
  * { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Hardening
   Some themes print heading and body colours straight into wp_head, where a
   normal dequeue can't reach them — that turns headline lines dark and makes
   them vanish against the black. These declarations pin the brand colours down
   so the page renders the same on any theme.
   -------------------------------------------------------------------------- */

body.td-body {
  background: var(--td-ink) !important;
  color: var(--td-bone) !important;
  font-family: var(--td-sans) !important;
}

body.td-body .td-title,
body.td-body .td-title .td-line,
body.td-body .td-num {
  color: var(--td-bone) !important;
  font-family: var(--td-display) !important;
}

body.td-body .td-title .td-shade,
body.td-body .td-launched {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(96deg, var(--td-amber), var(--td-ember) 68%) !important;
  -webkit-background-clip: text;
  background-clip: text;
}

/* If background-clip:text is unavailable or stripped by an optimiser plugin,
   fall back to solid ember rather than invisible text. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  body.td-body .td-title .td-shade,
  body.td-body .td-launched {
    color: var(--td-ember) !important;
    -webkit-text-fill-color: var(--td-ember);
    background-image: none !important;
  }
}

body.td-body .td-lede,
body.td-body .td-note,
body.td-body .td-status,
body.td-body .td-unit-label,
body.td-body .td-meter-head,
body.td-body .td-foot,
body.td-body .td-foot a {
  color: var(--td-ash) !important;
}

body.td-body .td-form-label { color: var(--td-bone) !important; }

body.td-body .td-field {
  color: var(--td-bone) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.td-body .td-submit {
  color: #150800 !important;
  border-radius: 0 !important;
  text-transform: none !important;
}

body.td-body .td-note a,
body.td-body .td-social a:hover { color: var(--td-amber) !important; }

/* Line boxes: enough room for descenders so tall lines never collide. */
body.td-body .td-title { padding-bottom: 0.06em; }
body.td-body .td-title .td-line { display: block; line-height: 1.16; }
