/* PARAMANT design-system.css v3.0
   Source of truth: PARAMANT-DESIGN-SYSTEM.md
   Two colors: #000000 (Paramant Black) + #d4ff00 (Paramant Lime)
   Two weights: 400 regular, 700 bold. Monospace only. Zero radius.
   No hex values, no raw px sizing below :root. */


/* ═══════════════════════════════════════════════════
   TOKENS
   ═══════════════════════════════════════════════════ */
:root {
  /* Colors — two hues, opacity derivatives only */
  --black:        #000000;
  --lime:         #d4ff00;
  --lime-dim:     rgba(212,255,0,.45);
  --lime-hair:    rgba(212,255,0,.22);
  --lime-ghost:   rgba(212,255,0,.18);
  --black-dim:    rgba(0,0,0,.55);
  --black-hair:   rgba(0,0,0,.22);
  --black-ghost:  rgba(0,0,0,.18);

  /* Document mode colors (Template B only) */
  --doc-bg:       #f4efe2;
  --doc-ink:      #0a0a0a;
  --doc-ink-dim:  rgba(10,10,10,.6);

  /* Typography — system mono stack, no external loads */
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Monaco,
          Consolas, "Liberation Mono", "Courier New", monospace;

  /* Type scale (rem, 1rem = 16px) */
  --text-xs:   0.625rem;            /* 10px — eyebrows, meta, microprint */
  --text-sm:   0.75rem;             /* 12px — labels, nav, secondary UI */
  --text-base: 0.875rem;            /* 14px — body default */
  --text-md:   1rem;                /* 16px — emphasis within body */
  --text-lg:   1.125rem;            /* 18px — sub-headings, small wordmarks */
  --text-xl:   1.5rem;              /* 24px — H4, card titles */
  --text-2xl:  2rem;                /* 32px — H3 */
  --text-3xl:  3rem;                /* 48px — H2 */
  --text-4xl:  5.5rem;              /* 88px — prices, metric numbers */
  --text-5xl:  clamp(3.5rem, 11vw, 11rem);    /* H1 on web */
  --text-6xl:  clamp(7.5rem, 18vw, 17.5rem);  /* hero metrics, oversized numbers */

  /* Spacing — 4px base, modular */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   24px;
  --space-6:   32px;
  --space-7:   48px;
  --space-8:   64px;
  --space-9:   96px;
  --space-10:  128px;
  --space-11:  160px;

  /* Containers */
  --container-xl: 1440px;
  --container-lg: 1200px;
  --container-md: 760px;
  --container-sm: 480px;

  /* Motion */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --ease-sharp:    cubic-bezier(0.2, 0, 0, 1);
}


/* ═══════════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

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

img, video, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

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


/* ═══════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════ */
html, body {
  background: var(--black);
  color: var(--lime);
  font-family: var(--mono);
  font-size: var(--text-base);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.0;
  text-transform: uppercase;
}
h1 { font-size: var(--text-5xl);  letter-spacing: -.05em; }
h2 { font-size: var(--text-3xl);  letter-spacing: -.03em; }
h3 { font-size: var(--text-2xl);  letter-spacing: -.02em; }
h4 { font-size: var(--text-xl);   letter-spacing: -.01em; }
h5 { font-size: var(--text-lg);   letter-spacing: .02em;  }
h6 { font-size: var(--text-md);   letter-spacing: .04em;  }

p + p {
  margin-top: var(--space-4);
}


/* ═══════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════ */
::selection {
  background: var(--lime);
  color: var(--black);
}
.invert ::selection {
  background: var(--black);
  color: var(--lime);
}
.doc ::selection {
  background: var(--doc-ink);
  color: var(--doc-bg);
}


/* ═══════════════════════════════════════════════════
   FOCUS
   ═══════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.invert :focus-visible {
  outline-color: var(--black);
}
.doc :focus-visible {
  outline-color: var(--doc-ink);
}


/* ═══════════════════════════════════════════════════
   SECTION WRAPPERS
   ═══════════════════════════════════════════════════ */

/* Normal: black bg, lime fg (default — set by body) */

/* Inverted: lime bg, black fg */
.invert {
  background: var(--lime);
  color: var(--black);
}

/* Document mode (Template B): warm bone bg, near-black ink */
.doc {
  background: var(--doc-bg);
  color: var(--doc-ink);
  font-size: var(--text-base);
  line-height: 1.55;
}


/* ═══════════════════════════════════════════════════
   CONTAINERS
   ═══════════════════════════════════════════════════ */
.container,
.container-lg,
.container-md,
.container-sm {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-7);
}
.container    { max-width: var(--container-lg); }
.container-lg { max-width: var(--container-xl); }
.container-md { max-width: var(--container-md); }
.container-sm { max-width: var(--container-sm); }

@media (max-width: 768px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm {
    padding-inline: var(--space-5);
  }
}


/* ═══════════════════════════════════════════════════
   LAYOUT HELPERS
   ═══════════════════════════════════════════════════ */
.stack {
  display: flex;
  flex-direction: column;
}
.stack > * + * {
  margin-top: var(--stack-gap, var(--space-5));
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cluster-gap, var(--space-4));
  align-items: center;
}


/* ═══════════════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════════════ */
.sec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  column-gap: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--lime-hair);
  margin-bottom: var(--space-8);
}
.invert .sec-head {
  border-bottom-color: var(--black-hair);
}

.sec-head .num {
  font-family: var(--mono);
  font-size: clamp(5rem, 10vw, 10rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -.05em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.invert .sec-head .num {
  color: var(--black);
}

.sec-head h2,
.sec-head .title {
  font-family: var(--mono);
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  text-transform: uppercase;
  line-height: 1.0;
  margin: 0;
  align-self: end;
}

.sec-head .tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .16em;
  line-height: 1.55;
  text-align: right;
  color: var(--lime-dim);
  font-weight: 400;
  align-self: end;
}
.invert .sec-head .tag {
  color: var(--black-dim);
}

@media (max-width: 768px) {
  .sec-head {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .sec-head .tag {
    grid-column: 1 / -1;
    text-align: left;
    margin-top: var(--space-2);
  }
}


/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-family: var(--mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-sharp),
              color var(--duration-base) var(--ease-sharp),
              border-color var(--duration-base) var(--ease-sharp);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}
.btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary: lime fill, black text. Hover: outline. */
.btn-primary {
  background: var(--lime);
  color: var(--black);
  border-color: var(--lime);
}
.btn-primary:hover {
  background: transparent;
  color: var(--lime);
}

/* Secondary: outline. Hover: lime fill. */
.btn-secondary {
  background: transparent;
  color: var(--lime);
  border-color: var(--lime);
}
.btn-secondary:hover {
  background: var(--lime);
  color: var(--black);
}

/* Tertiary: text link, no box. */
.btn-tertiary {
  background: none;
  color: var(--lime-dim);
  border: none;
  padding-left: 0;
  padding-right: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  letter-spacing: .08em;
}
.btn-tertiary:hover {
  color: var(--lime);
  text-decoration-color: var(--lime);
}

/* Inverted context overrides */
.invert .btn-primary {
  background: var(--black);
  color: var(--lime);
  border-color: var(--black);
}
.invert .btn-primary:hover {
  background: transparent;
  color: var(--black);
}
.invert .btn-secondary {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.invert .btn-secondary:hover {
  background: var(--black);
  color: var(--lime);
}
.invert .btn-tertiary {
  color: var(--black-dim);
}
.invert .btn-tertiary:hover {
  color: var(--black);
  text-decoration-color: var(--black);
}


/* ═══════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════ */
.card {
  border: 1px solid var(--lime-hair);
  padding: var(--space-6);
  transition: transform var(--duration-base) var(--ease-sharp);
}
.card:hover {
  transform: translateY(-2px);
}
.invert .card {
  border-color: var(--black-hair);
}


/* ═══════════════════════════════════════════════════
   DROPZONE
   ═══════════════════════════════════════════════════ */
.dropzone {
  position: relative;
  border: 2px solid var(--lime);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-sharp);
}
.dropzone:hover,
.dropzone.drag-over {
  background: var(--lime-ghost);
}

.dropzone-num {
  position: absolute;
  top: -2px;
  left: -2px;
  background: var(--black);
  padding: var(--space-1) var(--space-2);
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--lime);
  line-height: 1;
  user-select: none;
}

.dropzone-main {
  font-family: var(--mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -.02em;
  text-transform: uppercase;
  line-height: 1.0;
  margin-bottom: var(--space-3);
}

.dropzone-sub {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--lime-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Spec grid inside dropzone */
.dropzone-spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--lime-hair);
  border: 1px solid var(--lime-hair);
  margin-top: var(--space-5);
  font-size: var(--text-xs);
}
.dropzone-spec-cell {
  background: var(--black);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}
.dropzone-spec-key {
  color: var(--lime-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
  display: block;
}
.dropzone-spec-val {
  color: var(--lime);
  font-weight: 700;
  letter-spacing: .04em;
}

/* Hidden file input */
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}


/* ═══════════════════════════════════════════════════
   COMPLIANCE STRIP
   ═══════════════════════════════════════════════════ */
.compliance-strip {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--lime-hair);
  overflow: hidden;
}
.compliance-strip-cell {
  flex: 1 0 auto;
  padding: var(--space-3) var(--space-4);
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  border-right: 1px solid var(--lime-hair);
  white-space: nowrap;
}
.compliance-strip-cell:last-child {
  border-right: none;
}
.compliance-strip-cell::before {
  content: '\2713\00a0';
  color: var(--lime-dim);
}
.invert .compliance-strip {
  border-color: var(--black-hair);
}
.invert .compliance-strip-cell {
  border-right-color: var(--black-hair);
}
.invert .compliance-strip-cell::before {
  color: var(--black-dim);
}


/* ═══════════════════════════════════════════════════
   CT LOG FEED
   ═══════════════════════════════════════════════════ */
.ctlog-feed {
  font-family: var(--mono);
  font-size: var(--text-sm);
  line-height: 1.9;
  font-variant-numeric: tabular-nums;
  width: 100%;
  border-collapse: collapse;
}
.ctlog-feed thead th {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--lime-hair);
  color: var(--lime-dim);
}
.ctlog-feed thead th:last-child {
  text-align: right;
}
.ctlog-feed tbody td {
  padding: var(--space-1) var(--space-3);
  color: var(--lime-dim);
}
.ctlog-feed tbody td:first-child {
  width: 4em;
  font-weight: 700;
  color: var(--lime);
}
.ctlog-feed tbody td:last-child {
  text-align: right;
}
.ctlog-feed tbody tr:hover td {
  color: var(--lime);
}


/* ═══════════════════════════════════════════════════
   HASH DECORATION
   ═══════════════════════════════════════════════════ */
.hash-deco {
  font-family: var(--mono);
  font-size: clamp(3.75rem, 9vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--lime-ghost);
  text-stroke: 1px var(--lime-ghost);
  word-break: break-all;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  user-select: none;
}


/* ═══════════════════════════════════════════════════
   STATUS INDICATOR
   ═══════════════════════════════════════════════════ */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: currentColor;
  flex-shrink: 0;
  animation: blink-step 1.4s steps(2, end) infinite;
}
@keyframes blink-step {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.status-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .16em;
}


/* ═══════════════════════════════════════════════════
   WORDMARK
   ═══════════════════════════════════════════════════ */
.wordmark {
  font-family: var(--mono);
  white-space: nowrap;
  color: inherit;
}
.wordmark .para   { font-weight: 400; }
.wordmark .suffix { font-weight: 700; }


/* ═══════════════════════════════════════════════════
   MOTION SAFETY
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .status-dot {
    animation: none;
    opacity: 1;
  }
}
