/* TechLink Drop — Dark Tech-Noir, tokens copied from the main site (src/tokens.css) */

:root {
  --bg: #06070b;
  --bg-elev: #0b0d14;
  --ink: #e9ebf2;
  --ink-dim: #9aa1b5;
  --ink-faint: #848da6;
  --line: rgba(233, 235, 242, 0.08);

  --robotics: #3ee0ff;
  --ai: #9d7bff;
  --energy: #ffb43a;

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --space-unit: clamp(16px, 2.2vw, 28px);
  --radius: 2px;
}

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

/* author display rules must never beat the hidden attribute */
[hidden] {
  display: none !important;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* subtle starfield — two dot layers, no canvas needed */
  background-image:
    radial-gradient(1px 1px at 22px 34px, rgba(233, 235, 242, 0.13) 50%, transparent 51%),
    radial-gradient(1px 1px at 118px 92px, rgba(62, 224, 255, 0.09) 50%, transparent 51%),
    radial-gradient(1px 1px at 71px 151px, rgba(233, 235, 242, 0.07) 50%, transparent 51%);
  background-size: 190px 190px;
}

::selection {
  background: var(--robotics);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--robotics);
  outline-offset: 2px;
}

/* grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */

.shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px) calc(var(--space-unit) * 2);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ---------- header / wordmark ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: clamp(18px, 3vw, 30px) var(--space-unit);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.node {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  margin-left: 0.12em;
  background: var(--robotics);
  transform: translateY(-0.55em);
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(62, 224, 255, 0.8);
}

.head-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- kicker + hero ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--robotics);
  margin: calc(var(--space-unit) * 1.4) 0 14px;
}

.kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--robotics);
  flex: none;
}

h1 {
  font-size: clamp(30px, 5.4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 10px;
}

.lede {
  color: var(--ink-dim);
  font-weight: 500;
  max-width: 46ch;
  margin: 0 0 calc(var(--space-unit) * 1.4);
}

/* ---------- cards ---------- */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-top: 1px solid var(--robotics);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: var(--space-unit);
}

.card--ai {
  border-top-color: var(--ai);
}

.card--energy {
  border-top-color: var(--energy);
}

.card h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
}

/* ---------- dropzone ---------- */

.dropzone {
  border: 1px dashed rgba(233, 235, 242, 0.22);
  border-radius: var(--radius);
  padding: clamp(26px, 5vw, 44px) 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: transparent;
  width: 100%;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 15px;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--robotics);
  background: rgba(62, 224, 255, 0.04);
}

.dropzone strong {
  color: var(--ink);
  font-weight: 700;
}

.dropzone .hint {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.file-chip {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
}

.file-chip .size {
  color: var(--ink-faint);
  white-space: nowrap;
}

.file-chip .clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}

.file-chip .clear:hover {
  color: var(--robotics);
}

/* ---------- form rows ---------- */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: flex-end;
  margin-top: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > .label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* segmented TTL control */
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.seg button {
  appearance: none;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 9px 16px;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.seg button:last-child {
  border-right: none;
}

.seg button[aria-pressed='true'] {
  background: rgba(62, 224, 255, 0.1);
  color: var(--robotics);
}

/* burn toggle */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  user-select: none;
  padding-bottom: 8px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle .pill {
  width: 34px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  position: relative;
  flex: none;
  transition: border-color 0.12s ease;
}

.toggle .pill::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--ink-faint);
  border-radius: 1px;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.toggle input:checked + .pill {
  border-color: var(--energy);
}

.toggle input:checked + .pill::after {
  transform: translateX(16px);
  background: var(--energy);
  box-shadow: 0 0 8px rgba(255, 180, 58, 0.7);
}

.toggle input:focus-visible + .pill {
  outline: 2px solid var(--robotics);
  outline-offset: 2px;
}

/* passphrase input */
input[type='password'],
input[type='text'].mono-input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 12px;
  min-width: 200px;
}

input[type='password']::placeholder {
  color: var(--ink-faint);
}

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--robotics);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 26px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  box-shadow: 0 0 22px rgba(62, 224, 255, 0.4);
}

.btn:disabled {
  background: rgba(233, 235, 242, 0.12);
  color: var(--ink-faint);
  cursor: not-allowed;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}

.btn--ghost:hover {
  border-color: var(--robotics);
  color: var(--robotics);
  box-shadow: none;
}

/* ---------- progress ---------- */

.progress {
  margin-top: 22px;
  display: none;
}

.progress.is-active {
  display: block;
}

.progress .track {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.progress .bar {
  height: 100%;
  width: 0%;
  background: var(--robotics);
  box-shadow: 0 0 10px rgba(62, 224, 255, 0.7);
  transition: width 0.12s linear;
}

.progress .pct {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* ---------- status / result ---------- */

.status {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  min-height: 1.2em;
}

.status.is-error {
  color: var(--energy);
}

.result {
  display: none;
}

.result.is-visible {
  display: block;
}

.result .link-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}

.result .link-box {
  flex: 1 1 260px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--robotics);
  overflow-wrap: anywhere;
  user-select: all;
}

.result .meta-line {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* ---------- download page ---------- */

.drop-meta {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.drop-meta li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.drop-meta li:first-child {
  border-top: 1px solid var(--line);
}

.drop-meta .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex: none;
  padding-top: 2px;
}

.drop-meta .v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.burn-note {
  color: var(--energy);
}

.notfound {
  text-align: center;
  padding: 14px 0 6px;
}

.notfound .code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: calc(var(--space-unit) * 2);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.site-foot nav {
  display: flex;
  gap: 22px;
}

.site-foot a {
  color: var(--ink-dim);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--robotics);
}

/* ---------- responsive ---------- */

@media (max-width: 480px) {
  .row {
    align-items: stretch;
  }

  .field,
  .seg,
  input[type='password'] {
    width: 100%;
  }

  .seg button {
    flex: 1;
  }

  .btn {
    width: 100%;
  }

  .drop-meta li {
    flex-direction: column;
    gap: 4px;
  }

  .drop-meta .v {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
