/* once.aegyrix.app — secure-terminal theme. CSP-safe: no external fonts/images. */

:root {
  --bg: #04060a;
  --bg-2: #070b12;
  --panel: rgba(10, 16, 24, 0.82);
  --field: #0a0f17;
  --ink: #d7f5ef;
  --muted: #6f8a92;
  --accent: #2ce8d6;          /* phosphor cyan — the single signature hue */
  --accent-deep: #0fb6ad;
  --warn: #ffb347;
  --danger: #ff5d6c;
  --line: rgba(44, 232, 214, 0.16);
  --line-soft: rgba(120, 160, 170, 0.14);
  --glow: 0 0 0 1px rgba(44, 232, 214, 0.18), 0 30px 80px -30px rgba(0, 0, 0, 0.9),
    0 0 60px -20px rgba(44, 232, 214, 0.35);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(44, 232, 214, 0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 110%, rgba(15, 182, 173, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
}

/* faint moving grid + scanlines, purely decorative */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 100%);
  opacity: 0.5;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.35;
  z-index: 2;
}

/* ------------------------------ terminal frame ------------------------------ */

.term {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--glow);
  overflow: hidden;
  z-index: 1;
  animation: boot-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* accent sweep across the top edge on load */
.term::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-100%);
  animation: sweep 1.6s ease-out 0.3s both;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.term__dots {
  display: inline-flex;
  gap: 7px;
}
.term__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1c2a2f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.term__dots i:nth-child(1) { background: #2a3a3f; }
.term__dots i:nth-child(2) { background: #2a3a3f; }
.term__dots i:nth-child(3) { background: #2a3a3f; }

.term__path {
  color: var(--accent);
  opacity: 0.85;
}

.term__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
}
.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
.led--warn {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
}

.term__body {
  padding: clamp(22px, 4.5vw, 38px);
}

/* staggered reveal of body sections on load */
.stack > * {
  animation: rise 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.stack > *:nth-child(1) { animation-delay: 0.18s; }
.stack > *:nth-child(2) { animation-delay: 0.30s; }
.stack > *:nth-child(3) { animation-delay: 0.42s; }
.stack > *:nth-child(4) { animation-delay: 0.54s; }

/* ------------------------------ masthead ------------------------------ */

.masthead {
  margin-bottom: 26px;
}
.wordmark {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 26px rgba(44, 232, 214, 0.35);
}
.cursor {
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
.tagline {
  margin: 14px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 0.95rem;
}
.tagline strong { color: var(--ink); }
.tagline .hot {
  color: var(--warn);
  font-weight: 600;
}

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

label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--accent);
  margin: 20px 0 8px;
}
.hint {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.hint em { color: var(--ink); font-style: normal; }

textarea,
input[type="text"],
input[type="password"],
select {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink);
  padding: 13px 14px;
  font-family: var(--mono);
  font-size: 0.92rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
textarea {
  resize: vertical;
  min-height: 96px;
}
::placeholder { color: #45585e; }

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 232, 214, 0.15), 0 0 22px -6px var(--accent);
}

select {
  appearance: none;
  cursor: pointer;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.btn {
  margin-top: 24px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #02110f;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  border: 0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 10px 30px -12px var(--accent);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px -12px var(--accent), 0 0 0 1px rgba(44, 232, 214, 0.4);
  filter: brightness(1.05);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.btn__glyph { font-size: 1.05em; line-height: 1; }

.btn--ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover {
  background: rgba(44, 232, 214, 0.07);
  box-shadow: inset 0 0 0 1px var(--accent);
  filter: none;
}
.btn--sm {
  margin-top: 10px;
  width: auto;
  padding: 9px 14px;
  font-size: 0.82rem;
}

/* passphrase field with an inline show/hide eye toggle */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 46px; }
.pass-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.pass-toggle:hover { opacity: 1; background: rgba(44, 232, 214, 0.08); }
.pass-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------ result / reveal ------------------------------ */

.result {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(44, 232, 214, 0.07), transparent 60%),
    var(--field);
  animation: armed 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.result label { margin-top: 0; }

.seal {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 14px;
}

/* reveal page: ember/burn treatment */
.result--burn {
  border-color: rgba(255, 179, 71, 0.35);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255, 93, 108, 0.10), transparent 55%),
    var(--field);
  animation: burn-in 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.seal--burn {
  color: var(--warn);
  border-color: rgba(255, 179, 71, 0.4);
  text-shadow: 0 0 14px rgba(255, 179, 71, 0.5);
}
#secret-out {
  color: var(--warn);
}

.link-box {
  display: flex;
  gap: 8px;
}
.link-box input {
  flex: 1;
  color: var(--accent);
}
.link-box .btn {
  margin: 0;
  width: auto;
  padding: 0 18px;
}

.note {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 14px 0 0;
}

.error {
  color: var(--danger);
  background: rgba(255, 93, 108, 0.08);
  border: 1px solid rgba(255, 93, 108, 0.32);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.86rem;
  animation: shake 0.4s ease both;
}

.status {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.86rem;
  margin-top: 14px;
}

/* ------------------------------ explainer / tips ------------------------------ */

.explain {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(10, 16, 24, 0.5);
  overflow: hidden;
}
.explain > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  -webkit-tap-highlight-color: transparent;
}
.explain > summary::-webkit-details-marker { display: none; }
.explain > summary::after {
  content: "▾";
  margin-left: auto;
  transition: transform 0.18s ease;
  opacity: 0.7;
}
.explain[open] > summary::after { transform: rotate(180deg); }
.explain > summary:hover { background: rgba(44, 232, 214, 0.05); }
.explain[open] > summary { border-bottom: 1px solid var(--line-soft); }
.explain__q {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #02110f;
  font-weight: 700;
  font-size: 0.72rem;
}
.steps {
  margin: 0;
  padding: 12px 18px 14px 34px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}
.steps li::marker {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}
.steps b { color: var(--ink); font-weight: 600; }

/* ------------------------------ photo attachments ------------------------------ */

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.thumbs:empty { display: none; }
.thumbs--reveal { margin-top: 16px; }

.thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.8);
}
.thumb-cell {
  position: relative;
  display: inline-flex;
}
.thumb-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--danger);
  color: #1a0306;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.thumb-remove:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.thumbs--reveal .thumb {
  width: 110px;
  height: 110px;
  border-color: rgba(255, 179, 71, 0.35);
}
.thumb-link {
  display: inline-flex;
  position: relative;
}
.thumb-link::after {
  content: "↓";
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #02110f;
  background: var(--accent);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.thumb-link:hover::after,
.thumb-link:focus-visible::after {
  opacity: 1;
}
/* touch devices have no hover — always show the download affordance */
@media (pointer: coarse) {
  .thumb-link::after { opacity: 1; }
}

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

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.meta span { position: relative; }
.meta span::before {
  content: "▰ ";
  color: var(--accent);
  opacity: 0.7;
}

.hidden { display: none !important; }

/* ------------------------------ keyframes ------------------------------ */

@keyframes boot-in {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sweep {
  to { transform: translateX(100%); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes armed {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes burn-in {
  0%   { opacity: 0; transform: translateY(10px); box-shadow: 0 0 0 0 rgba(255, 179, 71, 0); }
  40%  { box-shadow: 0 0 50px -8px rgba(255, 93, 108, 0.5); }
  100% { opacity: 1; transform: translateY(0); box-shadow: 0 0 0 0 rgba(255, 179, 71, 0); }
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  30%, 70% { transform: translateX(2px); }
  50% { transform: translateX(-2px); }
}

@media (max-width: 460px) {
  .row { grid-template-columns: 1fr; }
  .term__path { display: none; }
  /* 16px keeps iOS Safari from auto-zooming when a field gains focus */
  textarea,
  input[type="text"],
  input[type="password"],
  select { font-size: 16px; }
  .thumb { width: 72px; height: 72px; }
}

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

