/*
Theme Name: Caldris
Theme URI: https://caldris.example
Author: Caldris
Description: Caldris is a light, data-first WordPress theme for a crypto and multi-asset brokerage: hairline market tables, monospaced figures, TradingView quote boards, account tiers, research notes, contact and legal centre, with CRM-ready client forms. Figures are indicative and forms run in demo mode until the CRM is enabled.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caldris
*/

:root {
  color-scheme: dark;
  --cd-paper: #0b0c10;
  --cd-sheet: #111318;
  --cd-ink: #f2f0eb;
  --cd-slate: #9aa0ab;
  --cd-line: #242830;
  --cd-edge: #343942;
  --cd-ochre: #e09a43;
}

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

body {
  background: var(--cd-paper);
  color: var(--cd-ink);
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

.cd-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  letter-spacing: -0.01em;
}

.cd-eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.cd-hero {
  position: relative;
  isolation: isolate;
  background: #0f1014;
}

.cd-hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
}

.cd-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, #0f1014 0%, rgba(15, 16, 20, 0.92) 34%, rgba(15, 16, 20, 0.35) 62%, rgba(15, 16, 20, 0.15) 100%),
    linear-gradient(to top, #0f1014 0%, rgba(15, 16, 20, 0) 38%);
}

.cd-figure {
  position: relative;
  overflow: hidden;
  background: #0b0c10;
}

.cd-stage {
  position: relative;
  isolation: isolate;
}

.cd-stage::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  z-index: -1;
  background:
    radial-gradient(62% 54% at 72% 42%, rgba(224, 154, 67, 0.16), transparent 68%),
    radial-gradient(48% 48% at 22% 78%, rgba(90, 108, 140, 0.14), transparent 70%);
}

.cd-coin {
  display: block;
  width: 100%;
  height: 100%;
}

.cd-coin-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(5rem, 16vw, 11rem);
  font-weight: 700;
  color: rgba(224, 154, 67, 0.22);
  letter-spacing: -0.04em;
}

.cd-tick-live {
  transition: color 0.45s ease;
}

.cd-tick-live[data-dir="up"] {
  color: #3fd492;
}

.cd-tick-live[data-dir="down"] {
  color: #ff6b5e;
}

.cd-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cd-figure figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 1.25rem 1.25rem 1rem;
  color: #f1efe9;
  background: linear-gradient(to top, rgba(15, 16, 20, 0.88), rgba(15, 16, 20, 0));
  font-size: 0.8125rem;
  line-height: 1.5;
}

.cd-index {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.cd-rule {
  border: 0;
  border-top: 1px solid var(--cd-line);
  margin: 0;
}

.cd-hairline {
  box-shadow: inset 0 -1px 0 var(--cd-line);
}

.cd-table {
  border-collapse: collapse;
  width: 100%;
}

.cd-table th,
.cd-table td {
  border-bottom: 1px solid var(--cd-line);
  padding: 0.875rem 1rem;
  text-align: left;
  vertical-align: middle;
}

.cd-table thead th {
  border-bottom: 1px solid var(--cd-edge);
  font-size: 0.8125rem;
  letter-spacing: 0;
  color: var(--cd-slate);
  font-weight: 500;
  white-space: nowrap;
}

.cd-table tbody tr:last-child td {
  border-bottom: 0;
}

.cd-table tbody tr {
  transition: background-color 0.15s ease;
}

.cd-table tbody tr:hover {
  background: rgba(224, 154, 67, 0.06);
}

.cd-tick {
  display: flex;
  width: max-content;
  animation: cd-tick 44s linear infinite;
}

.cd-tick-wrap:hover .cd-tick {
  animation-play-state: paused;
}

@keyframes cd-tick {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.cd-field input,
.cd-field select,
.cd-field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--cd-edge);
  padding: 0.625rem 0;
  color: var(--cd-ink);
  font-size: 0.9375rem;
  border-radius: 0;
  transition: border-color 0.15s ease;
}

.cd-field input:focus,
.cd-field select:focus,
.cd-field textarea:focus {
  outline: none;
  border-bottom-color: var(--cd-ochre);
}

.cd-field input::placeholder,
.cd-field textarea::placeholder {
  color: #646b76;
}

.cd-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cd-slate) 50%), linear-gradient(135deg, var(--cd-slate) 50%, transparent 50%);
  background-position: calc(100% - 13px) calc(50% + 1px), calc(100% - 8px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.75rem;
}

.cd-check input[type="checkbox"] {
  appearance: auto;
  width: 1rem;
  height: 1rem;
  accent-color: var(--cd-ochre);
  flex: none;
  margin-top: 0.1875rem;
}

.cd-link-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.25s ease;
}

.cd-link-underline:hover {
  background-size: 100% 1px;
}

.cd-spark path {
  vector-effect: non-scaling-stroke;
}

.cd-prose p { margin-bottom: 1rem; }
.cd-prose p:last-child { margin-bottom: 0; }
.cd-prose ul { margin: 0 0 1rem 1.125rem; list-style: disc; }
.cd-prose li { margin-bottom: 0.4375rem; }
.cd-prose strong { font-weight: 600; }

.tradingview-widget-container iframe {
  color-scheme: normal;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cd-tick { animation: none; }
}
