/* =====================================================================
 * pass.gawor.eu — jednorazowe sekrety
 * Estetyka: editorial / cypherpunk / paper-noir
 * Typografia: JetBrains Mono (fragmenty kodu) + Fraunces (display) +
 *             system serif jako fallback. Zaciągamy z @font-face local-only.
 * Paleta: tusz na surowym papierze, akcent uranowo-zielony.
 * ===================================================================== */

@font-face {
  font-family: 'Display';
  font-style: italic;
  font-weight: 400 900;
  src: local('Fraunces'), local('Fraunces-Italic'),
       local('Iowan Old Style Italic'), local('Georgia Italic');
  font-display: swap;
}
@font-face {
  font-family: 'Display';
  font-style: normal;
  font-weight: 400 900;
  src: local('Fraunces'), local('Iowan Old Style'),
       local('Georgia'), local('Times New Roman');
  font-display: swap;
}
@font-face {
  font-family: 'Mono';
  font-style: normal;
  font-weight: 400 700;
  src: local('JetBrains Mono'), local('IBM Plex Mono'),
       local('SF Mono'), local('Menlo'), local('Consolas');
  font-display: swap;
}

:root {
  --paper:        #efece4;       /* surowy papier */
  --paper-deep:   #e3dfd2;
  --ink:          #131210;       /* tusz */
  --ink-soft:     #2a2722;
  --rule:         #c8c2b1;
  --accent:       #2f6b3e;       /* zieleń uranowa */
  --accent-hot:   #d8421d;       /* cynober */
  --warn:         #b8881b;
  --shadow:       0 1px 0 rgba(19,18,16,.08), 0 12px 28px -16px rgba(19,18,16,.35);
  --max:          820px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #14130f;
    --paper-deep: #0c0b09;
    --ink:        #ece8db;
    --ink-soft:   #c9c3b1;
    --rule:       #2c2922;
    --accent:     #7ec38a;
    --accent-hot: #ee6b46;
    --warn:       #e6b347;
    --shadow:     0 1px 0 rgba(0,0,0,.4), 0 14px 30px -16px rgba(0,0,0,.7);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Display', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Ziarnista tekstura papieru (CSS-only) */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(rgba(0,0,0,.12) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.07) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}
@media (prefers-color-scheme: dark) {
  .grain { mix-blend-mode: screen; opacity: .07; }
}

.vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.18) 100%);
}
@media (prefers-color-scheme: dark) {
  .vignette { background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.55) 100%); }
}

/* ----- Header ----- */
.site {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
  transform: translateY(2px);
}
.brand__name {
  font-family: 'Mono', monospace;
  letter-spacing: .22em;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
.brand__sub {
  font-family: 'Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  opacity: .65;
}
.site__nav a {
  font-family: 'Mono', monospace;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: lowercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.site__nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ----- Main ----- */
.main {
  position: relative;
  z-index: 3;
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 56px) 80px;
}

/* ----- Hero ----- */
.hero { margin-bottom: 36px; }
.hero--tight { margin-bottom: 24px; }

.hero__eyebrow {
  font-family: 'Mono', monospace;
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero__title {
  font-family: 'Display', serif;
  font-weight: 500;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.hero__title--small { font-size: clamp(28px, 4.5vw, 44px); }

.hero__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.hero__strike {
  position: relative;
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 400;
}
.hero__strike::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%;
  top: 52%;
  height: 2px;
  background: var(--accent-hot);
  transform: rotate(-1.5deg);
  opacity: .85;
}

.hero__lede {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* ----- Card ----- */
.card {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: clamp(22px, 3vw, 36px);
  margin-top: 28px;
  position: relative;
  box-shadow: var(--shadow);
}
.card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--rule);
  pointer-events: none;
  opacity: .55;
}
.card > * { position: relative; }

/* ----- Form fields ----- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.field__label {
  font-family: 'Mono', monospace;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field__hint {
  font-family: 'Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
  opacity: .7;
  letter-spacing: .04em;
}

textarea, input[type="password"], input[type="text"], select {
  font-family: 'Mono', monospace;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  outline: none;
  width: 100%;
  border-radius: 0;
  transition: border-color .2s, box-shadow .2s;
}
textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}
textarea:focus, input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Mono', monospace;
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
  position: relative;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}
.btn:active { transform: translate(0, 0); box-shadow: 0 0 0 var(--accent); }

.btn--primary { width: 100%; padding: 16px 22px; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--danger {
  background: var(--accent-hot);
  border-color: var(--accent-hot);
  color: var(--paper);
}
.btn--danger:hover { box-shadow: 4px 4px 0 var(--ink); }

.btn__arrow { font-size: 16px; }

/* ----- Pillars ----- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; gap: 18px; }
}
.pillars h3 {
  font-family: 'Mono', monospace;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--accent);
}
.pillars p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.pillars code {
  font-family: 'Mono', monospace;
  background: var(--paper-deep);
  padding: 1px 5px;
  font-size: 12px;
  border: 1px solid var(--rule);
}

/* ----- Result ----- */
.card--result { background: var(--paper); }
.result__url {
  background: var(--ink);
  color: var(--paper);
  padding: 20px 18px;
  font-family: 'Mono', monospace;
  font-size: 14px;
  word-break: break-all;
  line-height: 1.55;
  position: relative;
  overflow: hidden;
}
.result__url::before {
  content: '$ ';
  color: var(--accent);
  font-weight: 700;
}
.result__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.result__actions .btn { flex: 1 1 auto; min-width: 160px; }
.result__warn {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 3px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  font-size: 14px;
  color: var(--ink-soft);
}
.result__warn code {
  font-family: 'Mono', monospace;
  background: var(--paper-deep);
  padding: 1px 5px;
}

/* ----- Reveal ----- */
.card--reveal { background: var(--paper); }
.reveal__box {
  background: var(--ink);
  padding: 22px 20px;
  position: relative;
  border-left: 4px solid var(--accent);
}
.reveal__box::before {
  content: 'PLAINTEXT — ZNISZCZONY NA SERWERZE';
  position: absolute;
  top: -10px; left: 12px;
  font-family: 'Mono', monospace;
  font-size: 10px;
  letter-spacing: .2em;
  background: var(--paper-deep);
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid var(--rule);
}
.reveal__box pre {
  margin: 0;
  font-family: 'Mono', monospace;
  font-size: 15px;
  color: #d6f4dd;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}
.reveal__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.reveal__actions .btn { flex: 1 1 auto; min-width: 180px; }

/* ----- Alerts ----- */
.alert {
  padding: 14px 16px;
  font-family: 'Mono', monospace;
  font-size: 13px;
  letter-spacing: .04em;
  margin: 16px 0;
  border-left: 3px solid var(--rule);
}
.alert--err { border-color: var(--accent-hot); background: color-mix(in srgb, var(--accent-hot) 10%, transparent); }
.alert--info { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ----- Empty ----- */
.card--empty p { font-family: 'Mono', monospace; font-size: 13px; color: var(--ink-soft); margin-top: 0; }
.card--empty ul {
  font-family: 'Mono', monospace;
  font-size: 13px;
  color: var(--ink-soft);
  padding-left: 20px;
  margin-bottom: 22px;
}
.card--empty li { margin: 4px 0; }

/* ----- Footer ----- */
.site__footer {
  position: relative;
  z-index: 3;
  padding: 24px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
}
.kbd {
  font-family: 'Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  margin-right: 6px;
  color: var(--ink-soft);
}
.muted { color: var(--ink-soft); font-family: 'Mono', monospace; font-size: 11px; letter-spacing: .08em; }
.muted--center { text-align: center; margin-top: 16px; }

/* ----- Prose (about) ----- */
.prose { max-width: 65ch; }
.prose h2 {
  font-family: 'Display', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 28px;
  margin-top: 38px;
  margin-bottom: 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}
.prose p, .prose ul, .prose ol { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.prose code {
  font-family: 'Mono', monospace;
  background: var(--paper-deep);
  padding: 2px 6px;
  font-size: 13px;
  border: 1px solid var(--rule);
}
.prose pre {
  background: var(--ink);
  color: var(--paper);
  padding: 16px;
  font-family: 'Mono', monospace;
  font-size: 13px;
  overflow-x: auto;
  line-height: 1.6;
  border-left: 3px solid var(--accent);
}
.prose pre code { background: transparent; border: 0; padding: 0; color: var(--paper); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ----- Selection ----- */
::selection {
  background: var(--accent);
  color: var(--paper);
}
